/// import { CheckedConfiguration, Configuration, ControlExecutionSpec, ControlstateContent, DatapointState, DatapointTargetSpec, DatastateContent, Device, DeviceControlResponse, DeviceDatapoint, DeviceStatus, EngineControlResponse, PersistenceAreas, SimulationPreviewResponse, SystemStatus, UniqueDatapoint } from "jm-castle-ac-dc-types"; import { PreviewOptions } from "../../devices/simulation/Types.mjs"; import { ControlContextConsumer, Engine, EngineContextConsumer } from "../../engines/Types.mjs"; import { Persistence } from "../../persistence/Types.mjs"; export declare const setCurrentSystem: (system: CastleAcDc) => void; export declare const getCurrentSystem: () => CastleAcDc; export declare class CastleAcDc { constructor(configuration: Configuration); private systemName; private startedAt; private configuration; private configErrors; private validConfig; private persistence; private defaultPersistence; private mailSenders; private defaultMailSender; private datastate; private devices; private datacollectors; private controls; private engines; private caCert; private serverCert; private serverKey; clientPath: () => string; start: () => Promise; getOwnPort: () => number; getCACertificate: () => Buffer | null | undefined; getServerCertificate: () => Buffer; getServerKey: () => Buffer; private disconnectFromAllDevices; private disconnectFromAllPersistences; private disconnectFromAllMailSenders; /** * Stop all engines and remove all * Disconnect from all devices and remove all * Set empty datastate * Disconnect all persistences and remove all * Disconnect all mail senders and remove all * Start again */ restart: () => Promise; private executeAutoStarts; private executeStopAll; private checkSystemSpec; private checkPersistenceSpec; private checkMailingSpec; private checkDatacollectorEngine; private checkPersistStatePart; private checkPersistControlPart; private checkPersistEngine; private checkControlEngine; private checkStateEngine; checkConfiguration: (configuration: Configuration) => { validConfig: CheckedConfiguration; errors: string[] | undefined; }; private setupPersistence; private setupMailSenders; private setupDevices; private setupDatacollectors; private setupDatastate; private setupControls; private setupPersists; private setupEngines; getStatus: () => Promise; getDevices: () => Promise<{ device: Device; datapoints: Record; }[]>; getEngines: () => Promise>; getAllCollectorDatapoints: () => Promise>; getStateDatapoints: () => Promise>; getPersistentDatapoints_DatapointLog: () => Promise>; getPersistentDatapoints_DatapointControlLog: () => Promise>; getPersistentDatapoints: (area: keyof typeof PersistenceAreas) => Promise>; getDeviceDatapointsArray: (deviceId?: string) => Promise; getDeviceControlDatapointsArray: (deviceId?: string) => Promise; getStateDatapointsArray: () => Promise; getPersistentDatapointsArray: (area: keyof typeof PersistenceAreas) => Promise; consumeEngineControlAction: (engineId: string, actionId: string) => Promise; addConsumerOnDatastate: (consumer: EngineContextConsumer) => void; addConsumerOnControlHistories: (consumer: ControlContextConsumer) => void; removeConsumerOnDatastate: (consumer: EngineContextConsumer) => void; removeConsumerOnControlHistories: (consumer: ControlContextConsumer) => void; getDatastateContent: () => Promise; getControlstateContent: () => Promise; getDeviceStatus: (deviceId: string) => Promise; executeDeviceControlRequest: (deviceId: string, targets: Record) => Promise; getSimulationPreview: (deviceId: string, options?: PreviewOptions) => Promise; getDefaultPersistence: () => Persistence & Engine; }