Remove debug logs

This commit is contained in:
Daniel Kluge
2023-11-01 22:10:10 +01:00
parent dacd278793
commit b27a71d92d
4 changed files with 2 additions and 14 deletions
+1 -6
View File
@@ -134,12 +134,7 @@ export default class HTTPInterfaceServer extends AbstractInterfaceServer<Config>
case "/value":
if (req.method !== "GET" && req.method !== "PUT") return res.status(501).end();
const prop = Traverser.getElementByIdPath(this.aas, sm, idShortPath);
console.log((prop as AASCoreTypes.Property).constructor.name)
if (prop === null || !AASCoreTypes.isProperty(prop)) {
// @ts-ignore
console.log(prop === null, !AASCoreTypes.isProperty(prop))
return res.status(404).end();
}
if (prop === null || !AASCoreTypes.isProperty(prop)) return res.status(404).end();
const request: Types.RequestTypes.Request = req.method === "GET" ? { type: "READ", target: prop } : { type: "WRITE", target: prop, extraData: { value: req.body } };
-5
View File
@@ -33,18 +33,13 @@ export default class MQTTConnector extends AbstractConnectionObject<mqtt.IClient
}
public readProperty(prop: AASCoreTypes.Property): any {
console.log(prop);
const cc = this.mapper.get(prop);
console.log(cc);
if (cc === undefined) return null;
const errorReturn = cc.default ?? null;
if (!this.client || !this.client.connected) return errorReturn;
console.log(this.messageStore)
const value = this.messageStore[cc.forms.href.substring(1)];
console.log(value)
if (value === undefined) return errorReturn;
switch (cc.type) {
case "integer":