Exemplo n.º 1
0
        /// <summary>
        /// 初始化终端解析器
        /// </summary>
        /// <param name="eventDlg">终端事件回调</param>
        public void Initialize()
        {
            this.isAnsiMode        = true;
            this.isApplicationMode = false;

            this.Keyboard = new VTKeyboard();
            this.Keyboard.SetAnsiMode(true);
            this.Keyboard.SetKeypadMode(false);

            this.unicodeText = new List <byte>();

            this.oscString = new StringBuilder();
            this.oscParam  = 0;

            this.intermediate = new List <byte>();
            this.parameters   = new List <int>();

            this.state = VTStates.Ground;   // 状态机默认设置为基态
        }
Exemplo n.º 2
0
 private void EnterDCSIntermediate()
 {
     this.state = VTStates.DCSIntermediate;
 }
Exemplo n.º 3
0
 private void EnterDCSParam()
 {
     this.state = VTStates.DCSParam;
 }
Exemplo n.º 4
0
 private void EnterDCSIgnore()
 {
     this.state = VTStates.DCSIgnore;
 }
Exemplo n.º 5
0
 private void EnterDCSEntry()
 {
     this.state = VTStates.DCSEntry;
     this.ActionClear();
 }
Exemplo n.º 6
0
 private void EnterOSCTermination()
 {
     this.state = VTStates.OSCTermination;
 }
Exemplo n.º 7
0
 private void EnterOSCString()
 {
     this.state = VTStates.OSCString;
 }
Exemplo n.º 8
0
 /// <summary>
 /// This state is entered whenever the C0 control ESC is received. This will immediately cancel any escape sequence, control sequence or control string in progress
 /// </summary>
 private void EnterEscape()
 {
     this.state = VTStates.Escape;
     // 根据https://vt100.net/emu/dec_ansi_parser#STDCSIGN这个网页上的表格,第一次进入Escape状态的时候需要做clear动作
     this.ActionClear();
 }
Exemplo n.º 9
0
 private void EnterCSIParam()
 {
     this.state = VTStates.CSIParam;
 }
Exemplo n.º 10
0
 private void EnterCSIIgnore()
 {
     this.state = VTStates.CSIIgnore;
 }
Exemplo n.º 11
0
 private void EnterCSIIntermediate()
 {
     this.state = VTStates.CSIIntermediate;
 }
Exemplo n.º 12
0
 private void EnterCSIEntry()
 {
     this.state = VTStates.CSIEntry;
     // 根据https://vt100.net/emu/dec_ansi_parser#STDCSIGN这个网页上的表格,第一次进入csi entry状态的时候需要做clear动作
     this.ActionClear();
 }
Exemplo n.º 13
0
 private void EnterGround()
 {
     this.state = VTStates.Ground;
 }
Exemplo n.º 14
0
 private void EnterEscapeIntermediate()
 {
     this.state = VTStates.EscapeIntermediate;
 }
Exemplo n.º 15
0
 private void EnterDCSPassThrough()
 {
     this.state = VTStates.DCSPassthrough;
 }
Exemplo n.º 16
0
 private void EnterVt52Param()
 {
     this.state = VTStates.Vt52Param;
 }
Exemplo n.º 17
0
 private void EnterOSCParam()
 {
     this.state = VTStates.OSCParam;
 }