// Data Source // tslint:disable-next-line:no-empty-interface export interface IDataSourceIdentifier { } export interface IDataSource { id: string; name: string; description: string; location: string; type: string; identifier: IDataSourceIdentifier; } export interface IDataSourceEntity { id: string; name: string; dataType: string; description?: string; entityType?: string; supportedOperations?: string; parentId?: string; } // IoT Central Protocol Gatewway export interface IDiscoverDataSourcesRequestParams { timeout: number; } export interface ISetDataSourcesRequestParams { dataSources: IDataSource[]; } export interface IDeleteDataSourcesRequestParams { dataSourceIds: string[]; } export interface IGetDataSourceEntitiesRequestParams { dataSourceId: string; } export interface IDeviceInfo { deviceId: string; deviceName: string; deviceKey: string; templateId: string; scopeId: string; } export interface IAssetInfo { id: string; name: string; description: string; location: string; } export interface IDestinationCapability { name: string; } export interface IDataSourceEntityPublishingConfiguration { samplingInterval: number; publishingInterval: number; heartbeat: number; } export interface IAssetMapItem { sourceEntity: IDataSourceEntity; destinationCapability: IDestinationCapability; configuration: IDataSourceEntityPublishingConfiguration; } // @ts-ignore export interface IDataSourceSubscription { enabled: boolean; publishingInterval: number; assetMap: IAssetMapItem[]; } export interface ISetDataSourceEntitiesRequestParams { deviceInformation: IDeviceInfo; assetInformation: IAssetInfo; dataSourceId: string; assetMap: IAssetMapItem[]; } export interface IRestartGatewayModuleRequestParams { timeout: number; } export interface IRestartProtocolModuleRequestParams { timeout: number; } export interface IRestartDeviceRequestParams { deviceId: string; } // Device provisioning export interface IClientConnectResult { clientConnectionStatus: boolean; clientConnectionMessage: string; } export interface IIoTDeviceProvisionParams { deviceInformation: IDeviceInfo; assetInformation: IAssetInfo; dataSource: IDataSource; assetMapItems: IAssetMapItem[]; } export interface IProvisionResult { dpsProvisionStatus: boolean; dpsProvisionMessage: string; dpsHubConnectionString: string; clientConnectionStatus: boolean; clientConnectionMessage: string; } export interface IProtocolModuleResponse { statusCode: number; message: string; payload: any; } // Module interfaces export const IIoTProtocolModuleInterface = { Command: { RestartProtocolModule: 'cmRestartProtocolModule', RestartDevice: 'cmRestartDevice' } }; export enum IoTCentralClientState { Disconnected = 'disconnected', Connected = 'connected' } export enum GatewayModuleSetting { DebugTelemetry = 'wpDebugTelemetry' } export const IIoTGatewayInterface = { Telemetry: { SystemHeartbeat: 'tlGatewaySystemHeartbeat', FreeMemory: 'tlGatewayFreeMemory' }, State: { IoTCentralClientState: 'stGatewayClientState' }, Event: { ModuleStarted: 'evGatewayModuleStarted', ModuleStopped: 'evGatewayModuleStopped', ModuleRestart: 'evGatewayModuleRestart', RecreatingDevices: 'evRecreatingDevices' }, Setting: { DebugTelemetry: GatewayModuleSetting.DebugTelemetry }, Command: { RestartGatewayModule: 'cmRestartGatewayModule', RestartProtocolModule: 'cmRestartProtocolModule', RestartDevice: 'cmRestartDevice' } }; export const IIoTGatewayOperationalInterface = { Telemetry: { ConnectedDevices: 'tlConnectedDevices' }, State: { IoTCentralClientState: 'stIoTCentralClientState' }, Event: { ModuleStarted: 'evModuleStarted', ModuleStopped: 'evModuleStopped', DataSourceDiscoveryStarted: 'evDataSourceDiscoveryStarted', DataSourceDiscoveryCompleted: 'evDataSourceDiscoveryCompleted', ConnectedToDataSource: 'evConnectedToDataSource', DisconnectedFromDataSource: 'evDisconnectedFromDataSource', RetrievingDataSourceEntities: 'evRetrievingDataSourceEntities', SubscribingToEntitiesOnDataSource: 'evSubscribingToEntitiesOnDataSource', CreateDevice: 'evCreateDevice', DeleteDevice: 'evDeleteDevice', RestartDevice: 'evRestartDevice' } }; export const IIoTGatewayDiagnosticInterface = { Telemetry: { SystemHeartbeat: 'tlSystemHeartbeat', FreeMemory: 'tlFreeMemory' }, Event: { RuntimeError: 'evRuntimeError', AuthenticationError: 'evAuthenticationError', AuthorizationError: 'evAuthorizationError', DataDropped: 'evDataDropped', NetworkError: 'evNetworkError', ProtocolError: 'evProtocolError', StorageError: 'evStorageError', ModuleRestart: 'evModuleRestarted' } }; export const IIoTRemoteDataSourceInterface = { Command: { DiscoverDataSources: 'cmDiscoverDataSources', SetDataSources: 'cmSetDataSources', GetDataSources: 'cmGetDataSources', DeleteDataSources: 'cmDeleteDataSources', GetDataSourceEntities: 'cmGetDataSourceEntities', SetDataSourceEntities: 'cmSetDataSourceEntities' } }; export const IIoTProtocolGatewayEdgeInputs = { IIoTProtocolDiagnostics: 'protocolDiagnostics', IIoTProtocolOperational: 'protocolOperational', IIoTProtocolTelemetry: 'protocolGateway' };