File: TelEngine__ETSIModem.html

package info (click to toggle)
yate 2.2.0-1~dfsg-1.1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 17,496 kB
  • ctags: 21,687
  • sloc: cpp: 126,248; ansic: 11,462; sh: 3,573; php: 3,229; python: 2,014; makefile: 1,504; perl: 465; awk: 8
file content (237 lines) | stat: -rw-r--r-- 11,834 bytes parent folder | download
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<HTML>
<HEAD>
<TITLE>class ETSIModem</TITLE>

<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
	<TABLE BORDER="0">
		<TR><TD valign="top" align="left" cellspacing="10">
		<h1>class ETSIModem</h1>
		</TD>
		<TD valign="top" align="right" colspan="1">An analog signal processor as defined by ETSI. <small><A HREF="#longdesc">More...</A></small></TD></TR>
	</TABLE>
	<HR>
	<TABLE BORDER="0">
		<TR><TH>Full name</TH><TD><code><A HREF="TelEngine.html">TelEngine</A>::ETSIModem</code></TD></TR>
<TR><TH>Definition</TH><TD><code>#include &lt;<A HREF="libs___ymodem___yatemodem_h.html">libs/ymodem/yatemodem.h</A>&gt;</code></TD></TR>
<TR><TH>Inherits</TH><TD><A HREF="TelEngine__UART.html">TelEngine::UART</A> <small>[public ]</small></TD></TR>
<TR><TH><A HREF="full-list-TelEngine__ETSIModem.html">List of all Methods</A></TH></TR>
	</TABLE>
	</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Types</h4><ul><LI>enum <A HREF="#ref1">State</A> {	StateError,                      
	WaitFSKStart,                    
	WaitMark,                        
	WaitMsg,                         
	WaitMsgLen,                      
	WaitParam,                       
	WaitParamLen,                    
	WaitData,                        
	WaitChksum,                      
    }
</LI>
<LI>enum <A HREF="#ref2">MsgType</A> {	MsgCallSetup = 0x80,             
	MsgMWI       = 0x82,             
	MsgCharge    = 0x86,             
	MsgSMS       = 0x89,             
    }
</LI>
<LI>enum <A HREF="#ref3">MsgParam</A> {	DateTime         = 0x01,         
	CallerId         = 0x02,         
	CalledId         = 0x03,         
	CallerIdReason   = 0x04,         
	CallerName       = 0x07,         
	CallerNameReason = 0x08,         
	VisualIndicator  = 0x0B,         
	MessageId        = 0x0D,         
	LastMsgCLI       = 0x0E,         
	CompDateTime     = 0x0F,         
	CompCallerId     = 0x10,         
	CallType         = 0x11,         
	FirstCalledId    = 0x12,         
	MWICount         = 0x13,         
	FwdCallType      = 0x15,         
	CallerType       = 0x16,         
	RedirNumber      = 0x1A,         
	Charge           = 0x20,         
	AdditionalCharge = 0x21,         
	Duration         = 0x23,         
	NetworkID        = 0x30,         
	CarrierId        = 0x31,         
	SelectFunction   = 0x40,         
	Display          = 0x50,         
	ServiceInfo      = 0x55,         
	Extension        = 0xE0,         
	Unknown
    }
</LI>
</ul><h4>Public Methods</h4><ul><LI>&nbsp;<b><A HREF="#ref4">ETSIModem</A></b> (const NamedList& params, const char* name = 0) 
</LI>
<LI>virtual  &nbsp;<b><A HREF="#ref5">~ETSIModem</A></b> () 
</LI>
<LI>virtual  void &nbsp;<b><A HREF="#ref6">reset</A></b> () 
</LI>
<LI>virtual  bool &nbsp;<b><A HREF="#ref7">recvByte</A></b> (unsigned char data) 
</LI>
</ul><h4>Public Members</h4><ul><LI>static TokenDict <b><A HREF="#ref8">s_msg[]</A></b></LI>
<LI>static TokenDict <b><A HREF="#ref9">s_msgParams[]</A></b></LI>
</ul><h4>Protected Methods</h4><ul><LI>virtual  int &nbsp;<b><A HREF="#ref10">idleRecvByte</A></b> (unsigned char data) 
</LI>
<LI>virtual  bool &nbsp;<b><A HREF="#ref11">recvParams</A></b> (MsgType msg, const NamedList& params) 
</LI>
<LI>virtual  bool &nbsp;<b><A HREF="#ref12">decode</A></b> (MsgType msg, const DataBlock& buffer) 
</LI>
<LI>virtual  bool &nbsp;<b><A HREF="#ref13">createMsg</A></b> (NamedList& params, DataBlock& data) 
</LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
 This class implements a modem/UART pair used to demodulate/decode analog signal as defined
  in ETSI EN 300 659-1, ETSI EN 300 659-2, ETSI EN 300 659-3
</p>
<A NAME="State"></A><A NAME="ref1"></A><table width="100%"><tr bgcolor="#eeeeee"><td>enum <strong>State</strong> {	StateError,                      
	WaitFSKStart,                    
	WaitMark,                        
	WaitMsg,                         
	WaitMsgLen,                      
	WaitParam,                       
	WaitParamLen,                    
	WaitData,                        
	WaitChksum,                      
    }
</td><td align="right"><h3><strong>State</strong></h3></td></tr></table><p></p><p>
 The state of this ETSI decoder
     </p>
<A NAME="MsgType"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td>enum <strong>MsgType</strong> {	MsgCallSetup = 0x80,             
	MsgMWI       = 0x82,             
	MsgCharge    = 0x86,             
	MsgSMS       = 0x89,             
    }
</td><td align="right"><h3><strong>MsgType</strong></h3></td></tr></table><p></p><p>
 Message type defined in ETSI EN 659-3 5.2
     </p>
<A NAME="MsgParam"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td>enum <strong>MsgParam</strong> {	DateTime         = 0x01,         
	CallerId         = 0x02,         
	CalledId         = 0x03,         
	CallerIdReason   = 0x04,         
	CallerName       = 0x07,         
	CallerNameReason = 0x08,         
	VisualIndicator  = 0x0B,         
	MessageId        = 0x0D,         
	LastMsgCLI       = 0x0E,         
	CompDateTime     = 0x0F,         
	CompCallerId     = 0x10,         
	CallType         = 0x11,         
	FirstCalledId    = 0x12,         
	MWICount         = 0x13,         
	FwdCallType      = 0x15,         
	CallerType       = 0x16,         
	RedirNumber      = 0x1A,         
	Charge           = 0x20,         
	AdditionalCharge = 0x21,         
	Duration         = 0x23,         
	NetworkID        = 0x30,         
	CarrierId        = 0x31,         
	SelectFunction   = 0x40,         
	Display          = 0x50,         
	ServiceInfo      = 0x55,         
	Extension        = 0xE0,         
	Unknown
    }
</td><td align="right"><h3><strong>MsgParam</strong></h3></td></tr></table><p></p><p>
 Message parameters defined in ETSI EN 659-3 5.3
     </p>
<A NAME="ETSIModem"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td>&nbsp;<strong>ETSIModem</strong> (const NamedList& params, const char* name = 0)
<br></td><td align="right"><h3><strong>ETSIModem</strong></h3></td></tr></table><p></p><p>
 Constructor
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>params</i></TD><TD align="left" valign="top">Decoder parameters
</TD></TR>
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">The name of this debug enabler
     </TD></TR>
</TABLE></P>
<A NAME="~ETSIModem"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td> &nbsp;<strong>~ETSIModem</strong> ()
<br></td><td align="right"><h3><strong>~ETSIModem</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 Destructor
     </p>
<A NAME="reset"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void &nbsp;<strong>reset</strong> ()
<br></td><td align="right"><h3><strong>reset</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 Reset this decoder (modem and UART)
     </p>
<p>Reimplemented from <A HREF="TelEngine__UART.html#reset">UART</A>.</p>
<A NAME="recvByte"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<strong>recvByte</strong> (unsigned char data)
<br></td><td align="right"><h3><strong>recvByte</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
 Push a data byte into this decoder. Reset this UART and call decode after validated a received message
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>data</i></TD><TD align="left" valign="top">The byte to be processed
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False to stop feeding data
     </p>
<p>Reimplemented from <A HREF="TelEngine__UART.html#recvByte">UART</A>.</p>
<A NAME="s_msg[]"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td>static TokenDict  <strong>s_msg[]</strong>
</td><td align="right"><h3><strong>s_msg[]</strong></h3></td></tr></table><p></p><A NAME="s_msgParams[]"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td>static TokenDict  <strong>s_msgParams[]</strong>
</td><td align="right"><h3><strong>s_msgParams[]</strong></h3></td></tr></table><p></p><A NAME="idleRecvByte"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td> int &nbsp;<strong>idleRecvByte</strong> (unsigned char data)
<br></td><td align="right"><h3><strong>idleRecvByte</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
 Process an accumulated byte in Idle state
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>data</i></TD><TD align="left" valign="top">The byte to process
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Negative to stop, positive to change state to BitStart, 0 to continue
     </p>
<p>Reimplemented from <A HREF="TelEngine__UART.html#idleRecvByte">UART</A>.</p>
<A NAME="recvParams"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<strong>recvParams</strong> (MsgType msg, const NamedList& params)
<br></td><td align="right"><h3><strong>recvParams</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
 Process a list of received message parameters
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>msg</i></TD><TD align="left" valign="top">The message type as enumeration
</TD></TR>
<TR><TD align="left" valign="top"><i>params</i></TD><TD align="left" valign="top">Message parameters
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False to stop processing data
     </p>
<A NAME="decode"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<strong>decode</strong> (MsgType msg, const DataBlock& buffer)
<br></td><td align="right"><h3><strong>decode</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
 Process (decode) a valid received buffer. Call recvParams() after decoding the message
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>msg</i></TD><TD align="left" valign="top">The message type as enumeration
</TD></TR>
<TR><TD align="left" valign="top"><i>buffer</i></TD><TD align="left" valign="top">The accumulated data bytes
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False to stop processing data
     </p>
<A NAME="createMsg"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool &nbsp;<strong>createMsg</strong> (NamedList& params, DataBlock& data)
<br></td><td align="right"><h3><strong>createMsg</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
 Create a buffer containing the byte representation of a message to be sent
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>params</i></TD><TD align="left" valign="top">The list containing message parameters.
  The name of the list must be a valid (known) message
</TD></TR>
<TR><TD align="left" valign="top"><i>data</i></TD><TD align="left" valign="top">Destination message data buffer
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: False on failure (an 'error' parameter will be set in params)
     </p>
<p>Reimplemented from <A HREF="TelEngine__UART.html#createMsg">UART</A>.</p>
<HR>
	<table>
	<tr><td><small>Generated by: paulc on bussard on Mon Mar  8 12:18:15 2010, using kdoc 2.0a54.</small></td></tr>
	</table>
</BODY>
</HTML>