The components of an application in TWELITE NET are as follows
The main files are described below.
In the TWENET API, the main file contains the following definition.
You can also put other procedure in files other than the main file.
The TWENTE API does not have a main() function as is common in C language processors. The first function to be called is the cbAppColdStart() function.
Define functions and memory to be determined statically at compile time in order to minimise build binary and runtime memory.
Write the definition of the module usage declaration before cbAppColdStart() and initialize it by calling the ToCoNet_REG_MOD_ALL() macro in cbAppColdStart().
For header files, "ToCoNet.h" and "ToCoNet_mod_prototype.h" are required.
// Select Modules (define befor include "ToCoNet.h")
#define ToCoNet_USE_MOD_RXQUEUE_BIG
#define ToCoNet_USE_MOD_CHANNEL_MGR
// Includes
#include "ToCoNet.h"
#include "ToCoNet_mod_prototype.h"
…
void cbAppColdStart(bool_t bStart) {
if (!bStart) {
// Module Registration
ToCoNet_REG_MOD_ALL();
} else {
…The callback functions should always be defined in the source code.