Host library for controlling a WiConnect enabled Wi-Fi module.

Dependents:   wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more

Embed: (wiki syntax)

« Back to documentation index

Settings Methods

Settings Methods
[Core]

API getters/setters for core library settings. More...

Functions

WiconnectResult setSetting (const char *settingStr, uint32_t value)
 Set a module setting.
WiconnectResult setSetting (const char *settingStr, const char *value)
 Set a module setting.
WiconnectResult getSetting (const char *settingStr, uint32_t *valuePtr)
 Get a module setting.
WiconnectResult getSetting (const char *settingStr, char **valuePtr)
 Get a module setting.
WiconnectResult getSetting (const char *settingStr, char *valueBuffer, uint16_t valueBufferLen)
 Get a module setting.
WiconnectResult saveSettings ()
 Save settings to Non-Volatile Memory.
void setBlockingEnabled (bool blockingEnabled)
 Sets if API calls are blocking or non-blocking.
bool getBlockingEnabled (void)
 Gets if API calls are blocking or non-blocking.
void setCommandDefaultTimeout (TimerTimeout timeoutMs)
 Sets the default maximum time an API method may execute before terminating and return a timeout error code.
TimerTimeout getCommandDefaultTimeout ()
 Returns the current default maximum API execution time.
void setPinToGpioMapper (PinToGpioMapper mapper)
 Sets a mapping function used to convert from a host Pin to WiConnect WiFi module GPIO.
void setDebugLogger (LogFunc logFunc)
 Sets callback function used to debug WiConnect WiFi module RX/TX serial data.
void setAssertLogger (LogFunc assertLogFunc)
 Sets callback used when Wiconnect Library hits and internal assertion.
void setCommandProcessingPeriod (uint32_t periodMs)
 Set the period at which an asynchronous command should be processed.

Detailed Description

API getters/setters for core library settings.


Function Documentation

bool getBlockingEnabled ( void   ) [inherited]

Gets if API calls are blocking or non-blocking.

TimerTimeout getCommandDefaultTimeout (  ) [inherited]

Returns the current default maximum API execution time.

Returns:
Default command timeout in milliseconds
WiconnectResult getSetting ( const char *  settingStr,
char **  valuePtr 
) [inherited]

Get a module setting.

Refer to: http://wiconnect.ack.me/2.0/variables for a list of the available settings and descriptions

Parameters:
settingStrString module setting name.
valuePtrPointer to hold pointer to internal API buffer containing retrieved setting result
Returns:
Result of method. See WiconnectResult
WiconnectResult getSetting ( const char *  settingStr,
uint32_t *  valuePtr 
) [inherited]

Get a module setting.

Refer to: http://wiconnect.ack.me/2.0/variables for a list of the available settings and descriptions

Parameters:
settingStrString module setting name.
valuePtrPointer to buffer to contain integer value
Returns:
Result of method. See WiconnectResult
WiconnectResult getSetting ( const char *  settingStr,
char *  valueBuffer,
uint16_t  valueBufferLen 
) [inherited]

Get a module setting.

Refer to: http://wiconnect.ack.me/2.0/variables for a list of the available settings and descriptions

Parameters:
settingStrString module setting name.
valueBufferBuffer to hold retrieved setting result
valueBufferLenThe length of the input buffer
Returns:
Result of method. See WiconnectResult
WiconnectResult saveSettings (  ) [inherited]

Save settings to Non-Volatile Memory.

Returns:
Result of method. See WiconnectResult
void setAssertLogger ( LogFunc  assertLogFunc ) [inherited]

Sets callback used when Wiconnect Library hits and internal assertion.

Note:
This is mainly for debugging. There's nothing the callback can do to fix the assertion.
Parameters:
[in]assertLogFuncLogging function pointer

Definition at line 400 of file Wiconnect.cpp.

void setBlockingEnabled ( bool  blockingEnabled ) [inherited]

Sets if API calls are blocking or non-blocking.

Parameters:
[in]blockingEnabledThe new blocking value
void setCommandDefaultTimeout ( TimerTimeout  timeoutMs ) [inherited]

Sets the default maximum time an API method may execute before terminating and return a timeout error code.

Note:
All API methods (execpt some sendCommand()) use this default value.
Parameters:
[in]timeoutMsDefault command timeout in milliseconds
void setCommandProcessingPeriod ( uint32_t  periodMs ) [inherited]

Set the period at which an asynchronous command should be processed.

Refer to Asynchronous Processing for more info.

Parameters:
[in]periodMsProcessing period in milliseconds
void setDebugLogger ( LogFunc  logFunc ) [inherited]

Sets callback function used to debug WiConnect WiFi module RX/TX serial data.

Parameters:
[in]logFuncLogging function pointer

Definition at line 392 of file Wiconnect.cpp.

void setPinToGpioMapper ( PinToGpioMapper  mapper ) [inherited]

Sets a mapping function used to convert from a host Pin to WiConnect WiFi module GPIO.

Parameters:
[in]mapperPin to GPIO mapper function pointer

Definition at line 262 of file Wiconnect.cpp.

WiconnectResult setSetting ( const char *  settingStr,
const char *  value 
) [inherited]

Set a module setting.

Refer to: http://wiconnect.ack.me/2.0/variables for a list of the available settings and descriptions

Parameters:
settingStrString module setting name.
valueThe string value to set
Returns:
Result of method. See WiconnectResult
WiconnectResult setSetting ( const char *  settingStr,
uint32_t  value 
) [inherited]

Set a module setting.

Refer to: http://wiconnect.ack.me/2.0/variables for a list of the available settings and descriptions

Parameters:
settingStrString module setting name.
valueThe integer value to set
Returns:
Result of method. See WiconnectResult