node-dmx
    Preparing search index...

    Type Alias FixtureModelPlugin

    Plugin contract for a fixture model implementation.

    type FixtureModelPlugin = {
        decode?: (
            args: { ctx: DecodeContext; personalityId: string },
        ) => FixtureState;
        defaultPersonalityId: string;
        encode: (
            args: {
                ctx: EncodeContext;
                personalityId: string;
                state: FixtureState;
            },
        ) => void;
        manufacturerId?: number;
        match: (id: FixtureIdentity) => boolean;
        model: string;
        personalities: Personality[];
        rdm?: {
            decodePid?: (pid: number, data: Uint8Array) => unknown;
            encodePid?: (pid: number, value: unknown) => Uint8Array;
        };
        vendor: string;
    }
    Index

    Properties

    decode?: (args: { ctx: DecodeContext; personalityId: string }) => FixtureState

    Optional decode path from DMX bytes to state object.

    defaultPersonalityId: string

    Default personality id when none is specified.

    encode: (
        args: { ctx: EncodeContext; personalityId: string; state: FixtureState },
    ) => void

    Encode fixture state into DMX bytes in-place.

    manufacturerId?: number

    Optional manufacturer id for matching.

    match: (id: FixtureIdentity) => boolean

    Returns true when this plugin can represent the fixture identity.

    model: string

    Model label.

    personalities: Personality[]

    Available personalities for this model.

    rdm?: {
        decodePid?: (pid: number, data: Uint8Array) => unknown;
        encodePid?: (pid: number, value: unknown) => Uint8Array;
    }

    Optional PID mappers for model-specific RDM data.

    vendor: string

    Vendor label.