Add ApcParser

This commit is contained in:
Anthony Kim
2026-01-21 08:31:07 -08:00
parent 14b6a71391
commit 48df6117ed
7 changed files with 754 additions and 28 deletions
+18 -2
View File
@@ -20,7 +20,8 @@ export const enum ParserState {
DCS_PARAM = 10,
DCS_IGNORE = 11,
DCS_INTERMEDIATE = 12,
DCS_PASSTHROUGH = 13
DCS_PASSTHROUGH = 13,
APC_STRING = 14
}
/**
@@ -41,7 +42,10 @@ export const enum ParserAction {
CLEAR = 11,
DCS_HOOK = 12,
DCS_PUT = 13,
DCS_UNHOOK = 14
DCS_UNHOOK = 14,
APC_START = 15,
APC_PUT = 16,
APC_END = 17
}
/**
@@ -54,5 +58,17 @@ export const enum OscState {
ABORT = 3
}
// I actually don't know if below is correct..
// If it is.. it seems like dup of OscState.
/**
* Internal states of ApcParser.
*/
export const enum ApcState {
START = 0,
ID = 1,
PAYLOAD = 2,
ABORT = 3
}
// payload limit for OSC and DCS
export const PAYLOAD_LIMIT = 10000000;