This is the entry point of the application. It just calls two functions in
FruityMesh.cpp. The first one boots up the node and the second one runs an endless loop to fetch and process events.
During bootup, classes such as the SoftDevice, Terminal, Logger, Storage, and others are initialized. After everything has been started, the event handling routine takes over. All event dispatching routines, as well as interrupt and error handlers are implemented here.
The base folder contains a few classes that are meant as wrappers for the S130 API. The most central one is the FruityHal, which wraps all nRF functionality (not yet complete).
The Node class is responsible for building mesh connections and works hand in hand with the MeshConnection and ConnectionManager classes to accomplish these tasks.
The ConnectionManager is responsible for handling and scheduling all BLE connections. It is the central point to handle connects, disconnects and reestablishing connections.
All connections between nodes are using the MeshConnection class. This, together with the ConnectionManager and the Node handles clustering and meshing in general.
Other classes, all derived from BaseConnection are also in this folder and they enable e.g. smart phones to connect to the mesh and send and receive data. The most important one is the MeshAccessConnection, which implements a custom encryption protocol for communicating with external devices independent of their operating system.
This folder contains a number of modules that provide specific functionality apart from the meshing protocol. To implement a new module, use a template in the
fruitymesh/src_examples/ folder to get started and have a look at the StatusReporterModule to get an idea of how to implement additional functionality.
If you want to learn more about modules, either read the Modules chapter or have at look at this tutorial about Implementing a Custom Module.