2766 lines
119 KiB
JSON
2766 lines
119 KiB
JSON
{
|
|
"type": "translation_unit",
|
|
"children": [
|
|
{
|
|
"type": "preproc_ifdef",
|
|
"children": [
|
|
{
|
|
"type": "#ifndef",
|
|
"text": "#ifndef"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "PRESS_CYLINDER_H"
|
|
},
|
|
{
|
|
"type": "preproc_def",
|
|
"children": [
|
|
{
|
|
"type": "#define",
|
|
"text": "#define"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "PRESS_CYLINDER_H"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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": "<ArduinoJson.h>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "preproc_ifdef",
|
|
"children": [
|
|
{
|
|
"type": "#ifdef",
|
|
"text": "#ifdef"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "ENABLE_PRESS_CYLINDER"
|
|
},
|
|
{
|
|
"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": "<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": "<ValueWrapper.h>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "preproc_include",
|
|
"children": [
|
|
{
|
|
"type": "#include",
|
|
"text": "#include"
|
|
},
|
|
{
|
|
"type": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "components/Loadcell.h"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "preproc_include",
|
|
"children": [
|
|
{
|
|
"type": "#include",
|
|
"text": "#include"
|
|
},
|
|
{
|
|
"type": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "components/Solenoid.h"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "preproc_include",
|
|
"children": [
|
|
{
|
|
"type": "#include",
|
|
"text": "#include"
|
|
},
|
|
{
|
|
"type": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "components/Joystick.h"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "comment",
|
|
"text": "// Default pressure thresholds for states\r"
|
|
},
|
|
{
|
|
"type": "preproc_def",
|
|
"children": [
|
|
{
|
|
"type": "#define",
|
|
"text": "#define"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "PRESS_CYLINDER_DEFAULT_HOMING_THRESHOLD"
|
|
},
|
|
{
|
|
"type": "preproc_arg",
|
|
"text": "10\r"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "preproc_def",
|
|
"children": [
|
|
{
|
|
"type": "#define",
|
|
"text": "#define"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "PRESS_CYLINDER_DEFAULT_PRESSING_THRESHOLD"
|
|
},
|
|
{
|
|
"type": "preproc_arg",
|
|
"text": "50\r"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "preproc_def",
|
|
"children": [
|
|
{
|
|
"type": "#define",
|
|
"text": "#define"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "PRESS_CYLINDER_DEFAULT_HIGHLOAD_THRESHOLD"
|
|
},
|
|
{
|
|
"type": "preproc_arg",
|
|
"text": "600\r"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "preproc_def",
|
|
"children": [
|
|
{
|
|
"type": "#define",
|
|
"text": "#define"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "PRESS_CYLINDER_DEFAULT_MAXLOAD_THRESHOLD"
|
|
},
|
|
{
|
|
"type": "preproc_arg",
|
|
"text": "900\r"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "class_specifier",
|
|
"children": [
|
|
{
|
|
"type": "class",
|
|
"text": "class"
|
|
},
|
|
{
|
|
"type": "type_identifier",
|
|
"text": "PressCylinder"
|
|
},
|
|
{
|
|
"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": "type_identifier",
|
|
"text": "E_MB_Offset"
|
|
},
|
|
{
|
|
"type": "enumerator_list",
|
|
"children": [
|
|
{
|
|
"type": "{",
|
|
"text": "{"
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "MB_OFS_HR_TARGET_SP"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "0"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "MB_OFS_COIL_ENABLED"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "1"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "MB_OFS_HR_MODE"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "2"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "MB_OFS_HR_PV"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "3"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "MB_OFS_HR_STATE"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "4"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "MB_OFS_HR_CMD"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "5"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "MB_OFS_COUNT"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "6"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "}",
|
|
"text": "}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "enum_specifier",
|
|
"children": [
|
|
{
|
|
"type": "enum",
|
|
"text": "enum"
|
|
},
|
|
{
|
|
"type": "type_identifier",
|
|
"text": "E_Mode"
|
|
},
|
|
{
|
|
"type": "enumerator_list",
|
|
"children": [
|
|
{
|
|
"type": "{",
|
|
"text": "{"
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "MODE_MANUAL"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "0"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "MODE_AUTO"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "1"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "}",
|
|
"text": "}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "enum_specifier",
|
|
"children": [
|
|
{
|
|
"type": "enum",
|
|
"text": "enum"
|
|
},
|
|
{
|
|
"type": "type_identifier",
|
|
"text": "E_State"
|
|
},
|
|
{
|
|
"type": "enumerator_list",
|
|
"children": [
|
|
{
|
|
"type": "{",
|
|
"text": "{"
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "STATE_IDLE"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "0"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "STATE_HOMING"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "1"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "STATE_PRESSING"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "2"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "STATE_HIGHLOAD"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "3"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "enumerator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "STATE_MAXLOAD"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "number_literal",
|
|
"text": "4"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "}",
|
|
"text": "}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "struct_specifier",
|
|
"children": [
|
|
{
|
|
"type": "struct",
|
|
"text": "struct"
|
|
},
|
|
{
|
|
"type": "type_identifier",
|
|
"text": "Settings"
|
|
},
|
|
{
|
|
"type": "field_declaration_list",
|
|
"children": [
|
|
{
|
|
"type": "{",
|
|
"text": "{"
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "primitive_type",
|
|
"text": "uint32_t"
|
|
},
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "homing_threshold"
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "primitive_type",
|
|
"text": "uint32_t"
|
|
},
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "pressing_threshold"
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "primitive_type",
|
|
"text": "uint32_t"
|
|
},
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "highload_threshold"
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "primitive_type",
|
|
"text": "uint32_t"
|
|
},
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "maxload_threshold"
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "function_definition",
|
|
"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_qualifier",
|
|
"children": [
|
|
{
|
|
"type": "const",
|
|
"text": "const"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "type_identifier",
|
|
"text": "JsonVariant"
|
|
},
|
|
{
|
|
"type": "reference_declarator",
|
|
"children": [
|
|
{
|
|
"type": "&",
|
|
"text": "&"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "doc"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ")",
|
|
"text": ")"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "compound_statement",
|
|
"children": [
|
|
{
|
|
"type": "{",
|
|
"text": "{"
|
|
},
|
|
{
|
|
"type": "expression_statement",
|
|
"children": [
|
|
{
|
|
"type": "assignment_expression",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "homing_threshold"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "binary_expression",
|
|
"children": [
|
|
{
|
|
"type": "subscript_expression",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "doc"
|
|
},
|
|
{
|
|
"type": "subscript_argument_list",
|
|
"children": [
|
|
{
|
|
"type": "[",
|
|
"text": "["
|
|
},
|
|
{
|
|
"type": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "homing_threshold"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "]",
|
|
"text": "]"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "|",
|
|
"text": "|"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "PRESS_CYLINDER_DEFAULT_HOMING_THRESHOLD"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "expression_statement",
|
|
"children": [
|
|
{
|
|
"type": "assignment_expression",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "pressing_threshold"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "binary_expression",
|
|
"children": [
|
|
{
|
|
"type": "subscript_expression",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "doc"
|
|
},
|
|
{
|
|
"type": "subscript_argument_list",
|
|
"children": [
|
|
{
|
|
"type": "[",
|
|
"text": "["
|
|
},
|
|
{
|
|
"type": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "pressing_threshold"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "]",
|
|
"text": "]"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "|",
|
|
"text": "|"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "PRESS_CYLINDER_DEFAULT_PRESSING_THRESHOLD"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "expression_statement",
|
|
"children": [
|
|
{
|
|
"type": "assignment_expression",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "highload_threshold"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "binary_expression",
|
|
"children": [
|
|
{
|
|
"type": "subscript_expression",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "doc"
|
|
},
|
|
{
|
|
"type": "subscript_argument_list",
|
|
"children": [
|
|
{
|
|
"type": "[",
|
|
"text": "["
|
|
},
|
|
{
|
|
"type": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "highload_threshold"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "]",
|
|
"text": "]"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "|",
|
|
"text": "|"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "PRESS_CYLINDER_DEFAULT_HIGHLOAD_THRESHOLD"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "expression_statement",
|
|
"children": [
|
|
{
|
|
"type": "assignment_expression",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "maxload_threshold"
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "binary_expression",
|
|
"children": [
|
|
{
|
|
"type": "subscript_expression",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "doc"
|
|
},
|
|
{
|
|
"type": "subscript_argument_list",
|
|
"children": [
|
|
{
|
|
"type": "[",
|
|
"text": "["
|
|
},
|
|
{
|
|
"type": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "maxload_threshold"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "]",
|
|
"text": "]"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "|",
|
|
"text": "|"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "PRESS_CYLINDER_DEFAULT_MAXLOAD_THRESHOLD"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "}",
|
|
"text": "}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "function_definition",
|
|
"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": "doc"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ")",
|
|
"text": ")"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "type_qualifier",
|
|
"children": [
|
|
{
|
|
"type": "const",
|
|
"text": "const"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "compound_statement",
|
|
"children": [
|
|
{
|
|
"type": "{",
|
|
"text": "{"
|
|
},
|
|
{
|
|
"type": "expression_statement",
|
|
"children": [
|
|
{
|
|
"type": "assignment_expression",
|
|
"children": [
|
|
{
|
|
"type": "subscript_expression",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "doc"
|
|
},
|
|
{
|
|
"type": "subscript_argument_list",
|
|
"children": [
|
|
{
|
|
"type": "[",
|
|
"text": "["
|
|
},
|
|
{
|
|
"type": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "homing_threshold"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "]",
|
|
"text": "]"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "homing_threshold"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "expression_statement",
|
|
"children": [
|
|
{
|
|
"type": "assignment_expression",
|
|
"children": [
|
|
{
|
|
"type": "subscript_expression",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "doc"
|
|
},
|
|
{
|
|
"type": "subscript_argument_list",
|
|
"children": [
|
|
{
|
|
"type": "[",
|
|
"text": "["
|
|
},
|
|
{
|
|
"type": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "pressing_threshold"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "]",
|
|
"text": "]"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "pressing_threshold"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "expression_statement",
|
|
"children": [
|
|
{
|
|
"type": "assignment_expression",
|
|
"children": [
|
|
{
|
|
"type": "subscript_expression",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "doc"
|
|
},
|
|
{
|
|
"type": "subscript_argument_list",
|
|
"children": [
|
|
{
|
|
"type": "[",
|
|
"text": "["
|
|
},
|
|
{
|
|
"type": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "highload_threshold"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "]",
|
|
"text": "]"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "highload_threshold"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "expression_statement",
|
|
"children": [
|
|
{
|
|
"type": "assignment_expression",
|
|
"children": [
|
|
{
|
|
"type": "subscript_expression",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "doc"
|
|
},
|
|
{
|
|
"type": "subscript_argument_list",
|
|
"children": [
|
|
{
|
|
"type": "[",
|
|
"text": "["
|
|
},
|
|
{
|
|
"type": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "maxload_threshold"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "]",
|
|
"text": "]"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "maxload_threshold"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "}",
|
|
"text": "}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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": "sized_type_specifier",
|
|
"children": [
|
|
{
|
|
"type": "short",
|
|
"text": "short"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "modbusAddress"
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "type_identifier",
|
|
"text": "Loadcell"
|
|
},
|
|
{
|
|
"type": "pointer_declarator",
|
|
"children": [
|
|
{
|
|
"type": "*",
|
|
"text": "*"
|
|
},
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "_loadcell"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "type_identifier",
|
|
"text": "Solenoid"
|
|
},
|
|
{
|
|
"type": "pointer_declarator",
|
|
"children": [
|
|
{
|
|
"type": "*",
|
|
"text": "*"
|
|
},
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "_solenoid"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "type_identifier",
|
|
"text": "Joystick"
|
|
},
|
|
{
|
|
"type": "pointer_declarator",
|
|
"children": [
|
|
{
|
|
"type": "*",
|
|
"text": "*"
|
|
},
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "_joystick"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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": "uint16_t"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ">",
|
|
"text": ">"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "targetSP"
|
|
},
|
|
{
|
|
"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": "uint16_t"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ">",
|
|
"text": ">"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "mode"
|
|
},
|
|
{
|
|
"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": "uint16_t"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ">",
|
|
"text": ">"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "state"
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "type_identifier",
|
|
"text": "Settings"
|
|
},
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "_settings"
|
|
},
|
|
{
|
|
"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": "identifier",
|
|
"text": "MB_OFS_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": "access_specifier",
|
|
"children": [
|
|
{
|
|
"type": "public",
|
|
"text": "public"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ":",
|
|
"text": ":"
|
|
},
|
|
{
|
|
"type": "declaration",
|
|
"children": [
|
|
{
|
|
"type": "function_declarator",
|
|
"children": [
|
|
{
|
|
"type": "identifier",
|
|
"text": "PressCylinder"
|
|
},
|
|
{
|
|
"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": "sized_type_specifier",
|
|
"children": [
|
|
{
|
|
"type": "short",
|
|
"text": "short"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "id"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "parameter_declaration",
|
|
"children": [
|
|
{
|
|
"type": "sized_type_specifier",
|
|
"children": [
|
|
{
|
|
"type": "short",
|
|
"text": "short"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "mbAddress"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "parameter_declaration",
|
|
"children": [
|
|
{
|
|
"type": "type_identifier",
|
|
"text": "Loadcell"
|
|
},
|
|
{
|
|
"type": "pointer_declarator",
|
|
"children": [
|
|
{
|
|
"type": "*",
|
|
"text": "*"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "loadcell"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "parameter_declaration",
|
|
"children": [
|
|
{
|
|
"type": "type_identifier",
|
|
"text": "Solenoid"
|
|
},
|
|
{
|
|
"type": "pointer_declarator",
|
|
"children": [
|
|
{
|
|
"type": "*",
|
|
"text": "*"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "solenoid"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ",",
|
|
"text": ","
|
|
},
|
|
{
|
|
"type": "optional_parameter_declaration",
|
|
"children": [
|
|
{
|
|
"type": "type_identifier",
|
|
"text": "Joystick"
|
|
},
|
|
{
|
|
"type": "pointer_declarator",
|
|
"children": [
|
|
{
|
|
"type": "*",
|
|
"text": "*"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "joystick"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "null",
|
|
"children": [
|
|
{
|
|
"type": "nullptr",
|
|
"text": "nullptr"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ")",
|
|
"text": ")"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "function_definition",
|
|
"children": [
|
|
{
|
|
"type": "function_declarator",
|
|
"children": [
|
|
{
|
|
"type": "destructor_name",
|
|
"children": [
|
|
{
|
|
"type": "~",
|
|
"text": "~"
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "PressCylinder"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "parameter_list",
|
|
"children": [
|
|
{
|
|
"type": "(",
|
|
"text": "("
|
|
},
|
|
{
|
|
"type": ")",
|
|
"text": ")"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "virtual_specifier",
|
|
"children": [
|
|
{
|
|
"type": "override",
|
|
"text": "override"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "default_method_clause",
|
|
"children": [
|
|
{
|
|
"type": "=",
|
|
"text": "="
|
|
},
|
|
{
|
|
"type": "default",
|
|
"text": "default"
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "primitive_type",
|
|
"text": "bool"
|
|
},
|
|
{
|
|
"type": "function_declarator",
|
|
"children": [
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "loadSettings"
|
|
},
|
|
{
|
|
"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": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "/press_cylinder.json"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ")",
|
|
"text": ")"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "field_declaration",
|
|
"children": [
|
|
{
|
|
"type": "primitive_type",
|
|
"text": "bool"
|
|
},
|
|
{
|
|
"type": "function_declarator",
|
|
"children": [
|
|
{
|
|
"type": "field_identifier",
|
|
"text": "saveSettings"
|
|
},
|
|
{
|
|
"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": "string_literal",
|
|
"children": [
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
},
|
|
{
|
|
"type": "string_content",
|
|
"text": "/press_cylinder.json"
|
|
},
|
|
{
|
|
"type": "\"",
|
|
"text": "\""
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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": "mb_tcp_write"
|
|
},
|
|
{
|
|
"type": "parameter_list",
|
|
"children": [
|
|
{
|
|
"type": "(",
|
|
"text": "("
|
|
},
|
|
{
|
|
"type": "parameter_declaration",
|
|
"children": [
|
|
{
|
|
"type": "sized_type_specifier",
|
|
"children": [
|
|
{
|
|
"type": "short",
|
|
"text": "short"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "address"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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": "sized_type_specifier",
|
|
"children": [
|
|
{
|
|
"type": "short",
|
|
"text": "short"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "identifier",
|
|
"text": "address"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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": "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": "}",
|
|
"text": "}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": ";",
|
|
"text": ";"
|
|
},
|
|
{
|
|
"type": "#endif",
|
|
"text": "#endif"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "comment",
|
|
"text": "// ENABLE_PRESS_CYLINDER\r"
|
|
},
|
|
{
|
|
"type": "#endif",
|
|
"text": "#endif"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "comment",
|
|
"text": "// PRESS_CYLINDER_H "
|
|
}
|
|
]
|
|
} |