Adds src/helper/formatters/frostFormatter.js — structured-envelope formatter parallel to the InfluxDB one. Produces dbase messages that a CoreSync collector can forward to FROST/SensorThings without coupling producing nodes to FROST HTTP details. Registered in formatters/index.js. Config additions in 4 node schemas (machineGroupControl, measurement, pumpingStation, rotatingMachine) expose the new dbase format option in the editor. Part of the CoreSync FROST handoff initiative — see superproject CORESYNC_FROST_INTERVIEW_HANDOFF.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
473 lines
15 KiB
JSON
473 lines
15 KiB
JSON
{
|
|
"general": {
|
|
"name": {
|
|
"default": "Rotating Machine",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "A human-readable name or label for this machine configuration."
|
|
}
|
|
},
|
|
"id": {
|
|
"default": null,
|
|
"rules": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "A unique identifier for this configuration. If not provided, defaults to null."
|
|
}
|
|
},
|
|
"unit": {
|
|
"default": "l/s",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "The default measurement unit for this configuration (e.g., 'meters', 'seconds', 'unitless')."
|
|
}
|
|
},
|
|
"logging": {
|
|
"logLevel": {
|
|
"default": "info",
|
|
"rules": {
|
|
"type": "enum",
|
|
"values": [
|
|
{
|
|
"value": "debug",
|
|
"description": "Log messages are printed for debugging purposes."
|
|
},
|
|
{
|
|
"value": "info",
|
|
"description": "Informational messages are printed."
|
|
},
|
|
{
|
|
"value": "warn",
|
|
"description": "Warning messages are printed."
|
|
},
|
|
{
|
|
"value": "error",
|
|
"description": "Error messages are printed."
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"enabled": {
|
|
"default": true,
|
|
"rules": {
|
|
"type": "boolean",
|
|
"description": "Indicates whether logging is active. If true, log messages will be generated."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"functionality": {
|
|
"softwareType": {
|
|
"default": "rotatingmachine",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "Specified software type for this configuration."
|
|
}
|
|
},
|
|
"role": {
|
|
"default": "RotationalDeviceController",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "Indicates the role this configuration plays within the system."
|
|
}
|
|
},
|
|
"positionVsParent":{
|
|
"default":"atEquipment",
|
|
"rules": {
|
|
"type": "enum",
|
|
"values": [
|
|
{
|
|
"value": "atEquipment",
|
|
"description": "The node is connected at the equipment level and is responsible for controlling or monitoring the equipment as a whole."
|
|
},
|
|
{
|
|
"value": "upstream",
|
|
"description": "The node is connected in a downstream position, indicating it is responsible for monitoring or controlling processes that occur after the equipment's operation, such as product flow or output."
|
|
},
|
|
{
|
|
"value": "downstream",
|
|
"description": "The node is connected in an upstream position, indicating it is responsible for monitoring or controlling processes that occur before the equipment's operation, such as input flow or supply."
|
|
}
|
|
],
|
|
"description": "Defines the position of the measurement relative to its parent equipment or system."
|
|
}
|
|
},
|
|
"distance": {
|
|
"default": null,
|
|
"rules": {
|
|
"type": "number",
|
|
"nullable": true,
|
|
"description": "Optional spatial offset from the parent equipment reference. Populated from the editor when hasDistance is enabled; null otherwise."
|
|
}
|
|
},
|
|
"distanceUnit": {
|
|
"default": "m",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "Unit for the functionality.distance offset (e.g. 'm', 'cm')."
|
|
}
|
|
},
|
|
"distanceDescription": {
|
|
"default": "",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "Free-text description of what the distance offset represents (e.g. 'cable length from control panel to motor')."
|
|
}
|
|
}
|
|
},
|
|
"output": {
|
|
"process": {
|
|
"default": "process",
|
|
"rules": {
|
|
"type": "enum",
|
|
"values": [
|
|
{ "value": "process", "description": "Delta-compressed process message (default)." },
|
|
{ "value": "json", "description": "Raw JSON payload." },
|
|
{ "value": "csv", "description": "CSV-formatted payload." }
|
|
],
|
|
"description": "Format of the process payload emitted on output port 0."
|
|
}
|
|
},
|
|
"dbase": {
|
|
"default": "influxdb",
|
|
"rules": {
|
|
"type": "enum",
|
|
"values": [
|
|
{ "value": "influxdb", "description": "InfluxDB line-protocol payload (default)." },
|
|
{ "value": "frost", "description": "FROST/SensorThings CoreSync payload." },
|
|
{ "value": "json", "description": "Raw JSON payload." },
|
|
{ "value": "csv", "description": "CSV-formatted payload." }
|
|
],
|
|
"description": "Format of the telemetry payload emitted on output port 1."
|
|
}
|
|
}
|
|
},
|
|
"asset": {
|
|
"uuid": {
|
|
"default": null,
|
|
"rules": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "A universally unique identifier for this asset. May be null if not assigned."
|
|
}
|
|
},
|
|
"tagCode":{
|
|
"default": null,
|
|
"rules": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "Asset tag code which is a unique identifier for this asset. May be null if not assigned."
|
|
}
|
|
},
|
|
"tagNumber": {
|
|
"default": null,
|
|
"rules": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "Optional asset tag number for legacy integrations."
|
|
}
|
|
},
|
|
"geoLocation": {
|
|
"default": {},
|
|
"rules": {
|
|
"type": "object",
|
|
"description": "An object representing the asset's physical coordinates or location.",
|
|
"schema": {
|
|
"x": {
|
|
"default": 0,
|
|
"rules": {
|
|
"type": "number",
|
|
"description": "X coordinate of the asset's location."
|
|
}
|
|
},
|
|
"y": {
|
|
"default": 0,
|
|
"rules": {
|
|
"type": "number",
|
|
"description": "Y coordinate of the asset's location."
|
|
}
|
|
},
|
|
"z": {
|
|
"default": 0,
|
|
"rules": {
|
|
"type": "number",
|
|
"description": "Z coordinate of the asset's location."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"model": {
|
|
"default": null,
|
|
"rules": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "Product model id (e.g. 'hidrostal-H05K-S03R'). Required at startup: the node looks the curve up via assetResolver.resolve('curves', model). Supplier/type/units are derived from the asset registry (assetResolver.resolveAssetMetadata) — do NOT save them on the node."
|
|
}
|
|
},
|
|
"unit": {
|
|
"default": null,
|
|
"rules": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "Deployment unit chosen by the user (e.g. 'm3/h'). Must appear in the registry's model.units list for this model. Validated at startup."
|
|
}
|
|
},
|
|
"curveUnits": {
|
|
"default": {
|
|
"pressure": "mbar",
|
|
"flow": "m3/h",
|
|
"power": "kW",
|
|
"control": "%"
|
|
},
|
|
"rules": {
|
|
"type": "object",
|
|
"schema": {
|
|
"pressure": {
|
|
"default": "mbar",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "Pressure unit used on the machine curve dimension axis."
|
|
}
|
|
},
|
|
"flow": {
|
|
"default": "m3/h",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "Flow unit used in the machine curve output (nq.y)."
|
|
}
|
|
},
|
|
"power": {
|
|
"default": "kW",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "Power unit used in the machine curve output (np.y)."
|
|
}
|
|
},
|
|
"control": {
|
|
"default": "%",
|
|
"rules": {
|
|
"type": "string",
|
|
"description": "Control axis unit used in the curve x-dimension."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"accuracy": {
|
|
"default": null,
|
|
"rules": {
|
|
"type": "number",
|
|
"nullable": true,
|
|
"description": "The accuracy of the machine or sensor, typically as a percentage or absolute value."
|
|
}
|
|
},
|
|
"machineCurve": {
|
|
"default": {
|
|
"nq": {},
|
|
"np": {}
|
|
},
|
|
"rules": {
|
|
"type": "machineCurve",
|
|
"description": "All machine curves must have a 'nq' and 'np' curve. nq stands for the flow curve, np stands for the power curve. Together they form the efficiency curve."
|
|
}
|
|
}
|
|
},
|
|
"mode": {
|
|
"current": {
|
|
"default": "auto",
|
|
"rules": {
|
|
"type": "enum",
|
|
"values": [
|
|
{
|
|
"value": "auto",
|
|
"description": "Machine accepts setpoints from a parent controller and runs autonomously."
|
|
},
|
|
{
|
|
"value": "virtualControl",
|
|
"description": "Controlled via GUI setpoints; ignores parent commands."
|
|
},
|
|
{
|
|
"value": "fysicalControl",
|
|
"description": "Controlled via physical buttons or switches; ignores external automated commands."
|
|
}
|
|
],
|
|
"description": "The operational mode of the machine."
|
|
}
|
|
},
|
|
"allowedActions":{
|
|
"default":{},
|
|
"rules": {
|
|
"type": "object",
|
|
"schema":{
|
|
"auto": {
|
|
"default": [
|
|
"statuscheck",
|
|
"execmovement",
|
|
"execsequence",
|
|
"flowmovement",
|
|
"emergencystop",
|
|
"entermaintenance"
|
|
],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Actions allowed in auto mode."
|
|
}
|
|
},
|
|
"virtualControl": {
|
|
"default": [
|
|
"statuscheck",
|
|
"execmovement",
|
|
"flowmovement",
|
|
"execsequence",
|
|
"emergencystop",
|
|
"exitmaintenance"
|
|
],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Actions allowed in virtualControl mode."
|
|
}
|
|
},
|
|
"fysicalControl": {
|
|
"default": [
|
|
"statuscheck",
|
|
"emergencystop",
|
|
"entermaintenance",
|
|
"exitmaintenance"
|
|
],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Actions allowed in fysicalControl mode."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "Information about valid command sources recognized by the machine."
|
|
},
|
|
"allowedSources":{
|
|
"default": {},
|
|
"rules": {
|
|
"type": "object",
|
|
"schema":{
|
|
"auto": {
|
|
"default": ["parent", "GUI", "fysical"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sources allowed in auto mode."
|
|
}
|
|
},
|
|
"virtualControl": {
|
|
"default": ["GUI", "fysical"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sources allowed in virtualControl mode."
|
|
}
|
|
},
|
|
"fysicalControl": {
|
|
"default": ["fysical"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sources allowed in fysicalControl mode."
|
|
}
|
|
}
|
|
},
|
|
"description": "Information about valid command sources recognized by the machine."
|
|
}
|
|
}
|
|
},
|
|
"source": {
|
|
"default": "parent",
|
|
"rules": {
|
|
"type": "enum",
|
|
"values": [
|
|
{
|
|
"value": "parent",
|
|
"description": "Commands are received from a parent controller."
|
|
},
|
|
{
|
|
"value": "GUI",
|
|
"description": "Commands are received from a graphical user interface."
|
|
},
|
|
{
|
|
"value": "fysical",
|
|
"description": "Commands are received from physical buttons or switches."
|
|
}
|
|
],
|
|
"description": "Information about valid command sources recognized by the machine."
|
|
}
|
|
},
|
|
"sequences":{
|
|
"default":{},
|
|
"rules": {
|
|
"type": "object",
|
|
"schema": {
|
|
"startup": {
|
|
"default": ["starting","warmingup","operational"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sequence of states for starting up the machine."
|
|
}
|
|
},
|
|
"shutdown": {
|
|
"default": ["stopping","coolingdown","idle"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sequence of states for shutting down the machine."
|
|
}
|
|
},
|
|
"emergencystop": {
|
|
"default": ["emergencystop","off"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sequence of states for an emergency stop."
|
|
}
|
|
},
|
|
"boot": {
|
|
"default": ["idle","starting","warmingup","operational"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sequence of states for booting up the machine."
|
|
}
|
|
},
|
|
"entermaintenance":{
|
|
"default": ["stopping","coolingdown","idle","maintenance"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sequence of states if the machine is running to put it in maintenance state"
|
|
}
|
|
},
|
|
"exitmaintenance":{
|
|
"default": ["off","idle"],
|
|
"rules": {
|
|
"type": "set",
|
|
"itemType": "string",
|
|
"description": "Sequence of states if the machine is running to put it in maintenance state"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "Predefined sequences of states for the machine."
|
|
|
|
},
|
|
"flowNumber": {
|
|
"default": 1,
|
|
"rules": {
|
|
"type": "number",
|
|
"nullable": false,
|
|
"description": "Defines which effluent flow of the parent node to handle."
|
|
}
|
|
}
|
|
}
|
|
|