initial docker support on x86

This commit is contained in:
David
2019-05-28 14:27:57 +10:00
commit 7a6b39bf18
23 changed files with 1403 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#ifndef ___SKYMAX_H
#define ___SKYMAX_H
#include <thread>
#include <mutex>
using namespace std;
class cSkymax
{
unsigned char buf[1024]; //internal work buffer
char status1[1024];
char status2[1024];
char mode;
std::string device;
std::mutex m;
void SetMode(char newmode);
bool CheckCRC(unsigned char *buff, int len);
bool query(const char *cmd);
uint16_t cal_crc_half(uint8_t *pin, uint8_t len);
public:
cSkymax(std::string devicename);
void poll();
void runMultiThread()
{
std::thread t1(&cSkymax::poll, this);
t1.detach();
}
string *GetQpiriStatus();
string *GetQpigsStatus();
int GetMode();
void ExecuteCmd(const std::string cmd);
};
#endif // ___SKYMAX_H