Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Using the CIM class example from section 3 as a basis, the following CIM instance encoding is presented.
-
instance of MyClass { Id = 123; Data1 = "StringField"; Array = { 1, 2, 3 }; };
The raw hexadecimal encoding of this CIM instance follows.
-
78 56 34 12 D3 01 00 00 06 00 44 50 52 41 56 41 54 2D 44 45 56 00 00 52 4F 4F 54 00 76 01 00 00 00 00 00 00 00 11 00 00 00 0E 00 00 00 00 42 61 73 65 00 06 00 00 00 11 00 00 00 09 00 00 00 00 08 00 00 00 16 00 00 00 04 00 00 00 27 00 00 00 2E 00 00 00 55 00 00 00 5C 00 00 00 99 00 00 00 A0 00 00 00 C7 00 00 00 CB 00 00 00 47 FF FF FF FF FF FF FF FF FD 00 00 00 FF FF FF FF 11 01 00 80 00 4D 79 43 6C 61 73 73 00 00 44 65 73 63 72 69 70 74 69 6F 6E 00 00 4D 79 43 6C 61 73 73 20 45 78 61 6D 70 6C 65 00 00 41 72 72 61 79 00 13 20 00 00 03 00 0C 00 00 00 01 00 00 00 11 00 00 00 0A 00 00 80 03 08 00 00 00 4D 00 00 00 00 75 69 6E 74 33 32 00 00 44 61 74 61 31 00 08 00 00 00 01 00 04 00 00 00 01 00 00 00 27 00 00 00 0A 00 00 80 03 08 00 00 00 91 00 00 00 03 00 00 80 00 0B 00 00 00 FF FF 04 00 00 80 00 0B 00 00 00 FF FF 00 73 74 72 69 6E 67 00 00 44 61 74 61 32 00 08 00 00 00 02 00 08 00 00 00 01 00 00 00 11 00 00 00 0A 00 00 80 03 08 00 00 00 BF 00 00 00 00 73 74 72 69 6E 67 00 00 49 64 00 03 40 00 00 00 00 00 00 00 00 00 00 00 00 1C 00 00 00 0A 00 00 80 23 08 00 00 00 F5 00 00 00 01 00 00 80 33 0B 00 00 00 FF FF 00 73 69 6E 74 33 32 00 00 64 65 66 61 75 6C 74 56 61 6C 75 65 00 00 00 00 00 00 00 49 00 00 00 00 00 00 00 00 20 7B 00 00 00 19 00 00 00 00 00 00 00 09 00 00 00 04 00 00 00 01 26 00 00 80 00 4D 79 43 6C 61 73 73 00 03 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 00 53 74 72 69 6E 67 46 69 65 6C 64 00
The following table breaks apart this encoding using ABNF. Note that the shaded part is the ClassPart encoding of the CIM instance and is identical to the preceding table for MyClass. Encoded instances always contain the CIM class definition encoding as the first part of the block. This allows a CIM instance to be decoded in its entirety without retrieving from, or cross-referencing to, a CIM class definition.
The part of the encoding that differs from the MyClass encoding (and is specific to the CIM instance) is not shaded and is covered in the following table.
Relevant offset |
Octet values |
Comments |
---|---|---|
|
|
EncodingUnit. |
|
78 56 34 12 |
Standard CIM object Signature. |
|
D3 01 00 00 |
UINT32 length of the entire CIM class encoding (0x1D3 octets). |
|
|
|
|
06 |
ObjectBlock::decoration. Bit 1 set. this is a CIM instance definition. Bit 2 set. this CIM object is decorated with a server and CIM namespace name. |
|
|
Decoration. |
|
00 44 50 52 41 56 41 54 2D 44 56 00 |
The Encoded-String that contains the name of the server that transmitted the CIM object DPRAVAT-DEV. |
|
00 52 4F 4F 54 00 |
The Encoded-String that contains the CIM namespace. The CIM object was created from ROOT. |
|
All shaded octets |
InstanceType::CurrentClass. This is a direct copy of the CIM class encoding for MyClass in the CurrentClass block. |
|
49 00 00 00 |
InstanceType::EncodingLength. 0x49 octets (73 decimal). |
|
00 00 00 00 |
InstanceType::InstanceClassName. Points to the CIM class name in heap. |
|
00 |
InstanceType::Flags. |
|
20 |
InstanceType::NdTabl. 00100000. Indicates the third CIM property has its default value. |
|
7B 00 00 00 |
InstanceType::InstanceData::ValueTable. The value for CIM property 0. |
|
19 00 00 00 |
InstanceType::InstanceData::ValueTable. The value for Data1. |
|
00 00 00 00 |
InstanceType::InstanceData::ValueTable. Data 2 still has the default value. |
|
09 00 00 00 |
InstanceType::InstanceData::ValueTable. The location of array for Array. |
|
04 00 00 00 |
InstanceType::InstanceQualifierSet::EncodingLength. This indicates that there is no CIM qualifier set data because the EncodingLength only includes its own size. |
*** See notes following this table |
01 |
InstPropQualSetFlag. There are no property-level qualifiers. |
|
26 00 00 80 |
InstanceHeap::HeapLength The Heap is 0x26 octets in length, and the most significant bit is set, for all HeapLength values. |
Heap offset 0 |
00 4D 79 43 6C 61 73 73 00 |
Encoded-String MyClass. |
Heap offset 9 |
03 00 00 00 |
Encoded-Array::ArrayCount. There are three elements in the array. |
|
01 00 00 00 |
UINT32 [0]. |
|
02 00 00 00 |
UINT32 [1]. |
|
03 00 00 00 |
UINT32 [2]. |
HeapOffset 0x19 |
00 53 73 72 69 6E 67 46 69 65 6C 64 00 |
The Encoded-String of the value StringField. |
***In the left column of the previous table, a special case can occur with instances that have qualifiers (see the InstancePropQualifierSet rule), as follows.
-
instance of MyClass { Array = {1, 2, 3}; [test] Data1 = "StringField"; Id = 123; };
The encoding for the preceding CIM instance is required to take into account that a property-level CIM qualifier appears within the instance. When any CIM qualifier appears on any CIM property at the CIM instance level, there is required to be an array of QualifierSet elements, one for each CIM property in the CIM class to which the CIM instance belongs, even if one or more of the CIM properties is not used.
The binary encoding for the preceding CIM instance, detailed in the following table, differs from the previous example, which starts in the preceding table at the row above the row that contains the three asterisks (***) in the left column.
|
Octet values |
Comments |
---|---|---|
*** |
02 |
InstPropQualSetFlag. If the octet value is 02, one QualifierSet per property is encoded at this location prior to the InstanceHeap. |
|
04 00 00 00 |
QualifierSet: No qualifiers for CIM property 0 because the EncodingLength is four octets, which is the length of the EncodingLength value itself. |
|
0F 00 00 00 |
QualifierSet CIM property 1 (Data1): There are 15 octets for this QualifierSet. |
|
26 00 00 00 |
QualifierName: The Heap reference to the CIM qualifier name test. |
|
0B 00 00 00 |
QualifierType: CIM-TYPE-BOOL. |
|
FF FF |
Logical TRUE. |
|
04 00 00 00 |
QualifierSet, none for CIM property 2 (Data2). |
|
04 00 00 00 |
QualifierSet, none for CIM property 3 (Id). |
|
2C 00 00 80 |
InstanceHeap::HeapLength. The Heap is longer in order to accommodate the name of the CIM qualifier test. |
|
... |
The remainder of the Heap. |