-
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: David Navarro <[email protected]>
Signed-off-by: David Navarro <[email protected]>
"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/", |
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.
"#/sdfObject/Device/sdfAction/", | |
"#/sdfObject/Device/sdfAction/Reboot", |
This seems to be missing the affordance name
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.
Indeed.
It seems there is bug in the LwM2M to SDF converter at http://wishi.nomadiclab.com/sdf-converter/. If you try the following XML definition, the sdfRequired contains "#/sdfObject/Test/sdfAction/" instead of "#/sdfObject/Test/sdfAction/MandatoryAction".
<?xml version="1.0" encoding="UTF-8"?>
<LWM2M xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.openmobilealliance.org/tech/profiles/LWM2M.xsd">
<Object ObjectType="MODefinition">
<Name>Test</Name>
<Description1><![CDATA[Test.]]></Description1>
<ObjectID>777</ObjectID>
<ObjectURN>urn:oma:lwm2m:oma:777</ObjectURN>
<LWM2MVersion>1.0</LWM2MVersion>
<ObjectVersion>1.0</ObjectVersion>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Resources>
<Item ID="0">
<Name>MandatoryProp</Name>
<Operations>R</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Mandatory</Mandatory>
<Type>String</Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description><![CDATA[]]></Description>
</Item>
<Item ID="1">
<Name>OptionalProp</Name>
<Operations>R</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type>String</Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description><![CDATA[]]></Description>
</Item>
<Item ID="2">
<Name>MandatoryAction</Name>
<Operations>E</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Mandatory</Mandatory>
<Type></Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description><![CDATA[]]></Description>
</Item>
<Item ID="3">
<Name>OptionalAction</Name>
<Operations>E</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type></Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description><![CDATA[]]></Description>
</Item>
</Resources>
<Description2></Description2>
</Object>
</LWM2M>
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.
Good catch! Fixed now in the ipso-odm toolkit. Unfortunately updating the web tool takes a bit more effort and will have to wait for 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.
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.
I updated the web tool today, so it should work now.
"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.", | ||
"sdfRef": "" |
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.
As discussed, here "sdfType" : "link"
is probably the best option, but probably needs some thinking.
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.
Updated according to my understanding of https://www.ietf.org/archive/id/draft-bormann-asdf-sdftype-link-00.html
Signed-off-by: David Navarro <[email protected]>
"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", |
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
Signed-off-by: David Navarro <[email protected]>
First version with some details to sort out:
the propery Error_Code is an integer between 0 and 32 with choices and reserved values.the thing ExtDevInfo has no defined reference has this is dependant on the implementation