31 #ifndef _ELABORATE_DATA_TASK_H
32 #define _ELABORATE_DATA_TASK_H
36 #include "stima_utility.h"
39 #include <STM32FreeRTOS.h>
42 #include "semaphore.hpp"
50 using namespace cpp_freertos;
53 #define ELABORATE_TASK_WAIT_DELAY_MS (20)
54 #define ELABORATE_TASK_SLEEP_DELAY_MS (850)
56 #define CLOGGED_TIMINGS_VERIFY (28800)
95 ELABORATE_DATA_SUSPEND
106 #if (ENABLE_STACK_USAGE)
107 void TaskMonitorStack();
109 void TaskWatchDog(uint32_t millis_standby);
110 void TaskState(uint8_t state_position, uint8_t state_subposition,
task_flag state_operation);
113 uint8_t checkRain(
void);
116 STM32RTC &rtc = STM32RTC::getInstance();
128 template<
typename buffer_g,
typename length_v,
typename value_v> value_v
bufferRead(buffer_g *buffer, length_v length);
129 template<
typename buffer_g,
typename length_v,
typename value_v> value_v
bufferReadBack(buffer_g *buffer, length_v length);
130 template<
typename buffer_g,
typename value_v>
void bufferWrite(buffer_g *buffer, value_v value);
131 template<
typename buffer_g>
void bufferPtrReset(buffer_g *buffer);
132 template<
typename buffer_g,
typename length_v>
void bufferPtrResetBack(buffer_g *buffer, length_v length);
133 template<
typename buffer_g,
typename length_v>
void incrementBuffer(buffer_g *buffer, length_v length);
134 template<
typename buffer_g,
typename length_v,
typename value_v>
void bufferReset(buffer_g *buffer, length_v length);
135 template<
typename buffer_g,
typename length_v,
typename value_v>
void addValue(buffer_g *buffer, length_v length, value_v value);
ELABORATE DATA TASK cpp_freertos class.
ElaborateDataParam_t param
State_t
Enum for state switch of running method.
#define REPORTS_TIME_S
Default report (RMAP) time in second.
#define OBSERVATIONS_TIME_S
Default observation (RMAP) time in second.
#define SAMPLES_COUNT_MAX
Sample and default value for elaborate task.
void incrementBuffer(buffer_g *buffer, length_v length)
void bufferPtrResetBack(buffer_g *buffer, length_v length)
void bufferPtrReset(buffer_g *buffer)
value_v bufferRead(buffer_g *buffer, length_v length)
void bufferReset(buffer_g *buffer, length_v length)
void bufferWrite(buffer_g *buffer, value_v value)
void addValue(buffer_g *buffer, length_v length, value_v value)
value_v bufferReadBack(buffer_g *buffer, length_v length)
task_flag
Task state Flag type.
Interface STM32 hardware_hal STIMAV4 Header config.
struct local elaborate data parameter
cpp_freertos::Queue * systemMessageQueue
Queue for system message.
cpp_freertos::Queue * elaborateDataQueue
Queue for elaborate data.
configuration_t * configuration
system configuration pointer struct
system_status_t * system_status
system status pointer struct
cpp_freertos::Queue * rainQueue
Queue to RAIN Event.
cpp_freertos::BinarySemaphore * systemStatusLock
semaphore access to system status
cpp_freertos::Queue * requestDataQueue
Queue for request data.
cpp_freertos::BinarySemaphore * configurationLock
semaphore access to configuration
cpp_freertos::Queue * reportDataQueue
Queue for report data.
System module configuration.
struct array for maintenance
bool * read_ptr
reader pointer
uint16_t count
samples counter
bool * write_ptr
writer pointer
struct array for module data
rmapdata_t * write_ptr
writer pointer
rmapdata_t * read_ptr
reader pointer
uint16_t count
samples counter