DataView.asn 6.14 KB
Newer Older
TASTE User's avatar
TASTE User committed
1
2
PUS-Implicit-Knowledge DEFINITIONS ::=
BEGIN
TASTE User's avatar
TASTE User committed
3
TC-type {APID, APUserID, TCs} ::= SEQUENCE {
TASTE User's avatar
TASTE User committed
4
5
6
    dest-apid           APID,
    sequence-count      INTEGER(0..16383),
    packet-length       INTEGER(0..65535),
TASTE User's avatar
TASTE User committed
7
8
9
    secondary-header    TC-Secondary-Header {APUserID},
    application-data    TCs,
    packet-error        INTEGER(0..65535)
10
}
TASTE User's avatar
TASTE User committed
11

TASTE User's avatar
TASTE User committed
12
TM-type {APID, APUserID, TMs} ::= SEQUENCE {
TASTE User's avatar
TASTE User committed
13
14
    source-apid         APID,
    sequence-count      INTEGER(0..16383),
TASTE User's avatar
TASTE User committed
15
    packet-length       INTEGER(0..65535),
TASTE User's avatar
TASTE User committed
16
17
18
    secondary-header    TM-Secondary-Header{APUserID},
    source-data         TMs,
    packet-error        INTEGER(0..65535)
TASTE User's avatar
TASTE User committed
19
20
}

TASTE User's avatar
TASTE User committed
21
TC-Secondary-Header {APUserID} ::= SEQUENCE {   
TASTE User's avatar
TASTE User committed
22
23
24
25
    ack-successful-completion BOOLEAN,
    ack-successful-progress   BOOLEAN,
    ack-successful-start      BOOLEAN,
    ack-successful-acceptance BOOLEAN,
TASTE User's avatar
TASTE User committed
26
    source-id                 APUserID
TASTE User's avatar
TASTE User committed
27
28
}

TASTE User's avatar
TASTE User committed
29
30
31
32
33
34
TM-Secondary-Header {APUserID}  ::= SEQUENCE { 
    time-reference-status	INTEGER(0..15),
    message-type-counter    INTEGER(0..65535),
    destination-id          APUserID
}

TASTE User's avatar
TASTE User committed
35
36
END

TASTE User's avatar
TASTE User committed
37
38
39
40
41
42
-- Generic definition for TC 2-1 - Distribute on/off device commands from PUS-C
Distribute-On-Off-Device-Commands-Generic DEFINITIONS ::=
BEGIN
On-Off-Device-Command{ On-off-dev-addr, INTEGER: addrsNo} ::= SEQUENCE (SIZE(1..addrsNo)) OF On-off-dev-addr 

END
TASTE User's avatar
TASTE User committed
43

TASTE User's avatar
TASTE User committed
44
45
46
47
48
49
-- Generic definition for TC 2-4 - Distribute CPDU Commands from PUS-C
Distribute-CPDU-Commands-Generic DEFINITIONS ::=
BEGIN

Pulse-Instruction {CPDU-OUTPUT-IDENTIFIER} ::= SEQUENCE {
    output-line-id CPDU-OUTPUT-IDENTIFIER,
TASTE User's avatar
TASTE User committed
50
51
52
53
54
55
56
57
58
59
60
    duration-exp-value INTEGER (0..7) 
}

CPDU-Command {CPDU-Identifier, Pulse-Instruction, INTEGER: max-Instr-No} ::= SEQUENCE {
        cpdu-id          CPDU-Identifier OPTIONAL,
        cmd-pulse-instr  SEQUENCE (SIZE (1..max-Instr-No)) OF Pulse-Instruction
}

-- TC[2,4] application data
Distribute-CPDU-Commands { CPDU-Cmd, INTEGER:max-Cpdu-Cmds } ::= SEQUENCE (SIZE (1..max-Cpdu-Cmds)) OF CPDU-Cmd 

TASTE User's avatar
TASTE User committed
61
62
END

TASTE User's avatar
TASTE User committed
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
-- Generic definition for Request verification service TM 
Request-Verification-Reports DEFINITIONS ::=
BEGIN

Request-ID {APID}::= SEQUENCE {
    source-apid                APID,
    sequence-count      INTEGER(0..16383)   
}

Failure-Notice{Failure-Code, Failure-Data} ::= SEQUENCE {
    code    Failure-Code,
    data    Failure-Data
}

TM-1-type1 {Request-ID, Failure-Notice} ::= SEQUENCE {
        req-ID          Request-ID,
        fail-Notice     Failure-Notice     
}
END

TASTE User's avatar
TASTE User committed
83
84
Taps DEFINITIONS ::=
BEGIN
TASTE User's avatar
TASTE User committed
85
86
IMPORTS Pulse-Instruction, 
        CPDU-Command,
TASTE User's avatar
TASTE User committed
87
        Distribute-CPDU-Commands        
TASTE User's avatar
TASTE User committed
88
FROM Distribute-CPDU-Commands-Generic
TASTE User's avatar
TASTE User committed
89
90
        On-Off-Device-Command
FROM Distribute-On-Off-Device-Commands-Generic        
TASTE User's avatar
TASTE User committed
91
92
93
94
        Request-ID,
        Failure-Notice,
        TM-1-type1
FROM Request-Verification-Reports
TASTE User's avatar
TASTE User committed
95
96
        TC-type, 
        TM-type
TASTE User's avatar
TASTE User committed
97
98
FROM PUS-Implicit-Knowledge;

TASTE User's avatar
TASTE User committed
99
100
101
-- for acn TC packet secondary header type & subtype
TYPE8b-ID ::= INTEGER (0..255)

102
APID ::= ENUMERATED {   --let ACN manage the "11 bits" constraint
TASTE User's avatar
TASTE User committed
103
    ground(1),
TASTE User's avatar
TASTE User committed
104
105
106
107
    sc-routing(2),
    sc-sensorA(3),
    sc-sensorB(4),
    sc-cpdu(5)
TASTE User's avatar
TASTE User committed
108
}
TASTE User's avatar
TASTE User committed
109
110
111
112
113
114
115
116

APUserID ::= ENUMERATED {   --let ACN manage the "16 bits" constraint
    ground-User(1),
    sc-routingUser(2),
    sc-sensorA-User(3),
    sc-sensorB-User(4),
    sc-cpdu-User(5)
}
TASTE User's avatar
TASTE User committed
117

TASTE User's avatar
TASTE User committed
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
-- On-off device addresses , ACN manage the "32 bits" constraint
On-off-dev-addr ::= ENUMERATED {
  onAddr(61136),
  offAddr(61140),
  coldResetAddr(61144),
  warmResetAddr(61148)
}

-- Maximum number of On/Off device addresses commands (!bounds constraints not found in PUS-C)
addrsNo INTEGER (1..128) ::= 4

-- Instantiate the TC-2-1
TC-2-1 ::= On-Off-Device-Command{On-off-dev-addr, addrsNo}

---------------------
TASTE User's avatar
TASTE User committed
133
134
135
-- CPDU output Identifier defined in 9.2.1d
CPDU-output-line-ID ::= INTEGER { cpdu-line1(1), cpdu-line2(2)} (0..4095)

TASTE User's avatar
TASTE User committed
136
CPDU-Ids ::= ENUMERATED { cpdu-id-1, cpdu-id-2 }
TASTE User's avatar
TASTE User committed
137
138
139
140
141

Pulse-Instr-Instance ::= Pulse-Instruction { CPDU-output-line-ID }

-- Maximum number of command pulse instructions (project specific) (PUS-C, clause 9.2.1.g)
max-Instr-No INTEGER (12 .. 504) ::= 12
TASTE User's avatar
TASTE User committed
142
143
144
145
146
147
148
149
150
151
152
-- Maximum number of CPDU commands (!bounds constraints not found in PUS-C)
max-CPDU-Cmds INTEGER (1..128) ::= 2

CPDU-Cmd ::= CPDU-Command {CPDU-Ids, Pulse-Instr-Instance, max-Instr-No} 
                 (WITH COMPONENTS {..., cpdu-id PRESENT})

-- Instantiate the TC-2-4
TC-2-4 ::= Distribute-CPDU-Commands {CPDU-Cmd, max-CPDU-Cmds}

-- Instantiate the project list of TC
TCs ::= CHOICE { 
TASTE User's avatar
TASTE User committed
153
    tc2-1 TC-2-1,
TASTE User's avatar
TASTE User committed
154
155
156
157
158
    tc2-4 TC-2-4
}

-- Instantiate the generic TC-type
Telecommand ::= TC-type{APID, APUserID, TCs}
TASTE User's avatar
TASTE User committed
159

TASTE User's avatar
TASTE User committed
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
-- Instantiate the request ID
Request-ID-inst ::= Request-ID {APID}

-- TM-1-10-failure-codes , ACN manage the "8 bits" constraint
TM-1-10-failure-codes ::= ENUMERATED {
  reqIntegrityFailure(0),
  noDestinationFound(1),
  destinationNotReady(2)
}
-- TM-1-10 failure notice data, 8 bits
TM-1-10-failure-data ::= SEQUENCE {
    tm-1-10-failure-data-inst    INTEGER (0..255)
}

Failure-Notice-tm-1-10 ::= Failure-Notice {TM-1-10-failure-codes, TM-1-10-failure-data}

TM-1-10 ::= TM-1-type1 {Request-ID-inst, Failure-Notice-tm-1-10}

-- Instantiate the project list of TM
TMs ::= CHOICE { 
    tm1-10 TM-1-10
}
182
-- Instantiate the Telemetry type
TASTE User's avatar
TASTE User committed
183
TM ::= TM-type{APID, APUserID, TMs}
184
185
186
187
188
189

END    

TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
TASTE User's avatar
TASTE User committed
190
191
192
193

Secondary-Header {APID} ::= SEQUENCE {
    source-id   APID
}
TASTE User's avatar
TASTE User committed
194
195
196
197
198
199
200
201
-- testing data  
Test-TC     ::= SEQUENCE {
  identifierRequest T-UInt32,
  cpduID            T-UInt8,
  crc               BOOLEAN
}

Test-TM     ::= SEQUENCE{
TASTE User's avatar
u1    
TASTE User committed
202
203
  failureCodes      Test-failureCodes,
  sourceID          T-UInt32
TASTE User's avatar
TASTE User committed
204
205
206
}
Test-failureCodes ::= ENUMERATED {crcFailure, destinationNotFound, destinationNotReady}

207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
-- A few simple types to start with ASN.1
MyInteger   ::= T-UInt8

MyReal      ::= REAL (0.0 .. 1000.0)

MyBool      ::= BOOLEAN

MyEnum      ::= ENUMERATED { hello, world, howareyou }

MySeq       ::= SEQUENCE {
    input-data  MyInteger,
    output-data MyInteger,
    validity    ENUMERATED { valid, invalid }
}

MyChoice    ::= CHOICE {
    a BOOLEAN,
    b MySeq
}

MySeqOf     ::= SEQUENCE (SIZE (2)) OF MyEnum

MyOctStr    ::= OCTET STRING (SIZE (3))

-- You can also declare constants
myVar       MySeqOf     ::= { hello, world }

END