8.9 Modbus Interworking
8.9.1 Modbus Thermometer Device Create
Interoperability Test Description
| Identifier: | TD_M2M_NH_163 |
| Objective: | AE1 creates Device Model for Modbus device |
| Configuration: | M2M_CFG_10 |
| References: | oneM2M TS-0040 <a href="#_ref_16">[16]</a>, clause 6.3 |
Pre-test conditions:
AE1 is running in Modbus IPE
AE1 has created an application resource <AE> on registrar CSE
| Step | RP | Type | Description |
|---|---|---|---|
| 1 | Stimulus | AE1 sends a request to create a <flexContainer> resource for Modbus deviceThermometer | |
| 2 | Mca | PRO Check Primitive | • op = 1 (Create) • to = {CSEBaseName}/URI of <AE1> resource • fr = AE1-ID • rqi = (token-string) • ty = 28 (flexContainer) • pc = Serialized representation of <flexContainer> resource with proper containerDefinition |
| 3 | IOP Check | Check if possible that the <flexContainer> resource is created in Registrar CSE | |
| 4 | Mca | PRO Check Primitive | • rsc = 2001 (CREATED) • rqi = (token-string) same as received in request message • pc = Serialized representation of <flexContainer> resource |
| 5 | IOP Check | AE indicates successful operation | |
| 6 | Stimulus | AE1 sends a request to create a <flexContainer> for temperature | |
| 7 | Mca | PRO Check Primitive | • op = 1 (Create) • to = {CSEBaseName}/URI of <AE1> resource/resource name of Modbus deviceLight • fr = AE1-ID • rqi = (token-string) • ty = 28 (flexContainer) • pc = Serialized representation of <flexContainer> resource with proper containerDefinition and nodnProperties |
| 8 | IOP Check | Check if possible that the <flexContainer> resource is created in Registrar CSE | |
| 9 | Mca | PRO Check Primitive | • rsc = 2001 (CREATED) • rqi = (token-string) same as received in request message • pc = Serialized representation of <flexContainer> resource |
| 10 | IOP Check | AE indicates successful operation | |
| Note | Optional: Repeat steps 5 – 10 for battery Module |
8.9.2 Retrieve data from a Modbus Thermometer device
Interoperability Test Description
| Identifier: | TD_M2M_NH_164 |
| Objective: | Modbus IPE reads data from Modbus device and updates Registrar CSE with the read data |
| Configuration: | M2M_CFG_10 |
| References: | oneM2M TS-0040 <a href="#_ref_16">[16]</a>, clause 6.5.1 |
Pre-test conditions:
AE1 is running in Modbus IPE
AE1 has created an application resource <AE> on registrar CSE
AE1 has created a <flexContainer> for deviceThermometer
AE1 has created a <flexContainer> for temperature as a child of deviceThermometer
AE2 has created an application resource <AE> on registrar CSE
AE2 has created a <subscription> resource as a child of temperature
| Step | RP | Type | Description |
|---|---|---|---|
| 1 | Stimulus | AE1 sends a request to retrieve a <flexContainer> resource for temperature | |
| 2 | Mca |
PRO Check Primitive | • op = 2 (Retrieve) • to = {CSEBaseName}/URI of <deviceThermometer> resource/ temperature • fr = AE1-ID • rqi = (token-string) |
| 3 | Mca |
PRO Check Primitive | • pc = Serialized representation of <flexContainer> resource • rsc = 2000 (OK) |
| 4 | IOP Check | AE1 indicates successful operation | |
| 5 | Stimulus | Modbus IPE sends a request(s) to retrieve data from Modbus Thermometer device | |
| 6 | IOP Check | Check if possible that Modbus IPE has successfully retrieved data from Modbus device | |
| 7 | Stimulus | AE1 sends a request to update a <flexContainer> resource for deviceThermometer | |
| 8 | Mca | PRO Check Primitive | • op = 3 (Update) • to = {CSEBaseName}/URI of deviceThermometer/temperature • fr = AE1-ID • rqi = (token-string) • pc = Serialized representation of updated <flexContainer> resource |
| 9 | Mca | PRO Check Primitive | • rsc = 2004 (Updated) • rqi = (token-string) same as received in request message • pc = Serialized representation of <flexContainer> resource |
| 10 | IOP Check | Check if possible that the < flexContainer > resource for temperature is updated in Registrar CSE. Registrar CSE sends a notification to AE2 | |
| 11 | Mca |
PRO Check Primitive | • op = 5 (Notify) • to = AE2-ID • from = Registrar CSE-ID • rqi = (token-string) • pc = Serialized representation of Notification data object |
| 12 | Mca | PRO Check Primitive | AE2 responds to notification • rsc = 2000 (OK) • rqi = (token-string) same as received in request message |
| 13 | IOP Check | AE2 indicates notification received |
8.9.3 Write data to a Modbus Thermometer device
Interoperability Test Description
| Identifier: | TD_M2M_NH_165 |
| Objective: | AE writes data into a Modbus device by updating <flexContainer> resource in Registrar CSE |
| Configuration: | M2M_CFG_10 |
| References: | oneM2M TS-0040 <a href="#_ref_16">[16]</a>, clause 6.5.2 |
Pre-test conditions:
AE1 is running in Modbus IPE
AE1 has created an application resource <AE> on registrar CSE
AE1 has created a <flexContainer> for deviceThermometer
AE1 has created a <flexContainer> for temperature as a child of deviceThermometer
AE2 has created an application resource <AE> on registrar CSE
AE2 has created a <subscription> resource as a child of temperature (notificationEventType = Blocking_Update)
| Step | RP | Type | Description |
|---|---|---|---|
| 1 | Stimulus | AE2 is requested to send a flexContainer Update Request to update the any customAttribute of the resource | |
| 2 | Mca |
PRO Check Primitive | • op = 3 (Update) • to = {CSEBaseName}/URI of <flexContainer> resource • fr = AE-ID • rqi = (token-string) • pc = Serialized representation of updated <flexContainer> resource |
| 3 | IOP Check | Check that Registrar CSE sent a notification to AE1 | |
| 4 | Mca |
PRO Check Primitive | • op = 5 (Notify) • to = AE1-ID • from = Registrar CSE-ID • rqi = (token-string) • pc = Serialized representation of Notification data object |
| 5 | Stimulus | Modbus IPE sends a request(s) to write data to Modbus Thermometer device | |
| 6 | IOP Check | Check if possible that Modbus IPE has successfully written data to Modbus device | |
| 7 | Stimulus | AE1 sends a response to notification to Registrar CSE | |
| 8 | Mca | PRO Check Primitive | Sent response contains: • rsc = 2000 (OK) • rqi = (token-string) same as received in request message |
| 9 | Mca | PRO Check Primitive | Registrar CSE sends a response to AE2 • rsc = 2004 (Updated) • rqi = (token-string) same as received in request message • pc = Serialized representation of <flexContainer> resource |
| 10 | IOP Check | AE2 indicates successful operation |