Microchip® Advanced Software Framework

syscmds.h File Reference
#include "FreeRTOS.h"
#include "shell.h"

Functions

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 sysname. More...
 
eExecStatus e_syscmds_cmd_reset (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply)
 The reset sys command: Sw reset of the Ctrl Panel. Format: reset_sys. 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 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. 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...
 

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 sysname.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acInput. The argument counter. For this command, should be 1.
avInput. The argument vector.
ppcStringReplyInput/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.
Returns
the status of the command execution.

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.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acInput. The argument counter. For this command, should be 1.
avInput. The argument vector.
ppcStringReplyInput/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.
Returns
the status of the command execution.

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_reset ( eModId  xModId,
signed short  FsNavId,
int  ac,
signed portCHAR *  av[],
signed portCHAR **  ppcStringReply 
)

The reset sys command: Sw reset of the Ctrl Panel. Format: reset_sys.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acInput. The argument counter. For this command, should be 0.
avInput. The argument vector.
ppcStringReplyInput/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.
Returns
the status of the command execution.
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 sysname field=value.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acInput. The argument counter. For this command, should be 3.
avInput. The argument vector.
ppcStringReplyInput/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.
Returns
the status of the command execution.

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.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acInput. The argument counter. For this command, should be 3.
avInput. The argument vector.
ppcStringReplyInput/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.
Returns
the status of the command execution.

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.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acIgnored.
avIgnored.
ppcStringReplyInput/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.
Returns
the status of the command execution.

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. Format: reboot.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acIgnored.
avIgnored.
ppcStringReplyInput/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.
Returns
the status of the command execution(makes no sense).

The sys reboot command. Format: reboot.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acIgnored.
avIgnored.
ppcStringReplyInput/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.
Returns
the status of the command execution(makes no sense).

References 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.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acIgnored.
avIgnored.
ppcStringReplyInput/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.
Returns
the status of the command execution.

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.

Note
This function must be of the type pfShellCmd defined by the shell module.
Parameters
xModIdInput. The module that is calling this function.
FsNavIdIgnored.
acIgnored.
avIgnored.
ppcStringReplyInput/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.
Returns
the status of the command execution(makes no sense).

References NULL, pcCtrlPanelVersion, SHELL_EXECSTATUS_KO, and SHELL_EXECSTATUS_OK_NO_FREE.

void v_syscmds_display_traces ( void  )

Display debug info on the trace port(USART1).

References NAKED_TRACE_COM2, and vTaskList().

Referenced by e_syscmds_trace(), and portTASK_FUNCTION().