forked from paulh002/sdrberry
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCatinterface.h
More file actions
49 lines (39 loc) · 759 Bytes
/
Catinterface.h
File metadata and controls
49 lines (39 loc) · 759 Bytes
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
46
47
48
49
#pragma once
#include <string>
#include <atomic>
#include <mutex>
#include "FT891_CAT.h"
#include "wiringSerial.h"
class Comm : public Cat_communicator
{
public:
bool begin();
void Send(std::string s) override;
int Read(char c, std::string& s) override;
bool available() override;
void SendInformation(int info) override;
~Comm();
void Close();
private:
std::string device;
int speed;
int serialport;
};
class Catinterface
{
public:
void checkCAT();
void begin();
void operator()();
uint8_t Getag();
long long Getfa();
uint8_t Getrg();
void SetBand(uint16_t band);
private:
FT891_CAT cat_message;
bool f_rxtx;
Comm comm_port;
bool bcomm_port;
int m_mode;
};
extern Catinterface catinterface;