2.2.26 NdTable
NdTable is an encoded table that represents the behavior of the default value of properties in a CIM class.
Values in the table are ordered similar to the order shown in the PropertyLookupTable.
Classes can establish default values for properties, as specified in [DMTF-DSP0004]. In some cases, the default value for a CIM property can be defined in a superclass, for example, by using the MOF syntax for CIM.
-
class Base { ... sint32 ValueX = 123; } class Derived : Base { sint32 ValueY = 456; }
In this example, both ValueX and ValueY have defaults; however, they are established in different classes. Because the derived class contains all the information from the base class, the effective class declaration is similar to the following.
-
class Derived : Base { sint32 ValueX = 123; sint32 ValueY = 456; }
However, for many operations that process CIM objects outside network protocol operations, it is important to distinguish if the default value is inherited or if it is locally defined in the current class. Therefore, this information must be maintained in the encoding.
Only 2 bits are required to indicate this information for each property; therefore, the bit fields are packed into octets.
-
NdTable = *NullAndDefaultFlag
The total number of bits is the number of properties * 2 rounded up to the nearest whole octet count. Specifically, the number of required octets is specified by the following formula.
-
octetCount = (PropertyCount - 1) / 4 + 1 // a formula, not ABNF
When encoding or decoding NdTable under ClassPart, the PropertyCount specified in PropertyLookupTable in the ClassPart MUST be used for calculating length. When encoding or decoding NdTable under InstanceType, the PropertyCount specified in InstanceType.CurrentClass.ClassPart.PropertyLookupTable MUST be used.
Because of rounding, there might be unused bits in the octet. These bits can have any value.