-
Notifications
You must be signed in to change notification settings - Fork 10
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
Draft: LwM2M Device Object model. #57
Open
dnav
wants to merge
4
commits into
one-data-model:master
Choose a base branch
from
dnav:oma_device_definition
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
{ | ||
"info": { | ||
"title": "OMA LwM2M Device (Object ID 3)", | ||
"version": "2020-11-10", | ||
"copyright": "Copyright 2020 Open Mobile Alliance", | ||
"license": "BSD-3-Clause" | ||
}, | ||
"namespace": { | ||
"oma": "https://onedm.org/ecosystem/oma" | ||
}, | ||
"defaultNamespace": "oma", | ||
"sdfThing": { | ||
"Device": { | ||
"label": "Device", | ||
"description": "This LwM2M Object provides a range of device related information which can be queried by the LwM2M Server, and a device reboot and factory reset function.", | ||
"sdfRequired": [ | ||
"#/sdfObject/Device/sdfAction/Reboot", | ||
"#/sdfObject/Device/sdfProperty/Error_Code", | ||
"#/sdfObject/Device/sdfProperty/Supported_Binding_and_Modes" | ||
], | ||
"sdfProperty": { | ||
"Manufacturer": { | ||
"label": "Manufacturer", | ||
"description": "Human readable manufacturer name", | ||
"writable": false, | ||
"type": "string" | ||
}, | ||
"Model_Number": { | ||
"label": "Model Number", | ||
"description": "A model identifier (manufacturer specified string)", | ||
"writable": false, | ||
"type": "string" | ||
}, | ||
"Serial_Number": { | ||
"label": "Serial Number", | ||
"description": "Serial Number", | ||
"writable": false, | ||
"type": "string" | ||
}, | ||
"Firmware_Version": { | ||
"label": "Firmware Version", | ||
"description": "Current firmware version of the Device. The Firmware Management function could rely on this resource.", | ||
"writable": false, | ||
"type": "string" | ||
}, | ||
"Battery_Level": { | ||
"label": "Battery Level", | ||
"description": "Contains the current battery level as a percentage (with a range from 0 to 100). This value is only valid for the Device internal Battery if present (one Available Power Sources Resource Instance is 1).", | ||
"writable": false, | ||
"type": "integer", | ||
"unit": "/100", | ||
"minimum": 0, | ||
"maximum": 100 | ||
}, | ||
"Memory_Free": { | ||
"label": "Memory Free", | ||
"description": "Estimated current available amount of storage space which can store data and software in the LwM2M Device (expressed in kilobytes). Note: 1 kilobyte corresponds to 1000 bytes.", | ||
"writable": false, | ||
"type": "integer" | ||
}, | ||
"Error_Code": { | ||
"label": "Error Code", | ||
"description": "When the single Device Object Instance is initiated, there is only one error code Resource Instance whose value is equal to 0 that means no error. When the first error happens, the LwM2M Client changes error code Resource Instance to any non-zero value to indicate the error type. When any other error happens, a new error code Resource Instance is created. When an error associated with a Resource Instance is no longer present, that Resource Instance is deleted. When the single existing error is no longer present, the LwM2M Client returns to the original no error state where Instance 0 has value 0. This error code Resource MAY be observed by the LwM2M Server. How to deal with LwM2M Client's error report depends on the policy of the LwM2M Server. Error codes in between 16 and 32 are specific to the Device and may have different meanings among implementations.", | ||
"writable": false, | ||
"type": "array", | ||
"items": { | ||
"type": "integer", | ||
"minimum": 0, | ||
"maximum": 32, | ||
"sdfChoice": { | ||
"No error": { "const": 0 }, | ||
"Low battery power": { "const": 1 }, | ||
"External power supply off": { "const": 2 }, | ||
"GPS module failure": { "const": 3 }, | ||
"Low received signal strength": { "const": 4 }, | ||
"Out of memory": { "const": 5 }, | ||
"SMS failure": { "const": 6 }, | ||
"IP connectivity failure": { "const": 7 }, | ||
"Peripheral malfunction": { "const": 8}, | ||
"Reserved for future use": {"type": "integer", "minimum": 9, "maximum": 15}, | ||
"Device specific error codes": {"type": "integer", "minimum": 16, "maximum": 32} | ||
} | ||
} | ||
}, | ||
"Current_Time": { | ||
"label": "Current Time", | ||
"description": "Current UNIX time of the LwM2M Client. The LwM2M Client should be responsible to increase this time value as every second elapses. The LwM2M Server is able to write this Resource to make the LwM2M Client synchronized with the LwM2M Server.", | ||
"type": "number", | ||
"sdfType": "unix-time" | ||
}, | ||
"UTC_Offset": { | ||
"label": "UTC Offset", | ||
"description": "Indicates the UTC offset currently in effect for this LwM2M Device. UTC+X [ISO 8601].", | ||
"type": "string" | ||
}, | ||
"Timezone": { | ||
"label": "Timezone", | ||
"description": "Indicates in which time zone the LwM2M Device is located, in IANA Timezone (TZ) database format.", | ||
"type": "string" | ||
}, | ||
"Supported_Binding_and_Modes": { | ||
"label": "Supported Binding and Modes", | ||
"description": "Indicates which bindings and modes are supported in the LwM2M Client. The possible values are those listed in the LwM2M Core Specification.", | ||
"writable": false, | ||
"type": "string" | ||
}, | ||
"Device_Type": { | ||
"label": "Device Type", | ||
"description": "Type of the device (manufacturer specified string: e.g. smart meters / dev Class / ...)", | ||
"writable": false, | ||
"type": "string" | ||
}, | ||
"Hardware_Version": { | ||
"label": "Hardware Version", | ||
"description": "Current hardware version of the device", | ||
"writable": false, | ||
"type": "string" | ||
}, | ||
"Software_Version": { | ||
"label": "Software Version", | ||
"description": "Current software version of the device (manufacturer specified string). On elaborated LwM2M device, SW could be split in 2 parts: a firmware one and a higher level software on top. Both pieces of Software are together managed by LwM2M Firmware Update Object (Object ID 5)", | ||
"writable": false, | ||
"type": "string" | ||
}, | ||
"Battery_Status": { | ||
"label": "Battery Status", | ||
"description": "This value is only valid for the Device Internal Battery if present (one Available Power Sources Resource Instance value is 1). Battery Status\tMeaning\tDescription 0\tNormal\tThe battery is operating normally and not on power. 1\tCharging\tThe battery is currently charging. 2\tCharge Complete\tThe battery is fully charged and still on power. 3\tDamaged\tThe battery has some problem. 4\tLow Battery\tThe battery is low on charge. 5\tNot Installed\tThe battery is not installed. 6\tUnknown\tThe battery information is not available.", | ||
"writable": false, | ||
"type": "integer", | ||
"minimum": 0, | ||
"maximum": 6 | ||
}, | ||
"Memory_Total": { | ||
"label": "Memory Total", | ||
"description": "Total amount of storage space which can store data and software in the LwM2M Device (expressed in kilobytes). Note: 1 kilobyte corresponds to 1000 bytes.", | ||
"writable": false, | ||
"type": "integer" | ||
}, | ||
"ExtDevInfo": { | ||
"label": "ExtDevInfo", | ||
"description": "Reference to external \"Device\" object instance containing information. For example, such an external device can be a Host Device, which is a device into which the Device containing the LwM2M client is embedded. This Resource may be used to retrieve information about the Host Device.", | ||
"sdfType": "link", | ||
"properties": { | ||
"href": { "type": "string"} | ||
} | ||
} | ||
}, | ||
"sdfAction": { | ||
"Reboot": { | ||
"label": "Reboot", | ||
"description": "Reboot the LwM2M Device to restore the Device from unexpected firmware failure." | ||
}, | ||
"Factory_Reset": { | ||
"label": "Factory Reset", | ||
"description": "Perform factory reset of the LwM2M Device to make the LwM2M Device to go through initial deployment sequence where provisioning and bootstrap sequence is performed. This requires client ensuring post factory reset to have minimal information to allow it to carry out one of the bootstrap methods specified in section 5.2.3. When this Resource is executed, \"De-register\" operation MAY be sent to the LwM2M Server(s) before factory reset of the LwM2M Device." | ||
}, | ||
"Reset_Error_Code": { | ||
"label": "Reset Error Code", | ||
"description": "Delete all error code Resource Instances and create only one zero-value error code that implies no error, then re-evaluate all error conditions and update and create Resources Instances to capture all current error conditions." | ||
} | ||
}, | ||
"sdfThing": { | ||
"Power_Source": { | ||
"minItems": 0, | ||
"sdfProperty": { | ||
"Type": { | ||
"label": "Type", | ||
"description": "Type of the Available Power Source.0: DC power 1: Internal Battery 2: External Battery 3: Fuel Cell 4: Power over Ethernet 5: USB 6: AC (Mains) power 7: Solar The same Resource Instance ID MUST be used to associate a given Power Source (Resource ID:6) with its Present Voltage (Resource ID:7) and its Present Current (Resource ID:8)", | ||
"writable": false, | ||
"type": "integer", | ||
"sdfChoice": { | ||
"DC power": { "const": 0 }, | ||
"Internal Battery": { "const": 1 }, | ||
"External Battery": { "const": 2 }, | ||
"Fuel Cell": { "const": 3 }, | ||
"Power over Ethernet": { "const": 4 }, | ||
"USB": { "const": 5 }, | ||
"AC (Mains) power": { "const": 6 }, | ||
"Solar": { "const": 7 } | ||
} | ||
}, | ||
"Voltage": { | ||
"label": "Voltage", | ||
"description": "Present voltage for the Available Power Source.", | ||
"writable": false, | ||
"type": "integer", | ||
"unit": "mV" | ||
}, | ||
"Current": { | ||
"label": "Current", | ||
"description": "Present current for the Power Source.", | ||
"writable": false, | ||
"type": "integer", | ||
"unit": "mA" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! To enable using
properties
quality, just add also quality"type" : "object"
(Yes, we need to update the schema to catch that. Thanks!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed