Giter VIP home page Giter VIP logo

xentara-template-driver-batch-polymorphic's Introduction

Batch Processing Polymorphic I/O Driver Template for Xentara

This repository contains skeleton code for a Xentara driver with the following features:

Connection based Batch processing Polymorphic Data Points
NO YES YES

Prerequisites

This driver template requires the Xentara development environment, as well as a Xentara licence. You can get a Xentara licence in the Xentara Online Shop.

The documentation for Xentara can be found at https://docs.xentara.io/xentara.

This driver template uses the Xentara Utility Library, as well as the Xentara Plugin Framework. The corresponding documentation can be found here:

https://docs.xentara.io/xentara-utils/
https://docs.xentara.io/xentara-plugin/

Build Environment

The repository include a CMakeLists.txt file for use with CMake, which allows you to build the source code out of the box, as long as the Xentara development environment is installed. If you whish to use a different build system, you must generate the necessary build configuration file yourself.

Source Code Documentation

The source code in this repository is documented using Doxygen comments. If you have Doxygen installed, you can generate detailed documentation for all classes, functions etc., including a TODO list. To generate the documentation using CMake, just build the target docs by executing the following command in your build directory:

cmake --build . --target docs

This will generate HTML documentation in the subdirectory docs/html.

Xentara I/O Component Template

(See I/O Components in the Xentara documentation)

src/TemplateIoComponent.hpp
src/TemplateIoComponent.cpp

The I/O component template provides template code for I/O components that can never be disconnected or reconnected to the computer. Such components are either entirely stateless, or require a single initialization and deinitialization call. This generally includes three types of components:

  • I/O components that are physically located inside the computer (PCIe expansion boards, SPI or I2C components etc.),
  • I/O components that are permanently attached to the computer, and cannot be removed or reattached without shutting down, or
  • virtual I/O components, that do not represent physical devices at all (simulators, A/I models, computational units etc.).

Xentara I/O Transaction Template

(See I/O Transactions in the Xentara documentation)

src/TemplateIoTransaction.hpp
src/TemplateIoTransaction.cpp

The I/O transaction template provides template code for a batch communications request that can read and write multiple data points at the same time.

The template code has the following features:

  • All data points attached to an I/O transaction share common Xentara attributes for update time, quality and error code, which are maintained centrally in the I/O transaction. These attributes are then inherited by the data points, so that they can be accessed as attributes of the data point as well.
  • The I/O transaction publishes a Xentara task called read, which acquires the current values of all data points from the I/O component using a read command.
  • The I/O transaction publishes a Xentara task called write, that checks which outputs have pending output values, and writes those outputs to the I/O component using a write command (if there are any).
  • The I/O transaction publishes Xentara events to signal if a write command was sent, or if a write error occurred. These events are not inherited by the data points, who have their own individual events instead. This is done so that the events of the individual outputs can be raised individually for only those outputs that were actually written.

Xentara Skill Data Point Templates

(See Skill Data Points in the Xentara documentation)

Input Template

src/TemplateInput.hpp
src/TemplateInput.cpp

The input template provides template code for a read-only skill data point whose value is read using an I/O transaction.

The template code has the following features:

  • The data type of the value is configurable in the model.json file.
  • The input inherits Xentara attributes for update time, quality and error code from the I/O transaction, and shares them with all other data points belonging to the same I/O transaction.

Output Template

src/TemplateOutput.hpp
src/TemplateOutput.cpp

The output template provides template code for a read/write skill data point whose value must be read and written using individual commands for each output.

The template code has the following features:

  • The data type of the value is configurable in the model.json file.
  • The input and output values are handled entirely separately. A written output value is not reflected in the input value until it has been read back from the I/O component by the I/O transaction. This is necessary because the I/O component might reject or modify the written value.
  • The value of the output is not sent to the I/O component directly when it is written, but placed in a queue to be written by the I/O transaction.
  • The output inherits Xentara attributes for update time, quality and error code from the I/O transaction, and shares them with all other data points belonging to the same I/O transaction.
  • The output publishes Xentara events to signal if a new value was written, or if a write error occurred.

xentara-template-driver-batch-polymorphic's People

Contributors

georg-emg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.