BACnetStack_AddLiftOrEscalatorObject
bool BACnetStack_AddLiftOrEscalatorObject( const uint32_t deviceInstance, const uint16_t objectType, const uint32_t objectInstance, const uint32_t elevatorGroupInstance, const uint8_t groupId, const uint8_t installationId);Adds a Lift or Escalator Object.
The device must be added first before this function can be called.
If adding to an Elevator Group Object, the Elevator Group object must be created first.
SIDE EFFECT: when elevatorGroupInstance is not 4194303, this object is also APPENDED to that Elevator Group object’s Group_Members property (135-2024 cl. 12.58.7). Note that BACnetStack_SetLiftHigherLowerDeck() can later REMOVE it again - see that function.
The only Lift/Escalator properties that are handled and stored by the CAS BACnet Stack are:
- ObjectIdentifier, ObjectType, PropertyList
- StatusFlags (assembled by the stack, but from EventState / Reliability / OutOfService, which are themselves read back through the callbacks below)
- ElevatorGroup, GroupID and InstallationID (all set by this function)
- EnergyMeterRef, if BACnetStack_SetLiftOrEscalatorEnergyMeterRef() was called. When it names a real instance the stack then reports EnergyMeter as 0.0
- HigherDeck and LowerDeck, if BACnetStack_SetLiftHigherLowerDeck() was called
THE DOOR COUNT IS NOT STORED BY THE STACK. Every door-indexed array below is served entirely by the application, which therefore owns how many doors the lift has.
Callbacks handle everything else. Required Lift properties:
-------------------------------------------------------------------------------- Property Datatype Callback -------------------------------------------------------------------------------- ObjectName CharacterString CallbackGetPropertyCharacterString CarPosition Unsigned8 CallbackGetPropertyUnsignedInteger CarMovingDirection Enumerated CallbackGetPropertyEnumerated CarDoorStatus Enumerated array CallbackGetPropertyEnumerated useArrayIndex = the door number PassengerAlarm Boolean CallbackGetPropertyBool OutOfService Boolean CallbackGetPropertyBool CallbackSetPropertyBool (if made writable) FaultSignals BACnetLIST of CallbackGetListOfEnumerations Enumerated --------------------------------------------------------------------------------Optional Lift properties - enable each with BACnetStack_SetPropertyEnabled() first:
-------------------------------------------------------------------------------- Property Datatype Callback -------------------------------------------------------------------------------- FloorText, CharacterString CallbackGetPropertyCharacterString CarDoorText array MakingCarCall Unsigned8 array CallbackGetPropertyUnsignedInteger CarDoorCommand Enumerated array CallbackGetPropertyEnumerated AssignedLandingCalls BACnetAssigned CallbackGetSequenceLiftAssignedLandingCall LandingCalls array RegisteredCarCall BACnetLiftCarCall CallbackGetSequenceLiftRegisteredCarCall List array LandingDoorStatus BACnetLandingDoor CallbackGetSequenceLiftLandingDoorStatus Status array CarLoad Real CallbackGetPropertyReal CarMode, Enumerated CallbackGetPropertyEnumerated CarDriveStatus, CarAssignedDirection CarDoorZone Boolean CallbackGetPropertyBool NextStoppingFloor Unsigned8 CallbackGetPropertyUnsignedInteger TimeDelay, Unsigned CallbackGetPropertyUnsignedInteger TimeDelayNormal --------------------------------------------------------------------------------Required Escalator properties. An Escalator has NO object-specific callbacks - everything is a plain typed property:
-------------------------------------------------------------------------------- Property Datatype Callback -------------------------------------------------------------------------------- ObjectName CharacterString CallbackGetPropertyCharacterString OperationDirection Enumerated CallbackGetPropertyEnumerated PassengerAlarm Boolean CallbackGetPropertyBool OutOfService Boolean CallbackGetPropertyBool PowerMode* Boolean CallbackGetPropertyBool EscalatorMode* Enumerated CallbackGetPropertyEnumerated FaultSignals* BACnetLIST of CallbackGetListOfEnumerations Enumerated (*) Optional; enable it with BACnetStack_SetPropertyEnabled first. FaultSignals is required on a Lift but optional on an Escalator. --------------------------------------------------------------------------------IMPORTANT: CarPosition, CarMovingDirection, CarDoorStatus and PassengerAlarm on a Lift, and OperationDirection and PassengerAlarm on an Escalator, return Error(PROPERTY, VALUE_NOT_INITIALIZED) if the application does not serve them - the stack deliberately refuses to invent a value for these. OutOfService is NOT in that set: an unserved OutOfService silently reports FALSE.
NOTE: GroupID and InstallationID are stored by the stack but are Unsigned properties, and the stack consults the callbacks BEFORE its own store. A registered CallbackGetPropertyUnsignedInteger that answers for either one OVERRIDES the value set here.
See also: BACnetStack_ObjectExists(), BACnetStack_RemoveObject()
BACnet reference: ANSI/ASHRAE 135-2024 clause 12.59 (Lift Object Type); clause 12.60 (Escalator Object Type).
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
deviceInstance |
in | The instance number of the device that owns this Lift or Escalator Object. |
objectType |
in | Must be Lift or Escalator. See CASBACnetStack::BACnetObjectType. Any other value is rejected. With objectInstance, this is one BACnet Object Identifier carried as two parameters (see the API conventions). |
objectInstance |
in | The instance number of this Lift or Escalator Object. |
elevatorGroupInstance |
in | The instance number of the Elevator Group Object that this Lift or Escalator Object belongs to. That object must already exist or this call fails. Use 4194303 - the spec’s “no reference” sentinel (cl. 12.59.6 / 12.60.6) - when this object is not part of an Elevator Group Object. |
groupId |
in | Group_ID for this object, an Unsigned8 (cl. 12.59.7 / 12.60.7). Stored verbatim: it is NOT validated, and it is NOT kept in sync with the referenced Elevator Group’s own Group_ID (cl. 12.58.6), so you must pass a value that matches the group yourself. |
installationId |
in | Installation_ID for this object, an Unsigned8 (cl. 12.59.8 / 12.60.8). The spec requires this to be unique among the Lift or Escalator Objects of the same Elevator Group Object, but the stack does NOT check it - a duplicate is stored and served without complaint. |
Returns
Section titled “Returns”True on success; false if the device does not exist, objectType is not Lift or Escalator, the referenced Elevator Group Object does not exist, or Lift/Escalator support was not compiled. On failure the partially created object is removed again.
Topic: Objects and properties. Declared in CASBACnetStackDLL.h.