firmware-base/cli-ts/ast/Logger.json

7698 lines
271 KiB
JSON

{
"type": "translation_unit",
"children": [
{
"type": "preproc_ifdef",
"children": [
{
"type": "#ifndef",
"text": "#ifndef"
},
{
"type": "identifier",
"text": "LOGGER_COMPONENT_H"
},
{
"type": "preproc_def",
"children": [
{
"type": "#define",
"text": "#define"
},
{
"type": "identifier",
"text": "LOGGER_COMPONENT_H"
}
]
},
{
"type": "preproc_include",
"children": [
{
"type": "#include",
"text": "#include"
},
{
"type": "system_lib_string",
"text": "<Arduino.h>"
}
]
},
{
"type": "preproc_include",
"children": [
{
"type": "#include",
"text": "#include"
},
{
"type": "system_lib_string",
"text": "<Component.h>"
}
]
},
{
"type": "preproc_include",
"children": [
{
"type": "#include",
"text": "#include"
},
{
"type": "system_lib_string",
"text": "<ArduinoLog.h>"
}
]
},
{
"type": "preproc_include",
"children": [
{
"type": "#include",
"text": "#include"
},
{
"type": "system_lib_string",
"text": "<modbus/ModbusTCP.h>"
}
]
},
{
"type": "preproc_include",
"children": [
{
"type": "#include",
"text": "#include"
},
{
"type": "system_lib_string",
"text": "<modbus/ModbusTypes.h>"
}
]
},
{
"type": "preproc_include",
"children": [
{
"type": "#include",
"text": "#include"
},
{
"type": "system_lib_string",
"text": "<Print.h>"
}
]
},
{
"type": "preproc_include",
"children": [
{
"type": "#include",
"text": "#include"
},
{
"type": "system_lib_string",
"text": "<esp_log.h>"
}
]
},
{
"type": "preproc_include",
"children": [
{
"type": "#include",
"text": "#include"
},
{
"type": "system_lib_string",
"text": "<macros.h>"
}
]
},
{
"type": "enum_specifier",
"children": [
{
"type": "enum",
"text": "enum"
},
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "enumerator_list",
"children": [
{
"type": "{",
"text": "{"
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "L_SILENT"
},
{
"type": "=",
"text": "="
},
{
"type": "number_literal",
"text": "0"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "L_FATAL"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "L_ERROR"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "L_WARNING"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "L_LEVEL_INFO"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "L_TRACE"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "L_VERBOSE"
}
]
},
{
"type": "}",
"text": "}"
}
]
}
]
},
{
"type": ";",
"text": ";"
},
{
"type": "enum_specifier",
"children": [
{
"type": "enum",
"text": "enum"
},
{
"type": "type_identifier",
"text": "LogTargetType"
},
{
"type": "enumerator_list",
"children": [
{
"type": "{",
"text": "{"
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "TARGET_TYPE_PRINT"
},
{
"type": "=",
"text": "="
},
{
"type": "number_literal",
"text": "0"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "TARGET_TYPE_WEBSOCKET"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "TARGET_TYPE_FILE"
}
]
},
{
"type": "}",
"text": "}"
}
]
}
]
},
{
"type": ";",
"text": ";"
},
{
"type": "enum_specifier",
"children": [
{
"type": "enum",
"text": "enum"
},
{
"type": "type_identifier",
"text": "LogTargetMask"
},
{
"type": "enumerator_list",
"children": [
{
"type": "{",
"text": "{"
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "TARGET_MASK_PRINT"
},
{
"type": "=",
"text": "="
},
{
"type": "call_expression",
"children": [
{
"type": "identifier",
"text": "__BV"
},
{
"type": "argument_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "identifier",
"text": "TARGET_TYPE_PRINT"
},
{
"type": ")",
"text": ")"
}
]
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "TARGET_MASK_WEBSOCKET"
},
{
"type": "=",
"text": "="
},
{
"type": "call_expression",
"children": [
{
"type": "identifier",
"text": "__BV"
},
{
"type": "argument_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "identifier",
"text": "TARGET_TYPE_WEBSOCKET"
},
{
"type": ")",
"text": ")"
}
]
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "TARGET_MASK_FILE"
},
{
"type": "=",
"text": "="
},
{
"type": "call_expression",
"children": [
{
"type": "identifier",
"text": "__BV"
},
{
"type": "argument_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "identifier",
"text": "TARGET_TYPE_FILE"
},
{
"type": ")",
"text": ")"
}
]
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "TARGET_MASK_ALL"
},
{
"type": "=",
"text": "="
},
{
"type": "binary_expression",
"children": [
{
"type": "binary_expression",
"children": [
{
"type": "identifier",
"text": "TARGET_MASK_PRINT"
},
{
"type": "|",
"text": "|"
},
{
"type": "identifier",
"text": "TARGET_MASK_WEBSOCKET"
}
]
},
{
"type": "|",
"text": "|"
},
{
"type": "identifier",
"text": "TARGET_MASK_FILE"
}
]
}
]
},
{
"type": "}",
"text": "}"
}
]
}
]
},
{
"type": ";",
"text": ";"
},
{
"type": "enum_specifier",
"children": [
{
"type": "enum",
"text": "enum"
},
{
"type": "class",
"text": "class"
},
{
"type": "type_identifier",
"text": "E_Logger_MB_Offset"
},
{
"type": ":",
"text": ":"
},
{
"type": "type_identifier",
"text": "ushort"
},
{
"type": "enumerator_list",
"children": [
{
"type": "{",
"text": "{"
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "MB_LOG_LEVEL"
},
{
"type": "=",
"text": "="
},
{
"type": "number_literal",
"text": "0"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "COIL_TARGET_PRINT"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "COIL_TARGET_WEBSOCKET"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "COIL_TARGET_FILE"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "enumerator",
"children": [
{
"type": "identifier",
"text": "COUNT"
}
]
},
{
"type": "}",
"text": "}"
}
]
}
]
},
{
"type": ";",
"text": ";"
},
{
"type": "class_specifier",
"children": [
{
"type": "class",
"text": "class"
},
{
"type": "type_identifier",
"text": "ILogTarget"
},
{
"type": "field_declaration_list",
"children": [
{
"type": "{",
"text": "{"
},
{
"type": "access_specifier",
"children": [
{
"type": "public",
"text": "public"
}
]
},
{
"type": ":",
"text": ":"
},
{
"type": "function_definition",
"children": [
{
"type": "virtual",
"text": "virtual"
},
{
"type": "function_declarator",
"children": [
{
"type": "destructor_name",
"children": [
{
"type": "~",
"text": "~"
},
{
"type": "identifier",
"text": "ILogTarget"
}
]
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": "default_method_clause",
"children": [
{
"type": "=",
"text": "="
},
{
"type": "default",
"text": "default"
},
{
"type": ";",
"text": ";"
}
]
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "virtual",
"text": "virtual"
},
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "log"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "identifier",
"text": "level"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "message"
}
]
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": "=",
"text": "="
},
{
"type": "number_literal",
"text": "0"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "function_definition",
"children": [
{
"type": "virtual",
"text": "virtual"
},
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "setLevel"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "identifier",
"text": "level"
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": "compound_statement",
"children": [
{
"type": "{",
"text": "{"
},
{
"type": "expression_statement",
"children": [
{
"type": "assignment_expression",
"children": [
{
"type": "identifier",
"text": "_level"
},
{
"type": "=",
"text": "="
},
{
"type": "identifier",
"text": "level"
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "}",
"text": "}"
}
]
}
]
},
{
"type": "function_definition",
"children": [
{
"type": "virtual",
"text": "virtual"
},
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "getLevel"
},
{
"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": "identifier",
"text": "_level"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "}",
"text": "}"
}
]
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "virtual",
"text": "virtual"
},
{
"type": "type_identifier",
"text": "LogTargetType"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "getType"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": ")",
"text": ")"
}
]
},
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
}
]
},
{
"type": "=",
"text": "="
},
{
"type": "number_literal",
"text": "0"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "access_specifier",
"children": [
{
"type": "protected",
"text": "protected"
}
]
},
{
"type": ":",
"text": ":"
},
{
"type": "field_declaration",
"children": [
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "field_identifier",
"text": "_level"
},
{
"type": "=",
"text": "="
},
{
"type": "identifier",
"text": "L_VERBOSE"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "}",
"text": "}"
}
]
}
]
},
{
"type": ";",
"text": ";"
},
{
"type": "class_specifier",
"children": [
{
"type": "class",
"text": "class"
},
{
"type": "type_identifier",
"text": "RESTServer"
}
]
},
{
"type": ";",
"text": ";"
},
{
"type": "comment",
"text": "// Forward declaration"
},
{
"type": "class_specifier",
"children": [
{
"type": "class",
"text": "class"
},
{
"type": "type_identifier",
"text": "WebSocketTarget"
}
]
},
{
"type": ";",
"text": ";"
},
{
"type": "comment",
"text": "// Forward declaration"
},
{
"type": "class_specifier",
"children": [
{
"type": "class",
"text": "class"
},
{
"type": "type_identifier",
"text": "FileTarget"
}
]
},
{
"type": ";",
"text": ";"
},
{
"type": "comment",
"text": "// Forward declaration"
},
{
"type": "comment",
"text": "// -----------------------------------------------------------------------------"
},
{
"type": "comment",
"text": "// Configuration macros ---------------------------------------------------------"
},
{
"type": "comment",
"text": "// -----------------------------------------------------------------------------"
},
{
"type": "preproc_ifdef",
"children": [
{
"type": "#ifndef",
"text": "#ifndef"
},
{
"type": "identifier",
"text": "LOG_BUFFER_LINES"
},
{
"type": "preproc_def",
"children": [
{
"type": "#define",
"text": "#define"
},
{
"type": "identifier",
"text": "LOG_BUFFER_LINES"
},
{
"type": "preproc_arg",
"text": "100"
}
]
},
{
"type": "#endif",
"text": "#endif"
}
]
},
{
"type": "preproc_ifdef",
"children": [
{
"type": "#ifndef",
"text": "#ifndef"
},
{
"type": "identifier",
"text": "LOG_BUFFER_LINE_LENGTH"
},
{
"type": "preproc_def",
"children": [
{
"type": "#define",
"text": "#define"
},
{
"type": "identifier",
"text": "LOG_BUFFER_LINE_LENGTH"
},
{
"type": "preproc_arg",
"text": "120"
}
]
},
{
"type": "#endif",
"text": "#endif"
}
]
},
{
"type": "preproc_ifdef",
"children": [
{
"type": "#ifndef",
"text": "#ifndef"
},
{
"type": "identifier",
"text": "LOG_BUFFER_THREAD_SAFE"
},
{
"type": "comment",
"text": "// #define LOG_BUFFER_THREAD_SAFE 1"
},
{
"type": "#endif",
"text": "#endif"
}
]
},
{
"type": "alias_declaration",
"children": [
{
"type": "using",
"text": "using"
},
{
"type": "type_identifier",
"text": "LogRingBuffer"
},
{
"type": "=",
"text": "="
},
{
"type": "type_descriptor",
"children": [
{
"type": "primitive_type",
"text": "char"
},
{
"type": "abstract_array_declarator",
"children": [
{
"type": "abstract_array_declarator",
"children": [
{
"type": "[",
"text": "["
},
{
"type": "identifier",
"text": "LOG_BUFFER_LINES"
},
{
"type": "]",
"text": "]"
}
]
},
{
"type": "[",
"text": "["
},
{
"type": "identifier",
"text": "LOG_BUFFER_LINE_LENGTH"
},
{
"type": "]",
"text": "]"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "class_specifier",
"children": [
{
"type": "class",
"text": "class"
},
{
"type": "type_identifier",
"text": "Logger"
},
{
"type": "base_class_clause",
"children": [
{
"type": ":",
"text": ":"
},
{
"type": "access_specifier",
"children": [
{
"type": "public",
"text": "public"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": ",",
"text": ","
},
{
"type": "access_specifier",
"children": [
{
"type": "public",
"text": "public"
}
]
},
{
"type": "type_identifier",
"text": "Print"
}
]
},
{
"type": "field_declaration_list",
"children": [
{
"type": "{",
"text": "{"
},
{
"type": "access_specifier",
"children": [
{
"type": "public",
"text": "public"
}
]
},
{
"type": ":",
"text": ":"
},
{
"type": "declaration",
"children": [
{
"type": "function_declarator",
"children": [
{
"type": "identifier",
"text": "Logger"
},
{
"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": "componentId"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "ushort"
},
{
"type": "identifier",
"text": "modbusAddress"
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "declaration",
"children": [
{
"type": "function_declarator",
"children": [
{
"type": "destructor_name",
"children": [
{
"type": "~",
"text": "~"
},
{
"type": "identifier",
"text": "Logger"
}
]
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "comment",
"text": "// --- Component Overrides (Optional) ---"
},
{
"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": "comment",
"text": "// --- Modbus Overrides ---"
},
{
"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": "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": "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": "value"
}
]
},
{
"type": ")",
"text": ")"
}
]
},
{
"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": "comment",
"text": "// --- Logging ---"
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "setLevel"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "identifier",
"text": "level"
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "setTargetMask"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "primitive_type",
"text": "uint8_t"
},
{
"type": "identifier",
"text": "mask"
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "uint8_t"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "getTargetMask"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": ")",
"text": ")"
}
]
},
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "bool"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "addTarget"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "ILogTarget"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "target"
}
]
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "bool"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "addPrintTarget"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "Print"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "output"
}
]
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "bool"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "addWebSocketTarget"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "RESTServer"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "server"
}
]
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "bool"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "addFileTarget"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "log"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "identifier",
"text": "level"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "log"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "identifier",
"text": "level"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "fatal"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "fatal"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "error"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "error"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "warn"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "warn"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "info"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "info"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "trace"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "trace"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "verbose"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "verbose"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "comment",
"text": "// Overloads for String"
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "log"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "identifier",
"text": "level"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "fatal"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "error"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "warn"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "info"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "trace"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "verbose"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "comment",
"text": "// Overloads without sender context"
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "fatal"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "fatal"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "error"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "error"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "warn"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "warn"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "info"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "info"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "trace"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "trace"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "verbose"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "verbose"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "__FlashStringHelper"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "comment",
"text": "// Overloads without sender context for String"
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "fatal"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "error"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "warn"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "info"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "trace"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "verbose"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "String"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "format"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "...",
"text": "..."
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "comment",
"text": "// --- Ring Buffer ---"
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "setOutput"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "Print"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "out"
}
]
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "clear"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "getLine"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "primitive_type",
"text": "size_t"
},
{
"type": "identifier",
"text": "i"
}
]
},
{
"type": ")",
"text": ")"
}
]
},
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "size_t"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "lines"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": ")",
"text": ")"
}
]
},
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "attachToEspLog"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "size_t"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "write"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "primitive_type",
"text": "uint8_t"
},
{
"type": "identifier",
"text": "c"
}
]
},
{
"type": ")",
"text": ")"
}
]
},
{
"type": "virtual_specifier",
"children": [
{
"type": "override",
"text": "override"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "size_t"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "write"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "uint8_t"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "data"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "primitive_type",
"text": "size_t"
},
{
"type": "identifier",
"text": "size"
}
]
},
{
"type": ")",
"text": ")"
}
]
},
{
"type": "virtual_specifier",
"children": [
{
"type": "override",
"text": "override"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "access_specifier",
"children": [
{
"type": "private",
"text": "private"
}
]
},
{
"type": ":",
"text": ":"
},
{
"type": "comment",
"text": "// --- Ring Buffer ---"
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "appendChar"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "primitive_type",
"text": "char"
},
{
"type": "identifier",
"text": "c"
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "commitLine"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "size_t"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "writeByte"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "primitive_type",
"text": "char"
},
{
"type": "identifier",
"text": "c"
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "storage_class_specifier",
"children": [
{
"type": "static",
"text": "static"
}
]
},
{
"type": "primitive_type",
"text": "int"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "vprintfShim"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "fmt"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "va_list"
},
{
"type": "identifier",
"text": "args"
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "storage_class_specifier",
"children": [
{
"type": "static",
"text": "static"
}
]
},
{
"type": "type_identifier",
"text": "Logger"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "field_identifier",
"text": "s_esp_log_instance"
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "comment",
"text": "// --- New logging system ---"
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "dispatch"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "type_identifier",
"text": "Component"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "sender"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "identifier",
"text": "level"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "message"
}
]
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "void"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "dispatch"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "identifier",
"text": "level"
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "message"
}
]
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "function_declarator",
"children": [
{
"type": "field_identifier",
"text": "parseLevelFromPrefix"
},
{
"type": "parameter_list",
"children": [
{
"type": "(",
"text": "("
},
{
"type": "parameter_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "char"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "identifier",
"text": "message"
}
]
}
]
},
{
"type": ",",
"text": ","
},
{
"type": "parameter_declaration",
"children": [
{
"type": "primitive_type",
"text": "int"
},
{
"type": "reference_declarator",
"children": [
{
"type": "&",
"text": "&"
},
{
"type": "identifier",
"text": "prefixLen"
}
]
}
]
},
{
"type": ")",
"text": ")"
}
]
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "sized_type_specifier",
"children": [
{
"type": "unsigned",
"text": "unsigned"
},
{
"type": "long",
"text": "long"
}
]
},
{
"type": "field_identifier",
"text": "_logInterval"
},
{
"type": "=",
"text": "="
},
{
"type": "number_literal",
"text": "50"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "comment",
"text": "// Rate limit interval in ms"
},
{
"type": "field_declaration",
"children": [
{
"type": "sized_type_specifier",
"children": [
{
"type": "unsigned",
"text": "unsigned"
},
{
"type": "long",
"text": "long"
}
]
},
{
"type": "field_identifier",
"text": "_lastLogTime"
},
{
"type": "=",
"text": "="
},
{
"type": "number_literal",
"text": "0"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "uint8_t"
},
{
"type": "field_identifier",
"text": "_targetMask"
},
{
"type": "=",
"text": "="
},
{
"type": "identifier",
"text": "TARGET_MASK_ALL"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "type_identifier",
"text": "LogLevel"
},
{
"type": "field_identifier",
"text": "_level"
},
{
"type": "=",
"text": "="
},
{
"type": "identifier",
"text": "L_VERBOSE"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "storage_class_specifier",
"children": [
{
"type": "static",
"text": "static"
}
]
},
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "primitive_type",
"text": "uint8_t"
},
{
"type": "field_identifier",
"text": "MAX_TARGETS"
},
{
"type": "=",
"text": "="
},
{
"type": "number_literal",
"text": "4"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "type_identifier",
"text": "ILogTarget"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "array_declarator",
"children": [
{
"type": "field_identifier",
"text": "_targets"
},
{
"type": "[",
"text": "["
},
{
"type": "identifier",
"text": "MAX_TARGETS"
},
{
"type": "]",
"text": "]"
}
]
}
]
},
{
"type": "initializer_list",
"children": [
{
"type": "{",
"text": "{"
},
{
"type": "}",
"text": "}"
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "uint8_t"
},
{
"type": "field_identifier",
"text": "_numTargets"
},
{
"type": "=",
"text": "="
},
{
"type": "number_literal",
"text": "0"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "type_identifier",
"text": "LogRingBuffer"
},
{
"type": "field_identifier",
"text": "_buf"
},
{
"type": "initializer_list",
"children": [
{
"type": "{",
"text": "{"
},
{
"type": "}",
"text": "}"
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "size_t"
},
{
"type": "field_identifier",
"text": "_head"
},
{
"type": "=",
"text": "="
},
{
"type": "number_literal",
"text": "0U"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "size_t"
},
{
"type": "field_identifier",
"text": "_filled"
},
{
"type": "=",
"text": "="
},
{
"type": "number_literal",
"text": "0U"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "char"
},
{
"type": "array_declarator",
"children": [
{
"type": "field_identifier",
"text": "_line"
},
{
"type": "[",
"text": "["
},
{
"type": "identifier",
"text": "LOG_BUFFER_LINE_LENGTH"
},
{
"type": "]",
"text": "]"
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "primitive_type",
"text": "size_t"
},
{
"type": "field_identifier",
"text": "_idx"
},
{
"type": "=",
"text": "="
},
{
"type": "number_literal",
"text": "0U"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "preproc_if",
"children": [
{
"type": "#if",
"text": "#if"
},
{
"type": "identifier",
"text": "LOG_BUFFER_THREAD_SAFE"
},
{
"type": "\n",
"text": "\n"
},
{
"type": "field_declaration",
"children": [
{
"type": "type_identifier",
"text": "portMUX_TYPE"
},
{
"type": "field_identifier",
"text": "_mux"
},
{
"type": "=",
"text": "="
},
{
"type": "identifier",
"text": "portMUX_INITIALIZER_UNLOCKED"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "#endif",
"text": "#endif"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "type_identifier",
"text": "WebSocketTarget"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "field_identifier",
"text": "_webSocketTarget"
}
]
},
{
"type": "=",
"text": "="
},
{
"type": "null",
"children": [
{
"type": "nullptr",
"text": "nullptr"
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "type_identifier",
"text": "FileTarget"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "field_identifier",
"text": "_fileTarget"
}
]
},
{
"type": "=",
"text": "="
},
{
"type": "null",
"children": [
{
"type": "nullptr",
"text": "nullptr"
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "const",
"text": "const"
}
]
},
{
"type": "sized_type_specifier",
"children": [
{
"type": "short",
"text": "short"
}
]
},
{
"type": "field_identifier",
"text": "modbusAddress"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "type_identifier",
"text": "MB_Registers"
},
{
"type": "array_declarator",
"children": [
{
"type": "field_identifier",
"text": "m_modbus_block"
},
{
"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_Logger_MB_Offset"
},
{
"type": "::",
"text": "::"
},
{
"type": "identifier",
"text": "COUNT"
}
]
}
]
},
{
"type": "]",
"text": "]"
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "type_qualifier",
"children": [
{
"type": "mutable",
"text": "mutable"
}
]
},
{
"type": "type_identifier",
"text": "ModbusBlockView"
},
{
"type": "field_identifier",
"text": "m_modbus_view"
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "field_declaration",
"children": [
{
"type": "type_identifier",
"text": "ModbusTCP"
},
{
"type": "pointer_declarator",
"children": [
{
"type": "*",
"text": "*"
},
{
"type": "field_identifier",
"text": "modbusTCP"
}
]
},
{
"type": ";",
"text": ";"
}
]
},
{
"type": "}",
"text": "}"
}
]
}
]
},
{
"type": ";",
"text": ";"
},
{
"type": "#endif",
"text": "#endif"
}
]
}
]
}