OpenDOF Project
DOFObjectID DOFObjectID_Create ( DOFObjectIDClass  idClass,
uint32  dataSize,
const uint8 data 
)

Create a new DOFObjectID from a given class and data.

This constructs a new DOFObjectID without any Attributes.

Resource Management:
This function allocates resources that must later be freed by calling DOFObjectID_Destroy.
Note
It is the responsibility of the caller to ensure the given class is registered and that the given data satisfies the requirements for that class. Refer to the documentation of the specific DOFObjectIDClass, or the DOF Common Types Specification for more information on object ID classes, formats, and requirements.
Parameters
idClassThe DOFObjectIDClass for this identifier. Use of unknown/unregistered classes is permitted (e.g., classes defined after this library was built); however, classes must be registered with the OpenDOF Project prior to use. Valid range is 0 <= idClass < 2^30.
dataSizeThe size, in bytes, of the given data field at data. Valid range is 0 <= dataSize <= 63. This should be 0 if idClass is DOFOBJECTIDCLASS_BROADCAST.
dataPointer to the given data. This is ignored (and may be NULL) if dataSize is 0. Otherwise, this must be a valid pointer to at least dataSize bytes of data, and appropriate for the class of Object ID being constructed.
Returns
A new DOFObjectID.
Exceptions
NULLis returned if
  • an invalid parameter is detected; or
  • insufficient resources exist to create the DOFObjectID.
core-c-dof-oal Version 7.1.5 Build 0
2017-01-25