Remove debug logs
This commit is contained in:
@@ -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 } };
|
||||
|
||||
|
||||
@@ -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":
|
||||
|
||||
@@ -46,8 +46,6 @@ export default class AIMCMapper {
|
||||
...parsedPropConf
|
||||
});
|
||||
}
|
||||
console.log(this.map)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export default class FileImporter {
|
||||
try {
|
||||
return FileImporter.readAASByPath(file);
|
||||
} catch (e) {
|
||||
console.log(`Error while reading AAS from ${file}`, e);
|
||||
console.error(`Error while reading AAS from ${file}`, e);
|
||||
return null;
|
||||
}
|
||||
}).filter(aas => aas !== null) as types.Environment[];
|
||||
|
||||
Reference in New Issue
Block a user