![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
research application on sending data to headend
Dependencies: DataStore JobScheduler NetworkServices W5500Interface nanopb protocol
See "main.cpp" documentation on "API Documentation" tab for details about application.
Diff: source/main.cpp
- Revision:
- 22:3af582d8e227
- Parent:
- 21:32cd3bfde206
--- a/source/main.cpp Fri Aug 04 19:27:31 2017 +0000 +++ b/source/main.cpp Fri Aug 04 21:08:49 2017 +0000 @@ -15,12 +15,16 @@ #include "jobSchedulesUpload.h" #include "jobTestUpload.h" - // These are necessary only if thread safety is needed +/** TracingLock provides a single synhronization point for tracing library. */ static Mutex TracingLock; + +/** @brief Implements trace library locking policy, which is to synchronize its output. */ static void tracingWait() { TracingLock.lock(); } + +/** @brief Implements tracing library release policy. */ static void tracingRelease() { TracingLock.unlock(); @@ -46,7 +50,30 @@ return true; } -/** Main function. +/** +\brief Application entry point. + +Main up execution environment. + +Sets up tracing environment to be thread safe. + +Initializes services such as networking stack, LCE proxy and others. + +Configures and starts scheduler service that's at the core of the application +functinality and design. + +Associates job type IDs with functions that implement high level job concept. + +If you need to add new functionality create it a a standalone C function +or C++ adapter function backed by C++ object state and register it with +scheduler service registry. + +Some jobs can be created in the main to bootstrap application functionality. + +Piggybacked commands can change internal scheduler state by adding new jobs +or removing existing jobs. + +@see main.h for design details. */ int main() {