node-insim
Version:
An InSim library for NodeJS with TypeScript support
67 lines (66 loc) • 2.01 kB
TypeScript
import { SendablePacket } from './base';
import { ObjectIndex, PacketType } from './enums';
import type { PacketData } from './types';
/**
* Object COntrol - currently used for switching start lights
*/
export declare class IS_OCO extends SendablePacket {
readonly Size = 8;
readonly Type = PacketType.ISP_OCO;
readonly ReqI = 0;
private readonly Zero;
OCOAction: OCOAction;
/** Specifies which lights you want to override **/
Index: ObjectIndex.AXO_START_LIGHTS1 | ObjectIndex.AXO_START_LIGHTS2 | ObjectIndex.AXO_START_LIGHTS3 | typeof OCO_INDEX_MAIN | ObjectIndex.AXO_NULL;
/**
* Identify particular start lights objects (0 to 63 or 255 = all)
*
* Identifier byte can be used to override groups of temporary start lights.
* It refers to the temporary lights identifier (0 to 63) seen in the layout editor.
*/
Identifier: number;
/**
* Specifies particular bulbs using the low 4 bits
*
* Bulb bit values for the currently available lights:
*
* {@link OCO_INDEX_MAIN}
*
* - bit 0 (1): red1
* - bit 1 (2): red2
* - bit 2 (4): red3
* - bit 3 (8): green
*
* {@link AXO_START_LIGHTS}
*
* - bit 0 (1): red
* - bit 1 (2): amber
* - bit 3 (8): green
*/
Data: OCOMainLights | OCOAutocrossStartLights | 0;
constructor(data?: IS_OCO_Data);
}
export type IS_OCO_Data = PacketData<IS_OCO>;
export declare enum OCOAction {
/** Reserved */
OCO_ZERO = 0,
/** Give up control of all lights */
OCO_LIGHTS_RESET = 4,
/** Use Data byte to set the bulbs */
OCO_LIGHTS_SET = 5,
/** Give up control of the specified lights */
OCO_LIGHTS_UNSET = 6
}
export declare enum OCOAutocrossStartLights {
RED = 1,
AMBER = 2,
GREEN = 8
}
export declare enum OCOMainLights {
RED_1 = 1,
RED_2 = 2,
RED_3 = 4,
GREEN = 8
}
/** Special value to override the main start light system */
export declare const OCO_INDEX_MAIN = 240;