procon-ip - v2.0.0
    Preparing search index...

    Class GetDmxData

    Parsed and mutable representation of all 16 DMX512 channels.

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    raw: string

    Original CSV body the instance was parsed from.

    Methods

    • Read the current value at index.

      Parameters

      • index: number

      Returns number

    • Update channel index to value, rounding to the nearest integer and clamping to [0, 255]. DMX512 channels are 8-bit integers; the controller expects integer values in the form payload, so a fractional input (12.5) is rounded (13) rather than stored verbatim.

      Parameters

      • index: number
      • value: number

      Returns void

      RangeError if index is outside [0, 15] or if value is not a finite number (NaN / Infinity). Math.max/Math.min would silently propagate NaN into toPostData() otherwise, sending an invalid value to the controller.

    • Form payload accepted by /usrcfg.cgi for a DMX512 update.

      Returns Record<string, string>