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.
RequestQueue.h
- Committer:
- avinashr
- Date:
- 2015-03-26
- Revision:
- 2:2cc70773996b
- Parent:
- 1:4ec28912c9e7
- Child:
- 3:c3d716d6c6a7
File content as of revision 2:2cc70773996b:
#include "mbed.h"
#ifndef REQUESTQUEUE_H
#define REQUESTQUEUE_H
class RequestQueue {
private :
int floorRequests[5];
public :
RequestQueue() {
for(int i=0;i<5;i++)
floorRequests[i] = 0;
}
void add(int);
void remove(int);
int isRequested (int);
};
void RequestQueue::add (int i){
floorRequests[i] = 1;
}
void RequestQueue::remove (int i){
floorRequests[i] = 0;
}
int RequestQueue::isRequested (int i){
return floorRequests[i];
}
#endif