Microchip® Advanced Software Framework

BasicWEB.h File Reference
#include "portmacro.h"
#include "shell.h"
#include "supervisor.h"

Functions

eExecStatus e_webserver_cmd_get_config (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply)
 The get webserver config command: get the config fields value of http port Takes no parameter. More...
 
eExecStatus e_webserver_cmd_set_config (eModId xModId, signed short FsNavId, int ac, signed portCHAR *av[], signed portCHAR **ppcStringReply)
 The set webserver config command: set the http port. Takes one parameter : port=ppppp. More...
 
 portTASK_FUNCTION_PROTO (vBasicWEBServer, pvParameters)
 WEB server main task. More...
 

eExecStatus e_webserver_cmd_get_config ( eModId  xModId,
signed short  FsNavId,
int  ac,
signed portCHAR *  av[],
signed portCHAR **  ppcStringReply 
)

The get webserver config command: get the config fields value of http port Takes no parameter.

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 NULL, pvPortMalloc(), SHELL_ERRMSG_MEMALLOC, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, sprintf(), and webHttpPort.

Referenced by e_syscmds_cmd_get_config().

eExecStatus e_webserver_cmd_set_config ( eModId  xModId,
signed short  FsNavId,
int  ac,
signed portCHAR *  av[],
signed portCHAR **  ppcStringReply 
)

The set webserver config command: set the http port. Takes one parameter : port=ppppp.

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 config_file_set_value(), HTTP_CONFIG_FILE, NULL, pvPortMalloc(), SHELL_ERRMSG_CONFIGERROR, SHELL_EXECSTATUS_KO, SHELL_EXECSTATUS_OK, and SHELL_MSG_REBOOT.

Referenced by e_syscmds_cmd_set_config().

portTASK_FUNCTION_PROTO ( vBasicWEBServer  ,
pvParameters   
)

WEB server main task.