Compare commits
1 Commits
44adfdece6
...
98cd44d3ae
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98cd44d3ae |
@@ -64,7 +64,7 @@ class OutputUtils {
|
|||||||
|
|
||||||
influxDBFormat(changedFields, config , flatTags) {
|
influxDBFormat(changedFields, config , flatTags) {
|
||||||
// Create the measurement and topic using softwareType and name config.functionality.softwareType + .
|
// Create the measurement and topic using softwareType and name config.functionality.softwareType + .
|
||||||
const measurement = config.general.name;
|
const measurement = `${config.functionality?.softwareType}_${config.general?.id}`;
|
||||||
const payload = {
|
const payload = {
|
||||||
measurement: measurement,
|
measurement: measurement,
|
||||||
fields: changedFields,
|
fields: changedFields,
|
||||||
@@ -104,24 +104,23 @@ class OutputUtils {
|
|||||||
return {
|
return {
|
||||||
// general properties
|
// general properties
|
||||||
id: config.general?.id,
|
id: config.general?.id,
|
||||||
name: config.general?.name,
|
|
||||||
unit: config.general?.unit,
|
|
||||||
// functionality properties
|
// functionality properties
|
||||||
softwareType: config.functionality?.softwareType,
|
softwareType: config.functionality?.softwareType,
|
||||||
role: config.functionality?.role,
|
role: config.functionality?.role,
|
||||||
// asset properties (exclude machineCurve)
|
// asset properties (exclude machineCurve)
|
||||||
uuid: config.asset?.uuid,
|
uuid: config.asset?.uuid,
|
||||||
|
tagcode: config.asset?.tagcode,
|
||||||
geoLocation: config.asset?.geoLocation,
|
geoLocation: config.asset?.geoLocation,
|
||||||
supplier: config.asset?.supplier,
|
category: config.asset?.category,
|
||||||
type: config.asset?.type,
|
type: config.asset?.type,
|
||||||
subType: config.asset?.subType,
|
|
||||||
model: config.asset?.model,
|
model: config.asset?.model,
|
||||||
|
unit: config.general?.unit,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
processFormat(changedFields,config) {
|
processFormat(changedFields,config) {
|
||||||
// Create the measurement and topic using softwareType and name config.functionality.softwareType + .
|
// Create the measurement and topic using softwareType and name config.functionality.softwareType + .
|
||||||
const measurement = config.general.name;
|
const measurement = `${config.functionality?.softwareType}_${config.general?.id}`;
|
||||||
const payload = changedFields;
|
const payload = changedFields;
|
||||||
const topic = measurement;
|
const topic = measurement;
|
||||||
const msg = { topic: topic, payload: payload };
|
const msg = { topic: topic, payload: payload };
|
||||||
|
|||||||
Reference in New Issue
Block a user