{ "type": "translation_unit", "children": [ { "type": "preproc_ifdef", "children": [ { "type": "#ifndef", "text": "#ifndef" }, { "type": "identifier", "text": "OPERATOR_SWITCH_H" }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "OPERATOR_SWITCH_H" } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "system_lib_string", "text": "" } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "string_literal", "children": [ { "type": "\"", "text": "\"" }, { "type": "string_content", "text": "config.h" }, { "type": "\"", "text": "\"" } ] } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "system_lib_string", "text": "" } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "system_lib_string", "text": "" } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "system_lib_string", "text": "" } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "string_literal", "children": [ { "type": "\"", "text": "\"" }, { "type": "string_content", "text": "config-modbus.h" }, { "type": "\"", "text": "\"" } ] } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "system_lib_string", "text": "" } ] }, { "type": "preproc_include", "children": [ { "type": "#include", "text": "#include" }, { "type": "string_literal", "children": [ { "type": "\"", "text": "\"" }, { "type": "string_content", "text": "ValueWrapper.h" }, { "type": "\"", "text": "\"" } ] } ] }, { "type": "class_specifier", "children": [ { "type": "class", "text": "class" }, { "type": "type_identifier", "text": "Bridge" } ] }, { "type": ";", "text": ";" }, { "type": "class_specifier", "children": [ { "type": "class", "text": "class" }, { "type": "type_identifier", "text": "OperatorSwitch" }, { "type": "base_class_clause", "children": [ { "type": ":", "text": ":" }, { "type": "access_specifier", "children": [ { "type": "public", "text": "public" } ] }, { "type": "type_identifier", "text": "Component" } ] }, { "type": "field_declaration_list", "children": [ { "type": "{", "text": "{" }, { "type": "access_specifier", "children": [ { "type": "public", "text": "public" } ] }, { "type": ":", "text": ":" }, { "type": "field_declaration", "children": [ { "type": "enum_specifier", "children": [ { "type": "enum", "text": "enum" }, { "type": "class", "text": "class" }, { "type": "type_identifier", "text": "State" }, { "type": ":", "text": ":" }, { "type": "type_identifier", "text": "ushort" }, { "type": "enumerator_list", "children": [ { "type": "{", "text": "{" }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "IDLE" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "STOP_PRESSED" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "CYCLE_PRESSED" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "BOTH_PRESSED" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "STOP_HELD" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "CYCLE_HELD" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "BOTH_HELD" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "UNKNOWN" } ] }, { "type": "}", "text": "}" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "enum_specifier", "children": [ { "type": "enum", "text": "enum" }, { "type": "class", "text": "class" }, { "type": "type_identifier", "text": "E_MB_Offset" }, { "type": ":", "text": ":" }, { "type": "type_identifier", "text": "ushort" }, { "type": "enumerator_list", "children": [ { "type": "{", "text": "{" }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "STATE" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "COIL_STOP" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "COIL_CYCLE" } ] }, { "type": ",", "text": "," }, { "type": "enumerator", "children": [ { "type": "identifier", "text": "COUNT" } ] }, { "type": "}", "text": "}" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "access_specifier", "children": [ { "type": "private", "text": "private" } ] }, { "type": ":", "text": ":" }, { "type": "field_declaration", "children": [ { "type": "type_qualifier", "children": [ { "type": "const", "text": "const" } ] }, { "type": "type_identifier", "text": "ushort" }, { "type": "field_identifier", "text": "pinStop" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "type_qualifier", "children": [ { "type": "const", "text": "const" } ] }, { "type": "type_identifier", "text": "ushort" }, { "type": "field_identifier", "text": "pinCycle" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "type_qualifier", "children": [ { "type": "const", "text": "const" } ] }, { "type": "type_identifier", "text": "ushort" }, { "type": "field_identifier", "text": "modbusAddr" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "bool" }, { "type": "field_identifier", "text": "stateOverride" }, { "type": "=", "text": "=" }, { "type": "false", "text": "false" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "template_type", "children": [ { "type": "type_identifier", "text": "ValueWrapper" }, { "type": "template_argument_list", "children": [ { "type": "<", "text": "<" }, { "type": "type_descriptor", "children": [ { "type": "primitive_type", "text": "bool" } ] }, { "type": ">", "text": ">" } ] } ] }, { "type": "field_identifier", "text": "stopCoil" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "template_type", "children": [ { "type": "type_identifier", "text": "ValueWrapper" }, { "type": "template_argument_list", "children": [ { "type": "<", "text": "<" }, { "type": "type_descriptor", "children": [ { "type": "primitive_type", "text": "bool" } ] }, { "type": ">", "text": ">" } ] } ] }, { "type": "field_identifier", "text": "cycleCoil" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "template_type", "children": [ { "type": "type_identifier", "text": "ValueWrapper" }, { "type": "template_argument_list", "children": [ { "type": "<", "text": "<" }, { "type": "type_descriptor", "children": [ { "type": "type_identifier", "text": "State" } ] }, { "type": ">", "text": ">" } ] } ] }, { "type": "field_identifier", "text": "stateWrapper" }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// Timing for hold detection\r" }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "unsigned", "text": "unsigned" }, { "type": "long", "text": "long" } ] }, { "type": "field_identifier", "text": "pressStartTime" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "bool" }, { "type": "field_identifier", "text": "holdEventTriggered" }, { "type": "=", "text": "=" }, { "type": "false", "text": "false" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "type_identifier", "text": "State" }, { "type": "field_identifier", "text": "pendingState" }, { "type": "=", "text": "=" }, { "type": "qualified_identifier", "children": [ { "type": "namespace_identifier", "text": "State" }, { "type": "::", "text": "::" }, { "type": "identifier", "text": "IDLE" } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "unsigned", "text": "unsigned" }, { "type": "long", "text": "long" } ] }, { "type": "field_identifier", "text": "pendingStateStartTime" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// Modbus definitions\r" }, { "type": "field_declaration", "children": [ { "type": "type_identifier", "text": "MB_Registers" }, { "type": "array_declarator", "children": [ { "type": "field_identifier", "text": "modbusBlocks" }, { "type": "[", "text": "[" }, { "type": "cast_expression", "children": [ { "type": "(", "text": "(" }, { "type": "type_descriptor", "children": [ { "type": "type_identifier", "text": "ushort" } ] }, { "type": ")", "text": ")" }, { "type": "qualified_identifier", "children": [ { "type": "namespace_identifier", "text": "E_MB_Offset" }, { "type": "::", "text": "::" }, { "type": "identifier", "text": "COUNT" } ] } ] }, { "type": "]", "text": "]" } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "type_identifier", "text": "ModbusBlockView" }, { "type": "field_identifier", "text": "modbusView" }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// Private helpers\r" }, { "type": "access_specifier", "children": [ { "type": "public", "text": "public" } ] }, { "type": ":", "text": ":" }, { "type": "declaration", "children": [ { "type": "function_declarator", "children": [ { "type": "identifier", "text": "OperatorSwitch" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "Component" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "owner" } ] } ] }, { "type": ",", "text": "," }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "ushort" }, { "type": "identifier", "text": "_pinStop" } ] }, { "type": ",", "text": "," }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "ushort" }, { "type": "identifier", "text": "_pinCycle" } ] }, { "type": ",", "text": "," }, { "type": "parameter_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "identifier", "text": "_id" } ] }, { "type": ",", "text": "," }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "ushort" }, { "type": "identifier", "text": "_modbusAddress" } ] }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "setup" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "loop" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "info" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "optional_parameter_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "identifier", "text": "val0" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" } ] }, { "type": ",", "text": "," }, { "type": "optional_parameter_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "identifier", "text": "val1" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" } ] }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "function_definition", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "debug" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": "compound_statement", "children": [ { "type": "{", "text": "{" }, { "type": "return_statement", "children": [ { "type": "return", "text": "return" }, { "type": "call_expression", "children": [ { "type": "identifier", "text": "info" }, { "type": "argument_list", "children": [ { "type": "(", "text": "(" }, { "type": "number_literal", "text": "0" }, { "type": ",", "text": "," }, { "type": "number_literal", "text": "0" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "}", "text": "}" } ] } ] }, { "type": "function_definition", "children": [ { "type": "type_identifier", "text": "State" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "getState" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "type_qualifier", "children": [ { "type": "const", "text": "const" } ] } ] }, { "type": "compound_statement", "children": [ { "type": "{", "text": "{" }, { "type": "return_statement", "children": [ { "type": "return", "text": "return" }, { "type": "call_expression", "children": [ { "type": "field_expression", "children": [ { "type": "identifier", "text": "stateWrapper" }, { "type": ".", "text": "." }, { "type": "field_identifier", "text": "get" } ] }, { "type": "argument_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "}", "text": "}" } ] } ] }, { "type": "function_definition", "children": [ { "type": "type_identifier", "text": "ushort" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "getValue" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "type_qualifier", "children": [ { "type": "const", "text": "const" } ] } ] }, { "type": "compound_statement", "children": [ { "type": "{", "text": "{" }, { "type": "return_statement", "children": [ { "type": "return", "text": "return" }, { "type": "call_expression", "children": [ { "type": "template_function", "children": [ { "type": "identifier", "text": "static_cast" }, { "type": "template_argument_list", "children": [ { "type": "<", "text": "<" }, { "type": "type_descriptor", "children": [ { "type": "type_identifier", "text": "ushort" } ] }, { "type": ">", "text": ">" } ] } ] }, { "type": "argument_list", "children": [ { "type": "(", "text": "(" }, { "type": "call_expression", "children": [ { "type": "identifier", "text": "getState" }, { "type": "argument_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] } ] }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "}", "text": "}" } ] } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "unsigned", "text": "unsigned" }, { "type": "long", "text": "long" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "getPressDuration" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "type_qualifier", "children": [ { "type": "const", "text": "const" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "mb_tcp_write" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "MB_Registers" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "reg" } ] } ] }, { "type": ",", "text": "," }, { "type": "parameter_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "identifier", "text": "networkValue" } ] }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "mb_tcp_read" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "MB_Registers" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "reg" } ] } ] }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "mb_tcp_register" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "ModbusTCP" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "manager" } ] } ] }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "type_identifier", "text": "ModbusBlockView" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "mb_tcp_blocks" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "type_qualifier", "children": [ { "type": "const", "text": "const" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "uint16_t" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "mb_tcp_base_address" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "type_qualifier", "children": [ { "type": "const", "text": "const" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "serial_register" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "Bridge" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "bridge" } ] } ] }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "sized_type_specifier", "children": [ { "type": "short", "text": "short" } ] }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "onMessage" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "primitive_type", "text": "int" }, { "type": "identifier", "text": "id" } ] }, { "type": ",", "text": "," }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "E_CALLS" }, { "type": "identifier", "text": "verb" } ] }, { "type": ",", "text": "," }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "E_MessageFlags" }, { "type": "identifier", "text": "flags" } ] }, { "type": ",", "text": "," }, { "type": "optional_parameter_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "user" } ] }, { "type": "=", "text": "=" }, { "type": "null", "children": [ { "type": "nullptr", "text": "nullptr" } ] } ] }, { "type": ",", "text": "," }, { "type": "optional_parameter_declaration", "children": [ { "type": "type_identifier", "text": "Component" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "src" } ] }, { "type": "=", "text": "=" }, { "type": "null", "children": [ { "type": "nullptr", "text": "nullptr" } ] } ] }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "access_specifier", "children": [ { "type": "protected", "text": "protected" } ] }, { "type": ":", "text": ":" }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "notifyStateChange" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": ")", "text": ")" } ] }, { "type": "virtual_specifier", "children": [ { "type": "override", "text": "override" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "comment", "text": "// Configuration\r" }, { "type": "field_declaration", "children": [ { "type": "storage_class_specifier", "children": [ { "type": "static", "text": "static" } ] }, { "type": "type_qualifier", "children": [ { "type": "constexpr", "text": "constexpr" } ] }, { "type": "type_identifier", "text": "ushort" }, { "type": "field_identifier", "text": "PRESS_TIME_MS" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "150" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "storage_class_specifier", "children": [ { "type": "static", "text": "static" } ] }, { "type": "type_qualifier", "children": [ { "type": "constexpr", "text": "constexpr" } ] }, { "type": "type_identifier", "text": "ushort" }, { "type": "field_identifier", "text": "HOLD_TIME_MS" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "2000" }, { "type": ";", "text": ";" } ] }, { "type": "}", "text": "}" } ] } ] }, { "type": ";", "text": ";" }, { "type": "#endif", "text": "#endif" } ] }, { "type": "comment", "text": "// OPERATOR_SWITCH_H " } ] }