Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPSO Temperature Object using sdfChoice and OMA IDs #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions sdfObject/sdfobject-ipso-temperature-sdfchoice.sdf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
{
"info": {
"title": "OMA LwM2M Temperature (Object ID 3303)",
"version": "2023-03-25",
"copyright": "Copyright 2019 Open Mobile Alliance.",
"license": "BSD-3-Clause"
},
"namespace": {
"oma": "https://onedm.org/ecosystem/oma"
},
"defaultNamespace": "oma",
"sdfObject": {
"Temperature": {
"label": "Temperature",
"description": "This IPSO object should be used with a temperature sensor to report a temperature measurement. It also provides resources for minimum/maximum measured values and the minimum/maximum range that can be measured by the temperature sensor. An example measurement unit is degrees Celsius.",
"oma:id": "3303",
"sdfProperty": {
"Sensor_Value": {
"label": "Sensor Value",
"description": "Last or Current Measured Value from the Sensor.",
"oma:id": 5700,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is probably just me, but I can't find mentions of such namespace-specific qualities in draft-13.

Copy link
Collaborator Author

@akeranen akeranen Mar 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The possibility to use namespace'd quality extensions is mentioned in section 2.3.3 but we still need to finalise the spec on this and add IANA registry for the namespaces (this is a different namespace than the definition namespace).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually in SDF models you would leave ecosystem specific details (like OMA IDs) to the mapping file, but I happened to run the conversion tool with ID in-lining mode in this case.

"writable": false,
"type": "number"
},
"Min_Measured_Value": {
"label": "Min Measured Value",
"description": "The minimum value measured by the sensor since power ON or reset.",
"oma:id": 5601,
"writable": false,
"type": "number"
},
"Max_Measured_Value": {
"label": "Max Measured Value",
"description": "The maximum value measured by the sensor since power ON or reset.",
"oma:id": 5602,
"writable": false,
"type": "number"
},
"Min_Range_Value": {
"label": "Min Range Value",
"description": "The minimum value that can be measured by the sensor.",
"oma:id": 5603,
"writable": false,
"type": "number"
},
"Max_Range_Value": {
"label": "Max Range Value",
"description": "The maximum value that can be measured by the sensor.",
"oma:id": 5604,
"writable": false,
"type": "number"
},
"Sensor_Units": {
"label": "Sensor Units",
"description": "Measurement Units Definition.",
"oma:id": 5701,
"writable": false,
"type": "string"
},
"Application_Type": {
"label": "Application Type",
"description": "The application type of the sensor or actuator as a string depending on the use case.",
"oma:id": 5750,
"type": "string"
},
"Timestamp": {
"label": "Timestamp",
"description": "The timestamp of when the measurement was performed.",
"oma:id": 5518,
"writable": false,
"type": "number",
"sdfType": "unix-time"
},
"Fractional_Timestamp": {
"label": "Fractional Timestamp",
"description": "Fractional part of the timestamp when sub-second precision is used (e.g., 0.23 for 230 ms).",
"oma:id": 6050,
"writable": false,
"type": "number",
"unit": "s",
"minimum": 0,
"maximum": 1
},
"Measurement_Quality_Indicator": {
"label": "Measurement Quality Indicator",
"description": "Measurement quality indicator reported by a smart sensor.",
"oma:id": 6042,
"writable": false,
"type": "integer",
"minimum": 0,
"maximum": 23,
"sdfChoice": {
"UNCHECKED": {
"description": "No quality checks were done because they do not exist or can not be applied.",
"const": 0
},
"REJECTED WITH CERTAINTY": {
"description": "The measured value is invalid.",
"const": 1
},
"REJECTED WITH PROBABILITY": {
"description": "The measured value is likely invalid.",
"const": 2
},
"ACCEPTED BUT SUSPICIOUS": {
"description": "The measured value is likely OK.",
"const": 3
},
"ACCEPTED": {
"description": "The measured value is OK.",
"const": 4
},
"option6": {
"description": "Reserved for future extensions.",
"minimum": 5,
"maximum": 15,
"type": "integer"
},
"option7": {
"description": "Vendor specific measurement quality.",
"minimum": 16,
"maximum": 23,
"type": "integer"
}
}
},
"Measurement_Quality_Level": {
"label": "Measurement Quality Level",
"description": "Measurement quality level reported by a smart sensor. Quality level 100 means that the measurement has fully passed quality check algorithms. Smaller quality levels mean that quality has decreased and the measurement has only partially passed quality check algorithms. The smaller the quality level, the more caution should be used by the application when using the measurement. When the quality level is 0 it means that the measurement should certainly be rejected.",
"oma:id": 6049,
"writable": false,
"type": "integer",
"minimum": 0,
"maximum": 100
}
},
"sdfAction": {
"Reset_Min_and_Max_Measured_Values": {
"label": "Reset Min and Max Measured Values",
"description": "Reset the Min and Max Measured Values to Current Value.",
"oma:id": 5605
}
},
"sdfRequired": [
"#/sdfObject/Temperature/sdfProperty/Sensor_Value"
]
}
}
}