filmout_manager/dist/fd/index.d.ts

64 lines
1.4 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
}
export interface fdOutgoingPosition {
x: number;
y: number;
w: number;
h: number;
}
export interface fdOutgoingMessage {
action: Action;
image: string;
mode?: Mode;
position?: fdOutgoingPosition;
exposure?: number[];
}
export interface fdIncomingMessage {
action: Action;
success: boolean;
error?: string;
}
export interface fdResult {
action: Action;
image: string;
time: 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;
constructor(bin: string, width: number, height: number, host: string, port: number);
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 {};