| 1 |
|
| 2 |
-- OK: Everything is fine |
| 3 |
|
| 4 |
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1) |
| 5 |
-- .spelio.software.asn1c.test (9363.1.5.1) |
| 6 |
-- .99 |
| 7 |
|
| 8 |
ModuleClassSample |
| 9 |
{ iso org(3) dod(6) internet (1) private(4) enterprise(1) |
| 10 |
spelio(9363) software(1) asn1c(5) test(1) 99 } |
| 11 |
DEFINITIONS ::= |
| 12 |
BEGIN |
| 13 |
|
| 14 |
SAMPLE-CLASS ::= CLASS { |
| 15 |
&id RELATIVE-OID UNIQUE, |
| 16 |
&code ENUMERATED { request, response, status } |
| 17 |
DEFAULT request, |
| 18 |
&Type OPTIONAL |
| 19 |
} WITH SYNTAX { [TYPE &Type] [WITH CODE &code] IDENTIFIED BY &id } |
| 20 |
|
| 21 |
SampleClassObjectSet SAMPLE-CLASS ::= { |
| 22 |
request-Whatever | respond-Stuff | request-Status | request-Salt |
| 23 |
} |
| 24 |
|
| 25 |
request-Whatever SAMPLE-CLASS |
| 26 |
::= { IDENTIFIED BY request-whatever } |
| 27 |
|
| 28 |
respond-Stuff SAMPLE-CLASS |
| 29 |
::= { WITH CODE 1 IDENTIFIED BY response-stuff } |
| 30 |
|
| 31 |
request-Status SAMPLE-CLASS |
| 32 |
::= { TYPE SampleType WITH CODE 2 IDENTIFIED BY request-id } |
| 33 |
|
| 34 |
request-Salt SAMPLE-CLASS |
| 35 |
::= { TYPE Salt IDENTIFIED BY request-salt } |
| 36 |
|
| 37 |
request-id RELATIVE-OID ::= { 1 1 1 } |
| 38 |
request-salt RELATIVE-OID ::= { 1 1 1 } |
| 39 |
request-whatever RELATIVE-OID ::= { 1 1 5 } |
| 40 |
response-stuff RELATIVE-OID ::= { 2 0 1 } |
| 41 |
|
| 42 |
SampleType ::= SEQUENCE { ... } |
| 43 |
Salt ::= SET { ... } |
| 44 |
|
| 45 |
END |