2 EIBD eib bus access and management daemon
3 Copyright (C) 2005-2008 Martin Koegler <mkoegler@auto.tuwien.ac.at>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 /** enumaration of TPDU types */
30 /** any connectionless TPDU */
32 /** connectionoriented TPDU */
45 /** represents a TPDU */
53 virtual bool init (const CArray
& c
) = 0;
54 /** convert to character array */
55 virtual CArray
ToPacket () = 0;
56 /** decode content as string */
57 virtual String
Decode () = 0;
59 virtual TPDU_Type
getType () const = 0;
60 /** converts character array to a TPDU */
61 static TPDU
*fromPacket (const CArray
& c
);
64 class T_UNKNOWN_PDU
:public TPDU
70 bool init (const CArray
& c
);
73 TPDU_Type
getType () const
78 class T_DATA_XXX_REQ_PDU
:public TPDU
83 T_DATA_XXX_REQ_PDU ();
84 bool init (const CArray
& c
);
87 TPDU_Type
getType () const
89 return T_DATA_XXX_REQ
;
92 class T_DATA_CONNECTED_REQ_PDU
:public TPDU
98 T_DATA_CONNECTED_REQ_PDU ();
99 bool init (const CArray
& c
);
102 TPDU_Type
getType () const
104 return T_DATA_CONNECTED_REQ
;
107 class T_CONNECT_REQ_PDU
:public TPDU
111 T_CONNECT_REQ_PDU ();
112 bool init (const CArray
& c
);
115 TPDU_Type
getType () const
117 return T_CONNECT_REQ
;
120 class T_DISCONNECT_REQ_PDU
:public TPDU
124 T_DISCONNECT_REQ_PDU ();
125 bool init (const CArray
& c
);
128 TPDU_Type
getType () const
130 return T_DISCONNECT_REQ
;
133 class T_ACK_PDU
:public TPDU
139 bool init (const CArray
& c
);
142 TPDU_Type
getType () const
147 class T_NACK_PDU
:public TPDU
153 bool init (const CArray
& c
);
156 TPDU_Type
getType () const