Functions | |
bool | b_temperature_get_value (xLogDef *pxLog) |
Get the current temperature value. More... | |
bool | b_temperature_init (void) |
Init the temperature channel. More... | |
eExecStatus | e_temperature_get_config (signed portCHAR **ppcStringReply) |
Get the temperature sensor config. More... | |
eExecStatus | e_temperature_set_config (signed portCHAR **ppcStringReply, int ac, signed portCHAR *av[]) |
Set the sensor config. More... | |
Variables | |
unsigned int | ul_temp_lograte |
Get the current temperature value.
pxLog | a Log structure. |
References adc, adc_disable(), adc_enable(), adc_get_value(), adc_start(), b_temp_alarm, b_temp_alarm_max, b_temp_alarm_min, index, l_temp_max, l_temp_min, NULL, LogDef::pcStringLog, pdFALSE, pdTRUE, LogDef::pfFreeStringLog, pvPortMalloc(), sprintf(), temperature_code, v_SMTP_Post, and vPortFree().
Referenced by b_sensor_get_value().
bool b_temperature_init | ( | void | ) |
Init the temperature channel.
References b_temp_alarm, config_file_get_value(), gpio_enable_module_pin(), l_temp_max, l_temp_min, NULL, pdTRUE, SENSOR_TEMP_CONFIG_FILE, ul_temp_lograte, x_supervisor_SemaphoreGive(), and x_supervisor_SemaphoreTake().
eExecStatus e_temperature_get_config | ( | signed portCHAR ** | ppcStringReply | ) |
Get the temperature sensor config.
ppcStringReply | Input/Output. The response string. NEVER NULL AS INPUT. A malloc for the response string is performed here; the caller must free this string. |
References b_temp_alarm, l_temp_max, l_temp_min, NULL, pdTRUE, pvPortMalloc(), SHELL_ERRMSG_MEMALLOC, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, sprintf(), TEMPERATURE_GETCONF_MAXLEN, and ul_temp_lograte.
eExecStatus e_temperature_set_config | ( | signed portCHAR ** | ppcStringReply, |
int | ac, | ||
signed portCHAR * | av[] | ||
) |
Set the sensor config.
ppcStringReply | Input/Output. The response string. NEVER NULL AS INPUT. |
ac | Input. Number of args |
av | Input. pointer to args |
References b_temp_alarm, config_file_set_value(), l_temp_max, l_temp_min, NULL, pdFALSE, pdTRUE, SENSOR_MSG_ALARM_OFF, SENSOR_MSG_ALARM_ON, SENSOR_MSG_CONFIG_SET, SENSOR_TEMP_CONFIG_FILE, SHELL_ERRMSG_CONFIGERROR, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK_NO_FREE, and ul_temp_lograte.
unsigned int ul_temp_lograte |
Declaration for datalog use
Value for the log rate.
Referenced by b_temperature_init(), e_temperature_get_config(), e_temperature_set_config(), and portTASK_FUNCTION().