@p2olab/pimad-core
Version:
PiMAd (Process-industry-Modular-Automation-description) High level access to automation of modular plants.
144 lines (143 loc) • 4.89 kB
TypeScript
import { FEA } from './FEA';
import { ServiceModel } from './ServiceModel';
import { Backbone, SemanticVersion } from '../Backbone';
import PiMAdResponse = Backbone.PiMAdResponse;
import { ModuleAutomation } from './DataAssemblyModel';
import DataAssembly = ModuleAutomation.DataAssembly;
import { DataItemModel } from './DataItemModel';
export interface PEAModel {
/**
* NOT YET IMPLEMENTED
* Get a specific actuator of the PEAModel object.
* @param tag - The tag of the actuator.
* @param callback - A callback function. Use an instance of the interface Response as input.
*/
getActuator(tag: string, callback: (response: PiMAdResponse) => void): void;
/**
* NOT YET IMPLEMENTED
* Getter for all actuators within this.dataAssemblies of the PEAModel object.
* @returns A response object.
*/
getAllActuators(callback: (response: PiMAdResponse) => void): void;
/**
* Getter for this.dataAssemblies of the PEAModel object.
* @returns A response object.
*/
getAllDataAssemblies(): PiMAdResponse;
/**
* Getter for this.feas of the PEAModel object.
* @returns A response object.
*/
getAllFEAs(): PiMAdResponse;
/**
* NOT YET IMPLEMENTED
* Getter for all sensors within this.dataAssemblies of the PEAModel object.
* @returns A response object.
*/
getAllSensors(callback: (response: PiMAdResponse) => void): void;
/**
* Getter for this.services of the PEAModel object.
* @returns A response object.
*/
getAllServices(): PiMAdResponse;
/**
* Getter for this.dataModel of the PEAModel object.
* @returns A response object.
*/
getDataModel(): PiMAdResponse;
/**
* Getter for this.dataModelVersion of the PEAModel object.
* @returns A response object.
*/
getDataModelVersion(): PiMAdResponse;
/**
* Get a specific dataAssembly of the PEAModel object.
* @param tag - The tag of the dataAssembly.
* @param callback - A callback function. Use an instance of the interface Response as input.
*/
getDataAssembly(tag: string, callback: (response: PiMAdResponse) => void): void;
/**
*
*/
getEndpoint(): PiMAdResponse;
/**
* NOT YET IMPLEMENTED
* Get a specific FEA of the PEAModel object.
* @param tag - The tag of the FEA.
* @param callback - A callback function. Use an instance of the interface Response as input.
*/
getFEA(tag: string, callback: (response: PiMAdResponse) => void): void;
/**
* Getter for this.identifier of the PEAModel object.
* @returns The identifier of the PEAModel.
*/
getPiMAdIdentifier(): string;
/**
* Getter for this.name of the PEAModel object.
* @returns The name of the PEAModel..
*/
getName(): string;
/**
* NOT YET IMPLEMENTED
* Get a specific sensor of the PEAModel object.
* @param tag - The tag of the sensor.
* @param callback - A callback function. Use an instance of the interface Response as input.
*/
getSensor(tag: string, callback: (response: PiMAdResponse) => void): void;
/**
* Get a specific service of the PEAModel object.
* @param identifier - The PiMAd-identifier of the service.
* @param callback - A callback function. Use an instance of the interface Response as input.
*/
getService(identifier: string, callback: (response: PiMAdResponse) => void): void;
/**
* Initialize the PEAModel object with data. This one works like a constructor.
* @param data - Various data for initialization of the PEAModel.
* @returns True for a successful initialisation. False for a not successful initialisation.
* */
initialize(data: PEAInitializeDataType): boolean;
}
declare abstract class APEAFactory implements PEAFactory {
abstract create(): PEAModel;
}
export declare class BasePEAFactory extends APEAFactory {
create(): PEAModel;
}
export interface PEAFactory {
create(): PEAModel;
}
export declare type PEAInitializeDataType = {
/**
* The data assembly of the PEAModel object.. F. ex. with the communication interface data.
*/
DataAssemblies: DataAssembly[];
/**
* A reference to a data-model describing the PEAModel object.
*/
DataModel: string;
/**
* A reference to a data-model describing the PEAModel object.
*/
DataModelVersion: SemanticVersion;
/**
* The identifier for the PiMAd-Database.
*/
PiMAdIdentifier: string;
/**
* An Array with the PEAModel related FEAs.
*/
FEAs: FEA[];
/**
* The name of the PEAModel object.
*/
Name: string;
/**
* An Array with the PEAModel related Services.
*/
Services: ServiceModel[];
/**
* OPCUAServerURL
*/
Endpoint: DataItemModel[];
};
export {};