Remove debug logs
This commit is contained in:
@@ -134,12 +134,7 @@ export default class HTTPInterfaceServer extends AbstractInterfaceServer<Config>
|
|||||||
case "/value":
|
case "/value":
|
||||||
if (req.method !== "GET" && req.method !== "PUT") return res.status(501).end();
|
if (req.method !== "GET" && req.method !== "PUT") return res.status(501).end();
|
||||||
const prop = Traverser.getElementByIdPath(this.aas, sm, idShortPath);
|
const prop = Traverser.getElementByIdPath(this.aas, sm, idShortPath);
|
||||||
console.log((prop as AASCoreTypes.Property).constructor.name)
|
if (prop === null || !AASCoreTypes.isProperty(prop)) return res.status(404).end();
|
||||||
if (prop === null || !AASCoreTypes.isProperty(prop)) {
|
|
||||||
// @ts-ignore
|
|
||||||
console.log(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 } };
|
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 {
|
public readProperty(prop: AASCoreTypes.Property): any {
|
||||||
console.log(prop);
|
|
||||||
const cc = this.mapper.get(prop);
|
const cc = this.mapper.get(prop);
|
||||||
console.log(cc);
|
|
||||||
if (cc === undefined) return null;
|
if (cc === undefined) return null;
|
||||||
|
|
||||||
const errorReturn = cc.default ?? null;
|
const errorReturn = cc.default ?? null;
|
||||||
if (!this.client || !this.client.connected) return errorReturn;
|
if (!this.client || !this.client.connected) return errorReturn;
|
||||||
|
|
||||||
console.log(this.messageStore)
|
|
||||||
|
|
||||||
const value = this.messageStore[cc.forms.href.substring(1)];
|
const value = this.messageStore[cc.forms.href.substring(1)];
|
||||||
console.log(value)
|
|
||||||
if (value === undefined) return errorReturn;
|
if (value === undefined) return errorReturn;
|
||||||
switch (cc.type) {
|
switch (cc.type) {
|
||||||
case "integer":
|
case "integer":
|
||||||
|
|||||||
@@ -46,8 +46,6 @@ export default class AIMCMapper {
|
|||||||
...parsedPropConf
|
...parsedPropConf
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log(this.map)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default class FileImporter {
|
|||||||
try {
|
try {
|
||||||
return FileImporter.readAASByPath(file);
|
return FileImporter.readAASByPath(file);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(`Error while reading AAS from ${file}`, e);
|
console.error(`Error while reading AAS from ${file}`, e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}).filter(aas => aas !== null) as types.Environment[];
|
}).filter(aas => aas !== null) as types.Environment[];
|
||||||
|
|||||||
Reference in New Issue
Block a user