-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTransceiver.h
45 lines (37 loc) · 997 Bytes
/
Transceiver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef TRANSCEIVER_H
#define TRANSCEIVER_H
#include <Arduino.h>
#include "Transmitter.h"
#include "Receiver.h"
#include "LEDBitmap.h"
#include "Constants.h"
class Transceiver
{
public:
Transceiver(int frequency = 1000);
virtual ~Transceiver() { };
public: //methods
void startTransmitter();
void stopTransmitter();
void startReceiver();
void stopReceiver();
int setFrequencies(int frequency = 1000);
int setTransmitFrequency(int frequency = 1000);
int setReceiveFrequency(int frequency = 1000);
int sendData(LEDBitmap &image);
int sendData(String &string);
bool lastTransmissionComplete();
bool transmitterIsStarted();
bool receiverIsStarted();
bool isReceiving();
bool hadReceiverError();
bool receptionSuccessful();
LEDBitmap getImage();
String getString();
int getType();
bool handleReception(Matrix* matrix);
private: //members
Transmitter _transmitter;
Receiver _receiver;
};
#endif