#ifndef DATAPARSER_H
#define DATAPARSER_H

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

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

namespace DataParser {

QByteArray setExperimentInfo(const QVector<Phase>&,const QByteArray initBa);
QByteArray inquirePhaseInfo();
QByteArray setDeviceStartStop(const DeviceStartMode);

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

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

#endif // DATAPARSER_H
