3 Star 7 Fork 10

tinnu/qt_61850Client

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mqclient61850.h 2.71 KB
一键复制 编辑 原始数据 按行查看 历史
tinnu 提交于 2021-07-09 10:21 . 更新操作
#ifndef MQCLIENT61850_H
#define MQCLIENT61850_H
#include <QObject>
#include <QVector>
#include "iec61850_client.h"
#define _IPV4_ADDR_ "10.37.49.159"
#define _IPV4_PORT_ 102
//struct _61850_FCDA_STRUCT_ {
// QString name;
// QString type;
// QString value;
// QVector<_61850_FCDA_STRUCT_> structs;
//};
struct _61850_FCDA_ {
QString name;
QString type;
QString fc;
int type_num;
QString value;
QVector<_61850_FCDA_> structs;
};
struct _61850_DATASET_ {
QString name;
QString type;
QVector<_61850_FCDA_> fcdas;
};
struct _61850_DA_ {
QString name;
QString type;
QString fc;
int type_num;
QString value;
QVector<_61850_DA_> structs;
};
struct _61850_DO_ {
QString name;
QString type;
QVector<_61850_DA_> das;
};
struct _61850_LN_ {
QString name;
QVector<_61850_DO_> dos;
QVector<_61850_DATASET_> dataset;
};
struct _61850_LD_ {
QString name;
QVector<_61850_LN_> lns;
};
class MQClient61850:public QObject
{
Q_OBJECT
public:
MQClient61850();
QVector<_61850_LD_> GetDirVec(){
return m_dirVec;
}
void ClientUpdate();
void WriteVal(QString locate, int type_num, QString type_extra, QVariant valueVar);
private:
void ClientInit();
_61850_FCDA_ GetFedaStruct(MmsValue *tmms_fcda);
_61850_FCDA_ GetFedaStruct(MmsValue *tmms_fcda, char *reference);
_61850_DA_ GetDaStruct(MmsValue *tmms_fcda);
_61850_DA_ GetDaStruct(MmsValue *tmms_fcda, char *reference);
IedConnection m_iedConnectHandle;
QVector<_61850_LD_> m_dirVec;
};
typedef struct sMmsValue MmsValue;
typedef struct ATTRIBUTE_PACKED {
uint8_t size;
uint8_t maxSize;
uint8_t* octets;
} Asn1PrimitiveValue;
struct ATTRIBUTE_PACKED sMmsValue {
MmsType type;
uint8_t deleteValue;
union uMmsValue {
MmsDataAccessError dataAccessError;
struct {
int size;
MmsValue** components;
} structure;
bool boolean;
Asn1PrimitiveValue* integer;
struct {
uint8_t exponentWidth;
uint8_t formatWidth; /* number of bits - either 32 or 64) */
uint8_t buf[8];
} floatingPoint;
struct {
uint16_t size;
uint16_t maxSize;
uint8_t* buf;
} octetString;
struct {
int size; /* Number of bits */
uint8_t* buf;
} bitString;
struct {
char* buf;
int16_t size; /* size of the string, equals the amount of allocated memory - 1 */
} visibleString;
uint8_t utcTime[8];
struct {
uint8_t size;
uint8_t buf[6];
} binaryTime;
} value;
};
#endif // MQCLIENT61850_H
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tinnu/qt_61850-client.git
git@gitee.com:tinnu/qt_61850-client.git
tinnu
qt_61850-client
qt_61850Client
master

搜索帮助