UNPKG

htd-lync

Version:

This library is meant to be used to interact with an HTD Lync 12

163 lines 4.63 kB
export declare const Header = 2; export declare const IsVolume: { No: number; Yes: number; }; export type IsVolume = (typeof IsVolume)[keyof typeof IsVolume]; export declare const Zone: { Broadcast: number; _01: number; _02: number; _03: number; _04: number; _05: number; _06: number; _07: number; _08: number; _09: number; _10: number; _11: number; _12: number; }; export type Zone = (typeof Zone)[keyof typeof Zone]; export declare const Command: { Set_MP3_Repeat: number; Common: number; Get_Status_All_Zones: number; Set_Name_Zone: number; Set_Name_Source: number; Id: number; Recall_File: number; Save_File: number; Get_Status_All: number; Get_Zone_Name: number; Get_Zone_Source_Name: number; Firmware: number; Get_Status_Zones: number; Set_Volume: number; Set_Balance: number; Set_Treble: number; Set_Bass: number; Echo: number; Set_Name_Default: number; Set_Audio_Default: number; }; export type Command = (typeof Command)[keyof typeof Command]; export declare const Data: { Off: number; Shuffle: number; MP3_FF: number; MP3_Play: number; MP3_Back: number; MP3_Stop: number; Mute_On: number; Mute_Off: number; All_Power_On: number; All_Power_Off: number; Zone_Power_On: number; Zone_Power_Off: number; DND_On: number; DND_Off: number; On: number; }; export type Data = (typeof Data)[keyof typeof Data]; export declare const Source: { _01: number; _02: number; _03: number; _04: number; _05: number; _06: number; _07: number; _08: number; _09: number; _10: number; _11: number; _12: number; _13: number; _14: number; _15: number; _16: number; _17: number; _18: number; }; export type Source = (typeof Source)[keyof typeof Source]; export declare const PartySource: { _01: number; _02: number; _03: number; _04: number; _05: number; _06: number; _07: number; _08: number; _09: number; _10: number; _11: number; _12: number; _13: number; _14: number; _15: number; _16: number; _17: number; _18: number; }; export type PartySource = (typeof PartySource)[keyof typeof PartySource]; export declare const MP3: { readonly Null: 0; readonly Back: 1; readonly Play: 2; readonly FF: 3; readonly Stop: 4; readonly Repeat_On: 5; readonly Repeat_Off: 6; readonly Shuffle: 7; }; export type MP3 = (typeof MP3)[keyof typeof MP3]; type CommandProps = { zone?: Zone; command?: Command; data?: Data | Source | PartySource | Name; }; type Name = number[]; export default class Protocol { header: typeof Header; is_volume: IsVolume; zone: Zone; command: Command; data: Data | Source | PartySource | Name; constructor({ zone, command, data }: CommandProps); get_command(): Buffer; static add_checksum(command: Buffer): Buffer; static calculate_checksum(command: Buffer): number; static validate_checksum(data: Buffer): boolean; static set_echo_mode(on: boolean): Protocol; static get_id(): Protocol; static get_firmware(): Protocol; static get_status_all(): Protocol; static get_status_zones(): Protocol; static get_status_all_zones(): Protocol; static set_party_mode(data: PartySource): Protocol; static set_party_mode_number(party_source: number): Protocol; static get_zone_name(zone: Zone): Protocol; static get_source_name(zone: Zone, data: Source): Protocol; static set_all_power(on: boolean): Protocol; static set_zone_power(zone: Zone, on: boolean): Protocol; static set_volume(zone: Zone, _volume: number): Protocol; static set_mute(zone: Zone, on: boolean): Protocol; static set_source(zone: Zone, data: Source): Protocol; static set_source_number(zone: Zone, source: number): Protocol; static set_dnd(zone: Zone, on: boolean): Protocol; static set_balance(zone: Zone, _balance: number): Protocol; static set_treble(zone: Zone, _treble: number): Protocol; static set_bass(zone: Zone, _bass: number): Protocol; static reset_zone_names(): Protocol; static reset_zone_audio(zone: Zone): Protocol; static set_zone_name(zone: Zone, name: string): Protocol; static set_zone_source_name(zone: Zone, source: Source, name: string): Protocol; static recall_file(file: number): Protocol; static save_file(file: number): Protocol; static mp3(action: MP3): Protocol; } export {}; //# sourceMappingURL=Protocol.d.ts.map