Structure of the source code
最終更新
最終更新
The components of an application in TWELITE NET are as follows
Definitions of and : mandatory definitions, to be written in the main file.
: these are written as required. These functions are designed to work with state machines.
User-defined functions: These are other processing functions that are application-specific code.
The main files are described below.
In the TWENET API, the main file contains the following definition.
Module declaration (mandate in the Main file)
Required header file includes
Callback functions
You can also put other procedure in files other than the main file.
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.
The should always be defined in the source code.