Controls the configuration of the device addresses (i.e. IP and MAC addresses)
More...
Controls the configuration of the device addresses (i.e. IP and MAC addresses)
§ ATCmdNetcfg_getCallback()
int32_t ATCmdNetcfg_getCallback |
( |
void * |
arg | ) |
|
Netcfg Get callback.
This routine gets network configurations
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
This routine gets network configurations
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 543 of file atcmd_netcfg.c.
546 ATCmdNetcfg_t *params;
547 uint16_t *pOption = NULL;
549 params = malloc(
sizeof(ATCmdNetcfg_t));
553 ATCmd_errorResult(ATCmd_errorAllocStr,0);
556 memset(params, 0x0,
sizeof(ATCmdNetcfg_t));
559 ret = ATCmdNetcfg_getParse((
char *)arg, params);
563 ATCmd_errorResult(ATCmd_errorParseStr,ret);
564 ATCmdNetcfg_getFree(params);
567 if ((params->id != SL_NETCFG_IF) && (params->id != SL_NETCFG_AP_STATIONS_NUM_CONNECTED))
569 pOption = ¶ms->option;
573 ret = sl_NetCfgGet(params->id,pOption,¶ms->len,params->value);
577 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
578 ATCmdNetcfg_getFree(params);
582 ATCmd_commandResult(ATCmdNetcfg_getResult,params,0);
§ ATCmdNetcfg_setCallback()
int32_t ATCmdNetcfg_setCallback |
( |
void * |
arg | ) |
|
Netcfg Set callback.
This routine sets network configurations
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Zero on success, or negative error code on failure
This routine sets network configurations
- Parameters
-
arg | - Points to command line buffer. |
- Returns
- Upon successful completion, the function shall return 0. In case of failure, this function would return an error;
Definition at line 304 of file atcmd_netcfg.c.
307 ATCmdNetcfg_t params;
309 memset(¶ms, 0x0,
sizeof(ATCmdNetcfg_t));
312 ret = ATCmdNetcfg_setParse((
char *)arg, ¶ms);
316 ATCmd_errorResult(ATCmd_errorParseStr,ret);
317 ATCmdNetcfg_setFree(¶ms);
322 ret = sl_NetCfgSet(params.id,params.option,params.len,params.value);
326 ATCmd_errorResult(ATCmd_errorCmdStr,ret);
333 ATCmdNetcfg_setFree(¶ms);