2024-05-08 21:08:47 +00:00
|
|
|
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
|
|
|
|
}
|
2024-05-15 18:34:24 +00:00
|
|
|
export interface fdOutgoingPosition {
|
|
|
|
x: number;
|
|
|
|
y: number;
|
|
|
|
w: number;
|
|
|
|
h: number;
|
|
|
|
}
|
2024-05-08 21:08:47 +00:00
|
|
|
export interface fdOutgoingMessage {
|
|
|
|
action: Action;
|
|
|
|
image: string;
|
|
|
|
mode?: Mode;
|
2024-05-15 18:34:24 +00:00
|
|
|
position?: fdOutgoingPosition;
|
2024-05-08 21:08:47 +00:00
|
|
|
exposure?: number[];
|
|
|
|
}
|
|
|
|
export interface fdIncomingMessage {
|
|
|
|
action: Action;
|
|
|
|
success: boolean;
|
2024-05-15 15:22:50 +00:00
|
|
|
error?: string;
|
|
|
|
}
|
|
|
|
export interface fdResult {
|
|
|
|
action: Action;
|
|
|
|
image: string;
|
|
|
|
time: number;
|
2024-05-08 21:08:47 +00:00
|
|
|
}
|
|
|
|
export declare class FD {
|
|
|
|
private bin;
|
|
|
|
private width;
|
|
|
|
private height;
|
|
|
|
private host;
|
|
|
|
private port;
|
|
|
|
private shell;
|
|
|
|
private log;
|
|
|
|
private client;
|
|
|
|
private socketAvailable;
|
|
|
|
private socketConnected;
|
2024-05-15 15:22:50 +00:00
|
|
|
private waiting;
|
2024-05-08 21:08:47 +00:00
|
|
|
constructor(bin: string, width: number, height: number, host: string, port: number);
|
|
|
|
private startDisplay;
|
|
|
|
private startClient;
|
|
|
|
private logstd;
|
|
|
|
private logsterr;
|
|
|
|
private send;
|
|
|
|
private receive;
|
2024-05-15 15:22:50 +00:00
|
|
|
load(image: string, x: number, y: number, w: number, h: number): Promise<fdResult>;
|
2024-05-15 18:34:24 +00:00
|
|
|
display(image: string, exposure?: number[]): Promise<fdResult>;
|
2024-05-15 15:22:50 +00:00
|
|
|
stop(image: string): Promise<fdResult>;
|
|
|
|
isConnected(): boolean;
|
2024-05-15 18:34:24 +00:00
|
|
|
private test;
|
2024-05-08 21:08:47 +00:00
|
|
|
}
|
|
|
|
export {};
|