UNPKG

bacnet-device

Version:

A TypeScript library for implementing BACnet IP devices in Node.js.

57 lines 2.63 kB
import type { BDSubscription, BDQueuedCov } from './objects/device/types.js'; import type { BDDevice } from './objects/device/device.js'; import bacnet from '@innovation-system/node-bacnet'; declare const BACnetClient: typeof bacnet.default; /** * Type representing the BACnet client instance from the underlying library */ export type BACNetClientType = InstanceType<typeof BACnetClient>; /** * Ensures that a value or array of values is returned as an array * * @param val - A single value or array of values * @returns An array containing the input value(s) * @typeParam T - The type of the values */ export declare const ensureArray: <T>(val: T | T[]) => T[]; /** * Sends a confirmed COV (Change of Value) notification to a subscriber * * This function sends a notification that requires confirmation from the recipient, * which helps ensure reliable delivery of property value changes. * * @param client - The BACnet client instance used to send the notification * @param emitter - The BACnet device sending the notification * @param subscription - The subscription information for the recipient * @param cov - The change of value data to send * @returns A promise that resolves when the notification is confirmed or rejects on error */ export declare const sendConfirmedCovNotification: (client: BACNetClientType, emitter: BDDevice, subscription: BDSubscription, cov: BDQueuedCov) => Promise<void>; /** * Sends an unconfirmed COV (Change of Value) notification to a subscriber * * This function sends a notification without requiring confirmation from the recipient. * This is more efficient but less reliable than confirmed notifications. * * @param client - The BACnet client instance used to send the notification * @param emitter - The BACnet device sending the notification * @param subscription - The subscription information for the recipient * @param cov - The change of value data to send * @returns A promise that resolves when the notification is sent */ export declare const sendUnconfirmedCovNotification: (client: BACNetClientType, emitter: BDDevice, subscription: BDSubscription, cov: BDQueuedCov) => Promise<void>; /** * Start date of the process. */ export declare const PROCESS_START_DATE: Date; /** * Standard time zone offset local to the computer running this code. */ export declare const STD_TZ_OFFSET: number; /** * Returns whether daylight saving time is in effect for a given date, * relative to the local time zone of the computer running this code. */ export declare const isDstInEffect: (date: Date) => boolean; export {}; //# sourceMappingURL=utils.d.ts.map