aVineas.org aVineas open source Java code

Introduction

Comli is a protocol originally developed by ABB that communicates via serial lines, either point-to-point or multi-drop. The protocol is a strict master/slave protocol where the master is the initiator of all communication. Slaves listen on the other end of the line and only respond to messages from the master that are directed to them, as indicated by the destination identification in the message. A master can request data from a slave or send data to it. The details of the protocol are specified in here.

Usage

The software provided here can act as both the master side or the slave side of a Comli protocol interaction. Since the details of the line protocol (serial, multi-drop, etc.) are specific for the environment used, the lowest level interaction is abstracted via a Channel interface provided by the IO library bundle. A Channel implementation for TCP links are provided in that library bundle, so when interaction takes place via LAN-serial converters, usage is out of the box. In all other cases a Channel implementation must be provided externally.

In an OSGi environment, all handling is done via service tracking. As soon as a specific Channel implementation is registered as service, the related Comli side is automatically constructed and made available. For the slave side this means that slave implementations are automatically looked-up and tracked in the service registry and called appropriately. For the master side it means that a service is created and exported via the service registry for use by others.

Details are provided in the OSGi Javadoc. The interface itself is described in the interface Javadoc. In case the jar is used outside an OSGi environment, the handling must be instantiated in code. Code for this is present in the impl package (Javadoc). Examples are present in the test bundle.

Dependencies

The bundle depends on the standard OSGi core and compendium interfaces if run in an OSGi environment (not required otherwise). Furthermore, it uses Apache Commons logging as logging facility.

Download

org.avineas.io_1.0.1.jar - the aVineas IO library bundle
org.avineas.comli_1.0.0.jar - bundle with the code
test.avineas.comli_1.0.0.jar - bundle with example code

Copyright 2010-2014, aVineas IT Consulting