Skip to content

Commit

Permalink
Add Battery and Uptime fields to Device_Information schema (#62)
Browse files Browse the repository at this point in the history
The Battery field includes properties for percentage and time remaining,
with relevant metrics and documentation. The Uptime field tracks device
online duration, with types and documentation defined.
  • Loading branch information
AlexGodbehere authored Sep 17, 2024
1 parent a5d0c3b commit 341c0b9
Showing 1 changed file with 89 additions and 0 deletions.
89 changes: 89 additions & 0 deletions Common/Device_Information-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down

0 comments on commit 341c0b9

Please sign in to comment.