Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SetTimeCommand

Set current time on shade. Note that there is some latency in the command so shades will not be millisecond accurate.

Hierarchy

Index

Constructors

constructor

Properties

characteristic

characteristic: string

commandType

commandType: CommandType

encoder

encoder: CommandEncoder = new CommandEncoder()

name

name: string = "GenericCommand"

service

service: string

Methods

parseResponse

  • parseResponse(buffer: any): void
  • Subclasses which require response parsing should override this function

    Parameters

    • buffer: any

    Returns void

setSequence

  • setSequence(seq: number): void
  • Set the sequence byte

    Parameters

    • seq: number

    Returns void

toData

  • toData(): Array<any>
  • Returns a an array of UInt8 values, ready to be sent over the wire to a shade

    Returns Array<any>

toHash

  • toHash(): string
  • This hash is really useful for say, keeping track of unqiue commands in a dictionary or set.

    Returns string

toHexValues

  • toHexValues(): string[]
  • For example if you have a command consisting of [ Uint8, Uint8, Uint16 ], this function will print 3 values. This is in contrast to a command like toData(), which will output 4 values consisting of [ Uint8, Uint8, Uint8, Uint8 ]

    Returns string[]

toSizedValues

  • For example if you have a command consisting of [ Uint8, Uint8, Uint16 ], this function will print 3 values. This is in contrast to a command like toData(), which will output 4 values consisting of [ Uint8, Uint8, Uint8, Uint8 ]

    Returns CommandValue[]

toString

  • toString(): string
  • Returns a hex string representation

    Returns string

toValues

  • toValues(): number[]
  • For example if you have a command consisting of [ Uint8, Uint8, Uint16 ], this function will print 3 values. This is in contrast to a command like toData(), which will output 4 values consisting of [ Uint8, Uint8, Uint8, Uint8 ]

    Returns number[]

Generated using TypeDoc