Olcb* C/C++ Libraries

Note: As of August 2015, this library has been orphaned. If you're interested in forking or restarting development, please see the README.txt file for additional information.

The OlcbCommonCAN library combined with other platform-specific libraries to form a low-end OpenLCB implementation aimed at small processors. Together, the parts are called the Olcb* (pronounced “olcb star”) libraries.

It's hardware-independent as much as possible, so that it can form the basis for the Arduino and PIC implementations. It's also configured to run standalone tests and simulations without specific hardware, e.g on a PC. These are now written using the gtest toolkit, a pre-configured copy of which is included in OpenLCB SVN.

The sections below discuss the details of using the code.

Available Programs



Arduino IDE

Sketches OlcbBasicNode, OlcbMiniNode (and perhaps others) use implementations from libraries/OlcbCommonCAN, libraries/OlcbArduinoCAN and libraries/ButtonLED when opened in Arduino IDE.

The basic starting point is the OlcbBasicNode sketch, which implements 4 producers and 4 consumers on an Arduino shield.

Standalone Gmake

To build and run the tests, do

make run

The gcc/g++ compiler is expected. The “run” argument runs some standalone tests that work by comparing stdout to pre-made files from SVN; it might not work on a non-*nix machine.

This is primarily used to do a quick build check on all the Olcb* sketches after a change to the code.

NetBeans

You can build and test the libraries for your desktop machine via NetBeans. Cross-compilation is not yet available, though it would be a great thing for somebody to work on.

Start by opening the OlcbDesktopTests project. It should also open three other projects:

Select the OlcbDesktopTests project in the window, do a clean build, and then run. This runs the default set of tests.

Note to MacOS X users: To get command line C/C++ tools needed by NetBeans, you may need to download and launch Xcode, go to Preferences → Downloads, and install the command line tools.

Getting the Code

The content of this development area, including code, documents and web pages, is kept in the OpenLCB SourceForge.net SVN repository in the “trunk/prototypes/C” directory. To check it out, please do:

svn co http://svn.code.sf.net/p/openlcb/svn/trunk/prototypes/C/OlcbStarLibraries OlcbStarLibraries

For more information on the SVN source code management tool, please see the SVN website and the online SVN book.



This web site contains trademarks and copyrighted information. Please see the Licensing page.

This is SVN $Revision: 3915 $ of 08/16/09.