Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "BaSyx / Documentation / Components / DataBridge / Features / Timer"

(Created page with "= Timer = The Timer trigger is used to generate message exchanges when a timer fires. It means that the configured route would start processing the message when the configured...")
 
Line 3: Line 3:
  
 
== Configuration ==
 
== Configuration ==
You can specify '''"trigger": "timer"''' in '''routes.json''' [Link] configuration file. Apart from this, you have to specify the timer name as a trigger data inside '''routes.json'''.
+
You can specify '''"trigger": "timer"''' in '''routes.json'''. Apart from this, you have to specify the timer name as a trigger data inside '''routes.json'''.
  
 
=== Sample Route Configuration with Timer ===  
 
=== Sample Route Configuration with Timer ===  
Line 20: Line 20:
 
</pre>
 
</pre>
  
When configuring the timer as a trigger, you have to include another configuration file i.e. '''timerconsumer.json''', for the configuration of '''timerconsumer.json''' please check Protocol Integration Timer[Link]. For e.g. As the above sample route configuration shows httpsource as datasource and the trigger is timer, then there will be two consumer configuration files i.e. '''httpconsumer.json''' and '''timerconsumer.json''' along with other configuration files.
+
When configuring the timer as a trigger, you have to include another configuration file i.e. '''timerconsumer.json''' (Sample Timer consumer configuration file below). For e.g. As the above sample route configuration shows httpsource as datasource and the trigger is timer, then there will be two consumer configuration files i.e. '''httpconsumer.json''' and '''timerconsumer.json''' along with other configuration files.
 +
 
 +
=== Sample Timer Consumer Configuration ===
 +
<pre class="mw-code mw-code-json">
 +
[
 +
  {
 +
    "uniqueId": "timer1",
 +
    "fixedRate": true,
 +
    "delay": 0,
 +
    "period": 5000
 +
  }
 +
]
 +
</pre>
 +
 
 +
== Working Example ==
 +
The integration example with '''timer triggered''' OPC UA as a data source, with two transformers JSONata and Jackson, and AAS as a data sink is on [https://github.com/eclipse-basyx/basyx-databridge/tree/main/basyx.components.databridge.examples/basyx.components.databridge.examples.opcua-jsonata-aas GitHub DataBridge Example].

Revision as of 06:55, 1 February 2023

Timer

The Timer trigger is used to generate message exchanges when a timer fires. It means that the configured route would start processing the message when the configured timer is triggered.

Configuration

You can specify "trigger": "timer" in routes.json. Apart from this, you have to specify the timer name as a trigger data inside routes.json.

Sample Route Configuration with Timer

[
  {
    "datasource": "httpsource",
    "transformers": ["jsonataA"],
    "datasinks": ["ConnectedSubmodel/ConnectedPropertyB"],
    "trigger": "timer",
    "triggerData" : {
    	"timerName": "timer1"
    }
  }
]

When configuring the timer as a trigger, you have to include another configuration file i.e. timerconsumer.json (Sample Timer consumer configuration file below). For e.g. As the above sample route configuration shows httpsource as datasource and the trigger is timer, then there will be two consumer configuration files i.e. httpconsumer.json and timerconsumer.json along with other configuration files.

Sample Timer Consumer Configuration

[
  {
    "uniqueId": "timer1",
    "fixedRate": true,
    "delay": 0,
    "period": 5000
  }
]

Working Example

The integration example with timer triggered OPC UA as a data source, with two transformers JSONata and Jackson, and AAS as a data sink is on GitHub DataBridge Example.

Back to the top