| EventStudio 2.5 Sequence diagram based system design and modeling | |
#include <Protocol_Layer.h> Inheritance diagram for Protocol_Layer:


This class defines the common interface for interactions between different layers of a protocol. This has several advantages:
Note that this transparent layered design is possible because the Protocol_Packet class directly supports addition and removal of layer specific protocol headers and trailers without allocating new buffers at every layer boundary.
Definition at line 32 of file Protocol_Layer.h.
Public Member Functions | |
| Protocol_Layer () | |
| Create a protocol layer object. | |
| virtual void | Transmit (Protocol_Packet *p_Packet)=0 |
| Process and transmit the packet passed by higher layer. | |
| virtual void | Handle_Receive (Protocol_Packet *p_Packet)=0 |
| Receive and process the packets passed by a lower layer. | |
| void | Set_Upper_Layer (Protocol_Layer *p_Layer) |
| Set the upper protocol layer. | |
| void | Set_Lower_Layer (Protocol_Layer *p_Layer) |
| Set the lower protocol layer. | |
| Protocol_Layer * | Get_Upper_Layer () const |
| Get the upper protocol layer. | |
| Protocol_Layer * | Get_Lower_Layer () const |
| Get the lower protocol layer. | |
Private Attributes | |
| Protocol_Layer * | m_p_Lower_Layer |
| Pointer to the lower layer. | |
| Protocol_Layer * | m_p_Upper_Layer |
| Pointer to the lower layer. | |
|
Create a protocol layer object. The lower and upper protocol layers are defaulted to NULL value.
Definition at line 52 of file Protocol_Layer.h. 00053 {
00054 m_p_Lower_Layer = NULL;
00055 m_p_Upper_Layer = NULL;
00056 }
|
|
Process and transmit the packet passed by higher layer. The packets are passed to the lower layer. This is a pure virtual function. All inheriting classes must implement this method.
Implemented in Datalink_Layer. |
|
Receive and process the packets passed by a lower layer. After processing, the packet will be passed to the upper layer. This is a pure virtual function. All inheriting classes must implement this method.
Implemented in Datalink_Layer. |
|
Set the upper protocol layer. Messages received from the lower layer will be passed to this layer for upper layer handling.
Definition at line 85 of file Protocol_Layer.h. 00086 { m_p_Upper_Layer = p_Layer; }
|
|
Set the lower protocol layer. Messages received from the upper layer will be passed to this layer for lower layer handling.
Definition at line 96 of file Protocol_Layer.h. 00097 { m_p_Lower_Layer = p_Layer; }
|
|
Get the upper protocol layer. Messages received from the lower layer will be passed to this layer for upper layer handling.
Definition at line 107 of file Protocol_Layer.h. 00108 { return m_p_Upper_Layer; }
|
|
Get the lower protocol layer. Messages received from the upper layer will be passed to this layer for lower layer handling.
Definition at line 118 of file Protocol_Layer.h. 00119 { return m_p_Lower_Layer; }
|
|
Pointer to the lower layer. Initialized by Set_Lower_Layer method. This pointers can change dynamically as protocol layers are added and deleted. Thus the pointer value should always be obtained from the Layer object just before sending the message. Definition at line 38 of file Protocol_Layer.h. |
|
Pointer to the lower layer. Initialized by the Set_Upper_Layer method. This pointers can change dynamically as protocol layers are added and deleted. Thus the pointer value should always be obtained from the Layer object just before sending the message. Definition at line 44 of file Protocol_Layer.h. |
1.3.4 | |
| Copyright © 2000-2005 EventHelix.com Inc. All Rights Reserved. |