#ifndef DATAPARSER_H
#define DATAPARSER_H

#include <QVector>
#include <qbytearray.h>
#include <qobject.h>

#include "protocol.h"
#include "defines.h"

namespace DataParser {
QByteArray connectToDevice(const QVector<Phase>&);
QByteArray inquirePhaseInfo();
QByteArray setDeviceStartStop(const DeviceStartMode);

bool isDevExperimentEnded(const CommonData&cd);
bool commonDataParser(const QByteArray&ba,CommonData &cd);

unsigned short modbusCRC16(unsigned char *data,unsigned short length);
}

#endif // DATAPARSER_H
