Inmation-to-Inmation Data Transfer: Push
With the push method for the Inmation-to-Inmation Data Transfer, the source system acts as the client, trying to connect to the target system that is acting as the server. There are two different options for the implementation of the push method:
-
the Basic Data Transfer uses the History Controller object in conjunction with the History Sink object, which is simpler to set up and does not require scripting, but also offers less flexibility and control over the transfer and export process
-
the Advanced Data Transfer which offers more flexibility and control over the transfer as well as the export process using the History Transport Manager object together with the Generic Time Series Buffer (GTSB) object. This approach requires the implementation of a custom export logic with Lua scripting, though
Both variants require the same preparation for the target system.
Preparing the Target System
Before setting up the source system an Inmation Receiver object needs to be created on the target system. This object will be the entry point for API calls coming in from the source system.
Basic Data Transfer - Source System Setup
For the basic data transfer push method, the History Transfer Controller object needs to be installed on the source system, as addressed in the object guide for the the History Transfer Controller .
|
Things to consider when setting up the History Transfer Controller object:
|
Advanced Data Transfer - Source System Setup
For the advanced data transfer for the push method, the History Transport Manager object together with the Generic Time Series Buffer (GTSB) object need to be installed on the source system.
Regarding the setup of these objects, please
follow the instructions in the
object guides for
-
the Generic Time Series Buffer,
Things to consider when setting up the Generic Time Series Buffer object:-
set the Interface Extension >
Extension Selector to Inmation To Inmation,
-
use the Basic Inmation-to-Inmation GTSB script below instead of the one from the object guide page
-
-
the History Transport Manager object.
A Basic Inmation-to-Inmation GTSB Lua Script
The following Lua code is a simple example, illustrating the use of the Generic Time Series Buffer (GTSB) for the Inmation-to-Inmation Push Data Transfer. For various refinement options, please refer to the examples on the Cloud Export with GTSB page.
local I2I = require('syslib.inmationtoinmation-publisher') (1)
return function(...)
local iter, sink = ...
if iter.length > 0 then
local latestID
for saf_id, prp_id, v, q, t, _ in iter() do
I2I.helper:PAYLOADADD(prp_id, v, q, t)
latestID = saf_id
end
local payload = I2I.helper:PAYLOADBUILDER()
local suc, err = sink:SEND(payload)
if not suc then
error(err)
else
iter:ack(latestID)
end
end
end
| 1 | The syslib.inmationtoinmation-publisher library is required to build the payload. |