Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Smoothie by
Diff: libs/Network/uip/CommandQueue.h
- Revision:
- 2:1df0b61d3b5a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/libs/Network/uip/CommandQueue.h Fri Feb 28 18:52:52 2014 -0800
@@ -0,0 +1,33 @@
+#ifndef _COMMANDQUEUE_H_
+#define _COMMANDQUEUE_H_
+
+#ifdef __cplusplus
+
+#include "fifo.h"
+#include <string>
+
+#include "StreamOutput.h"
+
+class CommandQueue
+{
+public:
+ CommandQueue();
+ ~CommandQueue();
+ bool pop();
+ int add(const char* cmd, StreamOutput *pstream);
+ int size() {return q.size();}
+ static CommandQueue* getInstance();
+
+private:
+ typedef struct {char* str; StreamOutput *pstream; } cmd_t;
+ Fifo<cmd_t> q;
+ static CommandQueue *instance;
+ StreamOutput *null_stream;
+};
+
+#else
+
+extern int network_add_command(const char * cmd, void *pstream);
+#endif
+
+#endif
