mirror of
https://github.com/g4klx/MMDVMHost
synced 2026-02-04 22:05:41 +08:00
Add the data packing and unpacking code.
This commit is contained in:
18
FMControl.h
18
FMControl.h
@@ -20,20 +20,14 @@
|
||||
#define FMControl_H
|
||||
|
||||
#include "FMNetwork.h"
|
||||
#include "RingBuffer.h"
|
||||
#include "StopWatch.h"
|
||||
#include "Defines.h"
|
||||
#include "Timer.h"
|
||||
#include "Modem.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class CFMControl {
|
||||
public:
|
||||
CFMControl(CFMNetwork* network);
|
||||
~CFMControl();
|
||||
|
||||
bool writeModem(unsigned char* data, unsigned int length);
|
||||
bool writeModem(const unsigned char* data, unsigned int length);
|
||||
|
||||
unsigned int readModem(unsigned char* data, unsigned int space);
|
||||
|
||||
@@ -42,14 +36,8 @@ public:
|
||||
void enable(bool enabled);
|
||||
|
||||
private:
|
||||
CFMNetwork* m_network;
|
||||
CRingBuffer<unsigned short> m_queue;
|
||||
bool m_enabled;
|
||||
FILE* m_fp;
|
||||
|
||||
bool openFile();
|
||||
bool writeFile(const unsigned char* data, unsigned int length);
|
||||
void closeFile();
|
||||
CFMNetwork* m_network;
|
||||
bool m_enabled;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user