// Definition for the different APCI headers
// This allows us to make determinations on how to handle the fields following the first 1-2 bits
-enum ApciTypeEnum
+enum ApciTypeEnum
{
IEC104_NO_APCI = -1,
- IEC104_APCI_TYPE_I = 0,
- IEC104_APCI_TYPE_S = 1,
- IEC104_APCI_TYPE_U = 2,
+ IEC104_APCI_TYPE_I = 0,
+ IEC104_APCI_TYPE_S = 1,
+ IEC104_APCI_TYPE_U = 2,
};
-enum AsduTypeEnum
-{
+enum AsduTypeEnum
+{
IEC104_NO_ASDU = 0, // placeholder for an error case
IEC104_ASDU_M_SP_NA_1 = 1, // Single-point information
IEC104_ASDU_M_SP_TA_1 = 2, // Single-point information with time tag
IEC104_ASDU_C_BO_NA_1 = 51, // Bitstring 32 bit command
// 52-57 reserved
IEC104_ASDU_C_SC_TA_1 = 58, // Single command with time tag CP56Time2a
- IEC104_ASDU_C_DC_TA_1 = 59, // Double command with time tag CP56Time2a
+ IEC104_ASDU_C_DC_TA_1 = 59, // Double command with time tag CP56Time2a
IEC104_ASDU_C_RC_TA_1 = 60, // Regulating step command with time tag CP56Time2a
IEC104_ASDU_C_SE_TA_1 = 61, // Set-point command with time tag CP56Time2a, normalized value
IEC104_ASDU_C_SE_TB_1 = 62, // Set-point command with time tag CP56Time2a, scaled value
};
// Definition for the different transmission cause codes
-enum CauseOfTransmissionEnum
+enum CauseOfTransmissionEnum
{
IEC104_CAUSE_TX_NOT_USED = 0, // not used
IEC104_CAUSE_TX_PER_CYC = 1, // periodic, cyclic
IEC104_CAUSE_TX_RES63 = 63, // 48-63 reserved
};
-enum StructureQualifierEnum
+enum StructureQualifierEnum
{
IEC104_SQ_FALSE = 0,
IEC104_SQ_TRUE = 1,
//
// struct Iec104To help determine what type of APCI is in use
-struct Iec104GenericApci
+struct Iec104GenericApci
{
uint8_t start;
uint8_t length;
// ASDU Information Object Structs
//
-struct Iec104VariableStructureQualifierType
+struct Iec104VariableStructureQualifierType
{
uint8_t numberOfElements : 7;
uint8_t sq : 1;
}__attribute__((packed));
// This structure does not require the OA, but it seems to be used in all traffic seen so far
-struct Iec104CauseOfTransmissionType
+struct Iec104CauseOfTransmissionType
{
uint8_t causeOfTransmission : 6;
uint8_t pn : 1;
}__attribute__((packed));
// COI: Cause of Initialization Structure
-struct Iec104CoiType
+struct Iec104CoiType
{
uint8_t ui : 7;
uint8_t bs : 1;
}__attribute__((packed));
// QOI: Qualifier of Interrogation Structure
-struct Iec104QoiType
+struct Iec104QoiType
{
uint8_t qoi;
}__attribute__((packed));
// QCC: Qualifier of Counter Interrogation Command Structure
-struct Iec104QccType
+struct Iec104QccType
{
uint8_t rqt : 6;
uint8_t frz : 2;
}__attribute__((packed));
// QPM: Qualifier of Parameter of Measured Values Structure
-struct Iec104QpmType
+struct Iec104QpmType
{
uint8_t kpa : 6;
uint8_t lpc : 1;
}__attribute__((packed));
// QPA: Qualifier of Parameter Activation Structure
-struct Iec104QpaType
+struct Iec104QpaType
{
uint8_t qpa;
}__attribute__((packed));
// QOC: Qualifier of Command Structure
-// This doesn't add up to 8, but that is expected
+// This doesn't add up to 8, but that is expected
// This struct gets used in fields that have 2 preceding bits
-struct Iec104QocType
+struct Iec104QocType
{
uint8_t qu : 5;
uint8_t se : 1;
}__attribute__((packed));
// QRP: Qualifier of Reset Process Structure
-struct Iec104QrpType
+struct Iec104QrpType
{
uint8_t qrp;
}__attribute__((packed));
// FRQ: File Ready Qualifier Structure
-struct Iec104FrqType
+struct Iec104FrqType
{
uint8_t ui : 7;
uint8_t bs : 1;
}__attribute__((packed));
// SRQ: Section Ready Qualifier Structure
-struct Iec104SrqType
+struct Iec104SrqType
{
uint8_t ui : 7;
uint8_t bs : 1;
}__attribute__((packed));
// SCQ: Select and Call Qualifier Structure
-struct Iec104ScqType
+struct Iec104ScqType
{
uint8_t ui1 : 4;
uint8_t ui2 : 4;
}__attribute__((packed));
// LSQ: Last Section or Segment Qualifier Structure
-struct Iec104LsqType
+struct Iec104LsqType
{
uint8_t lsq;
}__attribute__((packed));
// AFQ: Acknowledge File or Section Qualifier Structure
-struct Iec104AfqType
+struct Iec104AfqType
{
uint8_t ui1 : 4;
uint8_t ui2 : 4;
// Common Address of ASDU Structure
// This structure does not require the high octet, but it seems to be
// used in all traffic seen so far
-struct Iec104CommonAddressOfAsduType
+struct Iec104CommonAddressOfAsduType
{
uint16_t commonAddress;
}__attribute__((packed));
// Information Object Address One Octet Structure
-struct Iec104InformationObjectAddressOneOctetType
+struct Iec104InformationObjectAddressOneOctetType
{
uint8_t informationObjectAddress;
}__attribute__((packed));
// Information Object Address Two Octet Structure
-struct Iec104InformationObjectAddressTwoOctetType
+struct Iec104InformationObjectAddressTwoOctetType
{
uint8_t informationObjectAddress[2];
}__attribute__((packed));
// Information Object Address Three Octet Structure
-struct Iec104InformationObjectAddressThreeOctetType
+struct Iec104InformationObjectAddressThreeOctetType
{
uint8_t informationObjectAddress[3];
}__attribute__((packed));
// SIQ: Single Point Information with Quality Descriptor Structure
-struct Iec104SiqType
+struct Iec104SiqType
{
uint8_t spi : 1;
uint8_t reserved : 3;
}__attribute__((packed));
// DIQ: Double Point Information with Quality Descriptor Structure
-struct Iec104DiqType
+struct Iec104DiqType
{
uint8_t dpi : 2;
uint8_t reserved : 2;
}__attribute__((packed));
// QDS: Quality Descriptor Structure
-struct Iec104QdsType
+struct Iec104QdsType
{
uint8_t ov : 1;
uint8_t reserved : 3;
}__attribute__((packed));
// QDP: Quality Descriptor for Events of Protection Equipment Structure
-struct Iec104QdpType
+struct Iec104QdpType
{
uint8_t reserved : 3;
uint8_t ei : 1;
}__attribute__((packed));
// VTI: Value with Transient State Indication Structure
-struct Iec104VtiType
+struct Iec104VtiType
{
uint8_t value : 7;
uint8_t t : 1;
}__attribute__((packed));
// NVA: Normalized Value Structure
-struct Iec104NvaType
+struct Iec104NvaType
{
uint16_t value;
}__attribute__((packed));
// SVA: Scaled Value Structure
-struct Iec104SvaType
+struct Iec104SvaType
{
uint16_t value;
}__attribute__((packed));
// IEEE_STD_754: Short Floating Point Number Structure
-struct Iec104IeeeStd754Type
+struct Iec104IeeeStd754Type
{
uint32_t ieeeStd754;
}__attribute__((packed));
// BCR: Binary Counter Reading Structure
-struct Iec104BcrType
+struct Iec104BcrType
{
uint32_t value;
uint8_t sequenceNumber : 5;
}__attribute__((packed));
// SEP: Single Event of Protection Equipment Structure
-struct Iec104SepType
+struct Iec104SepType
{
uint8_t es : 2;
uint8_t reserved : 1;
}__attribute__((packed));
// SPE: Start Event of Protection Equipment Structure
-struct Iec104SpeType
+struct Iec104SpeType
{
uint8_t gs : 1;
uint8_t sl1 : 1;
}__attribute__((packed));
// OCI: Output Circuit Information Structure
-struct Iec104OciType
+struct Iec104OciType
{
uint8_t gc : 1;
uint8_t cl1 : 1;
}__attribute__((packed));
// BSI: Binary State Information Structure
-struct Iec104BsiType
+struct Iec104BsiType
{
uint32_t bitstring;
}__attribute__((packed));
// FBP: Fixed Test Bit Pattern Structure
-struct Iec104FbpType
+struct Iec104FbpType
{
uint16_t fixedTestBitPattern;
}__attribute__((packed));
// SCO: Single Command Structure
-struct Iec104ScoType
+struct Iec104ScoType
{
uint8_t scs : 1;
uint8_t reserved : 1;
}__attribute__((packed));
// DCO: Double Command Structure
-struct Iec104DcoType
+struct Iec104DcoType
{
uint8_t dcs : 2;
uint8_t qu : 5;
}__attribute__((packed));
// RCO: Regulating Step Command Structure
-struct Iec104RcoType
+struct Iec104RcoType
{
uint8_t rcs : 2;
uint8_t qu : 5;
}__attribute__((packed));
// Time2a Milliseconds Structure
-struct Iec104Time2aMillisecondsType
+struct Iec104Time2aMillisecondsType
{
uint16_t milliseconds;
}__attribute__((packed));
// Time2a IVResMinute Structure
-struct Iec104Time2aIvresminuteType
+struct Iec104Time2aIvresminuteType
{
uint8_t minutes : 6;
uint8_t res : 1;
}__attribute__((packed));
// Time2a SURes2Hour Structure
-struct Iec104Time2aSures2hourType
+struct Iec104Time2aSures2hourType
{
uint8_t hours : 5;
uint8_t res2 : 2;
}__attribute__((packed));
// Time2a DOWDay Structure
-struct Iec104Time2aDowdayType
+struct Iec104Time2aDowdayType
{
uint8_t dayOfMonth : 5;
uint8_t dayOfWeek : 3;
}__attribute__((packed));
// Time2a Res3Month Structure
-struct Iec104Time2aRes3monthType
+struct Iec104Time2aRes3monthType
{
uint8_t month : 4;
uint8_t res3 : 4;
}__attribute__((packed));
// Time2a Res4Year Structure
-struct Iec104Time2aRes4yearType
+struct Iec104Time2aRes4yearType
{
uint8_t year : 7;
uint8_t res4 : 1;
}__attribute__((packed));
// CP56Time2a Structure
-struct Iec104Cp56Time2aType
+struct Iec104Cp56Time2aType
{
Iec104Time2aMillisecondsType milliseconds;
Iec104Time2aIvresminuteType ivresminute;
}__attribute__((packed));
// Cp24Time2a Structure
-struct Iec104Cp24Time2aType
+struct Iec104Cp24Time2aType
{
Iec104Time2aMillisecondsType milliseconds;
Iec104Time2aIvresminuteType ivresminute;
}__attribute__((packed));
// Cp16Time2a Structure
-struct Iec104Cp16Time2aType
+struct Iec104Cp16Time2aType
{
Iec104Time2aMillisecondsType milliseconds;
}__attribute__((packed));
// NOF: Name of File Structure
-struct Iec104NofType
+struct Iec104NofType
{
uint16_t nameOfFile;
}__attribute__((packed));
// NOS: Name of Section Structure
-struct Iec104NosType
+struct Iec104NosType
{
uint8_t nameOfSection;
}__attribute__((packed));
// LOF: Length of File or Section Structure
-struct Iec104LofType
+struct Iec104LofType
{
uint8_t lengthOfFile[3];
}__attribute__((packed));
// LOS: Length of Segment Structure
-struct Iec104LosType
+struct Iec104LosType
{
uint8_t lengthOfSegment;
}__attribute__((packed));
// CHS: Checksum Structure
-struct Iec104ChsType
+struct Iec104ChsType
{
uint8_t chs;
}__attribute__((packed));
// SOF: Status of File Structure
// need to prepend `sof` tag on here since `for` is a reserved word
// doing it for the rest for consistency
-struct Iec104SofType
+struct Iec104SofType
{
uint8_t sofStatus : 5;
uint8_t sofLfd : 1;
}__attribute__((packed));
// QOS: Qualifier of Set Point Command Structure
-struct Iec104QosType
+struct Iec104QosType
{
uint8_t ql : 7;
uint8_t se : 1;
}__attribute__((packed));
// SCD: Status + Status Change Detection Structure
-struct Iec104ScdType
+struct Iec104ScdType
{
uint16_t st;
uint16_t cd;
}__attribute__((packed));
// TSC: Test Sequence Counter
-struct Iec104TscType
+struct Iec104TscType
{
uint16_t tsc;
}__attribute__((packed));
// Segment: Segment type
-struct Iec104SegmentType
+struct Iec104SegmentType
{
uint8_t segment;
}__attribute__((packed));
// Information Element
-struct Iec104InformationElementType
+struct Iec104InformationElementType
{
Iec104NofType nameOfFileOrSubdirectory;
Iec104LofType lengthOfFile;
// ASDUs for process information in monitor direction
//
-// ASDU Type M_SP_NA_1
+// ASDU Type M_SP_NA_1
// Ident 1
// Single-point information
-struct Iec104M_SP_NA_1_IO_Subgroup
+struct Iec104M_SP_NA_1_IO_Subgroup
{
Iec104SiqType siq;
}__attribute__((packed));
-struct Iec104M_SP_NA_1_IO_Group
+struct Iec104M_SP_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_SP_NA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_SP_TA_1
+// ASDU Type M_SP_TA_1
// Ident 2
// Single-point information with time tag
-struct Iec104M_SP_TA_1_IO_Subgroup
+struct Iec104M_SP_TA_1_IO_Subgroup
{
Iec104SiqType siq;
Iec104Cp24Time2aType threeOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_SP_TA_1_IO_Group
+struct Iec104M_SP_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_SP_TA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_DP_NA_1
+// ASDU Type M_DP_NA_1
// Ident 3
// Double-point information
-struct Iec104M_DP_NA_1_IO_Subgroup
+struct Iec104M_DP_NA_1_IO_Subgroup
{
Iec104DiqType diq;
}__attribute__((packed));
-struct Iec104M_DP_NA_1_IO_Group
+struct Iec104M_DP_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_DP_NA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_DP_TA_1
+// ASDU Type M_DP_TA_1
// Ident 4
// Double-point information with time tag
-struct Iec104M_DP_TA_1_IO_Subgroup
+struct Iec104M_DP_TA_1_IO_Subgroup
{
Iec104DiqType diq;
Iec104Cp24Time2aType threeOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_DP_TA_1_IO_Group
+struct Iec104M_DP_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_DP_TA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_ST_NA_1
+// ASDU Type M_ST_NA_1
// Ident 5
// Step position information
-struct Iec104M_ST_NA_1_IO_Subgroup
+struct Iec104M_ST_NA_1_IO_Subgroup
{
Iec104VtiType vti;
Iec104QdsType qds;
}__attribute__((packed));
-struct Iec104M_ST_NA_1_IO_Group
+struct Iec104M_ST_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ST_NA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_ST_TA_1
+// ASDU Type M_ST_TA_1
// Ident 6
// Step position information with time tag
-struct Iec104M_ST_TA_1_IO_Subgroup
+struct Iec104M_ST_TA_1_IO_Subgroup
{
Iec104VtiType vti;
Iec104QdsType qds;
Iec104Cp24Time2aType threeOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_ST_TA_1_IO_Group
+struct Iec104M_ST_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ST_TA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_BO_NA_1
+// ASDU Type M_BO_NA_1
// Ident 7
// Bitstring of 32 bit
-struct Iec104M_BO_NA_1_IO_Subgroup
+struct Iec104M_BO_NA_1_IO_Subgroup
{
Iec104BsiType bsi;
Iec104QdsType qds;
}__attribute__((packed));
-struct Iec104M_BO_NA_1_IO_Group
+struct Iec104M_BO_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_BO_NA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_BO_TA_1
+// ASDU Type M_BO_TA_1
// Ident 8
// Bitstring of 32 bit with time tag
-struct Iec104M_BO_TA_1_IO_Subgroup
+struct Iec104M_BO_TA_1_IO_Subgroup
{
Iec104BsiType bsi;
Iec104QdsType qds;
Iec104Cp24Time2aType threeOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_BO_TA_1_IO_Group
+struct Iec104M_BO_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_BO_TA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_ME_NA_1
+// ASDU Type M_ME_NA_1
// Ident 9
// Measured value, normalized value
-struct Iec104M_ME_NA_1_IO_Subgroup
+struct Iec104M_ME_NA_1_IO_Subgroup
{
Iec104NvaType nva;
Iec104QdsType qds;
}__attribute__((packed));
-struct Iec104M_ME_NA_1_IO_Group
+struct Iec104M_ME_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ME_NA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_ME_TA_1
+// ASDU Type M_ME_TA_1
// Ident 10
// Measured value, normalized value with time tag
-struct Iec104M_ME_TA_1_IO_Subgroup
+struct Iec104M_ME_TA_1_IO_Subgroup
{
Iec104NvaType nva;
Iec104QdsType qds;
Iec104Cp24Time2aType threeOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_ME_TA_1_IO_Group
+struct Iec104M_ME_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ME_TA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_ME_NB_1
+// ASDU Type M_ME_NB_1
// Ident 11
// Measured value, scaled value
-struct Iec104M_ME_NB_1_IO_Subgroup
+struct Iec104M_ME_NB_1_IO_Subgroup
{
Iec104SvaType sva;
Iec104QdsType qds;
}__attribute__((packed));
-struct Iec104M_ME_NB_1_IO_Group
+struct Iec104M_ME_NB_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ME_NB_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_ME_TB_1
+// ASDU Type M_ME_TB_1
// Ident 12
// Measured value, scaled value wit time tag
-struct Iec104M_ME_TB_1_IO_Subgroup
+struct Iec104M_ME_TB_1_IO_Subgroup
{
Iec104SvaType sva;
Iec104QdsType qds;
Iec104Cp24Time2aType threeOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_ME_TB_1_IO_Group
+struct Iec104M_ME_TB_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ME_TB_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_ME_NC_1
+// ASDU Type M_ME_NC_1
// Ident 13
// Measured value, short floating point number
-struct Iec104M_ME_NC_1_IO_Subgroup
+struct Iec104M_ME_NC_1_IO_Subgroup
{
Iec104IeeeStd754Type ieeeStd754;
Iec104QdsType qds;
}__attribute__((packed));
-struct Iec104M_ME_NC_1_IO_Group
+struct Iec104M_ME_NC_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ME_NC_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_ME_TC_1
+// ASDU Type M_ME_TC_1
// Ident 14
// Measured value, short floating point number with time tag
-struct Iec104M_ME_TC_1_IO_Subgroup
+struct Iec104M_ME_TC_1_IO_Subgroup
{
Iec104IeeeStd754Type ieeeStd754;
Iec104QdsType qds;
Iec104Cp24Time2aType threeOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_ME_TC_1_IO_Group
+struct Iec104M_ME_TC_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ME_TC_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_IT_NA_1
+// ASDU Type M_IT_NA_1
// Ident 15
// Integrated totals
-struct Iec104M_IT_NA_1_IO_Subgroup
+struct Iec104M_IT_NA_1_IO_Subgroup
{
Iec104BcrType bcr;
}__attribute__((packed));
-struct Iec104M_IT_NA_1_IO_Group
+struct Iec104M_IT_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_IT_NA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_IT_TA_1
+// ASDU Type M_IT_TA_1
// Ident 16
// Integrated totals with time tag
-struct Iec104M_IT_TA_1_IO_Subgroup
+struct Iec104M_IT_TA_1_IO_Subgroup
{
Iec104BcrType bcr;
Iec104Cp24Time2aType threeOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_IT_TA_1_IO_Group
+struct Iec104M_IT_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_IT_TA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_EP_TA_1
+// ASDU Type M_EP_TA_1
// Ident 17
// Event of protection equipment with time tag
-struct Iec104M_EP_TA_1_IO_Subgroup
+struct Iec104M_EP_TA_1_IO_Subgroup
{
Iec104SepType sep;
Iec104Cp16Time2aType elapsedTime;
Iec104Cp24Time2aType threeOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_EP_TA_1_IO_Group
+struct Iec104M_EP_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_EP_TA_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_EP_TB_1
+// ASDU Type M_EP_TB_1
// Ident 18
// Packed start events of protection equipment with time tag
-struct Iec104M_EP_TB_1_IO_Subgroup
+struct Iec104M_EP_TB_1_IO_Subgroup
{
Iec104SpeType spe;
Iec104QdpType qdp;
Iec104Cp24Time2aType threeOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_EP_TB_1_IO_Group
+struct Iec104M_EP_TB_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_EP_TB_1_IO_Subgroup subgroup;
}__attribute__((packed));
-// ASDU Type M_EP_TC_1
+// ASDU Type M_EP_TC_1
// Ident 19
// Packed output circuit information of protection equipment with time tag
-struct Iec104M_EP_TC_1_IO_Subgroup
+struct Iec104M_EP_TC_1_IO_Subgroup
{
Iec104OciType oci;
Iec104QdpType qdp;
Iec104Cp24Time2aType threeOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_EP_TC_1_IO_Group
+struct Iec104M_EP_TC_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_EP_TC_1_IO_Subgroup subgroup;
// Ident 20
// Packed single point information with status change detection
-struct Iec104M_PS_NA_1_IO_Subgroup
+struct Iec104M_PS_NA_1_IO_Subgroup
{
Iec104ScdType scd;
Iec104QdsType qds;
}__attribute__((packed));
-struct Iec104M_PS_NA_1_IO_Group
+struct Iec104M_PS_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_PS_NA_1_IO_Subgroup subgroup;
// Ident 21
// Measured value, normalized value without quality descriptor
-struct Iec104M_ME_ND_1_IO_Subgroup
+struct Iec104M_ME_ND_1_IO_Subgroup
{
Iec104NvaType nva;
}__attribute__((packed));
-struct Iec104M_ME_ND_1_IO_Group
+struct Iec104M_ME_ND_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ME_ND_1_IO_Subgroup subgroup;
// Ident 30
// Single-point information with time tag CP56Time2a
-struct Iec104M_SP_TB_1_IO_Subgroup
+struct Iec104M_SP_TB_1_IO_Subgroup
{
Iec104SiqType siq;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_SP_TB_1_IO_Group
+struct Iec104M_SP_TB_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_SP_TB_1_IO_Subgroup subgroup;
// Ident 31
// Double-point information with time tag CP56Time2a
-struct Iec104M_DP_TB_1_IO_Subgroup
+struct Iec104M_DP_TB_1_IO_Subgroup
{
Iec104DiqType diq;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_DP_TB_1_IO_Group
+struct Iec104M_DP_TB_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_DP_TB_1_IO_Subgroup subgroup;
// Ident 32
// Step position information with time tag CP56Time2a
-struct Iec104M_ST_TB_1_IO_Subgroup
+struct Iec104M_ST_TB_1_IO_Subgroup
{
Iec104VtiType vti;
Iec104QdsType qds;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_ST_TB_1_IO_Group
+struct Iec104M_ST_TB_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ST_TB_1_IO_Subgroup subgroup;
// Ident 33
// Bitstring of 32 bit with time tag CP56Time2a
-struct Iec104M_BO_TB_1_IO_Subgroup
+struct Iec104M_BO_TB_1_IO_Subgroup
{
Iec104BsiType bsi;
Iec104QdsType qds;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_BO_TB_1_IO_Group
+struct Iec104M_BO_TB_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_BO_TB_1_IO_Subgroup subgroup;
// Ident 34
// Measured value, normalized value with time tag CP56Time2a
-struct Iec104M_ME_TD_1_IO_Subgroup
+struct Iec104M_ME_TD_1_IO_Subgroup
{
Iec104NvaType nva;
Iec104QdsType qds;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_ME_TD_1_IO_Group
+struct Iec104M_ME_TD_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ME_TD_1_IO_Subgroup subgroup;
// Ident 35
// Measured value, scaled value with time tag CP56Time2a
-struct Iec104M_ME_TE_1_IO_Subgroup
+struct Iec104M_ME_TE_1_IO_Subgroup
{
Iec104SvaType sva;
Iec104QdsType qds;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_ME_TE_1_IO_Group
+struct Iec104M_ME_TE_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ME_TE_1_IO_Subgroup subgroup;
// Ident 36
// Measured value, short floating point number with time tag CP56Time2a
-struct Iec104M_ME_TF_1_IO_Subgroup
+struct Iec104M_ME_TF_1_IO_Subgroup
{
Iec104IeeeStd754Type ieeeStd754;
Iec104QdsType qds;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_ME_TF_1_IO_Group
+struct Iec104M_ME_TF_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_ME_TF_1_IO_Subgroup subgroup;
// Ident 37
// Integrated totals with time tag CP56Time2a
-struct Iec104M_IT_TB_1_IO_Subgroup
+struct Iec104M_IT_TB_1_IO_Subgroup
{
Iec104BcrType bcr;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_IT_TB_1_IO_Group
+struct Iec104M_IT_TB_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_IT_TB_1_IO_Subgroup subgroup;
// Ident 38
// Event of protection equipment with time tag CP56Time2a
-struct Iec104M_EP_TD_1_IO_Subgroup
+struct Iec104M_EP_TD_1_IO_Subgroup
{
Iec104SepType sep;
Iec104Cp16Time2aType elapsedTime;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_EP_TD_1_IO_Group
+struct Iec104M_EP_TD_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_EP_TD_1_IO_Subgroup subgroup;
// Ident 39
// Packed start events of protection equipment with time tag CP56Time2a
-struct Iec104M_EP_TE_1_IO_Subgroup
+struct Iec104M_EP_TE_1_IO_Subgroup
{
Iec104SepType sep;
Iec104QdpType qdp;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_EP_TE_1_IO_Group
+struct Iec104M_EP_TE_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_EP_TE_1_IO_Subgroup subgroup;
// Ident 40
// Packed output circuit information of protection equipment with time tag CP56Time2a
-struct Iec104M_EP_TF_1_IO_Subgroup
+struct Iec104M_EP_TF_1_IO_Subgroup
{
Iec104OciType oci;
Iec104QdpType qdp;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104M_EP_TF_1_IO_Group
+struct Iec104M_EP_TF_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_EP_TF_1_IO_Subgroup subgroup;
// ASDU Type C_SC_NA_1
-struct Iec104C_SC_NA_1_IO_Subgroup
+struct Iec104C_SC_NA_1_IO_Subgroup
{
Iec104ScoType sco;
}__attribute__((packed));
-struct Iec104C_SC_NA_1_IO_Group
+struct Iec104C_SC_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_SC_NA_1_IO_Subgroup subgroup;
// ASDU Type C_DC_NA_1
-struct Iec104C_DC_NA_1_IO_Subgroup
+struct Iec104C_DC_NA_1_IO_Subgroup
{
Iec104DcoType dco;
}__attribute__((packed));
-struct Iec104C_DC_NA_1_IO_Group
+struct Iec104C_DC_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_DC_NA_1_IO_Subgroup subgroup;
// ASDU Type C_RC_NA_1
-struct Iec104C_RC_NA_1_IO_Subgroup
+struct Iec104C_RC_NA_1_IO_Subgroup
{
Iec104RcoType rco;
}__attribute__((packed));
-struct Iec104C_RC_NA_1_IO_Group
+struct Iec104C_RC_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_RC_NA_1_IO_Subgroup subgroup;
// ASDU Type C_SE_NA_1
-struct Iec104C_SE_NA_1_IO_Subgroup
+struct Iec104C_SE_NA_1_IO_Subgroup
{
Iec104NvaType nva;
Iec104QosType qos;
}__attribute__((packed));
-struct Iec104C_SE_NA_1_IO_Group
+struct Iec104C_SE_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_SE_NA_1_IO_Subgroup subgroup;
// ASDU Type C_SE_NB_1
-struct Iec104C_SE_NB_1_IO_Subgroup
+struct Iec104C_SE_NB_1_IO_Subgroup
{
Iec104SvaType sva;
Iec104QosType qos;
}__attribute__((packed));
-struct Iec104C_SE_NB_1_IO_Group
+struct Iec104C_SE_NB_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_SE_NB_1_IO_Subgroup subgroup;
// ASDU Type C_SE_NC_1
-struct Iec104C_SE_NC_1_IO_Subgroup
+struct Iec104C_SE_NC_1_IO_Subgroup
{
Iec104IeeeStd754Type ieeeStd754;
Iec104QosType qos;
}__attribute__((packed));
-struct Iec104C_SE_NC_1_IO_Group
+struct Iec104C_SE_NC_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_SE_NC_1_IO_Subgroup subgroup;
// ASDU Type C_BO_NA_1
-struct Iec104C_BO_NA_1_IO_Subgroup
+struct Iec104C_BO_NA_1_IO_Subgroup
{
Iec104BsiType bsi;
}__attribute__((packed));
-struct Iec104C_BO_NA_1_IO_Group
+struct Iec104C_BO_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_BO_NA_1_IO_Subgroup subgroup;
// Single command with time tag CP56Time2a
// IEC-60870-5-104
-struct Iec104C_SC_TA_1_IO_Subgroup
+struct Iec104C_SC_TA_1_IO_Subgroup
{
Iec104ScoType sco;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104C_SC_TA_1_IO_Group
+struct Iec104C_SC_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_SC_TA_1_IO_Subgroup subgroup;
// ASDU Type C_DC_TA_1
// Ident 59
-// Double command with time tag CP56Time2a
+// Double command with time tag CP56Time2a
// IEC-60870-5-104
-struct Iec104C_DC_TA_1_IO_Subgroup
+struct Iec104C_DC_TA_1_IO_Subgroup
{
Iec104DcoType dco;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104C_DC_TA_1_IO_Group
+struct Iec104C_DC_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_DC_TA_1_IO_Subgroup subgroup;
// Regulating step command with time tag CP56Time2a
// IEC-60870-5-104
-struct Iec104C_RC_TA_1_IO_Subgroup
+struct Iec104C_RC_TA_1_IO_Subgroup
{
Iec104RcoType rco;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104C_RC_TA_1_IO_Group
+struct Iec104C_RC_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_RC_TA_1_IO_Subgroup subgroup;
// Set-point command with time tag CP56Time2a, normalized value
// IEC-60870-5-104
-struct Iec104C_SE_TA_1_IO_Subgroup
+struct Iec104C_SE_TA_1_IO_Subgroup
{
Iec104NvaType nva;
Iec104QosType qos;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104C_SE_TA_1_IO_Group
+struct Iec104C_SE_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_SE_TA_1_IO_Subgroup subgroup;
// Set-point command with time tag CP56Time2a, scaled value
// IEC-60870-5-104
-struct Iec104C_SE_TB_1_IO_Subgroup
+struct Iec104C_SE_TB_1_IO_Subgroup
{
Iec104SvaType sva;
Iec104QosType qos;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104C_SE_TB_1_IO_Group
+struct Iec104C_SE_TB_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_SE_TB_1_IO_Subgroup subgroup;
// Set-point command with time tag CP56Time2a, short floating point number
// IEC-60870-5-104
-struct Iec104C_SE_TC_1_IO_Subgroup
+struct Iec104C_SE_TC_1_IO_Subgroup
{
Iec104IeeeStd754Type ieeeStd754;
Iec104QosType qos;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104C_SE_TC_1_IO_Group
+struct Iec104C_SE_TC_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_SE_TC_1_IO_Subgroup subgroup;
// Bitstring of 32 bit with time tag CP56Time2a
// IEC-60870-5-104
-struct Iec104C_BO_TA_1_IO_Subgroup
+struct Iec104C_BO_TA_1_IO_Subgroup
{
Iec104BsiType bsi;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104C_BO_TA_1_IO_Group
+struct Iec104C_BO_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_BO_TA_1_IO_Subgroup subgroup;
// Ident 70
// End of initialization
-struct Iec104M_EI_NA_1_IO_Subgroup
+struct Iec104M_EI_NA_1_IO_Subgroup
{
Iec104CoiType coi;
}__attribute__((packed));
-struct Iec104M_EI_NA_1_IO_Group
+struct Iec104M_EI_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104M_EI_NA_1_IO_Subgroup subgroup;
// Ident 100
// Interrogation command
-struct Iec104C_IC_NA_1_IO_Subgroup
+struct Iec104C_IC_NA_1_IO_Subgroup
{
Iec104QoiType qoi;
}__attribute__((packed));
-struct Iec104C_IC_NA_1_IO_Group
+struct Iec104C_IC_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_IC_NA_1_IO_Subgroup subgroup;
// Ident 101
// Counter interrogation command
-struct Iec104C_CI_NA_1_IO_Subgroup
+struct Iec104C_CI_NA_1_IO_Subgroup
{
Iec104QccType qcc;
}__attribute__((packed));
-struct Iec104C_CI_NA_1_IO_Group
+struct Iec104C_CI_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_CI_NA_1_IO_Subgroup subgroup;
// Ident 102
// Read command
-struct Iec104C_RD_NA_1_IO_Subgroup
+struct Iec104C_RD_NA_1_IO_Subgroup
{
// No subgroup for this type
}__attribute__((packed));
-struct Iec104C_RD_NA_1_IO_Group
+struct Iec104C_RD_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_RD_NA_1_IO_Subgroup subgroup;
// Ident 103
// Clock synchronization command
-struct Iec104C_CS_NA_1_IO_Subgroup
+struct Iec104C_CS_NA_1_IO_Subgroup
{
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104C_CS_NA_1_IO_Group
+struct Iec104C_CS_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_CS_NA_1_IO_Subgroup subgroup;
// Ident 104
// Test command
-struct Iec104C_TS_NA_1_IO_Subgroup
+struct Iec104C_TS_NA_1_IO_Subgroup
{
Iec104FbpType fbp;
}__attribute__((packed));
-struct Iec104C_TS_NA_1_IO_Group
+struct Iec104C_TS_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_TS_NA_1_IO_Subgroup subgroup;
// Ident 105
// Reset process command
-struct Iec104C_RP_NA_1_IO_Subgroup
+struct Iec104C_RP_NA_1_IO_Subgroup
{
Iec104QrpType qrp;
}__attribute__((packed));
-struct Iec104C_RP_NA_1_IO_Group
+struct Iec104C_RP_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_RP_NA_1_IO_Subgroup subgroup;
// Ident 106
// Delay acquisition command
-struct Iec104C_CD_NA_1_IO_Subgroup
+struct Iec104C_CD_NA_1_IO_Subgroup
{
Iec104Cp16Time2aType msUpToSeconds;
}__attribute__((packed));
-struct Iec104C_CD_NA_1_IO_Group
+struct Iec104C_CD_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_CD_NA_1_IO_Subgroup subgroup;
// Test command with time tag CP56Time2a
// IEC-60870-5-104
-struct Iec104C_TS_TA_1_IO_Subgroup
+struct Iec104C_TS_TA_1_IO_Subgroup
{
Iec104TscType tsc;
Iec104Cp56Time2aType sevenOctetBinaryTime;
}__attribute__((packed));
-struct Iec104C_TS_TA_1_IO_Group
+struct Iec104C_TS_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104C_TS_TA_1_IO_Subgroup subgroup;
// Ident 110
// Parameter of measured values, normalized value
-struct Iec104P_ME_NA_1_IO_Subgroup
+struct Iec104P_ME_NA_1_IO_Subgroup
{
Iec104NvaType nva;
Iec104QpmType qpm;
}__attribute__((packed));
-struct Iec104P_ME_NA_1_IO_Group
+struct Iec104P_ME_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104P_ME_NA_1_IO_Subgroup subgroup;
// Ident 111
// Parameter of measured values, scaled value
-struct Iec104P_ME_NB_1_IO_Subgroup
+struct Iec104P_ME_NB_1_IO_Subgroup
{
Iec104SvaType sva;
Iec104QpmType qpm;
}__attribute__((packed));
-struct Iec104P_ME_NB_1_IO_Group
+struct Iec104P_ME_NB_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104P_ME_NB_1_IO_Subgroup subgroup;
// Ident 112
// Parameter of measured values, short floating point number
-struct Iec104P_ME_NC_1_IO_Subgroup
+struct Iec104P_ME_NC_1_IO_Subgroup
{
Iec104IeeeStd754Type ieeeStd754;
Iec104QpmType qpm;
}__attribute__((packed));
-struct Iec104P_ME_NC_1_IO_Group
+struct Iec104P_ME_NC_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104P_ME_NC_1_IO_Subgroup subgroup;
// Ident 113
// Parameter activation
-struct Iec104P_AC_NA_1_IO_Subgroup
+struct Iec104P_AC_NA_1_IO_Subgroup
{
Iec104QpaType qpa;
}__attribute__((packed));
-struct Iec104P_AC_NA_1_IO_Group
+struct Iec104P_AC_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104P_AC_NA_1_IO_Subgroup subgroup;
// Ident 120
// File ready
-struct Iec104F_FR_NA_1_IO_Subgroup
+struct Iec104F_FR_NA_1_IO_Subgroup
{
Iec104NofType nameOfFile;
Iec104LofType lengthOfFile;
Iec104FrqType frq;
}__attribute__((packed));
-struct Iec104F_FR_NA_1_IO_Group
+struct Iec104F_FR_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104F_FR_NA_1_IO_Subgroup subgroup;
// Ident 121
// Section ready
-struct Iec104F_SR_NA_1_IO_Subgroup
+struct Iec104F_SR_NA_1_IO_Subgroup
{
Iec104NofType nameOfFile;
Iec104NosType nameOfSection;
Iec104SrqType srq;
}__attribute__((packed));
-struct Iec104F_SR_NA_1_IO_Group
+struct Iec104F_SR_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104F_SR_NA_1_IO_Subgroup subgroup;
// Ident 122
// Call directory, select file, call file, call section
-struct Iec104F_SC_NA_1_IO_Subgroup
+struct Iec104F_SC_NA_1_IO_Subgroup
{
Iec104NofType nameOfFile;
Iec104NosType nameOfSection;
Iec104ScqType scq;
}__attribute__((packed));
-struct Iec104F_SC_NA_1_IO_Group
+struct Iec104F_SC_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104F_SC_NA_1_IO_Subgroup subgroup;
// Ident 123
// Last section, last segment
-struct Iec104F_LS_NA_1_IO_Subgroup
+struct Iec104F_LS_NA_1_IO_Subgroup
{
Iec104NofType nameOfFile;
Iec104NosType nameOfSection;
Iec104ChsType chs;
}__attribute__((packed));
-struct Iec104F_LS_NA_1_IO_Group
+struct Iec104F_LS_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104F_LS_NA_1_IO_Subgroup subgroup;
// Ident 124
// ACK file, ACK section
-struct Iec104F_AF_NA_1_IO_Subgroup
+struct Iec104F_AF_NA_1_IO_Subgroup
{
Iec104NofType nameOfFile;
Iec104NosType nameOfSection;
Iec104AfqType afq;
}__attribute__((packed));
-struct Iec104F_AF_NA_1_IO_Group
+struct Iec104F_AF_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104F_AF_NA_1_IO_Subgroup subgroup;
// Ident 125
// Single information object
-struct Iec104F_SG_NA_1_IO_Subgroup
+struct Iec104F_SG_NA_1_IO_Subgroup
{
Iec104NofType nameOfFile;
Iec104NosType nameOfSection;
Iec104SegmentType segment;
}__attribute__((packed));
-struct Iec104F_SG_NA_1_IO_Group
+struct Iec104F_SG_NA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104F_SG_NA_1_IO_Subgroup subgroup;
// Ident 126
// Sequence of information elements in a single information object
-struct Iec104F_DR_TA_1_IO_Subgroup
+struct Iec104F_DR_TA_1_IO_Subgroup
{
Iec104NofType nameOfFileOrSubdirectory;
Iec104LofType lengthOfFile;
Iec104Cp56Time2aType creationTimeOfFile;
}__attribute__((packed));
-struct Iec104F_DR_TA_1_IO_Group
+struct Iec104F_DR_TA_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104F_DR_TA_1_IO_Subgroup subgroup;
// Ident 127
// QueryLog – Request archive file
-struct Iec104F_SC_NB_1_IO_Subgroup
+struct Iec104F_SC_NB_1_IO_Subgroup
{
Iec104NofType nameOfFile;
Iec104Cp56Time2aType startTime;
Iec104Cp56Time2aType stopTime;
}__attribute__((packed));
-struct Iec104F_SC_NB_1_IO_Group
+struct Iec104F_SC_NB_1_IO_Group
{
Iec104InformationObjectAddressThreeOctetType ioa;
Iec104F_SC_NB_1_IO_Subgroup subgroup;
// Generic ASDU
//
-struct Iec104GenericAsdu
+struct Iec104GenericAsdu
{
uint8_t typeId;
Iec104VariableStructureQualifierType variableStructureQualifier;
Iec104CauseOfTransmissionType causeOfTransmission;
- Iec104CommonAddressOfAsduType commonAddressOfAsdu;
- union
+ Iec104CommonAddressOfAsduType commonAddressOfAsdu;
+ union
{
Iec104M_SP_NA_1_IO_Group m_sp_na_1;
Iec104M_SP_TA_1_IO_Group m_sp_ta_1;
}__attribute__((packed));
// APCI Type U
-struct Iec104ApciU
+struct Iec104ApciU
{
Iec104Header header;
uint8_t apciTypeMajor : 1;
}__attribute__((packed));
// APCI Type S
-struct Iec104ApciS
+struct Iec104ApciS
{
Iec104Header header;
uint16_t apciTypeMajor : 1;
}__attribute__((packed));
// APCI Type I
-struct Iec104ApciI
+struct Iec104ApciI
{
Iec104Header header;
uint16_t apciTypeMajor : 1;
}__attribute__((packed));
// structs used to determine if there is an issue with the passed ASDU
-struct Iec104AsduCheckCauseOfTx
+struct Iec104AsduCheckCauseOfTx
{
uint64_t percyc : 1;
uint64_t back : 1;
uint64_t unk_info_addr : 1;
};
-struct Iec104AsduCheck
+struct Iec104AsduCheck
{
const Iec104ApciI* apci;
bool sq0Allowed;