Skip to content
mpaland edited this page Apr 9, 2012 · 3 revisions

This is the decom (DEvice COMmunication) library. It is intented to be a minimalistic abstraction of the OSI layer model to provide protocols and communication on different platforms.

Design goals:

  • clean code without any warnings on compiler level 4
  • ONLY usage of standard C++ and STL library
  • ONLY usage of standard stdint.h and native C++ datatypes
  • NO other external libraries nor other plattform dependencies except for util and communication layers which have architecture dependend folders (Win32, Linux etc.)
  • LINT compliant - not done yet

decom_layer - lowest base class represents one layer in the OSI stack

decom_dev - base class for devices (layer 7) decom_prot - base class for protocols (layer 3-6) decom_com - base class for communication (layer 2)

The following layer classification is used:

Every layer consists of the standard decom_layer API to pass and receive data from the upper and lower layer. Further each layer can have own API functions to set layer specific protocol params like baudrate, timings, flow control etc.

Communication layer This is the lowest layer. It has only one interface to an upper layer.

Protocol layer This layer has two interfaces. One to the upper layer and one to the lower layer. Typically a protocol layer does clothing, stripping, checksum calculations, flow control etc. Any desired count of protocol layers may be chained.

Device layer This is the top most layer, often referred as application layer in OSI model. The upper layer has only one interface to its lower layer and some device specific API functions.

The stack is always created with bottom (Com) layer first to top (Dev) layer as last. Dynamic protocol generation, binding and unbinding (layer delete) is supported.

Clone this wiki locally