#include <string.h>
#include "gpio.h"
#include "FreeRTOS.h"
#include "task.h"
#include "shell.h"
#include "ethernet.h"
#include "BasicWEB.h"
#include "BasicSMTP.h"
#include "cptime.h"
#include "conf_usb.h"
#include "usb_drv.h"
#include "usb_task.h"
#include "com1shell.h"
#include "sensor.h"
#include "supervisor.h"
#include "syscmds.h"
Functions | |
eExecStatus | e_supervisor_switch_to_maintenance_mode (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The switch-to-maintenance-mode command: initiate the process to switch to maintenance mode. Format: maintain. More... | |
eExecStatus | e_syscmds_cmd_get_config (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The get sys config command: get the config fields value of a subsystem Takes one parameter, that is the subsystem's name. Format: get_sys_config sys=sysname. More... | |
eExecStatus | e_syscmds_cmd_set_config (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The set sys config command: set the value of a config field of a subsystem. Takes three parameters. The first parameter is the system's name, the second parameter is the config field name, the third parameter is its value. Format: set_sys_config sys=sysname field=value. More... | |
eExecStatus | e_syscmds_help (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The sys help command: display the system & subsystems available shell commands. Format: help. More... | |
eExecStatus | e_syscmds_reboot (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The sys reboot command: Sw reset of the Ctrl Panel. Format: reboot. More... | |
eExecStatus | e_syscmds_trace (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The dbgtrace command: displays info on the trace port(USART1). Format: dbgtrace. More... | |
eExecStatus | e_syscmds_version (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply) |
The sys version command: Display the Ctrl Panel sw version. Format: version. More... | |
void | v_syscmds_display_traces (void) |
Display debug info on the trace port(USART1). More... | |
Variables | |
const char *const | pcCtrlPanelVersion |
const signed portCHAR *const | SYSCMDS_MSG_HELP |
xSemaphoreHandle | xCFGMutex |
eExecStatus e_supervisor_switch_to_maintenance_mode | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The switch-to-maintenance-mode command: initiate the process to
switch to maintenance mode. Format: maintain.
xModId | Input. The module that is calling this function. |
FsNavId | Ignored. |
ac | Ignored. |
av | Ignored. |
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. |
eExecStatus e_syscmds_cmd_get_config | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The get sys config command: get the config fields value of a subsystem Takes one parameter, that is the subsystem's name. Format: get_sys_config sys=sysname.
The get sys config command: get the config fields value of a subsystem Takes one parameter, that is the subsystem's name. Format: get_sys_config sysname.
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 e_cptime_cmd_get_config(), e_ethernet_cmd_get_config(), e_smtpclient_cmd_get_config(), e_webserver_cmd_get_config(), and SHELL_EXECSTATUS_KO.
eExecStatus e_syscmds_cmd_set_config | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The set sys config command: set the value of a config field of a subsystem. Takes three parameters. The first parameter is the system's name, the second parameter is the config field name, the third parameter is its value. Format: set_sys_config sys=sysname field=value.
The set sys config command: set the value of a config field of a subsystem. Takes three parameters. The first parameter is the system's name, the second parameter is the config field name, the third parameter is its value. Format: set_sys_config sysname field=value.
xModId | Input. The module that is calling this function. |
FsNavId | Ignored. |
ac | Input. The argument counter. For this command, should be 3. |
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 e_cptime_cmd_set_config(), e_ethernet_cmd_set_config(), e_smtpclient_cmd_set_config(), e_webserver_cmd_set_config(), NULL, pdFALSE, SHELL_ERRMSG_MAINTENANCEMODE, SHELL_EXECSTATUS_KO, x_supervisor_SemaphoreGive(), and x_supervisor_SemaphoreTake().
eExecStatus e_syscmds_help | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The sys help command: display the system & subsystems available shell commands. Format: help.
xModId | Input. The module that is calling this function. |
FsNavId | Ignored. |
ac | Ignored. |
av | Ignored. |
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, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK_NO_FREE, and SYSCMDS_MSG_HELP.
Referenced by e_Shell_help().
eExecStatus e_syscmds_reboot | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The sys reboot command: Sw reset of the Ctrl Panel. Format: reboot.
The sys reboot command. Format: reboot.
xModId | Input. The module that is calling this function. |
FsNavId | Ignored. |
ac | Ignored. |
av | Ignored. |
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 b_supervisor_IsInMaintenanceMode(), Disable_global_interrupt, e_supervisor_switch_to_maintenance_mode(), Enable_global_interrupt, NULL, SHELL_EXECSTATUS_OK, Usb_disable, Usb_disable_otg_pad, v_com1shell_stopResources(), v_ethernet_stopResources(), v_sensor_stop(), and v_tracedump_stopResources().
eExecStatus e_syscmds_trace | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The dbgtrace command: displays info on the trace port(USART1). Format: dbgtrace.
xModId | Input. The module that is calling this function. |
FsNavId | Ignored. |
ac | Ignored. |
av | Ignored. |
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, SHELL_EXECSTATUS_OK, and v_syscmds_display_traces().
eExecStatus e_syscmds_version | ( | eModId | xModId, |
signed short | FsNavId, | ||
int | ac, | ||
signed portCHAR * | av[], | ||
signed portCHAR ** | ppcStringReply | ||
) |
The sys version command: Display the Ctrl Panel sw version. Format: version.
xModId | Input. The module that is calling this function. |
FsNavId | Ignored. |
ac | Ignored. |
av | Ignored. |
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, pcCtrlPanelVersion, SHELL_EXECSTATUS_KO, and SHELL_EXECSTATUS_OK_NO_FREE.
Display debug info on the trace port(USART1).
References NAKED_TRACE_COM2, and vTaskList().
Referenced by e_syscmds_trace(), and portTASK_FUNCTION().
const char* const pcCtrlPanelVersion |
The Ctrl Panel sw version.
Referenced by e_syscmds_version().
const signed portCHAR* const SYSCMDS_MSG_HELP |
Referenced by e_syscmds_help().
xSemaphoreHandle xCFGMutex |
The CFG system mutex.