#include <string.h>
#include "compiler.h"
#include "FreeRTOS.h"
#include "datalog.h"
#include "shell.h"
#include "board.h"
#include "supervisor.h"
#include "cptime.h"
#include "actuator.h"
#include "cpled.h"
Functions | |
bool | b_ledb1_get_value (xLogDef *pxLog) |
Get the ledb1 current value. More... | |
bool | b_ledb2_get_value (xLogDef *pxLog) |
Get the ledb2 current value. More... | |
bool | b_ledm1_get_value (xLogDef *pxLog) |
Get the ledm1 current value. More... | |
bool | b_ledm2_get_value (xLogDef *pxLog) |
Get the ledm2 current value. More... | |
eExecStatus | e_ledb1_set_value (eModId xModId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The set bicolor ledb1 value command: set the value of the bicolor ledb1. Takes up to six parameters the first parameter is the green parameter, the second parameter is its value in [0,255], the third parameter is the red parameter, the fourth parameter is its value in [0,255], the fifth is the time parameter(optional), the sixth is the time value(optional) expressed in seconds. Format: set_actuator_value actuator=actuatorname green=value red=value [time=date]. More... | |
eExecStatus | e_ledb2_set_value (eModId xModId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The set bicolor ledb2 value command: set the value of the bicolor ledb2. Takes up to six parameters the first parameter is the green parameter, the second parameter is its value in [0,255], the third parameter is the red parameter, the fourth parameter is its value in [0,255], the fifth is the time parameter(optional), the sixth is the time value(optional) expressed in seconds. Format: set_actuator_value actuator=actuatorname green=value red=value [time=date]. More... | |
eExecStatus | e_ledm1_set_value (eModId xModId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_ledm2_set_value (eModId xModId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The set monocolor led2 value command: set the value of the monocolor led2. Takes up to four parameters the first parameter is the state parameter, the second parameter is its value(on/off), the third is the time parameter(optional), the fourth is the time value(optional). Format: set_actuator_value actuator=actuatorname state=value [time=date]. More... | |
int | sprintf (char *out, const char *format,...) |
Variables | |
const signed portCHAR *const | CPLED_OFF_STR = (signed portCHAR *)"off" |
const signed portCHAR *const | CPLED_ON_STR = (signed portCHAR *)"on" |
Get the ledb1 current value.
pxLog | a Log structure. |
References LED_Get_Intensity(), LEDB1G, LEDB1R, NULL, LogDef::pcStringLog, LogDef::pfFreeStringLog, pvPortMalloc(), sprintf(), and vPortFree().
Get the ledb2 current value.
pxLog | a Log structure. |
References LED_Get_Intensity(), LEDB2G, LEDB2R, NULL, LogDef::pcStringLog, LogDef::pfFreeStringLog, pvPortMalloc(), sprintf(), and vPortFree().
Get the ledm1 current value.
pxLog | a Log structure. |
References CPLED_OFF_STR, CPLED_ON_STR, LED_Test(), LEDM1, NULL, LogDef::pcStringLog, and LogDef::pfFreeStringLog.
Get the ledm2 current value.
pxLog | a Log structure. |
References CPLED_OFF_STR, CPLED_ON_STR, LED_Test(), LEDM2, NULL, LogDef::pcStringLog, and LogDef::pfFreeStringLog.
eExecStatus e_ledb1_set_value | ( | eModId | xModId, |
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The set bicolor ledb1 value command: set the value of the bicolor ledb1. Takes up to six parameters the first parameter is the green parameter, the second parameter is its value in [0,255], the third parameter is the red parameter, the fourth parameter is its value in [0,255], the fifth is the time parameter(optional), the sixth is the time value(optional) expressed in seconds. Format: set_actuator_value actuator=actuatorname green=value red=value [time=date].
xModId | Input. The module that is calling this function. |
ac | Input. The argument counter. For this command, should be at least 4, at most 6. |
av | Input. The argument vector. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References ACTUATOR_ERRMSG_SETVAL_SYNTAXERROR, CPTIME_SCHEDCMDID_SETLEDB1VAL, e_actuator_ScheduleCmdSet(), LED_Set_Intensity(), LEDB1G, LEDB1R, SHELL_EXECSTATUS_KO, and SHELL_EXECSTATUS_OK.
Referenced by vExecScheduledSet().
eExecStatus e_ledb2_set_value | ( | eModId | xModId, |
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The set bicolor ledb2 value command: set the value of the bicolor ledb2. Takes up to six parameters the first parameter is the green parameter, the second parameter is its value in [0,255], the third parameter is the red parameter, the fourth parameter is its value in [0,255], the fifth is the time parameter(optional), the sixth is the time value(optional) expressed in seconds. Format: set_actuator_value actuator=actuatorname green=value red=value [time=date].
xModId | Input. The module that is calling this function. |
ac | Input. The argument counter. For this command, should be at least 4, at most 6. |
av | Input. The argument vector. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References ACTUATOR_ERRMSG_SETVAL_SYNTAXERROR, CPTIME_SCHEDCMDID_SETLEDB2VAL, e_actuator_ScheduleCmdSet(), LED_Set_Intensity(), LEDB2G, LEDB2R, SHELL_EXECSTATUS_KO, and SHELL_EXECSTATUS_OK.
Referenced by vExecScheduledSet().
eExecStatus e_ledm1_set_value | ( | eModId | xModId, |
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
References ACTUATOR_ERRMSG_SETVAL_SYNTAXERROR, CPLED_OFF_STR, CPLED_ON_STR, CPTIME_SCHEDCMDID_SETLEDM1VAL, e_actuator_ScheduleCmdSet(), LED_Off(), LED_On(), LEDM1, SHELL_EXECSTATUS_KO, and SHELL_EXECSTATUS_OK.
Referenced by vExecScheduledSet().
eExecStatus e_ledm2_set_value | ( | eModId | xModId, |
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The set monocolor led2 value command: set the value of the monocolor led2. Takes up to four parameters the first parameter is the state parameter, the second parameter is its value(on/off), the third is the time parameter(optional), the fourth is the time value(optional). Format: set_actuator_value actuator=actuatorname state=value [time=date].
xModId | Input. The module that is calling this function. |
ac | Input. The argument counter. For this command, should be at least 2, at most 4. |
av | Input. The argument vector. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. Else a malloc for the response string is performed here; the caller must free this string. |
References ACTUATOR_ERRMSG_SETVAL_SYNTAXERROR, CPLED_OFF_STR, CPLED_ON_STR, CPTIME_SCHEDCMDID_SETLEDM2VAL, e_actuator_ScheduleCmdSet(), LED_Off(), LED_On(), LEDM2, SHELL_EXECSTATUS_KO, and SHELL_EXECSTATUS_OK.
Referenced by vExecScheduledSet().
int sprintf | ( | char * | out, |
const char * | format, | ||
... | |||
) |
Referenced by b_ledb1_get_value(), b_ledb2_get_value(), b_light_get_value(), b_potentiometer_get_value(), b_temperature_get_value(), e_cptime_cmd_get_config(), e_fscmds_shell_disk(), e_light_get_config(), e_potentiometer_get_config(), e_smtpclient_cmd_get_config(), e_temperature_get_config(), e_usbsys_lsusb(), e_webserver_cmd_get_config(), portTASK_FUNCTION(), prulweb_BuildErrorBody(), prulweb_BuildErrorTail(), prulweb_BuildHeaders(), prv_df(), prv_ls(), prv_xopen_current_logfile(), prvweb_ParseHTMLRequest(), v_cptime_GetDateInFatStringFormat(), vdatalog_make_logstring(), vEthernetGetGWAddr(), vEthernetGetIPAddr(), vEthernetGetMACAddr(), and vEthernetGetSubnetMask().
const signed portCHAR* const CPLED_OFF_STR = (signed portCHAR *)"off" |
Referenced by b_ledm1_get_value(), b_ledm2_get_value(), e_ledm1_set_value(), and e_ledm2_set_value().
const signed portCHAR* const CPLED_ON_STR = (signed portCHAR *)"on" |
Referenced by b_ledm1_get_value(), b_ledm2_get_value(), e_ledm1_set_value(), and e_ledm2_set_value().