14 #ifndef FUJIKININTERFACE_H_
15 #define FUJIKININTERFACE_H_
17 #include "charinterface.h"
18 #include "chardevicedriver.h"
22 XFujikinInterface(
const char *name,
bool runtime,
const shared_ptr<XDriver> &driver);
26 void send(uint8_t classid, uint8_t instanceid, uint8_t attributeid, T data);
28 T query(uint8_t classid, uint8_t instanceid, uint8_t attributeid);
34 virtual bool isOpened()
const {
return !!m_openedPort;}
36 void communicate_once(uint8_t classid, uint8_t instanceid, uint8_t attributeid,
37 const std::vector<uint8_t> &data, std::vector<uint8_t> *response);
38 void communicate(uint8_t classid, uint8_t instanceid, uint8_t attributeid,
39 const std::vector<uint8_t> &data, std::vector<uint8_t> *response = 0);
41 shared_ptr<XPort> m_openedPort;
43 static std::deque<weak_ptr<XPort> > s_openedPorts;
45 enum {STX = 0x02, ACK = 0x06, NAK = 0x16};
52 Transaction &tr_meas,
const shared_ptr<XMeasure> &meas) :