Skip to content

Feature request: Support BACnet command prioritization (Priority_Array / Relinquish_Default) for commandable objects #40

@wz2b

Description

@wz2b

At the moment, it appears that writes simply overwrite the stored property value directly. For BACnet interoperability, it would be very helpful to support the standard command priority model.

Requested behavior

  1. Support Relinquish_Default as an object property

Allow a commandable object to be created with a Relinquish_Default value. This should be the fallback value used when all 16 command priority slots are NULL.

  1. Store commandable values using a 16-slot Priority_Array

For commandable objects/properties, store the commanded values internally as a BACnet-style priority array with 16 slots.

Each slot should hold either:

  • a commanded value, or
  • NULL meaning no active command at that priority
  1. Writes to Present_Value should honor BACnet priority

When a client writes Present_Value:

  • if a priority is supplied, write the value into that priority slot
  • if no priority is supplied, use the normal BACnet default write priority of 16

Writing NULL at a given priority should relinquish that slot.

  1. Present_Value should be computed from the highest active priority

The effective Present_Value should not be stored independently for commandable objects.

Instead, it should be computed as:

  • the highest-priority non-NULL entry in Priority_Array, or
  • Relinquish_Default if all 16 slots are NULL
  1. For commandable objects:
  • reading Present_Value should return the effective value after priority arbitration
  • reading Priority_Array should return the raw 16-slot array
  • reading Relinquish_Default should return the fallback value

I would not expect “read PV at a specific priority” as a separate behavior, since BACnet already represents that through Priority_Array.

  1. Object flags remain object-level, not per-priority

Properties such as:

  • Out_Of_Service
  • Status_Flags
  • Reliability

should continue to apply to the object as a whole, not to individual entries in the priority array.

The implementation should NOT impact backward compatibiltiy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions