* Check if DCS (Device Control String) sequence is complete * DCS sequences: ESC P ... ST (where ST is ESC \) * Used for XTVersion responses like ESC P >| ... ESC \
(data: string)
| 148 | * Used for XTVersion responses like ESC P >| ... ESC \ |
| 149 | */ |
| 150 | function isCompleteDcsSequence(data: string): "complete" | "incomplete" { |
| 151 | if (!data.startsWith(`${ESC}P`)) { |
| 152 | return "complete"; |
| 153 | } |
| 154 | |
| 155 | // DCS sequences end with ST (ESC \) |
| 156 | if (data.endsWith(`${ESC}\\`)) { |
| 157 | return "complete"; |
| 158 | } |
| 159 | |
| 160 | return "incomplete"; |
| 161 | } |
| 162 | |
| 163 | /** |
| 164 | * Check if APC (Application Program Command) sequence is complete |
no outgoing calls
no test coverage detected