{ "type": "translation_unit", "children": [ { "type": "preproc_ifdef", "children": [ { "type": "#ifndef", "text": "#ifndef" }, { "type": "identifier", "text": "RUNTIME_STATE_H" }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "RUNTIME_STATE_H" } ] }, { "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.h" }, { "type": "\"", "text": "\"" } ] } ] }, { "type": "preproc_def", "children": [ { "type": "#define", "text": "#define" }, { "type": "identifier", "text": "RUNTIME_STATE_TOTAL_HEATING_TIME_PID_COUNT" }, { "type": "preproc_arg", "text": "8\r" } ] }, { "type": "struct_specifier", "children": [ { "type": "struct", "text": "struct" }, { "type": "type_identifier", "text": "TempProfileRuntime" }, { "type": "field_declaration_list", "children": [ { "type": "{", "text": "{" }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "uint32_t" }, { "type": "field_identifier", "text": "elapsedSec" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "bool" }, { "type": "field_identifier", "text": "enabled" }, { "type": "=", "text": "=" }, { "type": "true", "text": "true" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "bool" }, { "type": "field_identifier", "text": "running" }, { "type": "=", "text": "=" }, { "type": "false", "text": "false" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "fromJSON" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "JsonObjectConst" }, { "type": "identifier", "text": "jsonObj" } ] }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "toJSON" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "JsonObject" }, { "type": "identifier", "text": "jsonObj" } ] }, { "type": ")", "text": ")" } ] }, { "type": "type_qualifier", "children": [ { "type": "const", "text": "const" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "}", "text": "}" } ] } ] }, { "type": ";", "text": ";" }, { "type": "struct_specifier", "children": [ { "type": "struct", "text": "struct" }, { "type": "type_identifier", "text": "OmronRuntime" }, { "type": "field_declaration_list", "children": [ { "type": "{", "text": "{" }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "uint8_t" }, { "type": "field_identifier", "text": "slaveId" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "bool" }, { "type": "field_identifier", "text": "enabled" }, { "type": "=", "text": "=" }, { "type": "true", "text": "true" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "fromJSON" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "JsonObjectConst" }, { "type": "identifier", "text": "jsonObj" } ] }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "toJSON" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "JsonObject" }, { "type": "identifier", "text": "jsonObj" } ] }, { "type": ")", "text": ")" } ] }, { "type": "type_qualifier", "children": [ { "type": "const", "text": "const" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "}", "text": "}" } ] } ] }, { "type": ";", "text": ";" }, { "type": "class_specifier", "children": [ { "type": "class", "text": "class" }, { "type": "type_identifier", "text": "RuntimeState" }, { "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": "declaration", "children": [ { "type": "function_declarator", "children": [ { "type": "identifier", "text": "RuntimeState" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "Component" }, { "type": "pointer_declarator", "children": [ { "type": "*", "text": "*" }, { "type": "identifier", "text": "parent" } ] } ] }, { "type": ",", "text": "," }, { "type": "optional_parameter_declaration", "children": [ { "type": "primitive_type", "text": "int" }, { "type": "identifier", "text": "id" }, { "type": "=", "text": "=" }, { "type": "identifier", "text": "COMPONENT_KEY_RUNTIME_STATE" } ] }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "type_identifier", "text": "TempProfileRuntime" }, { "type": "array_declarator", "children": [ { "type": "field_identifier", "text": "tempProfiles" }, { "type": "[", "text": "[" }, { "type": "identifier", "text": "PROFILE_TEMPERATURE_COUNT" }, { "type": "]", "text": "]" } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "type_identifier", "text": "OmronRuntime" }, { "type": "array_declarator", "children": [ { "type": "field_identifier", "text": "omronPids" }, { "type": "[", "text": "[" }, { "type": "identifier", "text": "NUM_OMRON_DEVICES" }, { "type": "]", "text": "]" } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "uint32_t" }, { "type": "field_identifier", "text": "totalKwh" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "uint32_t" }, { "type": "field_identifier", "text": "totalCents" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "uint32_t" }, { "type": "field_identifier", "text": "totalRuntimeHours" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "uint32_t" }, { "type": "field_identifier", "text": "totalHeatingTimeS" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "uint32_t" }, { "type": "array_declarator", "children": [ { "type": "field_identifier", "text": "totalHeatingTimePidS" }, { "type": "[", "text": "[" }, { "type": "identifier", "text": "RUNTIME_STATE_TOTAL_HEATING_TIME_PID_COUNT" }, { "type": "]", "text": "]" } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "uint32_t" }, { "type": "field_identifier", "text": "totalCycleCount" }, { "type": "=", "text": "=" }, { "type": "number_literal", "text": "0" }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "fromJSON" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "JsonVariantConst" }, { "type": "identifier", "text": "json" } ] }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "void" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "toJSON" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "parameter_declaration", "children": [ { "type": "type_identifier", "text": "JsonVariant" }, { "type": "identifier", "text": "json" } ] }, { "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": "load" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "optional_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": "filename" } ] }, { "type": "=", "text": "=" }, { "type": "identifier", "text": "RUNTIME_STATE_FILENAME" } ] }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "field_declaration", "children": [ { "type": "primitive_type", "text": "bool" }, { "type": "function_declarator", "children": [ { "type": "field_identifier", "text": "save" }, { "type": "parameter_list", "children": [ { "type": "(", "text": "(" }, { "type": "optional_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": "filename" } ] }, { "type": "=", "text": "=" }, { "type": "identifier", "text": "RUNTIME_STATE_FILENAME" } ] }, { "type": ")", "text": ")" } ] } ] }, { "type": ";", "text": ";" } ] }, { "type": "access_specifier", "children": [ { "type": "private", "text": "private" } ] }, { "type": ":", "text": ":" }, { "type": "}", "text": "}" } ] } ] }, { "type": ";", "text": ";" }, { "type": "#endif", "text": "#endif" } ] }, { "type": "comment", "text": "// RUNTIME_STATE_H " } ] }