Brainstem C API OverviewIndex

Introduction

This reference section describes the routines necessary for using C to interface with your BrainStem network from a number of possible host computers.

Structure

The code is provided as both shared libraries for basic functionallity as well as source code and include files for higher-level specifics like the interface to a particular sensor or device.  This reference section includes a note as to which include(s) are needed as well as where the object code is found (either a .c file or a shared library).

Library Calling Conventions

Since shared libraries are handled very differently on various supported platforms, all shared library access follows the same convention, regardless of platform.  To use a shared library function, an opaque reference to the shared library is first obtained.  This opaque reference is passed as the first variable to calls to routines in that shared library.  The opaque reference must then be explicitly destroyed at the end of the program.

The BrainStem C API is a very good framework for general purpose C coding on multiple platforms.  We use it for the BrainStem Console, GP, Moto, and other demonstration programs.  With it you can build a small terminal shell, implement a small web server, relay BrainStem traffic across a TCP/IP link, and perform other useful and general purpose tasks.

Which C Compiler to Use

The BrainStem architecture runs on a number of different OS Platforms and configuration.  On many of these platforms, there are a number of choices for the programming environment.  This reference describes the basic C language needs and constructs used in programming the BrainStem.  This document also assumes you have a very functional understanding of the operation of your compiler and C language.  We try to not make any compiler choices for you allowing you to use the compiler you are most familiar with or have at your disposal.

Because the BrainStem is supported on so many platforms, this API has been run through at least 8 different mainstream compilers.  It should work well in your environment when you have things properly configured.


version: 1.0, build n.a.
© Copyright 1994-2012 Acroname, Inc., Boulder, Colorado.  All rights reserved.