Backend API architecture

This chapter describes what classes you must implement to implement your backend.

In order to implement your backend, it must create and hold an instance of the CommonBackend class.

// doExit flag defines the backend shutdown event. When starting the backend, this flag is set to false.
// zmqContext zeromq context to use
CommonBackend commonBackend(zmqContext, doExit)

For the interaction of the backend with the frontend (receiving settings from the database, receiving settings from the WinCC OA system, sending status updates, etc.), you need an instance of the ConfigChannelHandler class, whose member is stored in the CommOnBackend class.

auto& configChannelHandler = commonBackend.runCommonBackendWithConfigChannelOnly(zmqAddress, pollingInterval);

You also need to send information about the state of the database connection. To do this, you must create an instance of the DataReceivedHandler class (see DatabaseActivityMonitor handlers).