import IClient from "./client.js"; import IProvider from "./provider.js"; import IResult from "./result.js"; /** * The IDatalayerSystem interface. */ interface IDatalayerSystem { /** * Gets the interprocess communication path. * * @return {string} - The interprocess communication path. */ getIpcPath(): string; /** * Returns a value indicating whether the DatalayerSystem is started. * * @return {boolean} - True, if the DatalayerSystem is started, else false. */ isStarted(): boolean; /** * Starts the DatalayerSystem. * * @param {boolean} startBroker - Use true to start a broker. If you are a user of the ctrlX Data Layer, set to false. */ start(startBroker: boolean): Promise; /** * Stops the DatalayerSystem. */ stop(): Promise; /** * Creates a ctrlX Data Layer client and connects. * Automatically reconnects if the connection is interrupted. * * @param {string} remote - The Remote address of the ctrlX Data Layer. */ createClient(remote: string): Promise; /** * Creates a ctrlX Data Layer provider and connects. * Automatically reconnects if the connection is interrupted. * * @param {string} remote - The Remote address of the ctrlX Data Layer. */ createProvider(remote: string): Promise; } /** * The DatalayerSystem. */ declare class DatalayerSystem implements IDatalayerSystem { /** * Gets the default Client port. * * @return {number} - The default Client port */ static readonly defaultClientPort = 2069; /** * Gets the default Provider port. * * @return {number} - The default Provider port */ static readonly defaultProviderPort = 2070; /** * Gets the protocol scheme for TCP communication. * Recommended to connect to a DatalayerSystem not running on localhost. * * @return {string} - The protocol scheme for TCP communication. */ static readonly protocolSchemeTcp = "tcp://"; /** * Gets the protocol scheme for IPC communication. * Recommended to connect to a DatalayerSystem running on localhost. * * @return {string} - The protocol scheme for IPC communication. */ static readonly protocolSchemeIpc = "ipc://"; /** * Gets the default flatbuffers initial size * * @return {number} - The default Flatbuffers initial size in bytes */ static readonly defaultFlatbuffersInitialSize = 1024; /** * Converts a FILETIME (64 bit (BigInt) - 100ns since 1.1.1601 UTC) * to a Date (milliseconds since 1 January 1970 UTC) * * @param {bigint} fileTime - The FILETIME to convert * @return {Date} - The corresponding Date */ static toDate(fileTime: bigint): Date; /** * Converts a Date (milliseconds since 1 January 1970 UTC) * to a FILETIME (64 bit (BigInt) - 100ns since 1.1.1601 UTC) * * @param {Date} - The Date to convert * @return {bigint} fileTime - The corresponding FILETIME */ static toFiletime(date: Date): bigint; /** * Creates an instance of Datalayersystem. * * @param {string} ipcPath (optional) The interprocess communication path. */ constructor(ipcPath?: string); /** * Gets the interprocess communication path. * * @return {string} - The interprocess communication path. */ getIpcPath(): string; /** * Returns a value indicating whether the DatalayerSystem is started. * * @return {boolean} - True, if the DatalayerSystem is started, else false. */ isStarted(): boolean; /** * Starts the DatalayerSystem. * * @param {string} startBroker Use true to start a broker. If you are a user of the ctrlX Data Layer, set to false. */ start(startBroker: boolean): Promise; /** * Stops the DatalayerSystem. */ stop(): Promise; /** * Creates a ctrlX Data Layer client and connects. * Automatically reconnects if the connection is interrupted. * * @param {string} remote - The Remote address of the ctrlX Data Layer. */ createClient(remote: string): Promise; /** * Creates a ctrlX Data Layer provider and connects. * Automatically reconnects if the connection is interrupted. * * @param {string} remote - The Remote address of the ctrlX Data Layer. */ createProvider(remote: string): Promise; private _addonInstance; } export = DatalayerSystem;