Skip to content

Commit

Permalink
NGSI-LD Compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
manfredipist committed Jul 2, 2021
1 parent b16a92a commit b556ff7
Show file tree
Hide file tree
Showing 7 changed files with 282 additions and 157 deletions.
269 changes: 134 additions & 135 deletions AGECONF/config.json
Original file line number Diff line number Diff line change
@@ -1,136 +1,135 @@
{
"logLevel" : "INFO",
"multiCore" : false,
"relaxTemplateValidation":true,
"contextBroker" : {
"host" : "orion",
"port" : 1026,
"ngsiVersion":"ld",
"jsonLdContext":"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
"fallbackTenant":"opcua_car"
},
"server" : {
"port" : 4001,
"baseRoot" : "/"
},
"deviceRegistry" : {
"type" : "memory"
},
"mongodb" : {
"host" : "iotmongo",
"port" : "27017",
"db" : "iotagent",
"retries" : 5,
"retryTime" : 5
},
"types" : {
"Device" : {
"service" : "opcua_car",
"subservice" : "/demo",
"active" : [{
"name" : "EngineBrake",
"type" : "Number"
}, {
"name" : "Acceleration",
"type" : "Number"
}, {
"name" : "EngineStopped",
"type" : "Boolean"
}, {
"name" : "Engine_Temperature",
"type" : "Number"
}, {
"name" : "Engine_Oxigen",
"type" : "Number"
}],
"lazy" : [{
"name": "Speed",
"type": "Number"
}],
"commands" : [{
"name" : "Error",
"type" : "command"
}, {
"name" : "Stop",
"type" : "command"
}, {
"name" : "Accelerate",
"type" : "command"
}]
}
},
"browseServerOptions" : null,
"service" : "opcua_car",
"subservice" : "/demo",
"providerUrl" : "http://iotage:4001",
"pollingExpiration" : "200000",
"pollingDaemonFrequency" : "20000",
"deviceRegistrationDuration" : "P1M",
"defaultType" : null,
"contexts" : [ {
"id" : "urn:ngsi-ld:Device:age01_Car",
"type" : "Device",
"service" : "opcua_car",
"subservice" : "/demo",
"polling" : false,
"mappings" : [{
"ocb_id" : "Error",
"opcua_id" : "ns=3;s=Error",
"object_id" : null,
"inputArguments" : [ ]
},{
"ocb_id" : "Acceleration",
"opcua_id" : "ns=3;s=Acceleration",
"object_id" : null,
"inputArguments" : [ ]
}, {
"ocb_id" : "EngineStopped",
"opcua_id" : "ns=3;s=EngineStopped",
"object_id" : null,
"inputArguments" : [ ]
}, {
"ocb_id" : "Engine_Temperature",
"opcua_id" : "ns=3;s=Temperature",
"object_id" : null,
"inputArguments" : [ ]
}, {
"ocb_id" : "Engine_Oxigen",
"opcua_id" : "ns=3;s=Oxigen",
"object_id" : null,
"inputArguments" : [ ]
}]
} ],
"contextSubscriptions" : [ {
"id" : "urn:ngsi-ld:Device:age01_Car",
"type" : "Device",
"mappings" : [
{
"ocb_id" : "Error",
"opcua_id" : "ns=3;s=Error",
"object_id" : "ns=3;i=1000",
"inputArguments" : [ {
"dataType" : 12,
"type" : "Error Type"
} ]
},
{
"ocb_id": "Speed",
"opcua_id": "ns=3;s=Speed",
"object_id": "ns=3;i=1000",
"inputArguments" : [ ]
}, {
"ocb_id" : "Stop",
"opcua_id" : "ns=3;s=Stop",
"object_id" : "ns=3;i=1000",
"inputArguments" : [ ]
}, {
"ocb_id" : "Accelerate",
"opcua_id" : "ns=3;s=Accelerate",
"object_id" : "ns=3;i=1000",
"inputArguments" : [ {
"dataType" : 6,
"type" : "Intensity"
} ]
} ]
} ]
}
"logLevel": "DEBUG",
"multiCore": false,
"relaxTemplateValidation": true,
"contextBroker": {
"host": "orion",
"port": 1026,
"ngsiVersion": "ld",
"jsonLdContext": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
"service": "opcua_car",
"subservice": "/demo"
},
"server": {
"port": 4001,
"baseRoot": "/"
},
"deviceRegistry": {
"type": "memory"
},
"mongodb": {
"host": "iot_mongo",
"port": "27017",
"db": "iotagent",
"retries": 5,
"retryTime": 5
},
"types": {
"Device": {
"service": "opcua_car",
"subservice": "/demo",
"active": [{
"name": "EngineBrake",
"type": "Number"
}, {
"name": "Acceleration",
"type": "Number"
}, {
"name": "EngineStopped",
"type": "Boolean"
}, {
"name": "Engine_Temperature",
"type": "Number"
}, {
"name": "Engine_Oxigen",
"type": "Number"
}],
"lazy": [{
"name": "Speed",
"type": "Number"
}],
"commands": [{
"name": "Error",
"type": "command"
}, {
"name": "Stop",
"type": "command"
}, {
"name": "Accelerate",
"type": "command"
}]
}
},
"browseServerOptions": null,
"service": "opcua_car",
"subservice": "/demo",
"providerUrl": "http://iotage:4001",
"pollingExpiration": "200000",
"pollingDaemonFrequency": "20000",
"deviceRegistrationDuration": "P1M",
"defaultType": null,
"contexts": [{
"id": "urn:ngsi-ld:Device:age01_Car",
"type": "Device",
"service": "opcua_car",
"subservice": "/demo",
"polling": false,
"mappings": [{
"ocb_id": "Error",
"opcua_id": "ns=3;s=Error",
"object_id": null,
"inputArguments": []
}, {
"ocb_id": "Acceleration",
"opcua_id": "ns=3;s=Acceleration",
"object_id": null,
"inputArguments": []
}, {
"ocb_id": "EngineStopped",
"opcua_id": "ns=3;s=EngineStopped",
"object_id": null,
"inputArguments": []
}, {
"ocb_id": "Engine_Temperature",
"opcua_id": "ns=3;s=Temperature",
"object_id": null,
"inputArguments": []
}, {
"ocb_id": "Engine_Oxigen",
"opcua_id": "ns=3;s=Oxigen",
"object_id": null,
"inputArguments": []
}]
}],
"contextSubscriptions": [{
"id": "urn:ngsi-ld:Device:age01_Car",
"type": "Device",
"mappings": [{
"ocb_id": "Error",
"opcua_id": "ns=3;s=Error",
"object_id": "ns=3;i=1000",
"inputArguments": [{
"dataType": 12,
"type": "Error Type"
}]
}, {
"ocb_id": "Speed",
"opcua_id": "ns=3;s=Speed",
"object_id": "ns=3;i=1000",
"inputArguments": []
}, {
"ocb_id": "Stop",
"opcua_id": "ns=3;s=Stop",
"object_id": "ns=3;i=1000",
"inputArguments": []
}, {
"ocb_id": "Accelerate",
"opcua_id": "ns=3;s=Accelerate",
"object_id": "ns=3;i=1000",
"inputArguments": [{
"dataType": 6,
"type": "Intensity"
}]
}]
}]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"contextBroker" : {
"host" : "TEST_MACHINE_IP",
"port" : 1026,
"ngsiVersion":"v1",
"service" : "opcua_car",
"subservice" : "/demo"
},
Expand Down Expand Up @@ -144,4 +143,3 @@
} ]
} ]
}

14 changes: 5 additions & 9 deletions conf/config.json_NGSILD → AGECONF/config_NGSIV2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
"contextBroker": {
"host": "orion",
"port": 1026,
"ngsiVersion": "ld",
"jsonLdContext": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
"fallbackTenant": "opcua_car"
"service": "opcua_car",
"subservice": "/demo"
},
"server": {
"port": 4001,
Expand All @@ -17,7 +16,7 @@
"type": "memory"
},
"mongodb": {
"host": "iotmongo",
"host": "iot_mongo",
"port": "27017",
"db": "iotagent",
"retries": 5,
Expand All @@ -28,9 +27,6 @@
"service": "opcua_car",
"subservice": "/demo",
"active": [{
"name": "EngineBrake",
"type": "Number"
}, {
"name": "Acceleration",
"type": "Number"
}, {
Expand Down Expand Up @@ -68,7 +64,7 @@
"deviceRegistrationDuration": "P1M",
"defaultType": null,
"contexts": [{
"id": "urn:ngsi-ld:Device:age01_Car",
"id": "age01_Car",
"type": "Device",
"service": "opcua_car",
"subservice": "/demo",
Expand Down Expand Up @@ -101,7 +97,7 @@
}]
}],
"contextSubscriptions": [{
"id": "urn:ngsi-ld:Device:age01_Car",
"id": "age01_Car",
"type": "Device",
"mappings": [{
"ocb_id": "Error",
Expand Down
16 changes: 9 additions & 7 deletions conf/config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"logLevel": "INFO",
"logLevel": "DEBUG",
"multiCore": false,
"relaxTemplateValidation": true,
"contextBroker": {
"host": "orion",
"port": 1026,
"service" : "opcua_car",
"subservice" : "/demo"
"ngsiVersion": "ld",
"jsonLdContext": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld",
"service": "opcua_car",
"subservice": "/demo"
},
"server": {
"port": 4001,
Expand All @@ -16,7 +18,7 @@
"type": "memory"
},
"mongodb": {
"host": "iotmongo",
"host": "iot_mongo",
"port": "27017",
"db": "iotagent",
"retries": 5,
Expand Down Expand Up @@ -67,7 +69,7 @@
"deviceRegistrationDuration": "P1M",
"defaultType": null,
"contexts": [{
"id": "age01_Car",
"id": "urn:ngsi-ld:Device:age01_Car",
"type": "Device",
"service": "opcua_car",
"subservice": "/demo",
Expand Down Expand Up @@ -100,7 +102,7 @@
}]
}],
"contextSubscriptions": [{
"id": "age01_Car",
"id": "urn:ngsi-ld:Device:age01_Car",
"type": "Device",
"mappings": [{
"ocb_id": "Error",
Expand Down Expand Up @@ -130,4 +132,4 @@
}]
}]
}]
}
}
File renamed without changes.

0 comments on commit b556ff7

Please sign in to comment.