/// <summary> /// - Processes a character event into an Action that occurs while in the DcsIntermediate state. /// Events in this state will: /// 1. Ignore C0 control characters /// 2. Ignore Delete characters /// 3. Collect intermediate data. /// 4. Begin to ignore all remaining intermediates when an invalid character is detected (DcsIgnore) /// 5. Dispatch the Final character in preparation for parsing the data string /// </summary> /// <param name="ch"></param> private void EventDCSIntermediate(byte ch) { if (ASCIIChars.IsC0Code(ch)) { this.ActionIgnore(ch); } else if (ASCIIChars.IsDelete(ch)) { this.ActionIgnore(ch); } else if (ASCIIChars.IsIntermediate(ch)) { this.ActionCollect(ch); } else if (ASCIIChars.IsIntermediateInvalid(ch)) { this.EnterDCSIgnore(); } else { this.ActionDCSDispatch(ch); } }
/// <summary> /// Processes a character event into an Action that occurs while in the CsiIgnore state. /// Events in this state will: /// 1. Execute C0 control characters /// 2. Ignore Delete characters /// 3. Collect Intermediate characters /// 4. Begin to ignore all remaining parameters when an invalid character is detected (CsiIgnore) /// 5. Return to Ground /// </summary> /// <param name="ch"></param> private void EventCSIIgnore(byte ch) { if (ASCIIChars.IsC0Code(ch)) { this.ActionExecute(ch); } else if (ASCIIChars.IsDelete(ch)) { this.ActionIgnore(ch); } else if (ASCIIChars.IsIntermediate(ch)) { this.ActionIgnore(ch); } else if (ASCIIChars.IsIntermediateInvalid(ch)) { this.ActionIgnore(ch); } else { this.EnterGround(); } }