filmout_manager/dist/fd/index.d.ts

67 lines
1.5 KiB
TypeScript
Raw Normal View History

declare enum Action {
NONE = 0,
LOAD = 1,
DISPLAY = 2,
STOP = 3
}
declare enum Mode {
RGB = 0,
BW = 1,
INVERT = 2,
BW_INVERT = 3,
RGB_CHANNELS = 4,
INVERT_CHANNELS = 5
}
interface fdOutgoingPosition {
x: number;
y: number;
w: number;
h: number;
}
interface fdOutgoingMessage {
action: Action;
image: string;
mode?: Mode;
position?: fdOutgoingPosition;
exposure?: number[];
}
interface fdIncomingMessage {
action: Action;
data?: number;
success: boolean;
error?: string;
}
interface fdResult {
action: Action;
image: string;
reported?: number;
elapsed?: number;
}
export declare class FD {
private bin;
private width;
private height;
private host;
private port;
private shell;
private log;
private client;
private socketAvailable;
private socketConnected;
private waiting;
private mock;
constructor(bin: string, width: number, height: number, host: string, port: number, mock?: boolean);
private startDisplay;
private startClient;
private logstd;
private logsterr;
private send;
private receive;
load(image: string, x: number, y: number, w: number, h: number): Promise<fdResult>;
display(image: string, exposure?: number[]): Promise<fdResult>;
stop(image: string): Promise<fdResult>;
isConnected(): boolean;
private test;
}
export type { Action, Mode, fdOutgoingPosition, fdOutgoingMessage, fdIncomingMessage, fdResult };