This guide focuses on integrating and porting CHPP to your desired platform. For implementation details please refer to the included README.md instead.
The minimum typical steps are as follows:
Implement the platform-specific functionality utilized by CHPP. These can be found in chpp/platform and include:
Sample Linux implementations are provided.
The APIs that are needed to tie CHPP to the serial port are as follows:
In addition, the system must implement and initialize the platform-specific linkParams data structure as part of platform_link.h
In order to initialize CHPP, it is necessary to
Several unit tests are provided in transport_test.c. In addition, loopback functionality is already implemented in CHPP, and can be used for testing. For details on crafting a loopback datagram, look at README.md and the transport layer unit tests (transport_test.c).
In order to terminate CHPP's main transport layer thread, it is necessary to call chppWorkThreadStop. It is then possible to deallocate the transportContext and appContext structs.