# An IoT System for Remote Monitoring of Patients at Home
## 5 Protocol Conversion in the IoT System
### Protocol Conversion Cases
Figure 7 shows how to convert a oneM2M Retrieve primitive Response message into an ISO/IEEE 11073 Association Response message in the gateway. \"<responseStatusCode>\" tag field in the oneM2M Retrieve primitive Response message is used to make \"Result\" field in the ISO/IEEE 11073 Association Response message. The \"<responseStatusCode>\" field contains the results of the registration checking. An example of the process described in Figure 7 is omitted here. When the PHD finds that it has not been registered in the IoT server after receiving the ISO/IEEE 11073 Association Response message sent from the gateway, the PHD sends an ISO/IEEE 11073 Present (Notice Configuration) Request message to inform the server of its environmental settings including biomedical data types the PHD will send. Figure 8 shows how to convert an ISO/IEEE 11073 Present (Notice Configuration) Request message into oneM2M Create primitive Request messages. Note that several oneM2M Create primitive Request messages are built from a single ISO/IEEE 11073 Present (Notice Configuration) Request message. This is because a single ISO/IEEE 11073 Present (Notice Configuration) Request message can contain multiple object information (\"Object Class\", \"Object Handle\", \"Attribute Count\", \"Attribute Length\", \"Attribute ID\", \"Attribute Value Length\", \"Attribute Value\") and a oneM2M Create primitive Request message must be built for every piece of object information in a single ISO/IEEE 11073 Present (Notice Configuration) Request message. In Figure 8, each \"Object Handle\" field is used to create \"<container>\" node in the resource tree managed by the gateway or the IoT server. In addition, each (\"Attribute ID\", \"Attribute Value Length\", \"Attribute Value\") is used to create a \"<contentInstance>\" tag node under the \"<container>\" tag node in the resource tree. For this paper, an explanation of the conversion of oneM2M Create primitive messages into an ISO/IEEE 11073 Present (Notice Configuration) Request message will be omitted. Figures 9 and 10 show examples of the process described in Figure 8. In Figure 9, \"APDU Choice Type\" on the first line is 0 xE7 0x00, which means that this message is an ISO/IEEE 11073 Present Request message. \"Event Type\" on the ninth line indicates that this is a Notice Configuration message. \"Configuration Object Count\" (0x00 0x03) on the twelfth line indicates that the PHD sends the biomedical data of three objects. The lowest dotted box containing the fourteenth line to the last line represents the information of biomedical data to be delivered. Two more dotted boxes for additional objects are omitted here. In the dotted box, four pulse oxim  
Figure 7: Conversion of a oneM2M Retrieve primitive Response message to an ISO/IEEE 11073 Association Response message. attributes are contained. Four pulse oximetry information delivered in Figure 9 needs to be stored in the appropriate places in the related resource tree. To store the value information, \"\(<\)container>\" and \"\(<\)contentInstance>\" tag nodes need to be created in the resource tree. In Figure 10, an example of the resulting oneM2M Create primitive Request messages is shown. Figure 8: Conversion of an ISO/IEEE 11073 Present (Notice Configuration) Request message to oneM2M Create primitive Request messages. Figure 9: An example of the process described in Figure 8 (ISO/IEEE 11073 Present (Notice Configuration) Request message). Biomedical data measured by a PHD can be delivered in an ISO/IEEE 11073 Present (Store Sensing Data) Request message. Because a single ISO/IEEE 11073 Present (Store Sensing Data) Request message can contain multiple biomedical data, more than oneM2M Update primitive Request messages can be built. Figure 11 shows how to convert an ISO/IEEE 11073 Present (Store Sensing Data) Request message into oneM2M Update primitive Request messages.