node-insim
Version:
An InSim library for NodeJS with TypeScript support
41 lines (40 loc) • 1.41 kB
TypeScript
import { SendablePacket } from './base';
import { PacketType } from './enums';
import type { PacketDataWithRequiredReqI } from './types';
/**
* ScreenSHot
*
* You can instruct LFS to save a screenshot in data\shots using the IS_SSH packet.
*
* It will be saved as bmp / jpg / png as set in Misc Options.
* Name can be a filename (excluding extension) or zero - LFS will create a name.
*
* LFS will reply with another IS_SSH when the request is completed.
*/
export declare class IS_SSH extends SendablePacket {
readonly Size = 40;
readonly Type = PacketType.ISP_SSH;
/** Request: non-zero / reply: same value returned */
ReqI: number;
/** 0 = OK / other values see {@link ScreenshotError} */
Error: ScreenshotError;
private readonly Sp0;
private readonly Sp1;
private readonly Sp2;
private readonly Sp3;
/** Name of screenshot file - last byte must be zero */
Name: string;
constructor(data?: IS_SSH_Data);
pack(): Uint8Array<ArrayBuffer>;
}
export type IS_SSH_Data = Omit<PacketDataWithRequiredReqI<IS_SSH>, 'Error'>;
export declare enum ScreenshotError {
/** OK: completed instruction */
SSH_OK = 0,
/** Can't save a screenshot - dedicated host */
SSH_DEDICATED = 1,
/** {@link IS_SSH} corrupted (e.g. Name does not end with zero) */
SSH_CORRUPTED = 2,
/** Could not save the screenshot */
SSH_NO_SAVE = 3
}