#ifndef RS485_PACK_H
|
#define RS485_PACK_H
|
|
|
#include "Driver/uart_driver.h"
|
#include "Common/app_define.h"
|
|
|
#define RS485_Pack_DEV_PORT "/dev/ttymxc2"
|
|
|
|
class RS485_Pack : public Uart_Driver
|
{
|
Q_OBJECT
|
|
public:
|
RS485_Pack(const char *dev);
|
virtual void run();
|
|
void setPackCommParam(const quint8 devaddr,const quint16 packtype);
|
|
bool packComm_OK;
|
|
void lock_RS485();
|
void unlock_RS485();
|
|
void pausePackComm();
|
void remsumPackComm();
|
|
void setCertificationPackEn(void);
|
|
private:
|
int fd;
|
|
bool pausePackCommEn;
|
|
bool certificationEn;
|
|
bool RS485_RUN_EN;
|
|
quint8 dev_addr;
|
quint16 battPackType;
|
|
QMutex RS485_mutex;
|
|
void certificationPack(void);
|
|
signals:
|
void sendPackDataSignal(PACK_DATA);
|
|
|
};
|
|
|
|
|
|
|
#endif // RS485_PACK_H
|