tunnel::cs_mac Class Reference

Prototype carrier sense MAC. More...

List of all members.

Public Member Functions

def __init__
def set_top_block
def phy_rx_callback
 Invoked by thread associated with PHY to pass received packet up.
def main_loop
 Main loop for MAC.

Public Attributes

 tun_fd
 verbose
 tb


Detailed Description

Prototype carrier sense MAC.

Reads packets from the TUN/TAP interface, and sends them to the PHY. Receives packets from the PHY via phy_rx_callback, and sends them into the TUN/TAP interface.

Of course, we're not restricted to getting packets via TUN/TAP, this is just an example.


Member Function Documentation

def tunnel::cs_mac::__init__ (   self,
  tun_fd,
  verbose = False 
)

def tunnel::cs_mac::main_loop (   self  ) 

Main loop for MAC.

Only returns if we get an error reading from TUN.

FIXME: may want to check for EINTR and EAGAIN and reissue read

def tunnel::cs_mac::phy_rx_callback (   self,
  ok,
  payload 
)

Invoked by thread associated with PHY to pass received packet up.

Parameters:
ok,: bool indicating whether payload CRC was OK
payload,: contents of the packet (string)

def tunnel::cs_mac::set_top_block (   self,
  tb 
)


Member Data Documentation


The documentation for this class was generated from the following file:

Generated on Thu Mar 5 09:04:03 2009 for GNU Radio 3.1.3 by  doxygen 1.5.8