Skip to content

Commit 2d358a1

Browse files
Merge pull request cesmii#34 from cesmii/Documentation-Changes-from-01-14-WG
Implement Documentation changes from Jan-14 Working Group
2 parents f2d5b19 + 37a0708 commit 2d358a1

File tree

1 file changed

+35
-23
lines changed

1 file changed

+35
-23
lines changed

RFC for Contextualized Manufacturing Information API.md

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S
5050
- **Control System** - An electronic control system and associated instrumentation used for industrial process control
5151
- **Request** - A generic means of a consumer to inform the producer what information is needed
5252
- **Response** - A generic means of a producer to fulfill the needs of the consumer
53+
- **Query** - A read operation
54+
- **Update** - A write operation, inclusive of creation
5355

5456
## 3. I3X Basic Interfaces
5557

56-
The I3X API SHALL be implemented over an encrypted transport, and support the interfaces listed in this section. In order to properly support some of these interfaces, implementations MUST support the required capabilities listed in section 4, and MAY support the optional capabilities listed in section 4.
58+
The I3X API SHALL be implemented over an encrypted transport, and support the interfaces listed in this section. In order to properly support some of these interfaces, implementations MUST support the required capabilities listed in [section 4](#4-cmip-requirements), and MAY support the optional capabilities listed in [section 4](#4-cmip-requirements).
5759

5860
### 3.1 Request and Response Structure
5961

@@ -67,26 +69,24 @@ Implementations MAY support a Binary serialization for all responses, where the
6769

6870
Applications consuming the API SHOULD use the normal "accept" and "content-type" headers for indicating inbound and outbound serialization format. If omitted, the default JSON serialization should be used.
6971

70-
### 3.2 Informative Interfaces
72+
### 3.2 Value Interfaces
73+
74+
Value Interfaces MAY be used to both Read and Write values in a CMIP, depending on the server implementation. In order to keep this document indepenent of any specific implementation technology choices, a Read operation shall be referred to as a Query; a Write operation shall be referred to as an Update. An Update may change an existing value, or create a new value in the CMIP.
7175

7276
#### 3.2.1 LastKnownValue
7377

7478
When invoked as a Query, the LastKnownValue interface MUST return the current value available in the CMIP for the requested object, by ElementId.
7579

7680
When invoked as a Query, the LastKnownValue interface MAY support an array of requested object ElementIds to reduce round-trips where multiple values are required by an application, in which case, the return payload MUST be an array.
7781

82+
When invoked as a Query, the response payload MUST include the metadata indicated in [section 4.1.1](#411-required-object-metadata) and, if indicated by an optional query parameter, MAY include the metadata indicated in [section 4.1.2](#412-optional-object-metadata).
83+
7884
When invoked as a Query, if indicated by an optional query parameter, the response payload MUST include the following metadata about the returned value:
7985
- ElementId: a unique string identifier for the element, as defined by the implementation
8086
- DataType: incudes most-derived Type name of an object, or primitive datatype for an attribute, and MUST use the JavaScript primitive types
81-
- Quality: a data quality indicator following the standard established by the [OPC UA standard status codes](https://reference.opcfoundation.org/Core/Part8/v104/docs/A.3.2.3#_Ref377938607). If data quality is not available, the CMIP may return a GOOD status.
8287
- TimeStamp: a timestamp corresponding to the time and date the data was recorded in the CMIP, following the standard established by [Internet RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
8388

84-
When invoked as a Query, if indicated by an optional query parameter, the response payload MAY include the following metadata about the returned value;
85-
- Interpolation: if the element value is interpolated, rather than stored, indicate the interpolation method
86-
- EngUnit: a string indicating the engineering unit for measuring the element value. Where present, the definitions found in UNECE Recommendation Number 20 MUST be used.
87-
- NamespaceURI: if the element value is an object, a URI indicating the Namespace of the object MUST be returned. If the value is an attribute, a URI indicating the Namespace SHOULD be returned. If the Namespace is an implementation of standards-based definition that includes a URI, that URI MUST be used.
88-
- ParentId: the ElementId of the parent object
89-
- Attribute Metadata: Additional information about how an object attribute is stored or treated by the underlying platform.
89+
Implementations MAY include the ability to write to the LastKnownValue. If this feature is implemented, the following considerations apply:
9090

9191
When invoked as an Update, the LastKnownValue interface MUST accept a new current value for the requested object to be recorded in the CMIP, by ElementId. If the CMIP supports write-back to a Control System (for example, via an interface to a PLC) additional security requirements outside the scope of this proposal MUST be considered.)
9292

@@ -98,29 +98,27 @@ When invoked as a Query, the HistoricalValue interface MUST return an array of h
9898

9999
When invoked as a Query, the HistoricalValue interface MAY support an array of requested object ElementIds to reduce round-trips where multiple values are required by an application, in which case, the return payload MUST be an array of arrays.
100100

101+
When invoked as a Query, the response payload MUST include the metadata indicated in [section 4.1.1](#411-required-object-metadata) and, if indicated by an optional query parameter, MAY include the metadata indicated in [section 4.1.2](#412-optional-object-metadata).
102+
101103
When invoked as a Query, if indicated by an optional query parameter, the response payload MUST include the following metadata about the returned value:
102104
- ElementId: a unique string identifier for the element, as defined by the implementation
103105
- DataType: incudes most-derived Type name of an object, or primitive datatype for an attribute, and MUST use the JavaScript primitive types
104-
- Quality: a data quality indicator following the standard established by the [OPC UA standard status codes](https://reference.opcfoundation.org/Core/Part8/v104/docs/A.3.2.3#_Ref377938607). If data quality is not available, the CMIP may return a GOOD status.
105106
- TimeStamp: a timestamp corresponding to the time and date the data was recorded in the CMIP, following the standard established by [Internet RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
106107

107-
When invoked as a Query, if indicated by an optional query parameter, the response payload MAY include the following metadata about the returned value;
108-
- Interpolation: if the element value is interpolated, rather than stored, indicate the interpolation method
109-
- EngUnit: a string indicating the engineering unit for measuring the element value. Where present, the definitions found in [UNECE Recommendation Number 20]((https://unece.org/trade/documents/2021/06/uncefact-rec20-0)) MUST be used.
110-
- NamespaceURI: if the element value is an object, a URI indicating the Namespace of the object MUST be returned. If the value is an attribute, a URI indicating the Namespace SHOULD be returned.
111-
- ParentId: the ElementId of the parent object
112-
- Attribute Metadata: Additional information about how an object attribute is stored or treated by the underlying platform.
108+
Implementations MAY include the ability to write to HistoricalValue(s). If this feature is implemented, the following considerations apply:
113109

114110
When invoked as an Update, the HistoricalValue interface MUST accept an updated historical value for the requested object and timestamp, by ElementId.
115111

116112
When invoked as an Update, the HistoricalValue interface MAY accept an array of updated historical values for an array of specified objects and timestamps, by ElementId.
117113

118-
When invoked as a Put, the HistoricalValue interface MAY accept an array of new historical values for an array of specified objects and timestamps, by ElementId.
114+
When invoked in order to Create a new historical record, the HistoricalValue interface MAY accept an array of new historical values for an array of specified objects and timestamps, by ElementId.
119115

120116
When updating Historical data, the CMIP SHOULD implement auditing or tracking of such changes.
121117

122118
### 3.3 Exploratory Interfaces
123119

120+
Exploratory Interfaces are Read-only operations, reflecting the current state of an information graph at the time of the query, or in some cases, at the time specified as a query parameter. Operations to change relationships between elements are performed as an Update of an instance object, using the Value interfaces described in section [section 3.2](#value-interfaces).
121+
124122
#### 3.3.1 Namespaces
125123

126124
When invoked as a Query, MUST return an array of Namespaces registered in the contextualized manufacturing information platform. All Namespaces MUST have a Namespace URI to support follow-up queries.
@@ -139,11 +137,11 @@ When invoked as a Query, MAY accept an array of JSON structures defining Types f
139137

140138
#### 3.4.3 ObjectsByType
141139

142-
When invoked as a Query, MUST return an array of instance objects that are of the requested Type's ElementId.
140+
When invoked as a Query, MUST return an array of instance objects that are of the requested Type's ElementId. The returned value payload MUST include the metadata indicated in [section 4.1.1](#411-required-object-metadata) and, if indicated by an optional query parameter, MAY include the metadata indicated in [section 4.1.2](#412-optional-object-metadata).
143141

144142
#### 3.4.4 ObjectByElementId
145143

146-
When invoked as a Query, if the ElementId exists as an instance object, MUST return the instance object, conforming to the Type definition the instance object derives from, and including the current value, if present, of any attribute.
144+
When invoked as a Query, if the ElementId exists as an instance object, MUST return the instance object, conforming to the Type definition the instance object derives from, and including the current value, if present, of any attribute. The returned value payload MUST include the metadata indicated in [section 4.1.1](#411-required-object-metadata) and, if indicated by an optional query parameter, MAY include the metadata indicated in [section 4.1.2](#412-optional-object-metadata).
147145

148146
When invoked as a Query, MAY accept an array of JSON structures defining Types for the requested ElementIds to reduce round-trips where multiple instance object definitions are required by an application, in which case, the return payload MUST be an array of arrays.
149147

@@ -159,19 +157,33 @@ When invoked as a Query, MUST return the relationship types HasChildren, HasPare
159157

160158
When invoked as a Query, MAY return any graph-style relationship types the contextualized manufacturing information platform supports, excluding the HierarchicalRelationshipTypes. These relationship type names SHALL be treated as keywords for follow-up queries.
161159

162-
##### 3.4.6 RelationshipsOfType
160+
##### 3.4.6 ObjectsWithRelationshipsOfType
161+
162+
When invoked as a Query, MUST return an array of objects related to the requested ElementId by the Type name of relationship specified in the query. Implementations MAY support a timestamp as a query parameter, which would allow for the exploration of historical relationships.
163163

164-
When invoked as a Query, MUST return an array of objects related to the requested ElementId by the Type name of relationship specified in the query.
164+
Each element in the returned object array MUST include the metadata indicated in [section 4.1.1](#411-required-object-metadata) and, if indicated by an optional query parameter, MAY include the metadata indicated in [section 4.1.2](#412-optional-object-metadata).
165165

166-
When invoked as a Query, if specified by an optional query parameter, an implementation MAY support following relationships to the specified depth.
166+
When invoked as a Query, if specified by an optional query parameter, an implementation MAY support following relationships to the specified depth -- with the caveat that implementations may need to limit depth. As the required metadata for each object requires a boolean indication if an element HasChildren, a client may detect depth limiting by the server implementation, and recursively send follow-up requests to continue exploring the relationship hierarchy. If the depth parameter is omited, the depth SHALL be interpreted as zero.
167167

168168
## 4. CMIP Requirements
169169

170170
To support I3X, a CMIP must have certain capabilities. While this, and subsequent, RFCs will not define requirements for implementation specifics, some base functionality must exist. Vendors MAY differentiate on optimization, performance and scalability, to meet the requirements of the API.
171171

172172
### 4.1 Object Orientation
173173

174-
The reader will observe that the API requires the underlying platform to support the idea of organizing data into objects with attributes. Those objects MUST be composable using other objects. Implementations MAY choose to have attributes of different flavors internally (for example: OPC UA differentiates between properties and variables), but MUST simplify those variations to object parameters to support easy-to-consume JSON serialization. If the calling application requests additional metadata for an object, an implementation MAY return details about its specific attribute behavior (as described in 3.1.1 and 3.1.2)
174+
The reader will observe that the API requires the underlying platform to support the idea of organizing data into objects with attributes. Those objects MUST be composable using other objects. Implementations MAY choose to have attributes of different flavors internally (for example: OPC UA differentiates between properties and variables), but MUST simplify those variations to object parameters to support easy-to-consume JSON serialization. If the calling application requests additional metadata for an object, an implementation MAY return details about its specific attribute behavior (as described in [section 3.1.1](#311-response-serialization) and [section 3.1.2](#312-request-headers))
175+
176+
### 4.1.1 Required Object Metadata
177+
178+
- ParentId: the ElementId of the parent object
179+
- HasChildren: if the element value is complex, a boolean value indiciating if the element is composed of one or more child objects
180+
- NamespaceURI: if the element value is an object, a URI indicating the Namespace of the object MUST be returned. If the value is an attribute, a URI indicating the Namespace SHOULD be returned.
181+
182+
### 4.1.2 Optional Object Metadata
183+
184+
- Interpolation: if the element value is interpolated, rather than stored, indicate the interpolation method
185+
- EngUnit: a string indicating the engineering unit for measuring the element value. Where present, the definitions found in [UNECE Recommendation Number 20](https://unece.org/trade/documents/2021/06/uncefact-rec20-0) MUST be used.
186+
- Attribute Metadata: Additional information about how an object attribute is stored or treated by the underlying platform.
175187

176188
### 4.2 Type Safety
177189

0 commit comments

Comments
 (0)