jist.swans.mac
Interface MacInterface

All Superinterfaces:
JistAPI.Proxiable, JistAPI.Timeless
All Known Subinterfaces:
MacInterface.Mac802_11
All Known Implementing Classes:
Mac802_11, MacDumb, MacLoop

public interface MacInterface
extends JistAPI.Proxiable

Defines the interface of all Link layer entity implementations.

Since:
SWANS1.0
Version:
$Id: MacInterface.java,v 1.19 2004/04/06 16:07:48 barr Exp $
Author:
Rimon Barr <barr+jist@cs.cornell.edu>

Nested Class Summary
static interface MacInterface.Mac802_11
          Extends the default Mac interface with 802_11 functions.
 
Method Summary
 void peek(Message msg)
          Radio has locked onto a packet signal; mac may have a peek.
 void receive(Message msg)
          Radio has received a packet for mac to process.
 void send(Message msg, MacAddress nextHop)
          Network layer would like to send the following packet.
 void setRadioMode(byte mode)
          Update mac regarding new mode of its radio.
 

Method Detail

setRadioMode

void setRadioMode(byte mode)
Update mac regarding new mode of its radio.

Parameters:
mode - new radio mode

peek

void peek(Message msg)
Radio has locked onto a packet signal; mac may have a peek.

Parameters:
msg - packet currently in flight

receive

void receive(Message msg)
Radio has received a packet for mac to process.

Parameters:
msg - packet received

send

void send(Message msg,
          MacAddress nextHop)
Network layer would like to send the following packet. Should be called only after Mac has notified that it is wants a packet.

Parameters:
msg - packet to send
nextHop - destination mac