Skip to content

Commit 8b0c55f

Browse files
committed
Add GOOSE ASN.1 C sources
1 parent 7a89d44 commit 8b0c55f

73 files changed

Lines changed: 7375 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
-- IEC61850-8-1 Annex A
2+
-- Application protocol specification for GOOSE and GSE management
3+
IEC61850 DEFINITIONS ::=
4+
BEGIN
5+
6+
-- INLINED
7+
-- IMPORTS
8+
-- Data
9+
-- FROM ISO-IEC-9506-2
10+
-- { iso standard 9506 part(2) mms-abstract-syntax-version1(1) };
11+
-- ISO-9506-2
12+
-- DEFINITIONS ::=
13+
-- BEGIN
14+
Data ::= CHOICE {
15+
array [1] IMPLICIT SEQUENCE OF Data,
16+
structure [2] IMPLICIT SEQUENCE OF Data,
17+
boolean [3] IMPLICIT BOOLEAN,
18+
bit-string [4] IMPLICIT BIT STRING,
19+
integer [5] IMPLICIT INTEGER,
20+
unsigned [6] IMPLICIT INTEGER,
21+
floating-point [7] IMPLICIT FloatingPoint,
22+
octet-string [9] IMPLICIT OCTET STRING,
23+
visible-string [10] IMPLICIT VisibleString,
24+
generalized-time [11] IMPLICIT GeneralizedTime,
25+
binary-time [12] IMPLICIT TimeOfDay,
26+
bcd [13] IMPLICIT INTEGER,
27+
booleanArray [14] IMPLICIT BIT STRING,
28+
objId [15] IMPLICIT OBJECT IDENTIFIER,
29+
mMSString [16] IMPLICIT MMSString,
30+
utc-time [17] UtcTime
31+
}
32+
33+
MMSString ::= UTF8String
34+
FloatingPoint ::= OCTET STRING
35+
TimeOfDay ::= OCTET STRING
36+
-- END
37+
38+
IEC61850-Specific-Protocol ::= CHOICE {
39+
gseMngtPdu [APPLICATION 0] IMPLICIT GSEMngtPdu,
40+
goosePdu [APPLICATION 1] IMPLICIT IECGoosePdu
41+
}
42+
43+
GSEMngtPdu ::= SEQUENCE {
44+
stateID [0] IMPLICIT INTEGER,
45+
-- security [3] ANY OPTIONAL,
46+
requestResp GSERequestResponse
47+
}
48+
49+
GSERequestResponse ::= CHOICE {
50+
requests [1] GSEMngtRequests,
51+
responses [2] GSEMngtResponses
52+
}
53+
54+
GSEMngtRequests ::= CHOICE {
55+
getGoReference [1] IMPLICIT GetReferenceRequestPdu,
56+
getGOOSEElementNumber [2] IMPLICIT GetElementRequestPdu,
57+
getGsReference [3] IMPLICIT GetReferenceRequestPdu,
58+
getGSSEDataOffset [4] IMPLICIT GetElementRequestPdu
59+
}
60+
61+
GSEMngtResponses ::= CHOICE {
62+
gseMngtNotSupported [0] IMPLICIT NULL,
63+
getGoReference [1] IMPLICIT GSEMngtResponsePdu,
64+
getGOOSEElementNumber [2] IMPLICIT GSEMngtResponsePdu,
65+
getGsReference [3] IMPLICIT GSEMngtResponsePdu,
66+
getGSSEDataOffset [4] IMPLICIT GSEMngtResponsePdu
67+
}
68+
69+
GetReferenceRequestPdu ::= SEQUENCE {
70+
ident [0] IMPLICIT VisibleString,
71+
offset [1] IMPLICIT SEQUENCE OF INTEGER
72+
}
73+
74+
GetElementRequestPdu ::= SEQUENCE {
75+
ident [0] IMPLICIT VisibleString,
76+
references [1] IMPLICIT SEQUENCE OF VisibleString
77+
}
78+
79+
GSEMngtResponsePdu ::= SEQUENCE {
80+
ident [0] IMPLICIT VisibleString,
81+
confRev [1] IMPLICIT INTEGER OPTIONAL,
82+
positiveNegative CHOICE { -- missing identifier, added 'positiveNegative'
83+
responsePositive [2] IMPLICIT SEQUENCE {
84+
datSet [0] IMPLICIT VisibleString OPTIONAL,
85+
result [1] IMPLICIT SEQUENCE OF RequestResults
86+
},
87+
responseNegative [3] IMPLICIT GlbErrors
88+
}
89+
}
90+
91+
RequestResults ::= CHOICE {
92+
offset [0] IMPLICIT INTEGER,
93+
reference [1] IMPLICIT IA5String,
94+
error [2] IMPLICIT ErrorReason
95+
}
96+
97+
GlbErrors ::= INTEGER {
98+
other(0),
99+
unknownControlBlock(1),
100+
responseTooLarge(2),
101+
controlBlockConfigurationError(3)
102+
}
103+
104+
ErrorReason ::= INTEGER {
105+
other(0),
106+
notFound(1)
107+
}
108+
109+
IECGoosePdu ::= SEQUENCE {
110+
gocbRef [0] IMPLICIT VisibleString,
111+
timeAllowedtoLive [1] IMPLICIT INTEGER,
112+
datSet [2] IMPLICIT VisibleString,
113+
goID [3] IMPLICIT VisibleString OPTIONAL,
114+
time [4] IMPLICIT OCTET STRING, -- renamed from T
115+
stNum [5] IMPLICIT INTEGER,
116+
sqNum [6] IMPLICIT INTEGER,
117+
simulation [7] IMPLICIT BOOLEAN DEFAULT FALSE,
118+
confRev [8] IMPLICIT INTEGER,
119+
ndsCom [9] IMPLICIT BOOLEAN DEFAULT FALSE,
120+
numDatSetEntries [10] IMPLICIT INTEGER,
121+
allData [11] IMPLICIT SEQUENCE OF Data
122+
}
123+
124+
UtcTime ::= OCTET STRING
125+
126+
END

0 commit comments

Comments
 (0)