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