CMO - Concurrent Modules for GNU Octave

About | Status | License | Documentation | Download

About

What

Concurrent Modules for GNU Octave, CMO for short, is a library to help developing concurrent modules for GNU Octave. These modules are run in a separate thread or process and they communicate with GNU Octave via an IPC channel. Each module can create objects that represent a module-specific object and that can be managed by the user from within GNU Octave's interpreter using an object-oriented syntax. CMO also implements an event queue within GNU Octave. These events are able to execute user-defined callback functions.

Why

Originally, the objective was to implement a set of functions to create graphical user interfaces (GUIs) from GNU Octave as it can be done in Matlab(tm). The needed infrastructure that allows a separate thread to communicate asynchronously with Octave and that sents it events to which it has to react has been seen as useful for other needs, too. For example, a timer that has to run in parallel to Octave can trigger events; or a module can represent an external device (oscilloscope...) as an object that can be controlled using Octave commands, etc. Thus, CMO has been created to help the development of concurrent modules.

The project will also host the forthcoming Octave GUI Module (OGM) that will fullfill the original objective.

How

CMO provides a dynamically loadable library written in C++ that implements:
  • an event queue: to each event is associated a user definable callback : an Octave expression, a function handle or a script name;
  • a module manager: to start and stop a  module in a separate thread or process; to send it commands and to fetch the events it has sent;
  • an abstract module class from which the developer derive her own module;
  • an abstract object class from which the developer derive the objects associated with her module;
  • a new Octave data type representing module objects. This new data type is accessed from Octave's interpreter using an object-oriented syntax and allows the user to change object properties or to execute object methods.
As a sample module implementation, CMO provides a timer module that aims to provide the same functionalities as the timer object in recent Matlab(tm) versions.

For Who

CMO is a C++ framework for developers. If you use Octave and need a functionality that runs in parallel to Octave without blocking it, and if you want to communicate with it using an object oriented syntax (for setting object data or executing objects methods), if the functionality needs to signal Octave for certain events and if Octave has to react as soon as it can to them, then CMO may be a solution for your problem. Just use the provided abstract module class to derive your main function, use the provided abstract object class to represent objects and just implement what your specific functionalities without worrying about Octave-module and object-module communication.

Contact information

To contact the author, please send a mail to
driss dot ghaddab at free dot fr
and prefix your subject with [cmo].