Enumerations | |
enum | eSchedCmdId { CPTIME_SCHEDCMDID_SETLEDM1VAL, CPTIME_SCHEDCMDID_SETLEDM2VAL, CPTIME_SCHEDCMDID_SETLEDB1VAL, CPTIME_SCHEDCMDID_SETLEDB2VAL, CPTIME_SCHEDCMDID_SETLCDVAL } |
Functions | |
eExecStatus | e_cptime_cmd_get_config (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The get time config command: get the config fields value of the time module Takes no parameter. More... | |
eExecStatus | e_cptime_cmd_set_config (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The set time config command: set each config field value of the time module. Takes one parameter : field=value. More... | |
eExecStatus | e_cptime_RecordScheduledCmd (char *pcDate, int CmdId, void(*pfScheduledCmd)(int, void *), void *pvCmdParams, signed portCHAR **ppcStringReply) |
Record a scheduled command. More... | |
void | v_cptime_ExecuteScheduledCmd (void) |
Execute a scheduled command if expiration date is up. More... | |
void | v_cptime_GetDateInFatStringFormat (char *pcDate) |
Get the current time in the "YYYYMMDDHHMMSSMS" string format. More... | |
void | v_cptime_Init (void) |
Init the time module. More... | |
void | v_cptime_UpdateLocalTime (void) |
Update the local time. More... | |
enum eSchedCmdId |
eExecStatus e_cptime_cmd_get_config | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The get time config command: get the config fields value of the time module Takes no parameter.
xModId | Input. The module that is calling this function. |
FsNavId | Ignored. |
ac | Input. The argument counter. For this command, should be 1. |
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 NULL, pvPortMalloc(), SHELL_ERRMSG_MEMALLOC, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, sprintf(), and xcptime_LocalTime.
Referenced by e_syscmds_cmd_get_config().
eExecStatus e_cptime_cmd_set_config | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The set time config command: set each config field value of the time module. Takes one parameter : field=value.
xModId | Input. The module that is calling this function. |
FsNavId | Ignored. |
ac | Input. The argument counter. For this command, should be 1. |
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 CPTIME_ERRMSG_SETCFG_INVALIDDATE, CPTIME_ERRMSG_SETCFG_SYNTAXERROR, CPTIME_ERRMSG_SETCFG_UNKNOWNFIELD, CPTIME_MAX_NB_SCHED_CMDS, i, NAKED_TRACE_COM2, NbSchedCmd, NULL, prv_v_ShiftScheduledCmdsArray(), SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, xcptime_LocalTime, and st_scheduled_cmd::xScheduledTime.
Referenced by e_syscmds_cmd_set_config().
eExecStatus e_cptime_RecordScheduledCmd | ( | char * | pcDate, |
int | CmdId, | ||
void(*)(int, void *) | pfScheduledCmd, | ||
void * | pvCmdParams, | ||
signed portCHAR ** | ppcStringReply | ||
) |
Record a scheduled command.
pcDate | Input. The date the cmd is scheduled at. Format: seconds OR mm/dd/yy hh:mm:ss |
CmdId | Scheduled command id. |
pfScheduledCmd | pointer on fct to be called at expiration date |
pvCmdParams | pointer on struct to give as param to pfScheduledCmd |
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 st_scheduled_cmd::CmdId, CPTIME_ERRMSG_SETVAL_INVALIDTIME, CPTIME_ERRMSG_SETVAL_UNAVAILSCHEDSLOT, CPTIME_MAX_NB_SCHED_CMDS, i, j, NbSchedCmd, st_scheduled_cmd::pfScheduledCmd, st_scheduled_cmd::pxParam, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK_NO_FREE, xcptime_LocalTime, and st_scheduled_cmd::xScheduledTime.
Referenced by e_actuator_ScheduleCmdSet().
void v_cptime_ExecuteScheduledCmd | ( | void | ) |
Execute a scheduled command if expiration date is up.
References NbSchedCmd, st_scheduled_cmd::pfScheduledCmd, prv_v_ShiftScheduledCmdsArray(), xcptime_LocalTime, and st_scheduled_cmd::xScheduledTime.
Referenced by portTASK_FUNCTION().
void v_cptime_GetDateInFatStringFormat | ( | char * | pcDate | ) |
Get the current time in the "YYYYMMDDHHMMSSMS" string format.
pcDate | Input/Output. Input allocated array. Output is the current time expressed in the "YYYYMMDDHHMMSSMS" string format. |
References sprintf(), and xcptime_LocalTime.
Referenced by b_mmi_mkdir_aLOG(), b_mmi_mkdir_bLOG(), config_file_set_value(), e_fscmds_shell_mkdir(), e_fscmds_touch(), prv_append(), prv_vsave_logs(), and prv_xopen_current_logfile().
void v_cptime_Init | ( | void | ) |
void v_cptime_UpdateLocalTime | ( | void | ) |
Update the local time.
References configTICK_RATE_HZ, xcptime_LocalTime, xcptime_TickOrigin, and xTaskGetTickCount().