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

Send Command Methods

Send Command Methods
[Core]

API methods for sending commands to WiConnect WiFi module. More...

Functions

WiconnectResult sendCommand (const Callback &completeCallback, char *responseBuffer, int responseBufferLen, TimerTimeout timeoutMs, const ReaderFunc &reader, void *user, const char *cmd, va_list vaList)
 Send command to WiConnect WiFi module.
WiconnectResult sendCommand (char *responseBuffer, int responseBufferLen, TimerTimeout timeoutMs, const ReaderFunc &reader, void *user, const char *cmd, va_list vaList)
 Send command to WiConnect WiFi module.
WiconnectResult sendCommand (char *responseBuffer, int responseBufferLen, TimerTimeout timeoutMs, const ReaderFunc &reader, void *user, const char *cmd,...)
 Send command to WiConnect WiFi module.
WiconnectResult sendCommand (TimerTimeout timeoutMs, const ReaderFunc &reader, void *user, const char *cmd,...)
 Send command to WiConnect WiFi module.
WiconnectResult sendCommand (const ReaderFunc &reader, void *user, const char *cmd,...)
 Send command to WiConnect WiFi module.
WiconnectResult sendCommand (char *responseBuffer, int responseBufferLen, TimerTimeout timeoutMs, const char *cmd,...)
 Send command to WiConnect WiFi module.
WiconnectResult sendCommand (const Callback &completeCallback, char *responseBuffer, int responseBufferLen, const char *cmd,...)
 Send command to WiConnect WiFi module.
WiconnectResult sendCommand (char *responseBuffer, int responseBufferLen, const char *cmd,...)
 Send command to WiConnect WiFi module.
WiconnectResult sendCommand (const Callback &completeCallback, const char *cmd,...)
 Send command to WiConnect WiFi module.
WiconnectResult sendCommand (const char *cmd,...)
 Send command to WiConnect WiFi module.
WiconnectResult sendCommand (const Callback &completeCallback, TimerTimeout timeoutMs, const char *cmd,...)
 This method uses the library internal buffer.
WiconnectResult sendCommand (TimerTimeout timeoutMs, const char *cmd,...)
 Send command to WiConnect WiFi module.
WiconnectResult sendCommand (const char *cmd, va_list vaList)
 
  • This method uses the library internal buffer and
    • default timeout.

WiconnectResult checkCurrentCommand ()
 Check the status of the currently executing command.
void stopCurrentCommand ()
 Stop the currently executing command.
WiconnectResult enqueueCommand (QueuedCommand *command, const Callback &commandCompleteHandler=Callback())
 Add user command to be executed asynchronously.

Detailed Description

API methods for sending commands to WiConnect WiFi module.


Function Documentation

WiconnectResult checkCurrentCommand (  ) [inherited]

Check the status of the currently executing command.

Refer to WiconnectResult for more information about the return code.

Note:
This command is only applicable for non-blocking mode. Refer to Blocking / Non-blocking Modes.
Returns:
Result of method. See WiconnectResult
WiconnectResult enqueueCommand ( QueuedCommand command,
const Callback commandCompleteHandler = Callback() 
) [inherited]

Add user command to be executed asynchronously.

Refer to Asynchronous Processing for more info.

Parameters:
[in]commandPointer to QueuedCommand to be executed asynchronously
[in]commandCompleteHandlerCallback to be executed when processing is complete.
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( char *  responseBuffer,
int  responseBufferLen,
const char *  cmd,
  ... 
) [inherited]

Send command to WiConnect WiFi module.

Note:
Refer to Sending Commands To WiFi Module for more info
This method supports variable arguments
Parameters:
[in]responseBufferBuffer to hold command response
[in]responseBufferLenLength of responseBuffer
[in]cmdWiConnect command to send to module
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( const Callback completeCallback,
char *  responseBuffer,
int  responseBufferLen,
const char *  cmd,
  ... 
) [inherited]

Send command to WiConnect WiFi module.

Note:
Refer to Sending Commands To WiFi Module for more info
This method supports variable arguments
Parameters:
[in]completeCallbackCallback when command completes. arg1 of callback contains responseBuffer pointer, arg2 contains the response length
[in]responseBufferBuffer to hold command response
[in]responseBufferLenLength of responseBuffer
[in]cmdWiConnect command to send to module
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( const char *  cmd,
va_list  vaList 
) [inherited]

  • This method uses the library internal buffer and
    • default timeout.

See setCommandDefaultTimeout()

Note:
Refer to Sending Commands To WiFi Module for more info
Parameters:
[in]cmdWiConnect command to send to module
[in]vaListVaraible list of arguments
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( TimerTimeout  timeoutMs,
const char *  cmd,
  ... 
) [inherited]

Send command to WiConnect WiFi module.

This method uses the library internal buffer

Note:
Refer to Sending Commands To WiFi Module for more info
This method supports variable arguments
Parameters:
[in]timeoutMsMaximum time in milliseconds this command should execute
[in]cmdWiConnect command to send to module
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( const Callback completeCallback,
TimerTimeout  timeoutMs,
const char *  cmd,
  ... 
) [inherited]

This method uses the library internal buffer.

Note:
Refer to Sending Commands To WiFi Module for more info
This method supports variable arguments
Parameters:
[in]completeCallbackCallback when command completes. arg1 of callback contains responseBuffer pointer, arg2 contains the response length
[in]timeoutMsMaximum time in milliseconds this command should execute
[in]cmdWiConnect command to send to module
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( const char *  cmd,
  ... 
) [inherited]

Send command to WiConnect WiFi module.

  • This method uses the library internal buffer and
  • default timeout. See setCommandDefaultTimeout()
Note:
Refer to Sending Commands To WiFi Module for more info
This method supports variable arguments
Parameters:
[in]cmdWiConnect command to send to module
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( const Callback completeCallback,
const char *  cmd,
  ... 
) [inherited]

Send command to WiConnect WiFi module.

  • This method uses the library internal buffer and
  • default timeout. See setCommandDefaultTimeout()
Note:
Refer to Sending Commands To WiFi Module for more info
This method supports variable arguments
Parameters:
[in]completeCallbackCallback when command completes. arg1 of callback contains responseBuffer pointer, arg2 contains the response length
[in]cmdWiConnect command to send to module
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( char *  responseBuffer,
int  responseBufferLen,
TimerTimeout  timeoutMs,
const ReaderFunc reader,
void *  user,
const char *  cmd,
va_list  vaList 
) [inherited]

Send command to WiConnect WiFi module.

Note:
Refer to Sending Commands To WiFi Module for more info
Parameters:
[in]responseBufferBuffer to hold command response
[in]responseBufferLenLength of responseBuffer
[in]timeoutMsMaximum time in milliseconds this command should execute
[in]readerCallback for reading data to be read from host and send to module during command
[in]userUser data struct used during read Callback. Library doesn't use this. Set NULL if not used.
[in]cmdWiConnect command to send to module
[in]vaListVaraible list of arguments
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( char *  responseBuffer,
int  responseBufferLen,
TimerTimeout  timeoutMs,
const ReaderFunc reader,
void *  user,
const char *  cmd,
  ... 
) [inherited]

Send command to WiConnect WiFi module.

Note:
Refer to Sending Commands To WiFi Module for more info
This method supports variable arguments
Parameters:
[in]responseBufferBuffer to hold command response
[in]responseBufferLenLength of responseBuffer
[in]timeoutMsMaximum time in milliseconds this command should execute
[in]readerCallback for reading data to be read from host and send to module during command
[in]userUser data struct used during read Callback. Library doesn't use this. Set NULL if not used.
[in]cmdWiConnect command to send to module
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( char *  responseBuffer,
int  responseBufferLen,
TimerTimeout  timeoutMs,
const char *  cmd,
  ... 
) [inherited]

Send command to WiConnect WiFi module.

Note:
Refer to Sending Commands To WiFi Module for more info
This method supports variable arguments
Parameters:
[in]responseBufferBuffer to hold command response
[in]responseBufferLenLength of responseBuffer
[in]timeoutMsMaximum time in milliseconds this command should execute
[in]cmdWiConnect command to send to module
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( const ReaderFunc reader,
void *  user,
const char *  cmd,
  ... 
) [inherited]

Send command to WiConnect WiFi module.

  • This method uses the library internal buffer and
  • default timeout. See setCommandDefaultTimeout()
Note:
Refer to Sending Commands To WiFi Module for more info
This method supports variable arguments
Parameters:
[in]readerCallback for reading data to be read from host and send to module during command
[in]userUser data struct used during read Callback. Library doesn't use this. Set NULL if not used.
[in]cmdWiConnect command to send to module
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( TimerTimeout  timeoutMs,
const ReaderFunc reader,
void *  user,
const char *  cmd,
  ... 
) [inherited]

Send command to WiConnect WiFi module.

This method uses the library internal buffer.

Note:
Refer to Sending Commands To WiFi Module for more info
This method supports variable arguments
Parameters:
[in]timeoutMsMaximum time in milliseconds this command should execute
[in]readerCallback for reading data to be read from host and send to module during command
[in]userUser data struct used during read Callback. Library doesn't use this. Set NULL if not used.
[in]cmdWiConnect command to send to module
Returns:
Result of method. See WiconnectResult
WiconnectResult sendCommand ( const Callback completeCallback,
char *  responseBuffer,
int  responseBufferLen,
TimerTimeout  timeoutMs,
const ReaderFunc reader,
void *  user,
const char *  cmd,
va_list  vaList 
) [inherited]

Send command to WiConnect WiFi module.

Note:
Refer to Sending Commands To WiFi Module for more info
Parameters:
[in]completeCallbackCallback when command completes. arg1 of callback contains responseBuffer pointer, arg2 contains the response length
[in]responseBufferBuffer to hold command response
[in]responseBufferLenLength of responseBuffer
[in]timeoutMsMaximum time in milliseconds this command should execute
[in]readerCallback for reading data to be read from host and send to module during command
[in]userUser data struct used during read Callback. Library doesn't use this. Set NULL if not used.
[in]cmdWiConnect command to send to module
[in]vaListVaraible list of arguments
Returns:
Result of method. See WiconnectResult
void stopCurrentCommand (  ) [inherited]

Stop the currently executing command.

Note:
This command is only applicable for non-blocking mode. Refer to Blocking / Non-blocking Modes.