#include <string.h>
#include "compiler.h"
#include "FreeRTOS.h"
#include "shell.h"
#include "datalog.h"
#include "cpled.h"
#include "lcd.h"
#include "tracedump.h"
#include "cptime.h"
#include "actuator.h"
Data Structures | |
struct | ActuatorReg |
struct | st_scheduled_param |
Macros | |
#define | ACTUATOR_LIST "{ledb1,ledb2,ledm1,ledm2,lcd}" |
#define | ACTUATOR_MAXNB_ACTUATORS (DATALOG_ID_LCD - DATALOG_ID_LEDB1 +1) |
Typedefs | |
typedef struct st_scheduled_param | Scheduled_Cmd_Params |
typedef struct ActuatorReg | xActuatorReg |
Functions | |
eExecStatus | e_actuator_cmd_get_value (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_actuator_cmd_set_value (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_actuator_help (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
eExecStatus | e_actuator_ScheduleCmdSet (eSchedCmdId CmdId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
Schedule an actuator set for later. More... | |
void | vExecScheduledSet (int CmdId, void *pxCmdParams) |
Execute a scheduled command. More... | |
Variables | |
const signed portCHAR *const | ACTUATOR_ERRMSG_GETVAL_FAIL = (signed portCHAR *)"Error"CRLF"Actuator failed to deliver a value."CRLF |
const signed portCHAR *const | ACTUATOR_ERRMSG_GETVAL_SYNTAXERROR = (signed portCHAR *)"Error"CRLF"Usage: get_actuator_value actuator=actuatorname"CRLF |
const signed portCHAR *const | ACTUATOR_ERRMSG_SETVAL_SYNTAXERROR = (signed portCHAR *)"Error"CRLF"Usage: set_actuator_value actuator=actuatorname fields..."CRLF |
const signed portCHAR *const | ACTUATOR_ERRMSG_UNREFACTUATOR = (signed portCHAR *)"Error"CRLF"Unreferenced actuator name"CRLF |
const signed portCHAR *const | ACTUATOR_MSG_HELP |
xActuatorReg | axActuatorsRegistry [ACTUATOR_MAXNB_ACTUATORS] |
#define ACTUATOR_LIST "{ledb1,ledb2,ledm1,ledm2,lcd}" |
#define ACTUATOR_MAXNB_ACTUATORS (DATALOG_ID_LCD - DATALOG_ID_LEDB1 +1) |
Max number of actuators.
Referenced by e_actuator_cmd_get_value(), and e_actuator_cmd_set_value().
typedef struct st_scheduled_param Scheduled_Cmd_Params |
The params given to an actuator scheduled command.
typedef struct ActuatorReg xActuatorReg |
An actuator register cell structure.
eExecStatus e_actuator_cmd_get_value | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
References acLogSourceName, ACTUATOR_ERRMSG_GETVAL_FAIL, ACTUATOR_ERRMSG_GETVAL_SYNTAXERROR, ACTUATOR_ERRMSG_UNREFACTUATOR, ACTUATOR_MAXNB_ACTUATORS, DATALOG_ALLOC_DYNAMIC, DATALOG_ID_LCD, DATALOG_ID_LEDB1, DATALOG_LOG_MAXSIZE, LogDef::id, NULL, pvPortMalloc(), pxdatalog_log_alloc_init(), SHELL_ERRMSG_MEMALLOC, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, vdatalog_log_free(), and vdatalog_make_logstring().
eExecStatus e_actuator_cmd_set_value | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
eExecStatus e_actuator_help | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
References ACTUATOR_MSG_HELP, NULL, SHELL_EXECSTATUS_KO, and SHELL_EXECSTATUS_OK_NO_FREE.
Referenced by e_Shell_help().
eExecStatus e_actuator_ScheduleCmdSet | ( | eSchedCmdId | CmdId, |
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
Schedule an actuator set for later.
CmdId | Input. The set actuator cmd identifier. |
ac | Input. The argument counter. |
av | Input. The argument vector. |
ppcStringReply | Input/Output. The response string. If Input is NULL, no response string will be output. If the action is successful, no response string is output. If the action failed, a response string is output. |
References st_scheduled_param::ac, ACTUATOR_ERRMSG_SETVAL_SYNTAXERROR, st_scheduled_param::av, e_cptime_RecordScheduledCmd(), NULL, pvPortMalloc(), SHELL_ERRMSG_MEMALLOC, SHELL_EXECSTATUS_KO, vExecScheduledSet(), and vPortFree().
Referenced by e_lcd_set_value(), e_ledb1_set_value(), e_ledb2_set_value(), e_ledm1_set_value(), and e_ledm2_set_value().
Execute a scheduled command.
CmdId | Input. The set cmd identifier. |
pxCmdParams | Input. The parameters (ac,*av[]) for the cmd. |
References st_scheduled_param::ac, st_scheduled_param::av, CPTIME_SCHEDCMDID_SETLCDVAL, CPTIME_SCHEDCMDID_SETLEDB1VAL, CPTIME_SCHEDCMDID_SETLEDB2VAL, CPTIME_SCHEDCMDID_SETLEDM1VAL, CPTIME_SCHEDCMDID_SETLEDM2VAL, e_lcd_set_value(), e_ledb1_set_value(), e_ledb2_set_value(), e_ledm1_set_value(), e_ledm2_set_value(), NULL, SYS_MODID_NONE, and vPortFree().
Referenced by e_actuator_ScheduleCmdSet().
const signed portCHAR* const ACTUATOR_ERRMSG_GETVAL_FAIL = (signed portCHAR *)"Error"CRLF"Actuator failed to deliver a value."CRLF |
Error msg upon get_actuator_value actuator error.
Referenced by e_actuator_cmd_get_value().
const signed portCHAR* const ACTUATOR_ERRMSG_GETVAL_SYNTAXERROR = (signed portCHAR *)"Error"CRLF"Usage: get_actuator_value actuator=actuatorname"CRLF |
Error msg upon get_actuator_value syntax error.
Referenced by e_actuator_cmd_get_value().
const signed portCHAR* const ACTUATOR_ERRMSG_SETVAL_SYNTAXERROR = (signed portCHAR *)"Error"CRLF"Usage: set_actuator_value actuator=actuatorname fields..."CRLF |
Error msg upon set_actuator_value syntax error.
Referenced by e_actuator_cmd_set_value(), e_actuator_ScheduleCmdSet(), e_lcd_set_value(), e_ledb1_set_value(), e_ledb2_set_value(), e_ledm1_set_value(), and e_ledm2_set_value().
const signed portCHAR* const ACTUATOR_ERRMSG_UNREFACTUATOR = (signed portCHAR *)"Error"CRLF"Unreferenced actuator name"CRLF |
Error msg upon unreferenced actuator error.
Referenced by e_actuator_cmd_get_value(), and e_actuator_cmd_set_value().
const signed portCHAR* const ACTUATOR_MSG_HELP |
Referenced by e_actuator_help().
xActuatorReg axActuatorsRegistry[ACTUATOR_MAXNB_ACTUATORS] |