6.2 Device models using a Custom Model
Using oneM2M to represent devices allows for unlimited flexibility. A device model can be customized to support the needs of the manufacturer or system architecture. The resource tree structure shown here represents a custom model that has a single container for reading the status of the washing machine and a separate container to set or command the washing machine.
Figure 5: Custom washing machine model
Figure 6: Custom Model oneM2M Call Flows
Only the messages highlighted in light blue are described here as the rest of the messages are the same as in the general call flow described in clause 6.1.
- Create Information Model. The IPE creates all the resources needed to for the clothes washing machine that it knows how to model a priori. This IPE is developed with awareness of the clothes washing machine interface and the model that it is creating in the oneM2M CSE.
- A <container> resource is created for the Status information of the clothes washing machine. The IPE creates <contentInstance> resources that have the following content when there are any changes in the status of the clothes washing machine:
- A <container> resource is created for the command and control of the clothes washing machine. When the client application is setting the state of the device the following payload can be provided in a <contentInstance> resource:
- A <subscription> resource is created as a child of the command <container> resource by the IPE. This will cause a notification to be sent to the IPE when a new command is made by an application.