This method represents the BACnet service CreateObject. It is used to create a new instance of an object. The BACnet properties of standard objects created with this Method may be initialized in two ways: initial values may be provided as part of the CreateObject Method call or values may be written to the newly created object using OPC UA Write.
Signature
CreateObject (
[in]BACnetObjectIdentifier ObjectSpecifier
[in]0:KeyValuePair[] ListOfInitialValues
);
Argument |
Description |
ObjectSpecifier |
Provides the information about the BACnet object type to be created or the BACnet object identifier if the object to be created. The instance information shall be undefined if only the object type is passed in. The BACnetObjectIdentifier DataType is defined in 10.2.1. |
ListOfInitialValues |
A list of initial values that shall be used to initialize the values of the specified properties of the newly created object. |
Method Result Codes
ResultCode |
Description |
BadOutOfMemory |
This status is returned for the BACnet error code NO_SPACE_FOR_OBJECT |
BadNotSupported |
This status is returned for the BACnet error code DYNAMIC_CREATION_NOT_SUPPORTED |
BadTypeDefinitionInvalid |
This status is returned for the BACnet error code UNSUPPORTED_OBJECT_TYPE |
BadNodeIdInvalid |
This status is returned for the BACnet error code OBJECT_IDENTIFIER_ALREADY_EXISTS |
BadTypeMismatch |
This status is returned for the BACnet error code INVALID_DATATYPE |
BadOutOfRange |
This status is returned for the BACnet error code VALUE_OUT_OF_RANGE |
BadNodeIdInvalid |
This status is returned for the BACnet error code UNKNOWN_PROPERTY |
BadTypeMismatch |
This status is returned for the BACnet error code CHARACTER_SET_NOT_SUPPORTED |
BadNotWritable |
This status is returned for the BACnet error code WRITE_ACCESS_DENIED |
BadTypeMismatch |
This status is returned for the BACnet error code DATATYPE_NOT_SUPPORTED |