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