WirelessChannelManager Class Reference

This class manages which nodes are listening and transmitting on which channels. More...

#include <wireless_channel_manager.hpp>

List of all members.

Public Types

typedef boost::shared_ptr<
WirelessChannelManager
WirelessChannelManagerPtr
 Smart pointer that clients should use.

Public Member Functions

void recvSignal (PhysicalLayerPtr sender, WirelessCommSignalPtr signal)
 Receive a signal from a physical layer that will sent on all channels to which the sender is attached as a sender.
void passSignalToReceiver (PhysicalLayerPtr receiver, WirelessCommSignalPtr signal) const
 When the signal is finished, pass it on to the receiver if it was the captured signal for that receiver.
bool attachAsSender (PhysicalLayerPtr physicalLayer, t_uint channelId)
 Add the physical layer as a sender on the given channel.
bool attachAsListener (PhysicalLayerPtr physicalLayer, t_uint channelId)
 Add the physical layer as a listener of the given channel.
bool detachAsSender (PhysicalLayerPtr physicalLayer, t_uint channelId)
 Remove the physical layer as a sender on the given channel.
bool detachAsListener (PhysicalLayerPtr physicalLayer, t_uint channelId)
 Remove the physical layer as a listener of the given channel.
void addChannel (t_uint channelId, WirelessChannelPtr channel)
 Add the given channel to this manager with the specified ID.
bool removeChannel (t_uint channelId)
 Remove the channel with the given ID from this manager.

Static Public Member Functions

static WirelessChannelManagerPtr create ()
 A factory method to ensure that all objects are created via new since we are using smart pointers.

Protected Member Functions

 WirelessChannelManager ()
 A constructor.


Detailed Description

This class manages which nodes are listening and transmitting on which channels.

Definition at line 36 of file wireless_channel_manager.hpp.


Member Function Documentation

void WirelessChannelManager::addChannel ( t_uint  channelId,
WirelessChannelPtr  channel 
)

Add the given channel to this manager with the specified ID.

If a different already exists with the specified ID, it will be replaced with the newly specified channel.

Parameters:
channelId the ID to identify the channel.
channel a pointer to the channel to be added.

Definition at line 295 of file wireless_channel_manager.cpp.

bool WirelessChannelManager::attachAsListener ( PhysicalLayerPtr  physicalLayer,
t_uint  channelId 
)

Add the physical layer as a listener of the given channel.

Parameters:
physicalLayer a pointer to the physical layer.
channelId the ID of the channel on which the physical layer will listen.
Returns:
true if the layer is successfully added as a listener on the channel.

Definition at line 249 of file wireless_channel_manager.cpp.

bool WirelessChannelManager::attachAsSender ( PhysicalLayerPtr  physicalLayer,
t_uint  channelId 
)

Add the physical layer as a sender on the given channel.

Parameters:
physicalLayer a pointer to the physical layer.
channelId the ID of the channel on which the physical layer will transmit.
Returns:
true if the channel is successfully added on which the physical layer can transmit.

Definition at line 203 of file wireless_channel_manager.cpp.

bool WirelessChannelManager::detachAsListener ( PhysicalLayerPtr  physicalLayer,
t_uint  channelId 
)

Remove the physical layer as a listener of the given channel.

Parameters:
physicalLayer a pointer to the physical layer.
channelId the ID of the channel from which the physical layer will stop listening.
Returns:
true if the layer is successfully removed as a listener on the channel.

Definition at line 267 of file wireless_channel_manager.cpp.

bool WirelessChannelManager::detachAsSender ( PhysicalLayerPtr  physicalLayer,
t_uint  channelId 
)

Remove the physical layer as a sender on the given channel.

Parameters:
physicalLayer a pointer to the physical layer.
channelId the ID of the channel from which the physical layer will be removed.
Returns:
true if the channel is successfully removed from the physical layer's list of channels on which it can transmit.

Definition at line 221 of file wireless_channel_manager.cpp.

void WirelessChannelManager::passSignalToReceiver ( PhysicalLayerPtr  receiver,
WirelessCommSignalPtr  signal 
) const

When the signal is finished, pass it on to the receiver if it was the captured signal for that receiver.

Parameters:
receiver the physical layer that may potentially receive the signal.
signal the signal that may be received.

Definition at line 184 of file wireless_channel_manager.cpp.

References WirelessCommSignal::create().

void WirelessChannelManager::recvSignal ( PhysicalLayerPtr  sender,
WirelessCommSignalPtr  signal 
)

Receive a signal from a physical layer that will sent on all channels to which the sender is attached as a sender.

Parameters:
sender a pointer to the physical layer sending the signal.
signal the signal being sent.

Definition at line 56 of file wireless_channel_manager.cpp.

bool WirelessChannelManager::removeChannel ( t_uint  channelId  ) 

Remove the channel with the given ID from this manager.

Parameters:
channelId the ID of the channel to be removed.
Returns:
true if the channel was found and successfully removed.

Definition at line 302 of file wireless_channel_manager.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Dec 12 17:04:42 2006 for rfidsim by  doxygen 1.4.7