CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
Using the CMSDK library

When the CMSDK library has been linked and the header file locations have been set up (see Compiling and linking with the CMSDK library), any program can start including header files and using CMSDK objects and functions. They all live in the namespace called cmlabs, which can either be used directly:

The API handle a component (crank) uses to talk to the Psyclone system.
Definition PsyAPI.h:82

or the namespace can be brought in earlier:

using namespace cmlabs;
PsyAPI* api = new PsyAPI();

A lot of the utility functions are in a nested namespace called cmlabs::utils (see Utility functions and objects), such as:

cmlabs::utils::StringFormat("(%.3f,%.3f)", x, y);
std::string StringFormat(const char *format,...)
printf into a std::string.
Definition Utils.cpp:6884

or:

using namespace cmlabs;
utils::StringFormat("(%.3f,%.3f)", x, y);

If you are writing components for Psyclone rather than using CMSDK as a stand-alone C++ library, start with Getting Started and Writing a Module (Crank) — in practice you will mostly interact with cmlabs::PsyAPI, cmlabs::PsySpace and cmlabs::DataMessage.