Symisc Systems

Libcox API Introduction


Star Follow @symisc

This article provides an overview and roadmap to the C/C++ interface to Libcox.

The core Libcox API is relatively simple and easy to code to. This article aims to provide all of the background information needed to easily understand how Libcox works.

A separate document, The Libcox C/C++ Interface, provides detailed specifications for all of the various C/C++ APIs for Libcox. Once the reader understands the basic principles of operation for Libcox, that document should be used as a reference guide. This article is intended as introduction only and is neither a complete nor authoritative reference for the Libcox API.



Typical usage of the C/C++ Interface

In order to start programming with libcox, the developer needs to know about two objects. The developer who understands them will have a good foundation for using Libcox:

Programming with libcox is straightforward. An application that wants to use Libcox will typically uses the following set of interfaces with their optional components: Optionally, you may need the following set of interfaces:

Now you understand the basic usage of Libcox, we recommend you to take a look on C/C++ samples available at the bottom of the download page and start practicing with Libcox!


Extending Libcox

Libcox includes interfaces that can be used to extend its functionality. Such routines includes libcox_regsister_command().
The libcox_regsister_command() interface is used to register a foreign command (typically a C/C++ function that implement the system call for example) that can be invoked from libcox_exec(). The new command implementation typically makes use of the following additional interfaces to perform its task.
All of the Libcox built-in commands such as mkdir, chdir, uname, stat, sleep, date, etc. are created using exactly this interface.


Other Interfaces

This article only mentions the foundational Libcox interfaces. The Libcox library includes many other APIs implementing useful features that are not described here. A complete list of functions that form the Libcox application programming interface is found at the C/C++ Interface Specification. Refer to that document and the Libcox Object Reference for complete and authoritative information about all Libcox interfaces.