Skip to content

Commit

Permalink
Merge pull request #2768 from bosch-io/hrm_models
Browse files Browse the repository at this point in the history
vorto.private.bosch.io.hrm.test.* models added
  • Loading branch information
t-gauss authored Jul 14, 2021
2 parents c4d5f60 + 0b75888 commit 98bbd0d
Show file tree
Hide file tree
Showing 9 changed files with 3,850 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (C) 2020, 2021 Bosch.IO GmbH
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
vortolang 1.0
namespace vorto.private.bosch.io.hrm.test
version 1.0.0
displayname "BsedMeasurement"
description "Datatype for BsedMeasurement"

entity BsedMeasurement {
mandatory timestamp as dateTime
mandatory measurements as dictionary[string, float]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"root": {
"name": "BsedMeasurement",
"namespace": "vorto.private.bosch.io.hrm.test",
"version": "1.0.0",
"prettyFormat": "vorto.private.bosch.io.hrm.test:BsedMeasurement:1.0.0"
},
"models": {
"vorto.private.bosch.io.hrm.test:BsedMeasurement:1.0.0": {
"targetPlatformKey": null,
"stereotypes": [],
"mappingReference": null,
"vortolang": "1.0",
"id": {
"name": "BsedMeasurement",
"namespace": "vorto.private.bosch.io.hrm.test",
"version": "1.0.0",
"prettyFormat": "vorto.private.bosch.io.hrm.test:BsedMeasurement:1.0.0"
},
"type": "Datatype",
"displayName": "BsedMeasurement",
"description": "Datatype for BsedMeasurement",
"category": null,
"fileName": "BsedMeasurement.type",
"modelType": "EntityModel",
"references": [],
"properties": [
{
"targetPlatformKey": null,
"stereotypes": [],
"mappingReference": null,
"mandatory": true,
"name": "timestamp",
"description": null,
"type": "DATETIME",
"constraints": [],
"attributes": [],
"multiple": false,
"primitive": true
},
{
"targetPlatformKey": null,
"stereotypes": [],
"mappingReference": null,
"mandatory": true,
"name": "measurements",
"description": null,
"type": {
"key": "STRING",
"value": "FLOAT",
"type": "dictionary"
},
"constraints": [],
"attributes": [],
"multiple": false,
"primitive": false
}
],
"superType": null
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (C) 2020, 2021 Bosch.IO GmbH
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
vortolang 1.0
namespace vorto.private.bosch.io.hrm.test
version 1.0.4
displayname "BsedMeterDevice"
description "Functionblock for BsedMeterDevice"

using vorto.private.bosch.io.hrm.test.BsedMeasurement;1.0.0

functionblock BsedMeterDevice {
configuration {
mandatory meterPIN as string
mandatory meterType as string //could be also an enum
mandatory meterFactor as int
mandatory okkDeliveryInterval as int
mandatory okkStatusInterval as int
mandatory okkMeasurementInterval as int
mandatory obisPrecision as int
mandatory okkActive as boolean
mandatory multiple okkDeliveryObis as string
mandatory timeserverUrl as string

}
operations {
updateMeterPIN(meterPIN as string) "set meter PIN to retrieve extended measurement set"
updateDeliveryInterval(updateInterval as int) "set delivery interval for measurement messages in seconds"
updateStatusInterval(updateStatus as int) "set delivery interval for status messages in seconds"
updateDeliveryObis(deliveryObisCsv as string) "set the Obis collected by the device as CSV string, eg. [\"1.8.0\",\"16.7.0\"] "
updateActiveStatus(status as boolean) "disable/enable device measurements"
updateTimeserverURL(ntpUrl as string) "set URL to synchronize internal device clock, eg. https://ntp.org"
updateMeasurementInterval(okkMeasurementInterval as int) "set measurement interval in seconds when device should read from meter"
updateConfig (jsonConfig as string) "set the whole config on the device as jsonString"
updatePrecision(obisPrecision as int) "return precision of the float values"
updateAccessPointOpen(state as boolean) "open device AccessPoint on true, otherwise close AP"
}
events {
measurementsEvent {

multiple measurements as BsedMeasurement
}
}
status {
mandatory lastTimesync as dateTime //last ntp update
mandatory actualTime as dateTime
mandatory wlanRssi as int
mandatory fwVersion as string "OKK Firmware Version (example: FW1.23)"
mandatory values as boolean // meter attached?
mandatory extendedValues as boolean
mandatory meterId as string //1ESY132354356436
optional measurementInfo as string
optional accessPointOpen as boolean
}
}
Loading

0 comments on commit 98bbd0d

Please sign in to comment.