@p2olab/pimad-core
Version:
PiMAd (Process-industry-Modular-Automation-description) High level access to automation of modular plants.
91 lines (90 loc) • 3.35 kB
TypeScript
import { Parameter } from './Parameter';
import { Attribute } from './Attribute';
import { Backbone } from '../Backbone';
import PiMAdResponse = Backbone.PiMAdResponse;
import { ModuleAutomation } from './DataAssemblyModel';
import DataAssembly = ModuleAutomation.DataAssembly;
import { AModuleAutomationObject, InitializeModuleAutomationObject, ModuleAutomationObject } from './ModuleAutomationObject';
export interface ProcedureModel extends ModuleAutomationObject {
/**
* TODO
* @param callback - TODO
* @returns TODO
*/
getAttribute(name: string, callback: (response: PiMAdResponse, attribute: Attribute) => void): void;
/**
* TODO
* @param callback - TODO
* @returns TODO
*/
getAllAttributes(callback: (response: PiMAdResponse, attributes: Attribute[]) => void): void;
/**
* TODO
* @param callback - TODO
* @returns TODO
*/
getAllParameters(callback: (response: PiMAdResponse, parameters: Parameter[]) => void): void;
/**
* TODO
* @param callback - TODO
* @returns TODO
*/
getDataAssembly(callback: (response: PiMAdResponse, dataAssembly: DataAssembly) => void): void;
/**
* TODO
* @param callback - TODO
* @returns TODO
*/
getParameter(name: string, callback: (response: PiMAdResponse, parameter: Parameter) => void): void;
/**
* Initialize the parameter object with data. This one works like a constructor.
* @param instructions - TODO
* @returns True for a successful initialisation. False for a not successful initialisation.
*/
initialize(instructions: InitializeProcedureType): boolean;
}
export declare abstract class AProcedure extends AModuleAutomationObject implements ProcedureModel {
protected attributes: Attribute[];
protected dataAssembly: DataAssembly;
protected parameters: Parameter[];
constructor();
/**
* @inheritDoc {@link Parameter.getAttribute}
*/
getAttribute(name: string, callback: (response: PiMAdResponse, attribute: Attribute) => void): void;
/**
* @inheritDoc {@link Parameter.getAllAttributes}
*/
getAllAttributes(callback: (response: PiMAdResponse, attributes: Attribute[]) => void): void;
/**
* @inheritDoc {@link Parameter.getAllParameters}
*/
getAllParameters(callback: (response: PiMAdResponse, parameters: Parameter[]) => void): void;
/**
* @inheritDoc {@link Parameter.getDataAssembly}
*/
getDataAssembly(callback: (response: PiMAdResponse, dataAssembly: DataAssembly) => void): void;
/**
* @inheritDoc {@link Parameter.getParameter}
*/
getParameter(name: string, callback: (response: PiMAdResponse, parameter: Parameter) => void): void;
/**
* @inheritDoc {@link Parameter.initialize}
*/
initialize(instructions: InitializeProcedureType): boolean;
}
export declare type InitializeProcedureType = InitializeModuleAutomationObject & {
attributes: Attribute[];
dataAssembly: DataAssembly;
parameter: Parameter[];
};
export interface ProcedureFactory {
create(): ProcedureModel;
}
declare abstract class AProcedureFactory implements ProcedureFactory {
abstract create(): ProcedureModel;
}
export declare class BaseProcedureFactory extends AProcedureFactory {
create(): ProcedureModel;
}
export {};