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.
objectQueue.h
- Committer:
- williampeers
- Date:
- 2017-08-09
- Revision:
- 1:f9e6627f1f59
- Parent:
- 0:043b1271ed1b
- Child:
- 2:8f54ba4d961f
File content as of revision 1:f9e6627f1f59:
#ifndef __STRQUEUE_INCLUDED__
#define __STRQUEUE_INCLUDED__
#include "mbed.h"
#include "commands.h"
class StrQueue {
public:
StrQueue();
StrQueue(int size);
~StrQueue();
int put(const char* message, int length = 0);
int get(char* str, int size);
int getChars(char* chars, int size);
bool isfull();
bool isEmpty();
private:
Mutex lock;
bool empty, full;
int front, back;
int size;
char* chars;
};
#endif