Flexible Driver

Flexible Driver

AggreGate Flexible Driver is a self-service “driver construction kit”. It perfectly suits for connecting devices that use proprietary binary or text protocols and send data via TCP, UDP or Serial port. Flexible Driver takes on a role of message coordinator, connection manager and a mediator between business logic and operating system level staff. It covers most of the operations usually developed in Java like opening and closing ports, establishing connections, operating with threads, buffers management, event chain tracing.

Flexible Driver allows an engineer to concentrate on describing of incoming and outgoing messages logical structure and mapping it to Unified Data Model.

Flexible Driver works with the following cases:

  • Communications are performed via TCP, UDP or Serial port of local machine
  • Device protocol is ASCII (text) or binary
  • Device protocol doesn't use "transactions" or complex "conversations", i.e. chains of separate messages acting as a single consolidated protocol unit that sends one portion of data
  • Protocol is based on:
    • asynchronous messages initiated by device
    • server commands followed by device replies
    • both synchronous commands/replies and asynchronous device-initiated messages (mixed mode)
  • Device replies may be matched to server commands in two ways:
    • device may reply commands in the same order as they were sent by the server
    • server commands and device replies may have IDs (unique for every communication session and matched to each other), in this case device may reply server commands in random order

Necessary configuration:

  • Device connection settings
  • Protocol Data Units (PDUs) processing settings like message splitter, encoding/decoding settings
  • Messages routing settings
  • Device data model description (variables, functions, events)
  • Protocol to Data model mapping settings

Common Usage Scenarios

Server requests data from devices

This Request-Response scenario is initiated by AggreGate Server. Unified Data Model occasion (variable change, event, function call) forces Flexible Driver to generate PDU according to mapping settings and send prepared command to device. Device reply is gathered in buffer and is analyzed by splitter. When all related to one PDU data fragments are collected full message is decoded and processed according to configured business logic.

Devices send asynchronous messages

In this scenario many devices establish connection with AggreGate Server on specified port. Received data fragments are collected in separate PDUs. Decoded message is analyzed for identity data that is used for routing incoming message to intended object in AggreGate, where further data processing is performed. Like in Request-Response scenario the result of data conversion is a set of events or variable updates.

Flexible Driver Diagram