@companion-surface/base
    Preparing search index...

    Interface SurfaceInstance

    interface SurfaceInstance {
        productName: string;
        surfaceId: string;
        blank(): Promise<void>;
        checkForFirmwareUpdates?(
            versionsCache: SurfaceFirmwareUpdateCache,
        ): Promise<SurfaceFirmwareUpdateInfo | null>;
        close(): Promise<void>;
        draw(signal: AbortSignal, drawProps: SurfaceDrawProps): Promise<void>;
        init(): Promise<void>;
        onVariableValue?(name: string, value: any): void;
        ready(): Promise<void>;
        setBrightness(percent: number): Promise<void>;
        showLockedStatus?(locked: boolean, characterCount: number): void;
        showStatus(
            signal: AbortSignal,
            cardGenerator: CardGenerator,
            statusMessage: string,
        ): Promise<void>;
        updateConfig?(config: Record<string, any>): Promise<void>;
    }
    Index

    Properties

    productName: string

    A user-friendly name for this surface This should be the product name of the device

    surfaceId: string

    A unique ID for this surface instance This is typically the serial number

    Methods

    • Called when one of the 'input' transfer variables changes value

      Parameters

      • name: string

        Name of the variable

      • value: any

        New value of the variable

      Returns void

    • Show the locked status of the surface for pincode entry This is only used when the surface was registered with the custom pincode map

      Parameters

      • locked: boolean

        Whether the surface is locked. When false, this will be shortly followed by draw calls

      • characterCount: number

        The number of characters of the pincode which have been entered

      Returns void

    • Show a status image on the device, instead of the normal operation This is typically used for Satellite to show the "connecting" state

      Parameters

      • signal: AbortSignal

        AbortSignal to cancel the status display

      • cardGenerator: CardGenerator

        Card generator to create the status image(s)

      • statusMessage: string

      Returns Promise<void>

    • If there are any config fields defined, when the user updates the config, this is called to inform the surface of the new config This will be called just before ready() with the initial config

      Parameters

      • config: Record<string, any>

      Returns Promise<void>