diff --git a/AGV/AGV-v1.json b/AGV/AGV-v1.json new file mode 100644 index 0000000..78b9a96 --- /dev/null +++ b/AGV/AGV-v1.json @@ -0,0 +1,94 @@ +{ + "$id": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/AGV/AGV-v1.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "Schema_UUID": { + "const": "dce8a007-6a64-41d2-9851-89451e871613" + }, + "Instance_UUID": { + "description": "The unique identifier for this object. (A UUID specified by RFC4122).", + "type": "string", + "format": "uuid" + }, + "Device_Information": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Device_Information-v1.json" + }, + "Emergency_Stops": { + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Cell/Emergency_Stop-v1.json" + } + }, + "type": "object" + }, + "Position": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Pose-v1.json" + }, + "Velocity": { + "type": "object", + "properties": { + "Linear": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": "" + }, + "Sparkplug_Type": { + "enum": [ + "FloatLE", + "FloatBE", + "DoubleLE", + "DoubleBE" + ] + } + } + } + ] + }, + "Angular": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": "" + }, + "Sparkplug_Type": { + "enum": [ + "FloatLE", + "FloatBE", + "DoubleLE", + "DoubleBE" + ] + } + } + } + ] + } + }, + "required": [] + }, + "Current_Job": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/AGV/Job-v1.json" + }, + "Job_Queue": { + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/AGV/Job-v1.json" + } + }, + "type": "object" + } + }, + "required": [ + "Schema_UUID", + "Instance_UUID" + ] +} diff --git a/AGV/Job-v1.json b/AGV/Job-v1.json new file mode 100644 index 0000000..356f555 --- /dev/null +++ b/AGV/Job-v1.json @@ -0,0 +1,230 @@ +{ + "$id": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/AGV/Job-v1.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "Schema_UUID": { + "const": "0fb61e8d-a6ca-4907-9a14-ff11ec857fd9" + }, + "Instance_UUID": { + "description": "The unique identifier for this object. (A UUID specified by RFC4122).", + "type": "string", + "format": "uuid" + }, + "Name": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": null + }, + "Sparkplug_Type": { + "enum": [ + "String" + ] + } + } + } + ] + }, + "ID": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": null + }, + "Sparkplug_Type": { + "enum": [ + "String", + "UInt8", + "UInt16LE", + "UInt16BE", + "UInt32LE", + "UInt32BE", + "UInt64LE", + "UInt64BE" + ] + } + } + } + ] + }, + "Description": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": null + }, + "Sparkplug_Type": { + "enum": [ + "String" + ] + } + } + } + ] + }, + "Type": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": null + }, + "Sparkplug_Type": { + "enum": [ + "String" + ] + } + } + } + ] + }, + "Timestamps": { + "type": "object", + "properties": { + "Queued": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": "" + }, + "Sparkplug_Type": { + "enum": [ + "String", + "UInt8", + "UInt16LE", + "UInt16BE", + "UInt32LE", + "UInt32BE", + "UInt64LE", + "UInt64BE" + ] + } + } + } + ] + }, + "Started": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": "" + }, + "Sparkplug_Type": { + "enum": [ + "String", + "UInt8", + "UInt16LE", + "UInt16BE", + "UInt32LE", + "UInt32BE", + "UInt64LE", + "UInt64BE" + ] + } + } + } + ] + }, + "Completed": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": "" + }, + "Sparkplug_Type": { + "enum": [ + "String", + "UInt8", + "UInt16LE", + "UInt16BE", + "UInt32LE", + "UInt32BE", + "UInt64LE", + "UInt64BE" + ] + } + } + } + ] + } + }, + "required": [] + }, + "Status": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": "" + }, + "Sparkplug_Type": { + "enum": [ + "String" + ] + } + } + } + ] + }, + "Fail_Count": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": "" + }, + "Sparkplug_Type": { + "enum": [ + "UInt8", + "UInt16LE", + "UInt16BE", + "UInt32LE", + "UInt32BE", + "UInt64LE", + "UInt64BE" + ] + } + } + } + ] + } + }, + "required": [ + "Schema_UUID", + "Instance_UUID" + ] +} diff --git a/Common/Device_Information-v1.json b/Common/Device_Information-v1.json index bf82e6c..e9570cc 100644 --- a/Common/Device_Information-v1.json +++ b/Common/Device_Information-v1.json @@ -165,6 +165,95 @@ }, "ISA95_Hierarchy": { "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Hierarchy-v1.json" + }, + "Battery": { + "type": "object", + "properties": { + "Percentage": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": "The current battery percentage" + }, + "Sparkplug_Type": { + "enum": [ + "FloatLE", + "FloatBE", + "DoubleLE", + "DoubleBE" + ] + }, + "Eng_Unit": { + "default": "%" + }, + "Eng_Low": { + "default": 0 + }, + "Eng_High": { + "default": 100 + } + } + } + ] + }, + "Time_Remaining": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": "The amount of time remaining until the battery is depleted" + }, + "Sparkplug_Type": { + "enum": [ + "String", + "UInt64BE", + "UInt64LE", + "UInt32BE", + "UInt32LE", + "UInt16BE", + "UInt16LE", + "UInt8" + ] + } + } + } + ] + } + }, + "required": [] + }, + "Uptime": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": "The amount of time that the device has been online" + }, + "Sparkplug_Type": { + "enum": [ + "String", + "UInt32LE", + "UInt32BE", + "UInt64BE", + "UInt64LE", + "UInt16BE", + "UInt16LE", + "UInt8" + ] + } + } + } + ] } }, "required": [ diff --git a/Facility/Facility-v1.json b/Facility/Facility-v1.json new file mode 100644 index 0000000..176e949 --- /dev/null +++ b/Facility/Facility-v1.json @@ -0,0 +1,27 @@ +{ + "$id": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Facility/Facility-v1.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "Schema_UUID": { + "const": "efb3c472-6346-45b7-a482-5c9bcebe866d" + }, + "Instance_UUID": { + "description": "The unique identifier for this object. (A UUID specified by RFC4122).", + "type": "string", + "format": "uuid" + }, + "Zones": { + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Facility/Zone-v1.json" + } + }, + "type": "object" + } + }, + "required": [ + "Schema_UUID", + "Instance_UUID" + ] +} \ No newline at end of file diff --git a/Facility/Zone-v1.json b/Facility/Zone-v1.json new file mode 100644 index 0000000..bd96dfb --- /dev/null +++ b/Facility/Zone-v1.json @@ -0,0 +1,75 @@ +{ + "$id": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Facility/Zone-v1.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "Schema_UUID": { + "const": "09a88805-9844-44dd-b686-e61608908e08" + }, + "Instance_UUID": { + "description": "The unique identifier for this object. (A UUID specified by RFC4122).", + "type": "string", + "format": "uuid" + }, + "Carbon_Dioxide_Sensors": { + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Sensors/Carbon_Dioxide-v1.json" + } + }, + "type": "object" + }, + "Electrical_Energy_Sensors": { + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Sensors/Electrical_Energy-v1.json" + } + }, + "type": "object" + }, + "Temperature_Sensors": { + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Sensors/Temperature-v1.json" + } + }, + "type": "object" + }, + "Humidity_Sensors": { + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Sensors/Humidity-v1.json" + } + }, + "type": "object" + }, + "Light_Intensity_Sensors": { + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Sensors/Light_Intensity-v1.json" + } + }, + "type": "object" + }, + "Sound_Level_Sensors": { + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Sensors/Sound_Level-v1.json" + } + }, + "type": "object" + }, + "Zones": { + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Facility/Zone-v1.json" + } + }, + "type": "object" + } + }, + "required": [ + "Schema_UUID", + "Instance_UUID" + ] +} \ No newline at end of file diff --git a/Sensors/Electrical_Energy-v1.json b/Sensors/Electrical_Energy-v1.json new file mode 100644 index 0000000..74179b3 --- /dev/null +++ b/Sensors/Electrical_Energy-v1.json @@ -0,0 +1,44 @@ +{ + "$id": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Sensors/Electrical_Energy-v1.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "Schema_UUID": { + "const": "093c0186-f4ee-479a-b00b-c849b152b33e" + }, + "Instance_UUID": { + "description": "The unique identifier for this object. (A UUID specified by RFC4122).", + "type": "string", + "format": "uuid" + }, + "Electrical_Energy": { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/AMRC-FactoryPlus/schemas/main/Common/Metric-v1.json" + }, + { + "properties": { + "Documentation": { + "default": "" + }, + "Sparkplug_Type": { + "enum": [ + "FloatLE", + "FloatBE", + "DoubleLE", + "DoubleBE" + ] + }, + "Eng_Unit": { + "default": "kWh" + } + } + } + ] + } + }, + "required": [ + "Schema_UUID", + "Instance_UUID" + ] +} \ No newline at end of file