Skip to content

Commit

Permalink
update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
ck-c8y committed Dec 26, 2024
1 parent 12b3d08 commit ef57fd4
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ export class MappingStepPropertiesComponent
wrappers: ['custom-form-field-wrapper'],
templateOptions: {
switchMode: true,
label: 'Supports key message context',
label: 'Use message context',
disabled:
this.stepperConfiguration.editorMode == EditorMode.READ_ONLY,
description:
Expand Down
Binary file removed resources/samples/SampleMappings_12.xlsx
Binary file not shown.
Binary file not shown.
Binary file added resources/samples/SampleMappings_13.xlsx
Binary file not shown.
78 changes: 33 additions & 45 deletions resources/samples/mappings-test-INBOUND.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
[
{
"id": "7863058531",
"name": "Mapping - 10",
"mappingTopic": "device/test",
"mappingTopicSample": "device/test",
"tested": false,
"autoAckOperation": true,
"sourceTemplate": "{\"Temperature\":{\"value\":110,\"unit\":\"C\"},\"time\":\"2022-08-05T00:14:49.389+02:00\",\"deviceId\":\"909090\"}",
"targetTemplate": "{\"c8y_TemperatureMeasurement\":{\"T\":{\"value\":110,\"unit\":\"C\"}},\"time\":\"2022-08-05T00:14:49.389+02:00\",\"source\":{\"id\":\"909090\"},\"type\":\"c8y_TemperatureMeasurement\"}",
"externalIdType": "c8y_Serial",
"qos": "AT_LEAST_ONCE",
"substitutions": [
{
"resolve2ExternalId": false,
"pathSource": "_TOPIC_LEVEL_[1]",
"pathTarget": "source.id",
"pathTarget": "_IDENTITY_.externalId",
"repairStrategy": "DEFAULT",
"expandArray": false
},
{
"resolve2ExternalId": false,
"pathSource": "Temperature.value",
"pathTarget": "c8y_TemperatureMeasurement.T.value",
"repairStrategy": "DEFAULT",
"expandArray": false
},
{
"resolve2ExternalId": false,
"pathSource": "$now()",
"pathTarget": "time",
"repairStrategy": "DEFAULT",
Expand All @@ -30,45 +32,42 @@
],
"snoopedTemplates": [],
"createNonExistingDevice": true,
"id": "7863058531",
"direction": "INBOUND",
"mappingTopicSample": "device/test",
"snoopStatus": "NONE",
"debug": false,
"mapDeviceIdentifier": true,
"useExternalId": true,
"active": false,
"targetAPI": "MEASUREMENT",
"targetTemplate": "{\"c8y_TemperatureMeasurement\":{\"T\":{\"value\":110,\"unit\":\"C\"}},\"time\":\"2022-08-05T00:14:49.389+02:00\",\"source\":{\"id\":\"909090\"},\"type\":\"c8y_TemperatureMeasurement\"}",
"updateExistingDevice": false,
"mappingType": "JSON",
"lastUpdate": 1728564487231,
"name": "Mapping - 10",
"supportsMessageContext": false,
"mappingTopic": "device/test"
"supportsMessageContext": false
},
{
"id": "2063060936",
"name": "Mapping - 11",
"mappingTopic": "device/test/sub",
"mappingTopicSample": "device/test/sub",
"tested": false,
"autoAckOperation": true,
"targetTemplate": "{\"c8y_TemperatureMeasurement\":{\"T\":{\"value\":110,\"unit\":\"C\"}},\"time\":\"2022-08-05T00:14:49.389+02:00\",\"source\":{\"id\":\"909090\"},\"type\":\"c8y_TemperatureMeasurement\"}",
"sourceTemplate": "{\"Temperature\":{\"value\":110,\"unit\":\"C\"},\"time\":\"2022-08-05T00:14:49.389+02:00\",\"deviceId\":\"909090\"}",
"externalIdType": "c8y_Serial",
"qos": "AT_LEAST_ONCE",
"substitutions": [
{
"resolve2ExternalId": false,
"pathSource": "_TOPIC_LEVEL_[1]",
"pathTarget": "source.id",
"pathTarget": "_IDENTITY_.externalId",
"repairStrategy": "DEFAULT",
"expandArray": false
},
{
"resolve2ExternalId": false,
"pathSource": "Temperature.value",
"pathTarget": "c8y_TemperatureMeasurement.T.value",
"repairStrategy": "DEFAULT",
"expandArray": false
},
{
"resolve2ExternalId": false,
"pathSource": "$now()",
"pathTarget": "time",
"repairStrategy": "DEFAULT",
Expand All @@ -77,45 +76,42 @@
],
"snoopedTemplates": [],
"createNonExistingDevice": true,
"id": "2063060936",
"direction": "INBOUND",
"mappingTopicSample": "device/test/sub",
"snoopStatus": "NONE",
"debug": false,
"mapDeviceIdentifier": true,
"useExternalId": true,
"active": false,
"targetAPI": "MEASUREMENT",
"targetTemplate": "{\"c8y_TemperatureMeasurement\":{\"T\":{\"value\":110,\"unit\":\"C\"}},\"time\":\"2022-08-05T00:14:49.389+02:00\",\"source\":{\"id\":\"909090\"},\"type\":\"c8y_TemperatureMeasurement\"}",
"updateExistingDevice": false,
"mappingType": "JSON",
"lastUpdate": 1728564332182,
"name": "Mapping - 11",
"supportsMessageContext": false,
"mappingTopic": "device/test/sub"
"supportsMessageContext": false
},
{
"id": "2063060936",
"name": "Mapping - 12",
"mappingTopic": "device/test/sub/subsub",
"mappingTopicSample": "device/test/sub/subsub",
"tested": false,
"autoAckOperation": true,
"sourceTemplate": "{\"Temperature\":{\"value\":110,\"unit\":\"C\"},\"time\":\"2022-08-05T00:14:49.389+02:00\",\"deviceId\":\"909090\"}",
"targetTemplate": "{\"c8y_TemperatureMeasurement\":{\"T\":{\"value\":110,\"unit\":\"C\"}},\"time\":\"2022-08-05T00:14:49.389+02:00\",\"source\":{\"id\":\"909090\"},\"type\":\"c8y_TemperatureMeasurement\"}",
"externalIdType": "c8y_Serial",
"qos": "AT_LEAST_ONCE",
"substitutions": [
{
"resolve2ExternalId": false,
"pathSource": "_TOPIC_LEVEL_[1]",
"pathTarget": "source.id",
"pathTarget": "_IDENTITY_.externalId",
"repairStrategy": "DEFAULT",
"expandArray": false
},
{
"resolve2ExternalId": false,
"pathSource": "Temperature.value",
"pathTarget": "c8y_TemperatureMeasurement.T.value",
"repairStrategy": "DEFAULT",
"expandArray": false
},
{
"resolve2ExternalId": false,
"pathSource": "$now()",
"pathTarget": "time",
"repairStrategy": "DEFAULT",
Expand All @@ -124,45 +120,42 @@
],
"snoopedTemplates": [],
"createNonExistingDevice": true,
"id": "2063060936",
"direction": "INBOUND",
"mappingTopicSample": "device/test/sub/subsub",
"snoopStatus": "NONE",
"debug": false,
"mapDeviceIdentifier": true,
"useExternalId": true,
"active": false,
"targetAPI": "MEASUREMENT",
"targetTemplate": "{\"c8y_TemperatureMeasurement\":{\"T\":{\"value\":110,\"unit\":\"C\"}},\"time\":\"2022-08-05T00:14:49.389+02:00\",\"source\":{\"id\":\"909090\"},\"type\":\"c8y_TemperatureMeasurement\"}",
"updateExistingDevice": false,
"mappingType": "JSON",
"lastUpdate": 1728564332182,
"name": "Mapping - 12",
"supportsMessageContext": false,
"mappingTopic": "device/test/sub/subsub"
"supportsMessageContext": false
},
{
"id": "2063060936",
"name": "Mapping - 13",
"mappingTopic": "asset",
"mappingTopicSample": "asset",
"tested": false,
"autoAckOperation": true,
"sourceTemplate": "{\"Temperature\":{\"value\":110,\"unit\":\"C\"},\"time\":\"2022-08-05T00:14:49.389+02:00\",\"deviceId\":\"909090\"}",
"targetTemplate": "{\"c8y_TemperatureMeasurement\":{\"T\":{\"value\":110,\"unit\":\"C\"}},\"time\":\"2022-08-05T00:14:49.389+02:00\",\"source\":{\"id\":\"909090\"},\"type\":\"c8y_TemperatureMeasurement\"}",
"externalIdType": "c8y_Serial",
"qos": "AT_LEAST_ONCE",
"substitutions": [
{
"resolve2ExternalId": false,
"pathSource": "_TOPIC_LEVEL_[0]",
"pathTarget": "source.id",
"pathTarget": "_IDENTITY_.externalId",
"repairStrategy": "DEFAULT",
"expandArray": false
},
{
"resolve2ExternalId": false,
"pathSource": "Temperature.value",
"pathTarget": "c8y_TemperatureMeasurement.T.value",
"repairStrategy": "DEFAULT",
"expandArray": false
},
{
"resolve2ExternalId": false,
"pathSource": "$now()",
"pathTarget": "time",
"repairStrategy": "DEFAULT",
Expand All @@ -171,20 +164,15 @@
],
"snoopedTemplates": [],
"createNonExistingDevice": true,
"id": "2063060936",
"direction": "INBOUND",
"mappingTopicSample": "asset",
"snoopStatus": "NONE",
"debug": false,
"mapDeviceIdentifier": true,
"useExternalId": true,
"active": false,
"targetAPI": "MEASUREMENT",
"targetTemplate": "{\"c8y_TemperatureMeasurement\":{\"T\":{\"value\":110,\"unit\":\"C\"}},\"time\":\"2022-08-05T00:14:49.389+02:00\",\"source\":{\"id\":\"909090\"},\"type\":\"c8y_TemperatureMeasurement\"}",
"updateExistingDevice": false,
"mappingType": "JSON",
"lastUpdate": 1728564332182,
"name": "Mapping - 13",
"supportsMessageContext": false,
"mappingTopic": "asset"
"supportsMessageContext": false
}
]
]

0 comments on commit ef57fd4

Please sign in to comment.