Using the Modular Output System

If you'd like to use the Modular Output System in your own projects, the system is relatively easy to use.

Include the Library

import ardi.util.outputengine as outie

Create and Start an Instance

oe = outie.OutputEngine("My Source Name")
oe.Start()

This creates an instance of the Output Engine. You pass a name that identifies your application.

Note that calling 'start' may block for a few moments, depending on the output configuration. This varies, as some output types are outgoing (they only send data) while some are incoming (they host a service for other systems to query).

Writing Key/Value Pairs

If you want to write numeric, status or other key-value data, you use the WriteValue function of the OutputEngine object.

oe.WriteValue('TemperatureA',25.6)

To record an event, use WriteLog.

oe.WriteLog('Stoppage')

Closing

When finished, you should call 'Stop'.

oe.Stop()

This will stop any HTTP, Modbus/TCP, OPC-UA or other services that were brought up by the Modular Output System.