ACKme Logo WiConnect Host Library- API Reference Guide
 
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
QueuedCommand.h
1 
29 #pragma once
30 
31 
32 #include "WiconnectTypes.h"
33 
34 
35 namespace wiconnect
36 {
44 {
45 public:
46  void *userData;
47 
48 
49  QueuedCommand(int responseBufferLen, char *responseBuffer, int timeoutMs, const ReaderFunc &reader, void *user, const char *cmd, va_list vaList);
50  QueuedCommand(int responseBufferLen, char *responseBuffer, int timeoutMs, const char *cmd, ...);
51  QueuedCommand(int responseBufferLen, char *responseBuffer, const char *cmd, ...);
52  QueuedCommand(int timeoutMs_, const char *cmd, ...);
53  QueuedCommand(const char *cmd, ...);
54  ~QueuedCommand();
55 
56  char *getResponseBuffer();
57  int getResponseBufferLen();
58  int getTimeoutMs();
59  ReaderFunc getReader();
60  void * getReaderUserData();
61  char* getCommand();
62  Callback getCompletedCallback();
63  void setCompletedCallback(const Callback &cb);
64 
65  QueuedCommand& operator=( const QueuedCommand& other );
66  void* operator new(size_t size);
67  void operator delete(void*);
68 
69 protected:
70  char *responseBuffer;
71  int responseBufferLen;
72  int timeoutMs;
73  ReaderFunc reader;
74  void *user;
75  char command[WICONNECT_MAX_CMD_SIZE];
76  Callback completeCallback;
77 #ifdef WICONNECT_ENABLE_MALLOC
78  bool allocatedBuffer;
79 #endif
80  friend class NetworkInterface;
81  friend class Wiconnect;
82 
83  void initialize(int responseBufferLen, char *responseBuffer_, int timeoutMs_, const ReaderFunc &reader_, void *user_, const char *cmd_, va_list vaList);
84 };
85 
86 
87 
88 }
The provides an interface for joining and/or creating a network. It provides other utilities such as ...
Generic callback function.
Definition: Callback.h:49
Generic data reading callback function.
Definition: ReaderFunc.h:45
Class which contains command for asynchronous processing.
Definition: QueuedCommand.h:43
The root WiConnect library class. This class inheriets all WiConnect functionality.
#define WICONNECT_MAX_CMD_SIZE
The maximum command size that may be sent to the WiConnect WiFi module.