EGD Dynamic Binding Protocol Adapter
EGD Configuration
EGD configuration details need to be distributed to a large audience. EGD configurations support XML format for extensibility and flexibility. The configuration description supports the inherent hierarchy of nodes, exchanges, variables and variable attributes of an EGD producer.
The EGD protocol uses HTTP 1.1 over TCP/IP as the transport mechanism for configuration messages. The profile of the HTTP protocol required by this specification requires servers that are at least conditionally compliant with HTTP 1.1 to be used. Although implementations are not required to support the configuration port (7937), it is encouraged.
Overview of Capabilities
The EGD dynamic binding protocol adapter enables data transfer from any controller that supports EGD protocol to MQTT or Predix cloud. Currently only Class 2 Dynamic Read is supported. The adapter is able to determine when the configuration of the EGD producer it is listening on has changed and adapt in real time by querying for a new configuration via HTTP 1.1 over TCP/IP REST calls. Events that would trigger a configuration include moving a variable from one EGD exchange to another, causing the signature and timestamp of the exchange to update.
Data Format
Once data has been sourced from an EGD producer exchange via UDP Data Production Packet, the binary format of the desired EGD variables are extracted and transformed into a flat json format.
{
"timestamp": "1504739531776",
"data": {
"temperature": {
"val": 15,
"type": "int16"
},
"pressure": {
"val": 16.2,
"type": "float"
}
}
}
Configuration Resources
Type | Name |
---|---|
type | egddynamicflat |
Name | Type | Required |
---|---|---|
transport_addr | String | Yes |
log_level | String | No |
log_name | String | No |
subscriptions | Array | Yes |
egress | Object | No |
- Transport Address (
transport_addr
) - The host address where EGD messages are expected to be received. It is
recommended to keep this field as "127.0.0.1" unless multicast is used. The
transport_addr
can be specified as either of the following:"transport_addr":"egd://<ip address>"
"transport_addr":"egd://<FQDN>"
- Log Level (
log_level
) - Configures the logger for the EGD client used internally to the block, can
be any of the following (case insensitive):
- off (default)
- critical
- err
- warn
- info
- debug
- Log Name (
log_name
) - Used in the log file to associate statements with the block. If omitted, the block name is used for the log name.
- Subscriptions (
subscriptions
) - An array that contains JSON objects that describe a particular producer and
its associated configuration server. Within each subscription, the following
configuration options are supported:
Name Type Required port Integer No producer_id Integer Yes config_url String Yes variables Array No - Port (
port
): The port on which EGD messages are expected to be received. The default is port 18246. - Producer ID (
producer_id
): Producer ID of the EGD producer whose values you want to listen for. - Config URL (
config_url
): URL of the EGD configuration server to request new producer configurations from. - Variables (
variables
): An array containing objects with the names of variables you want to read from the EGD producer and optional aliases.Note: Ifvariables
is not included in config, all variables from the producer will be returned to the user.
- Port (
- Egress
- Used to change the EGD output or egress formats.
Field Type Applicable to Default Description Output Format String flat_json
Format of the JSON file output by the adapter into other blocks. Valid entries: flat_json
time_series
Batch Interval Integer 30 seconds Amount of time (in milliseconds) the batcher will hold or accumulate data before generating a message. Upon sending data, the internal state is reset and emptied. Maximum Number of Datapoints Integer 1 The maximum number of data values the batcher will hold, per tag, over a batching interval. This functions as a very simple filtering step that helps control CPU usage. Attributes Object time_series empty block Attributes are dependent on the Output Format value. Timestamp From String source
Configures how the output timestamp values are set. Valid entries: - host (the adapter will use the local time in its output)
- source (the adapter will use the timestamp from the EGDsource in its output, unless that time is 0, in which case it will use the local time)
{
"type": "egddynamicflat",
"config": {
"log_level": "debug",
"log_name": "egddynamicflat",
"transport_addr": "egd://127.0.0.1",
"subscriptions": [
{
"port": 18246,
"producer_id": 1234,
"config_url": "http://192.168.1.8:8080",
"variables": [
{
"name": "01_BOOL",
"alias": "EGD.01_BOOL"
}
]
},
{
"port": 18246,
"producer_id": 1235,
"config_url": "http://192.168.1.8:8080",
"variables": [
{
"name": "02_BOOL",
"alias": "EGD.02_BOOL"
}
]
}
]
}
}