diff --git a/TS-0023-SDT_based_Information_Model_and_Mapping_for_Vertical_Industries.md b/TS-0023-SDT_based_Information_Model_and_Mapping_for_Vertical_Industries.md index 05807774371664c2f3ea875ba89b308ea0ccd83b..a05f42c01901d3f32fa17e02d32f90fc9b4fc6d7 100644 --- a/TS-0023-SDT_based_Information_Model_and_Mapping_for_Vertical_Industries.md +++ b/TS-0023-SDT_based_Information_Model_and_Mapping_for_Vertical_Industries.md @@ -6877,13 +6877,14 @@ Table B.2.2-1 captures the equivalency mapping between OCF defined Device Types # Annex C (informative): Mapping to Content Attribute ## C.1 Introduction + Current SDT models are used only in form of <flexContainer>s, and how to design content attribute of <contentInstance> and <timeSeriesInstance> is left to developers. There is no rule for design of content attribute, it means interoperability of content attribute is low. Then SDT can become one of the rules for design of content attribute, and the low interoperability problem will be solved. The present clause explains how to use SDT as one of the rules for design of content attribute. There are several benefits of using SDT in content attribute. -First, the resource architecture can be simpler than the one using <flexContainer>s. When using <flexContainer>s, universal attributes are mapped either into attributes of [deviceInfo] under a <node> besides <flexContainer>s, or into custom attributes of [[dmDeviceInfo]](#583-dmdeviceinfo) under a [[flexNode](#581-flexnode)] (see Rule 1-8 in clause [6.2.2](#622-resource-mapping-for-device-model)). Moreover, Action Class and DataPoint Class are the same layer in SDT, but Action Class is mapped to <flexContainer> itself and DataPoint Class is mapped to attributes of <flexContainer> expressing Module class. On the other hand, Using SDT in content attribute means using only one <contentInstance> or <timeSeriesInstance> so the resource architecture is simple. +First, the resource architecture can be simpler than the one using <flexContainer>s. When using <flexContainer>s, universal attributes are mapped either into attributes of [deviceInfo] under a <node> besides <flexContainer>s, or into custom attributes of [\[dmDeviceInfo\]](#583-dmdeviceinfo) under a [\[flexNode\]](#581-flexnode)] (see Rule 1-8 in clause [6.2.2](#622-resource-mapping-for-device-model)). Moreover, Action Class and DataPoint Class are the same layer in SDT, but Action Class is mapped to <flexContainer> itself and DataPoint Class is mapped to attributes of <flexContainer> expressing Module class. On the other hand, Using SDT in content attribute means using only one <contentInstance> or <timeSeriesInstance> so the resource architecture is simple. Relating this benefit, it becomes easy to understand where to write information. @@ -6895,9 +6896,10 @@ In addition, tools can generate validator of the data and converter among the su ## C.2 XML representation of SDT instances. + ModuleClasses, SubDevice models and DeviceClass models written in clause 5 are expressed another way with using each class names as the tag. This clause introduces this way. -Normative work for defining the mapping rules from SDT to XML/ JSON instance are defined by SDT4.0. +Normative work for defining the mapping rules from SDT to XML/JSON instance are defined by SDT4.0. ### C.2.1 Mapping Rules of XML representation @@ -6966,6 +6968,7 @@ Below is the example for deviceThreeDPrinter: ## C.3 JSON representation of SDT instances ### C.3.1 Mapping Rules of JSON representation + This clause explains how to represent SDT instances inJSON format Inclusion relationship of SDT instances are directly expressed as inclusion relationship of JSON hash({}). Key name is same as each class name of SDT. Value types are written in various types depending on SDT definition. @@ -6988,6 +6991,7 @@ When a certain device does not any SubDevice Class, the tags about SubDevices Cl ### C.3.2 Example of JSON representation + Below is the example for deviceThreeDPrinter: ```JSON @@ -7034,13 +7038,13 @@ Below is the example for deviceThreeDPrinter: ## C.4 How to write into content attribute -Any size of the SDT class cluster may be mapped to content attribute. For example, from only the DataPoint class to DataPoint, Action, Module, SubDevice and Device classes may be mapped to one content attribute at once. - +Any size of the SDT class cluster may be mapped to content attribute. For example, from only the DataPoint class to DataPoint, Action, Module, SubDevice and Device classes may be mapped to one content attribute at once. - + **Figure C.4-1: Image of Mapping SDT to content attribute** + An example that expresses a CREATE request for <contentInstance> serialized into an XML document is shown below. This example is for the Module class and DataPoint class mapping and only content attribute and contentInfo attribute are shown as content parameter (pc). ```XML @@ -7070,7 +7074,6 @@ In content attribute, a value of DataPoint may be written between tags named the contentInfo attribute is able to be omitted because content attribute has tags named the certain Module class name (<temp></temp>). - An example for only DataPoint class mapping is shown below.: ```XML @@ -7101,7 +7104,6 @@ If a contentInfo attribute is not used, content attribute may change as follows: ``` - # Annex D (informative) Bibliography - oneM2M TS-0001: "Functional Architecture"