yass.igf
Enum IgfState

java.lang.Object
  extended by java.lang.Enum<IgfState>
      extended by yass.igf.IgfState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<IgfState>

public enum IgfState
extends java.lang.Enum<IgfState>

An enumeration of all permitted states through which an implementation of the IGF protocol might transition at a given network node. The states defined in this enumeration apply to all types of IGF participant, including packet senders and receivers. Note that the IGF protocol state is not the same as the executing node's state; in particular, it is not the same as the radio activity state. The IGF protocol induces a number of types of packet to be scheduled for transmission, but the transmission of these scheduled packets happens asynchronously with respect to the protocol implementation logic flow.


Enum Constant Summary
IDLE
          IGF protocol is not currently active at a given node but is waiting for be called into action.
UNINITIALISED
          Uninitialised; this state should never be encountered in a running network simulation.
WAIT_FOR_ACK
          A given node has broadcast a DATA packet and is now waiting for the selected recipient/relay to acknowledge receipt.
WAIT_FOR_CTS
          A given node has broadcast an ORTS packet and is now waiting to receive zero or more CTS packets, up till the CTS-TIMEOUT expires and forces the putative sender to either: - IDLE, give up due to receipt of no acceptable CTS before timeout - WAIT_FOR_ACK, if one or more suitable CTSes were received and a DATA packet was broadcast in response
WAIT_FOR_DATA
          A given node has received an ORTS packet, offered to act as a recipient or relay, and has broadcast a CTS indicating this decision.
 
Method Summary
static IgfState valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static IgfState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNINITIALISED

public static final IgfState UNINITIALISED
Uninitialised; this state should never be encountered in a running network simulation. Any simulated elements at UNINITIALISED should transition to IDLE before simulation begins.


IDLE

public static final IgfState IDLE
IGF protocol is not currently active at a given node but is waiting for be called into action. The possible transitions out of IDLE are: - WAIT_FOR_CTS, if a local data packet is ready for transmission and an ORTS has been broadcast - WAIT_FOR_DATA, if an ORTS is received from some other node and and a CTS is broadcast to offer to forward/recieve the associated DATA packet In addition to ORTS packets, it is possible for nodes to schedule ACK packets as they enter the IDLE state if they have just left the WAIT_FOR_DATA state and have successfully received a DATA packet.


WAIT_FOR_CTS

public static final IgfState WAIT_FOR_CTS
A given node has broadcast an ORTS packet and is now waiting to receive zero or more CTS packets, up till the CTS-TIMEOUT expires and forces the putative sender to either: - IDLE, give up due to receipt of no acceptable CTS before timeout - WAIT_FOR_ACK, if one or more suitable CTSes were received and a DATA packet was broadcast in response


WAIT_FOR_DATA

public static final IgfState WAIT_FOR_DATA
A given node has received an ORTS packet, offered to act as a recipient or relay, and has broadcast a CTS indicating this decision. The possible transitions at this point are: - IDLE, give up if no DATA packet broadcast is heard before timeout - IDLE, give up if we begin to hear a DATA broadcast but we have not been selected as the recipient or relay - IDLE, successfully completed receipt of a DATA packet


WAIT_FOR_ACK

public static final IgfState WAIT_FOR_ACK
A given node has broadcast a DATA packet and is now waiting for the selected recipient/relay to acknowledge receipt. Explicit acknowledgement is required by IGF, as opposed to the implicit acknowledgement possible in some circumstances, as it levies a less onerous requirement for a given node to stay awake upon successful completion of a packet exchange. The possible transitions at this point are: - IDLE, give up if no ACK is received prior to timeout - IDLE, if an appropriate ACK is received thereby successfully completing the protocol

Method Detail

values

public static IgfState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (IgfState c : IgfState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static IgfState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null