4 * "TBL" ASN.1 module encode/decode/print/free C src.
6 * This file was generated by snacc on Mon Jun 2 11:23:51 1997
8 * UBC snacc written by Mike Sample
10 * NOTE: This is a machine generated file - editing not recommended
20 BEncTBLRangeContent
PARAMS ((b
, v
),
29 itemLen
= BEncAsnIntContent (b
, (&v
->to
));
30 BEncDefLenTo127 (b
, itemLen
);
32 itemLen
+= BEncTag1 (b
, CNTX
, PRIM
, 1);
36 itemLen
= BEncAsnIntContent (b
, (&v
->from
));
37 BEncDefLenTo127 (b
, itemLen
);
39 itemLen
+= BEncTag1 (b
, CNTX
, PRIM
, 0);
45 } /* BEncTBLRangeContent */
51 BEncTBLNamedNumberContent
PARAMS ((b
, v
),
60 itemLen
= BEncAsnIntContent (b
, (&v
->value
));
61 BEncDefLenTo127 (b
, itemLen
);
63 itemLen
+= BEncTag1 (b
, CNTX
, PRIM
, 1);
67 itemLen
= BEncPrintableStringContent (b
, (&v
->name
));
68 itemLen
+= BEncDefLen (b
, itemLen
);
69 itemLen
+= BEncTag1 (b
, CNTX
, PRIM
, 0);
75 } /* BEncTBLNamedNumberContent */
81 BEncTBLNamedNumberListContent
PARAMS ((b
, v
),
83 TBLNamedNumberList
*v
)
91 FOR_EACH_LIST_ELMT_RVS (component
, v
)
94 itemLen
= BEncTBLNamedNumberContent (b
, component
);
95 itemLen
+= BEncConsLen (b
, itemLen
);
96 itemLen
+= BEncTag1 (b
, UNIV
, CONS
, 16);
102 } /* BEncTBLNamedNumberListContent */
108 BEncTBLTypeRefContent
PARAMS ((b
, v
),
117 itemLen
= BEncAsnBoolContent (b
, (&v
->implicit
));
118 BEncDefLenTo127 (b
, itemLen
);
120 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 1);
124 itemLen
= BEncTBLTypeDefIdContent (b
, (&v
->typeDef
));
125 BEncDefLenTo127 (b
, itemLen
);
127 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 2);
133 } /* BEncTBLTypeRefContent */
139 BEncTBLTagContent
PARAMS ((b
, v
),
148 itemLen
= BEncAsnIntContent (b
, (&v
->code
));
149 BEncDefLenTo127 (b
, itemLen
);
151 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 2);
155 itemLen
= BEncTBLTagClassContent (b
, (&v
->tclass
));
156 BEncDefLenTo127 (b
, itemLen
);
158 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 10);
164 } /* BEncTBLTagContent */
170 BEncTBLTypeSeqOfContent
PARAMS ((b
, v
),
180 FOR_EACH_LIST_ELMT_RVS (component
, v
)
183 itemLen
= BEncTBLTagContent (b
, component
);
184 itemLen
+= BEncConsLen (b
, itemLen
);
185 itemLen
+= BEncTag1 (b
, UNIV
, CONS
, 16);
191 } /* BEncTBLTypeSeqOfContent */
197 BEncTBLTypeContentSeqOfContent
PARAMS ((b
, v
),
199 TBLTypeContentSeqOf
*v
)
207 FOR_EACH_LIST_ELMT_RVS (component
, v
)
210 itemLen
= BEncTBLTypeContent (b
, component
);
211 itemLen
+= BEncConsLen (b
, itemLen
);
212 itemLen
+= BEncTag1 (b
, UNIV
, CONS
, 16);
218 } /* BEncTBLTypeContentSeqOfContent */
224 BEncTBLTypeContent
PARAMS ((b
, v
),
233 if (NOT_NULL ((v
->values
)))
236 itemLen
= BEncTBLNamedNumberListContent (b
, (v
->values
));
237 itemLen
+= BEncConsLen (b
, itemLen
);
238 itemLen
+= BEncTag1 (b
, CNTX
, CONS
, 6);
243 if (NOT_NULL ((v
->constraint
)))
246 itemLen
= BEncTBLRangeContent (b
, (v
->constraint
));
247 itemLen
+= BEncConsLen (b
, itemLen
);
248 itemLen
+= BEncTag1 (b
, CNTX
, CONS
, 5);
253 if (ASNOCTS_PRESENT ((&v
->fieldName
)))
255 itemLen
= BEncPrintableStringContent (b
, (&v
->fieldName
));
256 itemLen
+= BEncDefLen (b
, itemLen
);
257 itemLen
+= BEncTag1 (b
, CNTX
, PRIM
, 4);
263 itemLen
= BEncTBLTypeContentContent (b
, (v
->content
));
264 itemLen
+= BEncConsLen (b
, itemLen
);
265 itemLen
+= BEncTag1 (b
, CNTX
, CONS
, 3);
269 if (NOT_NULL ((v
->tagList
)))
272 itemLen
= BEncTBLTypeSeqOfContent (b
, (v
->tagList
));
273 itemLen
+= BEncConsLen (b
, itemLen
);
274 itemLen
+= BEncTag1 (b
, CNTX
, CONS
, 2);
279 itemLen
= BEncAsnBoolContent (b
, (&v
->optional
));
280 BEncDefLenTo127 (b
, itemLen
);
282 itemLen
+= BEncTag1 (b
, CNTX
, PRIM
, 1);
286 itemLen
= BEncTBLTypeIdContent (b
, (&v
->typeId
));
287 BEncDefLenTo127 (b
, itemLen
);
289 itemLen
+= BEncTag1 (b
, CNTX
, PRIM
, 0);
295 } /* BEncTBLTypeContent */
301 BEncTBLTypeContentContent
PARAMS ((b
, v
),
312 case TBLTYPECONTENT_PRIMTYPE
:
313 itemLen
= BEncAsnNullContent (b
, (&v
->a
.primType
));
314 BEncDefLenTo127 (b
, itemLen
);
316 itemLen
+= BEncTag1 (b
, CNTX
, PRIM
, 0);
322 case TBLTYPECONTENT_ELMTS
:
324 itemLen
= BEncTBLTypeContentSeqOfContent (b
, (v
->a
.elmts
));
325 itemLen
+= BEncConsLen (b
, itemLen
);
326 itemLen
+= BEncTag1 (b
, CNTX
, CONS
, 1);
332 case TBLTYPECONTENT_TYPEREF
:
334 itemLen
= BEncTBLTypeRefContent (b
, (v
->a
.typeRef
));
335 itemLen
+= BEncConsLen (b
, itemLen
);
336 itemLen
+= BEncTag1 (b
, CNTX
, CONS
, 2);
345 } /* BEncTBLTypeContentContent */
351 BEncTBLTypeDefContent
PARAMS ((b
, v
),
360 if (NOT_NULL ((v
->isPdu
)))
362 itemLen
= BEncAsnNullContent (b
, (v
->isPdu
));
363 BEncDefLenTo127 (b
, itemLen
);
365 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 5);
371 itemLen
= BEncTBLTypeContent (b
, (v
->type
));
372 itemLen
+= BEncConsLen (b
, itemLen
);
373 itemLen
+= BEncTag1 (b
, UNIV
, CONS
, 16);
377 itemLen
= BEncPrintableStringContent (b
, (&v
->typeName
));
378 itemLen
+= BEncDefLen (b
, itemLen
);
379 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 19);
383 itemLen
= BEncTBLTypeDefIdContent (b
, (&v
->typeDefId
));
384 BEncDefLenTo127 (b
, itemLen
);
386 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 2);
392 } /* BEncTBLTypeDefContent */
398 BEncTBLModuleSeqOfContent
PARAMS ((b
, v
),
408 FOR_EACH_LIST_ELMT_RVS (component
, v
)
411 itemLen
= BEncTBLTypeDefContent (b
, component
);
412 itemLen
+= BEncConsLen (b
, itemLen
);
413 itemLen
+= BEncTag1 (b
, UNIV
, CONS
, 16);
419 } /* BEncTBLModuleSeqOfContent */
425 BEncTBLModuleContent
PARAMS ((b
, v
),
435 itemLen
= BEncTBLModuleSeqOfContent (b
, (v
->typeDefs
));
436 itemLen
+= BEncConsLen (b
, itemLen
);
437 itemLen
+= BEncTag1 (b
, CNTX
, CONS
, 3);
441 itemLen
= BEncAsnBoolContent (b
, (&v
->isUseful
));
442 BEncDefLenTo127 (b
, itemLen
);
444 itemLen
+= BEncTag1 (b
, CNTX
, PRIM
, 2);
448 if (ASNOID_PRESENT ((&v
->id
)))
450 itemLen
= BEncAsnOidContent (b
, (&v
->id
));
451 itemLen
+= BEncDefLen (b
, itemLen
);
452 itemLen
+= BEncTag1 (b
, CNTX
, PRIM
, 1);
457 itemLen
= BEncPrintableStringContent (b
, (&v
->name
));
458 itemLen
+= BEncDefLen (b
, itemLen
);
459 itemLen
+= BEncTag1 (b
, CNTX
, PRIM
, 0);
465 } /* BEncTBLModuleContent */
471 BEncTBLSeqOfContent
PARAMS ((b
, v
),
481 FOR_EACH_LIST_ELMT_RVS (component
, v
)
484 itemLen
= BEncTBLModuleContent (b
, component
);
485 itemLen
+= BEncConsLen (b
, itemLen
);
486 itemLen
+= BEncTag1 (b
, UNIV
, CONS
, 16);
492 } /* BEncTBLSeqOfContent */
497 AsnLen BEncTBL
PARAMS ((b
, v
),
503 l
= BEncTBLContent (b
, v
);
504 l
+= BEncConsLen (b
, l
);
505 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
510 BEncTBLContent
PARAMS ((b
, v
),
520 itemLen
= BEncTBLSeqOfContent (b
, (v
->modules
));
521 itemLen
+= BEncConsLen (b
, itemLen
);
522 itemLen
+= BEncTag1 (b
, UNIV
, CONS
, 16);
526 itemLen
= BEncAsnIntContent (b
, (&v
->totalLenStrings
));
527 BEncDefLenTo127 (b
, itemLen
);
529 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 2);
533 itemLen
= BEncAsnIntContent (b
, (&v
->totalNumStrings
));
534 BEncDefLenTo127 (b
, itemLen
);
536 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 2);
540 itemLen
= BEncAsnIntContent (b
, (&v
->totalNumTags
));
541 BEncDefLenTo127 (b
, itemLen
);
543 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 2);
547 itemLen
= BEncAsnIntContent (b
, (&v
->totalNumTypes
));
548 BEncDefLenTo127 (b
, itemLen
);
550 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 2);
554 itemLen
= BEncAsnIntContent (b
, (&v
->totalNumTypeDefs
));
555 BEncDefLenTo127 (b
, itemLen
);
557 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 2);
561 itemLen
= BEncAsnIntContent (b
, (&v
->totalNumModules
));
562 BEncDefLenTo127 (b
, itemLen
);
564 itemLen
+= BEncTag1 (b
, UNIV
, PRIM
, 2);
570 } /* BEncTBLContent */