aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_SUITE_data/Remote-Operations-Generic-ROS-PDUs.asn1
blob: 7dcf4fda0eeb19b2aec9f4a6d362a319a26b5bad (plain) (blame)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
Remote-Operations-Generic-ROS-PDUs {joint-iso-itu-t remote-operations(4) generic-ROS-PDUs(6) version1(0)}
DEFINITIONS IMPLICIT TAGS ::=
BEGIN

-- exports everything

IMPORTS OPERATION, ERROR
FROM Remote-Operations-Information-Objects {joint-iso-itu-t remote-operations(4) informationObjects(5) version1(0)};


ROS {InvokeId:InvokeIdSet,OPERATION:Invokable,OPERATION:Returnable} ::= CHOICE
 {
   invoke [1] Invoke {{InvokeIdSet}, {Invokable}},
   returnResult [2] ReturnResult {{Returnable}},
   returnError [3] ReturnError {{Errors{{Returnable}}}},
   reject [4] Reject
 }
(CONSTRAINED BY {-- must conform to the above definition --}
 ! RejectProblem : general-unrecognizedPDU)

Invoke {InvokeId:InvokeIdSet, OPERATION:Operations} ::= SEQUENCE
{
  invokeId InvokeId (InvokeIdSet)
  (CONSTRAINED BY {-- must be unambiguous --}
   ! RejectProblem : invoke-duplicateInvocation),
  linkedId CHOICE {
    present [0] IMPLICIT present < InvokeId,
    absent [1] IMPLICIT NULL
  }
    (CONSTRAINED BY {-- must identify an outstanding operation --}
    ! RejectProblem : invoke-unrecognizedLinkedId)
    (CONSTRAINED BY {-- which has one or more linked operations--}
    ! RejectProblem : invoke-linkedResponseUnexpected)
    OPTIONAL,
    opcode OPERATION.&operationCode
    ({Operations}
    ! RejectProblem : invoke-unrecognizedOperation),
    argument OPERATION.&ArgumentType
    ({Operations} {@opcode}
    ! RejectProblem : invoke-mistypedArgument)
    OPTIONAL
    }
(CONSTRAINED BY {-- must conform to the above definition --}
 ! RejectProblem : general-mistypedPDU)
(
WITH COMPONENTS
{...,
    linkedId ABSENT
    }
| WITH COMPONENTS
{...,
    linkedId PRESENT,
    opcode
    (CONSTRAINED BY {-- must be in the &Linked field of the associated operation --
	}
    ! RejectProblem : invoke-unexpectedLinkedOperation)
    }
)

ReturnResult {OPERATION:Operations}::= SEQUENCE
{
    invokeId InvokeId
    (CONSTRAINED BY {-- must be that for an outstanding operation --}
     ! RejectProblem:returnResult-unrecognizedInvocation)
  (CONSTRAINED BY {-- which returns a result --}
   ! RejectProblem:returnResult-resultResponseUnexpected),
  result SEQUENCE
   {
     opcode OPERATION.&operationCode
     ({Operations})(CONSTRAINED BY {-- identified by invokeId --}
		    ! RejectProblem:returnResult-unrecognizedInvocation),
     result OPERATION.&ResultType     ({Operations} {@.opcode}
	! RejectProblem:returnResult-mistypedResult)
	}
    OPTIONAL
    }
(CONSTRAINED BY {-- must conform to the above definition --
    }
! RejectProblem:general-mistypedPDU)

ReturnError {ERROR:Errors} ::= SEQUENCE
{
    invokeId InvokeId
    (CONSTRAINED BY {-- must be that for an outstanding operation --
	}
    ! RejectProblem : returnError-unrecognizedInvocation)
    (CONSTRAINED BY {-- which returns an error --
	}
    ! RejectProblem : returnError-errorResponseUnexpected),
    errcode ERROR.&errorCode
    ({Errors}
    ! RejectProblem : returnError-unrecognizedError)
    (CONSTRAINED BY {-- must be in the &Errors field of the associated operation --
	}
    ! RejectProblem : returnError-unexpectedError),
    parameter ERROR.&ParameterType
    ({Errors}{@errcode}
    ! RejectProblem : returnError-mistypedParameter) OPTIONAL
    }
(CONSTRAINED BY {-- must conform to the above definition --
    }
! RejectProblem : general-mistypedPDU)

Reject ::= SEQUENCE
{
    invokeId InvokeId,
    problem CHOICE
    {
	general [0] GeneralProblem,
	invoke [1] InvokeProblem,
	returnResult [2] ReturnResultProblem,
	returnError [3] ReturnErrorProblem
	}
    }
(CONSTRAINED BY {-- must conform to the above definition --
    }
! RejectProblem : general-mistypedPDU)

GeneralProblem ::= INTEGER
{
    unrecognizedPDU (0),
    mistypedPDU (1),
    badlyStructuredPDU (2)
    }

InvokeProblem ::= INTEGER
{
    duplicateInvocation (0),
    unrecognizedOperation (1),
    mistypedArgument (2),
    resourceLimitation (3),
    releaseInProgress (4),
    unrecognizedLinkedId (5),
    linkedResponseUnexpected (6),
    unexpectedLinkedOperation (7)
    }

ReturnResultProblem ::= INTEGER
{
    unrecognizedInvocation (0),
    resultResponseUnexpected (1),
    mistypedResult (2)
    }

ReturnErrorProblem ::= INTEGER
{
    unrecognizedInvocation (0),
    errorResponseUnexpected (1),
    unrecognizedError (2),
    unexpectedError (3),
    mistypedParameter (4)
    }

RejectProblem ::= INTEGER
{
    general-unrecognizedPDU (0),
    general-mistypedPDU (1),
    general-badlyStructuredPDU (2),
    invoke-duplicateInvocation (10),
    invoke-unrecognizedOperation (11),
    invoke-mistypedArgument (12),
    invoke-resourceLimitation (13),
    invoke-releaseInProgress (14),
    invoke-unrecognizedLinkedId (15),
    invoke-linkedResponseUnexpected (16),
    invoke-unexpectedLinkedOperation (17),
    returnResult-unrecognizedInvocation (20),
    returnResult-resultResponseUnexpected (21),
    returnResult-mistypedResult (22),
    returnError-unrecognizedInvocation (30),
    returnError-errorResponseUnexpected (31),
    returnError-unrecognizedError (32),
    returnError-unexpectedError (33),
    returnError-mistypedParameter (34)
    }

InvokeId ::= CHOICE
{
    present INTEGER,
    absent NULL
    }

noInvokeId InvokeId ::= absent:NULL

NoInvokeId InvokeId ::= {noInvokeId}

Errors {OPERATION:Operations} ERROR ::= {Operations.&Errors}

Bind {OPERATION:operation} ::= CHOICE
{
    bind-invoke [16] OPERATION.&ArgumentType({operation}),
    bind-result [17] OPERATION.&ResultType ({operation}),
    bind-error [18] OPERATION.&Errors.&ParameterType ({operation})
    }

Unbind {OPERATION:operation} ::= CHOICE
{
    unbind-invoke [19] OPERATION.&ArgumentType({operation}),
    unbind-result [20] OPERATION.&ResultType ({operation}),
    unbind-error [21] OPERATION.&Errors.&ParameterType ({operation})
    }

END -- end of generic ROS PDU definitions