7.3.3.30 Method CreateObject

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
ObjectSpecifierProvides 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.
ListOfInitialValuesA 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
BadOutOfMemoryThis status is returned for the BACnet error code NO_SPACE_FOR_OBJECT
BadNotSupportedThis status is returned for the BACnet error code DYNAMIC_CREATION_NOT_SUPPORTED
BadTypeDefinitionInvalidThis status is returned for the BACnet error code UNSUPPORTED_OBJECT_TYPE
BadNodeIdInvalidThis status is returned for the BACnet error code OBJECT_IDENTIFIER_ALREADY_EXISTS
BadTypeMismatchThis status is returned for the BACnet error code INVALID_DATATYPE
BadOutOfRangeThis status is returned for the BACnet error code VALUE_OUT_OF_RANGE
BadNodeIdInvalidThis status is returned for the BACnet error code UNKNOWN_PROPERTY
BadTypeMismatchThis status is returned for the BACnet error code CHARACTER_SET_NOT_SUPPORTED
BadNotWritableThis status is returned for the BACnet error code WRITE_ACCESS_DENIED
BadTypeMismatchThis status is returned for the BACnet error code DATATYPE_NOT_SUPPORTED