Command
A Command object runs a set of actions when a client writes a number to it. Each number selects a list of writes to other objects. One write can put a whole zone into a mode, such as occupied or unoccupied.
Typical uses
Section titled “Typical uses”- Set a zone to occupied or unoccupied
- Switch a room to a lighting scene
- Apply a night setback
- Start a warm-up sequence
Key properties
Section titled “Key properties”| Property | What it holds |
|---|---|
| Present_Value | The action code. Writing it selects which list of actions to run. |
| In_Process | TRUE while the actions run. A write during that time is refused as busy. |
| All_Writes_Successful | TRUE if every write in the last run succeeded. |
| Action | The lists of writes, one per action code. Each names an object, a property and a value. |
| Action_Text | Optional labels that describe each action code. |
How it behaves
Section titled “How it behaves”When some writes in an action fail, the Command object reports which ones failed; the standard does not ask it to reverse the writes that worked. The standard applies no event algorithm to this type.
With the CAS BACnet Stack
Section titled “With the CAS BACnet Stack”Enable it with the STACK_OPTION_OBJECT_TYPE_COMMAND build option and add each object with BACnetStack_AddObject. Present_Value is served through the callback you register with BACnetStack_RegisterCallbackGetPropertyUnsignedInteger and the BACnetStack_RegisterCallbackSetPropertyUnsignedInteger callback. The standard applies no event algorithm to this type and the stack serves no event state for it, so there is nothing to arm: BACnetStack_SetAlarmsAndEventsForObjectEnabled accepts the object but changes nothing a client can see.
Related object types
Section titled “Related object types”Schedule, Channel, Multi-state Value, Notification Class
Properties
Section titled “Properties”The properties ASHRAE 135-2024 clause 12.10 defines for this object type.
How to read the table:
- Conformance is what the standard asks of every object of this type: R is required, W is required and writable by a client, O is optional. A digit after the letter marks a condition in the standard that decides when the property is present or writable, such as support for intrinsic reporting.
- Present by default: yes means the stack presents the property as soon as you add the object; no means it
is optional and you turn it on with
BACnetStack_SetPropertyEnabled. This is the stack’s starting setup, so it can differ from the conformance code. - Writable is whether a client can write the property by default. Change it with
BACnetStack_SetPropertyWritable. - not in profile means the stack does not offer this property for this object type.
- Value when your callback does not answer: “Held by the stack” means the stack stores and serves the value itself and does not ask your callbacks. Otherwise it is the value the stack answers when your callback declines or is not registered.
| Property | Datatype | Conformance | Present by default | Writable | Value when your callback does not answer |
|---|---|---|---|---|---|
| Object_Identifier | BACnetObjectIdentifier | R | yes | no | Held by the stack. |
| Object_Name | CharacterString | R | yes | no | "Object <type>,<instance>", such as "Object 0,1" for Analog Input 1. |
| Object_Type | BACnetObjectType | R | yes | no | Held by the stack. |
| Description | CharacterString | O | no | no | "" |
| Present_Value | Unsigned | W | yes | yes | No default: value-not-initialized. |
| In_Process | Boolean | R | yes | no | false |
| All_Writes_Successful | Boolean | R | yes | no | false |
| Action | BACnetARRAY[N] of BACnetActionList | R | yes | no | No default: the read fails. |
| Action_Text | BACnetARRAY[N] of CharacterString | O | no | no | "" |
| Property_List | BACnetARRAY[N] of BACnetPropertyIdentifier | R | yes | no | Held by the stack. |
| Status_Flags | BACnetStatusFlags | O1 | no | no | Built by the stack from your callbacks. |
| Event_State | BACnetEventState | O1 | no | no | 0 |
| Reliability | BACnetReliability | O1 | no | no | 0 |
| Event_Detection_Enable | Boolean | O1,2 | no | no | false |
| Notification_Class | Unsigned | O1,2 | no | no | 0 |
| Event_Enable | BACnetEventTransitionBits | O1,2 | no | no | An empty bit string. |
| Acked_Transitions | BACnetEventTransitionBits | O1,2 | no | no | An empty bit string. |
| Notify_Type | BACnetNotifyType | O1,2 | no | no | 0 |
| Event_Time_Stamps | BACnetARRAY[3] of BACnetTimeStamp | O1,2 | no | no | No default: the read fails. |
| Event_Message_Texts | BACnetARRAY[3] of CharacterString | O2 | no | no | "" |
| Event_Message_Texts_Config | BACnetARRAY[3] of CharacterString | O2 | no | no | "" |
| Reliability_Evaluation_Inhibit | Boolean | O3 | no | no | false |
| Value_Source | BACnetValueSource | O4,5,6 | no | no | No default: the read fails. |
| Audit_Level | BACnetAuditLevel | O7 | not in profile | not in profile | No default: the read fails. |
| Auditable_Operations | BACnetAuditOperationFlags | O7 | not in profile | not in profile | No default: the read fails. |
| Tags | BACnetARRAY[N] of BACnetNameValue | O | no | no | No default: the read fails. |
| Profile_Location | CharacterString | O | no | no | "" |
| Profile_Name | CharacterString | O | no | no | "" |