From 047842de36f1da93d2fb8b72da9e635b2aaa746f Mon Sep 17 00:00:00 2001 From: Martin Karkowski Date: Tue, 27 Jul 2021 12:55:24 +0200 Subject: [PATCH] Changing AVG --- modules/wamo/src/wamo.agv.module.ts | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/modules/wamo/src/wamo.agv.module.ts b/modules/wamo/src/wamo.agv.module.ts index 6242118..78e839f 100644 --- a/modules/wamo/src/wamo.agv.module.ts +++ b/modules/wamo/src/wamo.agv.module.ts @@ -30,7 +30,6 @@ import { IBaseModuleProcessInformation, IBaseModuleProductInformation, IConnectorReplicaBaseModuleToProcessModule, - IWaMOBaseModuleDescription, IWaMOProcessModule, IWaMOProcessModuleDescription } from "../types/interfaces"; @@ -41,10 +40,16 @@ export interface IPROCESSMODULE extends IGenericNopeModule, IWaMOProcessModule { } +export interface IAVGPLANNER + extends IGenericNopeModule { + +} + const sleep = promisify(setTimeout); export interface IAgvModuleDescription { name: string; + hostname: string; mqttUri: string; id: string; } @@ -123,6 +128,7 @@ export class WaMoAGVModule extends InjectableNopeBaseModule { protected _xetics: XETICS; protected _processModule: IPROCESSMODULE; + protected _avgPlanner: ; protected _observers: INopeObserver[] = []; protected _mqtt: MQTT; @@ -158,10 +164,9 @@ export class WaMoAGVModule extends InjectableNopeBaseModule { protected _logger = getNopeLogger("wamo-agv-module"); public async init( - options: IWaMOBaseModuleDescription, - + options: IAgvModuleDescription, autoStart = true, - demo = false + demo = true ): Promise { // Define the Author. this.author = { @@ -180,7 +185,7 @@ export class WaMoAGVModule extends InjectableNopeBaseModule { // Define a Getter => which will // extract all values. - this.connected.getter = (value) => { + this.connected.getter = () => { return true; }; @@ -278,7 +283,7 @@ export class WaMoAGVModule extends InjectableNopeBaseModule { _this._mqtt .publish( - `${this.config.getContent().plcName}/baseModule/connectorReplica`, + `${this.config.getContent().hostname}/baseModule/connectorReplica`, value, { format: "json" @@ -291,7 +296,7 @@ export class WaMoAGVModule extends InjectableNopeBaseModule { // Publish on MQTT. _this._mqtt .publish( - `${this.config.getContent().plcName + `${this.config.getContent().hostname }/baseModule/connectorReplica/${key}`, value[key], { @@ -309,13 +314,14 @@ export class WaMoAGVModule extends InjectableNopeBaseModule { this.baseInformation.setContent({ logical: { currentState: "initialize", + descripton: {}, error: null }, physical: { checkedInWorkpieceCarrier: "", installedFeederModuleId: "", installedProcessModuleId: "", - neighborStationId: options.leftNeighbor, + neighborStationId: "", rfidTagId: options.id } });