-
Notifications
You must be signed in to change notification settings - Fork 7
/
ciecsignal.h
90 lines (77 loc) · 1.76 KB
/
ciecsignal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef CIECSIGNAL_H
#define CIECSIGNAL_H
#include <QVariant>
#include <QString>
#include "cp56time.h"
class CIECSignal
{
///unique key for signal depends of IOA and type
uint key=0;
///IOA
quint32 address=0;
///IEC104 type
uchar typeID=0;
public:
CIECSignal();
CIECSignal(uint16_t addr, uchar type, QString descr=QString("new tag"));
// CIECSignal(uint16_t addr, uchar type, QString description);
///
/// \brief GetKey
/// returns unique key that depend of type and IOA
/// \return
///
uint GetKey()
{
return key;
}
void SetKey(uint key);
///
/// \brief SetAddress
/// set IOA address to signal
/// \param ioa
///
void SetAddress(quint32 ioa);
///
/// \brief SetType
/// set IEC-104 type to signal
/// \param type
///
void SetType(uchar type);
///
/// \brief GetAddress
/// return IOA address
/// \return
///
quint32 GetAddress()
{
return address;
}
///
/// \brief GetType
/// return IEC104 type
/// \return
///
uint GetType()
{
return typeID;
}
///value
QVariant value;
///IEC104 quality
uchar quality;
///описание сигнала
QString description = QString("");
///7-byte time
CP56Time timestamp;
uint ASDU;
///
/// \brief GetValueString
/// \return value as string
///
QString GetValueString();
///флаг означает что с момента подключения или добавления в список сигнал еще ни разу не обновлялся
bool bNeverUpdated = true;
};
bool IsStartDTCon(QByteArray &data);
bool IsTestFRCon(QByteArray &data);
#endif // CIECSIGNAL_H