UNPKG

lib-comfoair

Version:

Library to communicate with Zehnder ComfoAirQ ventilation unit through the ComfoControl gateway

36 lines (35 loc) 1.18 kB
import { GatewayOperation } from './protocol/comfoConnect'; /** * All ComfoAir messages start with a 38 byte header. */ export declare const COMFO_MESSAGE_HEADER_LENGTH = 38; export declare class ComfoControlHeader { /** * The total length of the message, excluding the totalLength field (4 bytes). */ readonly messageLength: number; /** * The UUID of the sender device. */ readonly senderUuid: string; /** * The UUID of the receiver device. */ readonly receiverUuid: string; /** * The length of the operation data. */ readonly opLength: number; /** * The total length of the message including msg and op data. */ get length(): number; get messageOffset(): number; get opOffset(): number; constructor(senderUuid: string, receiverUuid: string, opLength: number, messageLength: number); static fromBinary(data: Buffer, offset?: number): ComfoControlHeader; toBinary(): Buffer; getOperationBuffer(data: Buffer, offset?: number): Buffer; getMessageBuffer(data: Buffer, offset?: number): Buffer; parseOperation(data: Buffer, offset?: number): GatewayOperation; }