Commit | Line | Data |
---|---|---|
9319b3c3 C |
1 | -- VTPM: decode UDQ PDU |
2 | ||
3 | -- $Header: /f/osi/vt/RCS/rcv_udq.py,v 7.1 91/02/22 09:48:07 mrose Interim $ | |
4 | -- | |
5 | -- | |
6 | -- $Log: rcv_udq.py,v $ | |
7 | -- Revision 7.1 91/02/22 09:48:07 mrose | |
8 | -- Interim 6.8 | |
9 | -- | |
10 | -- Revision 7.0 89/11/23 22:31:39 mrose | |
11 | -- Release 6.0 | |
12 | -- | |
13 | ||
14 | -- | |
15 | -- NOTICE | |
16 | -- | |
17 | -- Acquisition, use, and distribution of this module and related | |
18 | -- materials are subject to the restrictions of a license agreement. | |
19 | -- Consult the Preface in the User's Manual for the full terms of | |
20 | -- this agreement. | |
21 | -- | |
22 | -- | |
23 | ||
24 | ||
25 | UDQPDU DEFINITIONS ::= | |
26 | ||
27 | %{ | |
28 | #include <stdio.h> | |
29 | #include "sector1.h" | |
30 | #undef PEPYPARM | |
31 | #define PEPYPARM int * | |
32 | ||
33 | void adios (); | |
34 | ||
35 | ||
36 | #define bitstr2int(arg,val,cnt) \ | |
37 | { \ | |
38 | char *cp; \ | |
39 | \ | |
40 | cp = bitstr2strb (arg, &cnt); \ | |
41 | val = strb2int (cp, cnt); \ | |
42 | free (cp); \ | |
43 | } | |
44 | ||
45 | %} | |
46 | ||
47 | BEGIN | |
48 | ||
49 | SECTIONS none unbuild none | |
50 | ||
51 | UDQpdu ::= CHOICE | |
52 | ||
53 | { | |
54 | udqpdu [7] IMPLICIT COupdate [[p (PEPYPARM)parm]] | |
55 | } | |
56 | ||
57 | COupdate | |
58 | %{ | |
59 | TEXT_UPDATE *arg = (TEXT_UPDATE *)parm; | |
60 | %} | |
61 | ::= SEQUENCE | |
62 | { | |
63 | coName PrintableString | |
64 | [[s arg->updates.co_list.co_name]], | |
65 | ||
66 | objectUpdate CHOICE { | |
67 | characterUpdate [0] IMPLICIT PrintableString | |
68 | [[s arg->updates.co_list.co_cmd.char_update]] | |
69 | %{arg->updates.co_list.co_type = 0;%}, | |
70 | ||
71 | booleanUpdate [1] IMPLICIT SEQUENCE { | |
72 | values [0] IMPLICIT BITSTRING | |
73 | [[x arg->updates.co_list.co_cmd.bool_update.value $ arg->updates.co_list.co_cmd.bool_update.val_count]], | |
74 | ||
75 | mask [1] IMPLICIT BITSTRING | |
76 | [[x arg->updates.co_list.co_cmd.bool_update.mask $ arg->updates.co_list.co_cmd.bool_update.mask_count]] | |
77 | } | |
78 | %{arg->updates.co_list.co_type = 1;%}, | |
79 | ||
80 | symbolicUpdate [2] IMPLICIT INTEGER | |
81 | [[i arg->updates.co_list.co_cmd.sym_update]] | |
82 | %{arg->updates.co_list.co_type = 2;%}, | |
83 | ||
84 | integerUpdate [3] IMPLICIT INTEGER | |
85 | [[i arg->updates.co_list.co_cmd.int_update]] | |
86 | %{arg->updates.co_list.co_type = 3;%}, | |
87 | ||
88 | bitStringUpdate [4] IMPLICIT BITSTRING | |
89 | %{ bitstr2int ($$, | |
90 | arg->updates.co_list.co_cmd.bit_update.bitstring, | |
91 | arg->updates.co_list.co_cmd.bit_update.bitcount); | |
92 | arg->updates.co_list.co_type = 4;%} | |
93 | } | |
94 | } | |
95 | END |