CHAI SDK  Version 1.3
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Types

All the data types used by the SDK are defined in the CPNS namespace in order to avoid conflicts with other platforms or application types, while being independent of compiler defines.

Type names are self-documented and intuitive. For instance, an unsigned 32-bit value is declared from the type CPNS::uint32. Numerical type sizes range from Boolean to 64-bit. Usage of 64-bit values should not be an issue, even in embedded; this has been tested on 8 bits MCUs.

Some complex data containers are also considered as "data type". These objects are defined using a regular class (in opposition to the interface classes) and can be freely created by the application code (no need to call the CHAI to create an instance of such objects). For example, CPNS::DeviceID is the container for a CopperLan Device Identity. It contains a BrandID, a ModelID, a DuplicateNumber and a ModuleID. The CPNS::Endpoint class is aimed at identifying an Input or an Output over the network. It contains a DeviceID in addition to an Input or Output ID.

Text strings are always encoded in UTF8. Const string can be passed using a CPNS::char8 pointer. The CPNS::UTF8String object is used to store or manipulate text strings.