CCTS defines a finite set of primitive data types that shall be used for a Content Component. These data types are mapped to OPC UA CC (Content Component) DataTypes which are OPC UA Built-in DataTypes or DataTypes defined in the following clauses. Table 10 defines mapping between the primitive data types for the Content Component and the CC DataTypes.
Table 10 – Built-in data types
CCTS Primitive data type |
OPC UA CC DataType |
Description |
Definition |
Binary |
ByteString |
|
|
Boolean |
Boolean |
|
|
Decimal |
Decimal |
|
Clause 6.2.4 |
|
DecimalString |
|
Clause 6.2.5 |
Double |
Double |
|
|
Float |
Float |
|
|
Integer |
Integer |
SByte, Int16, Int32, Int64 |
|
NormalizedString |
NormalizedString |
|
Clause 6.2.7 |
String |
String |
|
|
|
LocalizedText |
|
|
TimeDuration |
DurationString |
|
Clause 6.2.6 |
TimePoint |
DateString |
|
Clause 6.2.2 |
|
TimeString |
|
Clause 6.2.6 |
Token |
N/A |
|
N/A |
N/A |
CurrencyCode |
Used to represent code for currency |
Clause 6.2.2 |
This is a structured DataType which represents a currency code. Its elements are defined in Table 11.
Table 11 - CurrencyCode DataType structure
Name |
Type |
Description |
CurrencyCode |
Structure |
|
namespaceUri |
String |
Identifies the organization (company, standards organization) that defines the currency code. Default is http://www.opcfoundation.org/UA/Currency/ISO4217:2008 |
unitId |
Int32 |
Numeric id from the ISO4217 table. This element is optional. Default value shall be “-1” that indicates that this element isn’t applicable. |
charId |
Byte[3] |
The CharacterId from the ISO4217 table. This has a fixed length of 3 characters as defined by ISO4217:2008.The allowed values in the Byte are the ASCI codes representing each character. The range of ASCI characters that are allowed is defined in the ISO4217 table. |
displayName |
LocalizedText |
Symbol if one is defined otherwise the same as the charid. |
Description |
LocalizedText |
Contains the full name of the currency such as Australian Dollar or Yuan Renminbi |
Its representation in the Address Space is defined in Table 12.
Table 12 - CurrencyCode Definition
Attributes |
Value |
BrowseName |
CurrencyCode |
This DataType defines a value which is a day in the Gregorian calendar in string. Lexical representation of the string conforms to ISO 8601-2000.
Table 13 - DateString Definition
Attribute |
Value |
||||
BrowseName |
DateString |
||||
IsAbstract |
False |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
|
Subtype of the String defined in OPC 10000-3 |
According to ISO 8601—2000, ‘calendar date representations are in the form [YYYY-MM-DD]. [YYYY] indicates a four-digit year, 0000 through 9999. [MM] indicates a two-digit month of the year, 01 through 12. [DD] indicates a two-digit day of that month, 01 through 31. For example, "the 5th of April 1981" may be represented as either "1981-04-05" in the extended format or "19810405" in the basic format.’
The standard also allows for calendar dates to be written with reduced precision. For example, one may write "1981-04" to mean "1981 April", and one may simply write "1981" to refer to that year or "19" to refer to the century from 1900 to 1999 inclusive.
Although the standard allows both the YYYY-MM-DD and YYYYMMDD formats for complete calendar date representations, if the day [DD] is omitted then only the YYYY-MM format is allowed. By disallowing dates of the form YYYYMM, the standard avoids confusion with the truncated representation YYMMDD (still often used).
This DataType defines a decimal value. The format of this value conforms to the following formula
(-1)sign x coefficient x 10exponent
Attribute |
Value |
||||
BrowseName |
Decimal |
||||
IsAbstract |
False |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
|
Subtype of the SByte defined in OPC 10000-3 |
For this release the OPC UA stacks and infrastructure does not support Decimal as a base type, thus this type must be mapped to a ByteString and the ByteString must be passed to the SDK and/or Stack. This DataType has to be handled by the application.
Decimal can be encoded in a number of ways and can be defined to have 32, 64 and 128 varieties. Since the OPC UA stacks do not natively support this encoding only a single Decimal type is being defined. This will allow the stacks in the future to be expanded to support Decimal32, Decimal64 and Decimal128. The encoding of decimal is also defined by more than one group using different encodings. The binary encoding being used for this release (and will always be used for the plain decimal binary string encoding) is a string that is 128 bit and follows the IEC TR 24732 definition for a decimal. It is summarised in the table below.
Parameter |
decimal |
k, storage width in bits |
128 |
p, precision in digits |
34 |
6144 |
|
6176 |
|
sign bit |
1 |
17 |
|
t, trailing significant field width in bits |
110 |
k, storage width in bits |
128 |
|
|
This primitive DataType defines a value which can be represented by decimal number in string. Lexical representation of the string conforms to W3C XML Schema Definition Language (XSD) 1.1 Part 2: DataTypes.
Table 16 - DecimalString Definition
Attribute |
Value |
||||
BrowseName |
DecimalString |
||||
IsAbstract |
False |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
|
Subtype of the String defined in OPC 10000-3 |
OPC UA Applications may have the responsibility to encode / decode the DecimalString to an appropriate data type which is supported by the application’s platform. The DecimalString is a numeric string with an optional sign and decimal point.
This DataType defines a value which is a string representation of a duration of time. It conforms to lexical rules in ISO 8601-2000.
Table 17 - DurationString Definition
Attribute |
Value |
|||||
BrowseName |
DurationString |
|||||
IsAbstract |
False |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
||
Subtype of the String defined in OPC 10000-3 |
According to ISO 8601—2000 ‘Durations are represented by the format P[n]Y[n]M[n]DT[n]H[n]M[n]S or P[n]W as shown to the right. In these representations, the [n] is replaced by the value for each of the date and time elements that follow the [n]. Leading zeros are not required, but the maximum number of digits for each element should be agreed to by the communicating parties. The capital letters P, Y, M, W, D, T, H, M, and S are designators for each of the date and time elements and are not replaced.
P is the duration designator (historically called "period") placed at the start of the duration representation.
Y is the year designator that follows the value for the number of years.
M is the month designator that follows the value for the number of months.
W is the week designator that follows the value for the number of weeks.
D is the day designator that follows the value for the number of days.
T is the time designator that precedes the time components of the representation.
H is the hour designator that follows the value for the number of hours.
M is the minute designator that follows the value for the number of minutes.
S is the second designator that follows the value for the number of seconds.
For example, "P3Y6M4DT12H30M5S" represents a duration of "three years, six months, four days, twelve hours, thirty minutes, and five seconds". Date and time elements including their designator may be omitted if their value is zero, and lower order elements may also be omitted for reduced precision. For example, "P23DT23H" and "P4Y" are both acceptable duration representations’
This DataType defines a value which is a normalized string. Some Unicode characters have multiple equivalent binary representations consisting of sets of combining and/or composite Unicode characters. The Unicode standard defines a process called normalization that returns one binary representation when given any of the equivalent binary representations of a character. The Win32 and the .NET Framework currently support normalization forms C, D, KC, and KD, as defined in Annex15. This definition of NormalizedString uses Normalization Form C for all content, because this form avoids potential interoperability problems arising from the use of canonically equivalent, yet different, character sequences in document formats
Table 18 - NormalizedString Definition
Attribute |
Value |
||||
BrowseName |
NormalizedString |
||||
IsAbstract |
False |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
|
Subtype of the String defined in OPC 10000-3 |
This DataType defines a value which is the string representation of a time. It conforms to lexical rules in ISO 8601-2000.
Table 19 - TimeString Definition
Attribute |
Value |
||||
BrowseName |
TimeString |
||||
IsAbstract |
False |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
|
Subtype of the String defined in OPC 10000-3 |
ISO 8601 uses the 24-hour clock system. The basic format is [hh][mm][ss] and the extended format is [hh]:[mm]:[ss].
[hh] refers to a zero-padded hour between 00 and 24 (where 24 is only used to notate midnight at the end of a calendar day).
[mm] refers to a zero-padded minute between 00 and 59.
[ss] refers to a zero-padded second between 00 and 60 (where 60 is only used to notate an added leap second).
So a time might appear as either "134730" in the basic format or "13:47:30" in the extended format.
It is also acceptable to omit lower order time elements for reduced accuracy: [hh]:[mm], [hh][mm] and [hh] are all used.
Midnight is a special case and can be referred to as both "00:00" and "24:00". The notation "00:00" is used at the beginning of a calendar day and is the more frequently used. At the end of a day use "24:00"