@bacnet-js/device
Version:
A TypeScript library for implementing BACnet IP devices in Node.js.
59 lines • 2.58 kB
JavaScript
import { BDSingletProperty, BDArrayProperty, } from '../../properties/index.js';
import { BDAnalogValue, } from './analogvalue.js';
import { ObjectType, ApplicationTag, PropertyIdentifier, } from '@bacnet-js/client';
/**
* Implements a BACnet Analog Output object
*
* The Analog Output object represents a physical or virtual analog output point such as a
* control valve, damper actuator, or other output device. This object type provides a standard
* way to represent and control analog outputs in BACnet systems.
*
* Required properties according to the BACnet specification:
* - Object_Identifier (automatically added by BACnetObject)
* - Object_Name (automatically added by BACnetObject)
* - Object_Type (automatically added by BACnetObject)
* - Present_Value (writable)
* - Status_Flags
* - Event_State
* - Out_Of_Service
* - Units
* - Priority_Array
* - Relinquish_Default
*
* @extends BDObject
*/
export class BDAnalogOutput extends BDAnalogValue {
/**
* The default value for the present value when all priority array slots are NULL
*
* This property represents the value to be used for the Present_Value property
* when all entries in the Priority_Array property are NULL.
*/
relinquishDefault;
/**
* The priority array for command arbitration
*
* This property represents the 16-level priority array used for command arbitration.
* BACnet devices use this mechanism to determine which command source has control
* over the output value at any given time.
*/
priorityArray;
/**
* The current command priority that is controlling the Present_Value
*
* This property indicates which priority level in the priority array currently
* has control of the Present_Value property, or NULL if the Relinquish_Default
* is being used.
*/
currentCommandPriority;
/**
* Creates a new BACnet Analog Output object
*/
constructor(instance, opts) {
super(instance, opts, ObjectType.ANALOG_OUTPUT);
this.relinquishDefault = this.addProperty(new BDSingletProperty(PropertyIdentifier.RELINQUISH_DEFAULT, ApplicationTag.REAL, false, 0));
this.priorityArray = this.addProperty(new BDArrayProperty(PropertyIdentifier.PRIORITY_ARRAY, false, new Array(16).fill({ type: ApplicationTag.NULL, value: null })));
this.currentCommandPriority = this.addProperty(new BDSingletProperty(PropertyIdentifier.CURRENT_COMMAND_PRIORITY, ApplicationTag.UNSIGNED_INTEGER, false, 16));
}
}
//# sourceMappingURL=analogoutput.js.map