|
DESERT 4.0.0
|
#include <sun-ipr-node.h>


Public Member Functions | |
| SunIPRoutingNode () | |
| virtual | ~SunIPRoutingNode () |
Static Public Attributes | |
| static const int | LISTLENGTH = 30 |
| static const int | MINUTE |
Protected Types | |
| enum | { HOPCOUNT = 1 , SNR , LESSCONGESTED } |
Protected Member Functions | |
| virtual int | command (int, const char *const *) |
| virtual void | recv (Packet *) |
| virtual int | recvSyncClMsg (ClMessage *) |
| virtual int | recvAsyncClMsg (ClMessage *) |
| virtual void | clearHops () |
| virtual void | initialize () |
| virtual void | printHopTable () const |
| virtual void | printSelectedRoutes () const |
| const long & | getNPathsEstablished () |
| const double | getDelay (const double &period_) const |
| const bool | isZero (const double &value) const |
| virtual const int & | setNumberOfHopToSink (const int &) |
| virtual const int & | getNumberOfHopToSink () const |
| virtual void | receiveProbe (const Packet *) |
| virtual void | searchPath () |
| virtual void | initPktPathEstSearch (Packet *) const |
| virtual void | replyPathEstSearch (Packet *) |
| virtual const bool | addMyIpInList (Packet *) |
| virtual const bool | isMyIpInList (const Packet *) const |
| virtual void | updateQuality (Packet *) |
| virtual void | answerPath (const Packet *) |
| virtual void | initPktPathEstAnswer (Packet *, const Packet *) |
| virtual void | sendRouteBack (Packet *) |
| virtual const int & | evaluatePath (const Packet *) |
| virtual void | initPktDataPacket (Packet *) |
| virtual void | forwardDataPacket (Packet *) |
| virtual void | sendBackAck (const Packet *) |
| virtual void | initPktAck (Packet *) |
| virtual void | createRouteError (const Packet *, Packet *) |
| virtual void | sendRouteErrorBack (Packet *) |
| virtual void | updatePacketsCount () |
| virtual void | updateAcksCount () |
| virtual const int | getPacketsLastMinute () const |
| virtual const int | getAcksLastMinute () const |
| virtual const double | getLoad () const |
| virtual void | bufferManager () |
| const long & | getAckCount () const |
| const long & | getDataCount () const |
| const long & | getForwardedCount () const |
| const long & | getDataDropsCountBuffer () const |
| const long & | getDataDropsCountMaxRetx () const |
| const long & | getPathEstablishmentCount () const |
| virtual void | expTimerHopTable () |
| virtual void | lostSink () |
| virtual void | searchPathExpire () |
| virtual void | tracePacket (const Packet *const, const string &position="UNDEF___") |
| virtual string | createTraceString (const string &, const double &, const int &, const int &, const int &, const int &, const int &, const int &, const int &, const double &, const int &, const int &) |
| virtual void | writeInTrace (const string &) |
Static Protected Member Functions | |
| static string | printIP (const nsaddr_t &) |
| static string | printIP (const ns_addr_t &) |
| static nsaddr_t | str2addr (const char *) |
| static const int | getAckHeaderSize () |
| static const int | getDataPktHeaderSize () |
| static const int | getPathEstHeaderSize () |
Static Protected Attributes | |
| static long | number_of_pathestablishment_ = 0 |
| static long | number_of_datapkt_ = 0 |
| static long | number_of_ackpkt_ = 0 |
| static long | number_of_drops_buffer_full_ = 0 |
| static long | number_of_drops_maxretx_ = 0 |
| static long | number_of_pkt_forwarded_ = 0 |
Private Member Functions | |
| SunIPRoutingNode (const SunIPRoutingNode &) | |
Friends | |
| class | RemoveHopTableTimer |
| class | AckWaiting |
| class | SinkProbeTimer |
| class | BufferTimer |
| class | SearchPathTimer |
SunIPRoutingNode class is used to represent the routing layer of a node.
| SunIPRoutingNode::SunIPRoutingNode | ( | ) |
Constructor of SunIPRoutingNode class.
References alpha_, buffer_max_size_, bufferTmr_, clearHops(), data_and_hops, disable_path_error_, hop_table, ipAddr_, max_ack_error_, max_retx_, metrics_, period_data_, period_status_, PoissonTraffic_, printDebug_, probe_min_snr_, reset_buffer_if_error_, safe_timer_buffer_, timer_buffer_, timer_route_validity_, timer_search_path_, timer_sink_probe_validity_, and trace_separator_.

|
virtual |
Destructor of SunIPRoutingNode class.
References getNumberOfHopToSink(), hop_table, ipAddr_, printDebug_, printIP(), and trace_file_name_.

|
private |
Copy constructor declared as private. It is not possible to create a new SunIPRoutingNode object passing to its constructor another SunIPRoutingNode object.
| SunIPRoutingNode& | SunIPRoutingNode object. |
|
protectedvirtual |
Adds the IP of the current node in the header of a Path Establishment packet passed as argument. It can do it if there is at least one free block. The function returns true if it added the IP, false otherwise.
| Packet* | Pointer to a Path Establishment Search packet in which to add an IP. |
References ipAddr_, hdr_sun_path_est::list_of_hops(), hdr_sun_path_est::list_of_hops_length(), and hdr_sun_path_est::pointer().
Referenced by replyPathEstSearch().

|
protectedvirtual |
Creates and sends an Path Establishment Answer packet.
| Packet* | Pointer to a Path Establishment packet with the option field set to Search. |
References getDelay(), getNumberOfHopToSink(), initPktPathEstAnswer(), ipAddr_, hdr_sun_path_est::list_of_hops_length(), n_paths_established, number_of_pathestablishment_, period_status_, printDebug_, printIP(), hdr_uwip::saddr(), trace_, and tracePacket().
Referenced by replyPathEstSearch().

|
protectedvirtual |
Manage the buffer of the data packets.
References buffer_data, bufferTmr_, clearHops(), createRouteError(), hdr_uwip::daddr(), data_and_hops, disable_path_error_, forwardDataPacket(), getDelay(), getNumberOfHopToSink(), hop_table, initPktDataPacket(), ipAddr_, hdr_sun_data::list_of_hops(), hdr_sun_data::list_of_hops_length(), max_ack_error_, max_retx_, buffer_element::num_attempts_, number_of_datapkt_, number_of_drops_maxretx_, number_of_pkt_forwarded_, buffer_element::p_, period_data_, pkt_tx_, printDebug_, printIP(), reset_buffer_if_error_, buffer_element::retx_, hdr_uwip::saddr(), search_path_enable_, searchPath(), searchPathTmr_, setNumberOfHopToSink(), sink_associated, hdr_uwcbr::sn(), buffer_element::t_last_tx_, timer_buffer_, timer_search_path_, trace_, and tracePacket().

|
protectedvirtual |
Clears all the route information of the current node.
References getNumberOfHopToSink(), hop_table, hop_table_length, ipAddr_, printDebug_, printIP(), quality_link, and sink_associated.
Referenced by bufferManager(), command(), evaluatePath(), expTimerHopTable(), lostSink(), receiveProbe(), recv(), searchPath(), sendRouteBack(), and SunIPRoutingNode().

|
protectedvirtual |
TCL command interpreter. It implements the following OTcl methods:
| argc | Number of arguments in argv. |
| argv | Array of strings which are the command parameters (Note that argv[0] is the name of the object). |
References buffer_data, clearHops(), data_and_hops, getAckCount(), getAckHeaderSize(), getDataCount(), getDataDropsCountBuffer(), getDataDropsCountMaxRetx(), getDataPktHeaderSize(), getForwardedCount(), getNPathsEstablished(), getPathEstablishmentCount(), getPathEstHeaderSize(), initialize(), ipAddr_, num_hop_to_sink, pkt_stored_, pkt_tx_, printHopTable(), printIP(), printSelectedRoutes(), str2addr(), trace_, trace_file_, and trace_file_name_.

|
protectedvirtual |
Used to create a route error packet. This packet will be sent by the current node to the source of the data packet that generated the error.
| Packet* | Pointer to a Data packet that the current node is unable to forward. |
| Packet* | Pointer to a Route error packet already allocated to initialize with proper values. |
References hdr_uwip::daddr(), getNumberOfHopToSink(), initPktPathEstSearch(), ipAddr_, hdr_sun_data::list_of_hops(), hdr_sun_path_est::list_of_hops(), hdr_sun_path_est::list_of_hops_length(), hdr_sun_data::pointer(), hdr_sun_path_est::pointer(), printDebug_, printIP(), hdr_sun_path_est::ptype(), and hdr_uwip::saddr().
Referenced by bufferManager().

|
protectedvirtual |
Function that accepts a list of string and create an entry for the trace file.
References osstream_, and trace_separator_.
Referenced by tracePacket().
|
protectedvirtual |
Evaluates the route information contained in a Path Establishment packet, and according to different metrics it evaluates if the path contained in the packet is the new best route.
| Packet* | Pointer to a Path Establishment packet to evaluate. |
References ack_error_state, ack_warnings_counter_, clearHops(), getNumberOfHopToSink(), hop_table, hop_table_length, HOPCOUNT, ipAddr_, isZero(), LESSCONGESTED, hdr_sun_path_est::list_of_hops(), hdr_sun_path_est::list_of_hops_length(), metrics_, paths_selected, printDebug_, printIP(), hdr_sun_path_est::quality(), quality_link, rmhopTableTmr_, hdr_uwip::saddr(), setNumberOfHopToSink(), sink_associated, hdr_sun_path_est::sinkAssociated(), SNR, and timer_route_validity_.
Referenced by recv().

|
protectedvirtual |
This function is invoked when the timer of the routing table expires. It removes all the information about routing information and sink association.
References clearHops(), getNumberOfHopToSink(), ipAddr_, printDebug_, printIP(), and setNumberOfHopToSink().

|
protectedvirtual |
Forwards a data packet to the next hop. All the information to route the packet are contained in the packet. If the current node is in the coverage are of the sink it will forward the packet directly to the sink, otherwise the packet will be forwarded to the next hop.
| Packet* | Pointer to a Data packet to forward. |
References hdr_uwip::daddr(), getDelay(), getNumberOfHopToSink(), ipAddr_, hdr_sun_data::list_of_hops(), hdr_sun_data::list_of_hops_length(), number_of_datapkt_, number_of_pkt_forwarded_, period_data_, pkt_tx_, hdr_sun_data::pointer(), printDebug_, printIP(), hdr_uwip::saddr(), sink_associated, trace_, and tracePacket().
Referenced by bufferManager().

|
inlineprotected |
Returns the number of Ack packets processed by the entire network.
References number_of_ackpkt_.
Referenced by command().
|
inlinestaticprotected |
Returns the size in byte of a hdr_sun_ack packet header.
Referenced by command().
|
protectedvirtual |
Returns the number of acks received by the current node in the last interval of time (MINUTE).
References acks_array_full, list_acks, list_acks_max_time_, LISTLENGTH, and MINUTE.
Referenced by getLoad().
|
inlineprotected |
Returns the number of Data packets processed by the entire network.
References number_of_datapkt_.
Referenced by command().
|
inlineprotected |
Returns the number of packets dropped by the entire network for the reason: buffer is full.
References number_of_drops_buffer_full_.
Referenced by command().
|
inlineprotected |
Returns the number of packets dropped by the entire network for the reason: maximum number of retransmission reached.
References number_of_drops_maxretx_.
Referenced by command().
|
inlinestaticprotected |
Returns the size in byte of a hdr_sun_data packet header.
Referenced by command().
|
inlineprotected |
Returns a delay value to use in transmission. The delay can be 0 or poissonian accordingly with the flag PoissonTraffic_.
References PoissonTraffic_.
Referenced by answerPath(), bufferManager(), forwardDataPacket(), replyPathEstSearch(), searchPath(), sendBackAck(), sendRouteBack(), and sendRouteErrorBack().
|
inlineprotected |
Returns the number of Data packets forwarded by the entire network.
References number_of_pkt_forwarded_.
Referenced by command().
|
protectedvirtual |
Returns the load index of the current node combining the information from getPacketsLastMinute() and getAcksLastMinute() functions.
References alpha_, getAcksLastMinute(), and getPacketsLastMinute().
Referenced by updateQuality().

|
inlineprotected |
Print how many times the node was established as relay node for other nodes of the netwok.
References n_paths_established.
Referenced by command().
|
protectedvirtual |
Returns the number of hops that separate the node to the sink.
References num_hop_to_sink.
Referenced by answerPath(), bufferManager(), clearHops(), createRouteError(), evaluatePath(), expTimerHopTable(), forwardDataPacket(), initPktDataPacket(), lostSink(), receiveProbe(), recv(), replyPathEstSearch(), searchPath(), sendBackAck(), sendRouteBack(), setNumberOfHopToSink(), updateQuality(), and ~SunIPRoutingNode().
|
protectedvirtual |
Returns the number of packets processed by the current node in the last interval of time (MINUTE).
References list_packets, list_packets_max_time_, LISTLENGTH, MINUTE, and packets_array_full.
Referenced by getLoad(), and updateQuality().
|
inlineprotected |
Returns the number of Path Establishment packets processed by the entire network.
References number_of_pathestablishment_.
Referenced by command().
|
inlinestaticprotected |
Returns the size in byte of a hdr_sun_path_est packet header.
Referenced by command().
|
protectedvirtual |
Initializes a SunIPRoutingNode node. It sends to the lower layers a Sync message asking for the IP of the node.
References ipAddr_.
Referenced by command().
|
protectedvirtual |
Initializes an ack packet passed as argument with the default values.
| Packet* | Pointer to a packet already allocated to fill with the right values. |
References ipAddr_, and PT_SUN_ACK.
Referenced by sendBackAck().
|
protectedvirtual |
Initializes a data packet passed as argument with the default values.
| Packet* | Pointer to a packet already allocated to fill with the right values. |
References hdr_uwip::daddr(), getNumberOfHopToSink(), hop_table, hop_table_length, ipAddr_, hdr_sun_data::list_of_hops(), hdr_sun_data::list_of_hops_length(), hdr_sun_data::pointer(), hdr_uwip::saddr(), and sink_associated.
Referenced by bufferManager().

|
protectedvirtual |
Initializes a Path Establishment Answer packet (previously allocated) retrieving the information from a Path Establishment Request packet.
| Packet* | Pointer to a Path Establishment packet with the option field set to Answer to initialize. |
| Packet* | Pointer to a Path Establishment packet with the option field set to Search. |
References hdr_uwip::daddr(), ipAddr_, hdr_sun_path_est::list_of_hops(), hdr_sun_path_est::list_of_hops_length(), hdr_sun_path_est::pointer(), PT_SUN_PATH_EST, hdr_sun_path_est::ptype(), hdr_sun_path_est::quality(), hdr_uwip::saddr(), sink_associated, and hdr_sun_path_est::sinkAssociated().
Referenced by answerPath().

|
protectedvirtual |
Initializes a Path Establishment Search packet (previously allocated).
| Packet* | Pointer to a Path Establishment Packet with the option field set to Search to initialize. |
References hdr_uwip::daddr(), ipAddr_, hdr_sun_path_est::list_of_hops(), hdr_sun_path_est::list_of_hops_length(), PT_SUN_PATH_EST, hdr_sun_path_est::ptype(), and hdr_sun_path_est::quality().
Referenced by createRouteError(), and searchPath().

|
protectedvirtual |
Checks if the IP of the current node is in the header of the packet passed as argument. If yes it returns true, otherwise it return false.
| Packet* | Pointer to a Path Establishment packet to analyze. |
References ipAddr_, hdr_sun_path_est::list_of_hops(), and hdr_sun_path_est::list_of_hops_length().
Referenced by replyPathEstSearch().

|
inlineprotected |
Evaluates is the number passed as input is equal to zero. When C++ works with double and float number you can't compare them with 0. If the absolute value of the number is smaller than eplison that means that the number is equal to zero.
| double& | Number to evaluate. |
Referenced by evaluatePath(), receiveProbe(), sendRouteBack(), and updateQuality().
|
protectedvirtual |
This function removes all the information about routing information and sink association.
References clearHops(), getNumberOfHopToSink(), setNumberOfHopToSink(), and sink_associated.

|
protectedvirtual |
Prints in the stdout the routing table of the current node.
References hop_table, hop_table_length, and printIP().
Referenced by command().

|
staticprotected |
Returns a string with an IP in the classic form "x.x.x.x" converting an ns2 ns_addr_t address.
| ns_addr_t& | ns2 address |
References printIP().

|
staticprotected |
Returns a string with an IP in the classic form "x.x.x.x" converting an ns2 nsaddr_t address.
| nsaddr_t& | ns2 address |
Referenced by answerPath(), bufferManager(), clearHops(), command(), createRouteError(), evaluatePath(), expTimerHopTable(), forwardDataPacket(), printHopTable(), printIP(), printSelectedRoutes(), receiveProbe(), recv(), replyPathEstSearch(), searchPath(), sendBackAck(), sendRouteBack(), and ~SunIPRoutingNode().
|
protectedvirtual |
Print the nodes that were chosen as relay nodes to rach the sink and how many times each node was chosen.
References paths_selected, and printIP().
Referenced by command().

|
protectedvirtual |
Invoked when the node receives a probe packet from a sink. It is used to update the information about routes.
| Packet* | Pointer to a Probe packet. |
References clearHops(), getNumberOfHopToSink(), ipAddr_, isZero(), printDebug_, printIP(), probe_min_snr_, hdr_uwip::saddr(), setNumberOfHopToSink(), sink_associated, sinkProbeTimer_, snr_to_sink_, and timer_sink_probe_validity_.
Referenced by recv().

|
protectedvirtual |
Performs the reception of packets from upper and lower layers.
| Packet* | Pointer to the packet will be received. |
References ack_error_state, ack_warnings_counter_, buffer_data, buffer_max_size_, clearHops(), hdr_uwip::daddr(), evaluatePath(), getNumberOfHopToSink(), buffer_element::id_pkt_, ipAddr_, hdr_sun_data::list_of_hops(), hdr_sun_data::list_of_hops_length(), number_of_drops_buffer_full_, pkt_stored_, printDebug_, printIP(), PT_SUN_ACK, PT_SUN_PATH_EST, PT_SUN_PROBE, hdr_sun_path_est::ptype(), receiveProbe(), replyPathEstSearch(), reset_buffer_if_error_, hdr_uwip::saddr(), safe_timer_buffer_, search_path_enable_, searchPath(), searchPathTmr_, sendBackAck(), sendRouteBack(), sendRouteErrorBack(), setNumberOfHopToSink(), hdr_uwcbr::sn(), timer_buffer_, timer_search_path_, trace_, tracePacket(), hdr_sun_ack::uid(), updateAcksCount(), and updatePacketsCount().

|
protectedvirtual |
Cross-Layer messages asynchronous interpreter. Used to retrive the IP od the current node from the IP module.
| ClMessage* | an instance of ClMessage that represent the message received and used for the answer. |
References UWIPClMsgSendAddr::getAddr(), ipAddr_, and UWIP_CLMSG_SEND_ADDR.

|
protectedvirtual |
Cross-Layer messages synchronous interpreter.
| ClMessage* | an instance of ClMessage that represent the message received |
|
protectedvirtual |
Replies to Path Establishment Search packets. It adds in the packet the IP of the current node and forwards or replies to the request.
| Packet* | Pointer to a Path Establishment Search packets to process. |
References addMyIpInList(), answerPath(), hdr_uwip::daddr(), getDelay(), getNumberOfHopToSink(), ipAddr_, isMyIpInList(), number_of_pathestablishment_, period_status_, printDebug_, printIP(), hdr_sun_path_est::ptype_, hdr_uwip::saddr(), trace_, tracePacket(), and updateQuality().
Referenced by recv().

|
protectedvirtual |
Sends a Path Establishment Packet with the option field sets to Search. It also remove all the information about current routes to the sink.
References clearHops(), getDelay(), getNumberOfHopToSink(), initPktPathEstSearch(), ipAddr_, number_of_pathestablishment_, period_status_, printDebug_, printIP(), setNumberOfHopToSink(), trace_, and tracePacket().
Referenced by bufferManager(), and recv().

|
protectedvirtual |
This function enable the possibility to send a new Seath Path packet. It is used to avoid too many control packets in network in a high load condition.
References search_path_enable_.
|
protectedvirtual |
Creates an ack packet and sends it to the previous hop using the information contained in the header of the data packet passed as input parameter. It is an ack to the previous hop, and not to the source of the packet.
| Packet* | Pointer to a Data packet to acknowledge. |
References hdr_uwip::daddr(), getDelay(), getNumberOfHopToSink(), initPktAck(), ipAddr_, number_of_ackpkt_, period_status_, printDebug_, printIP(), hdr_uwcbr::sn(), trace_, tracePacket(), and hdr_sun_ack::uid().
Referenced by recv().

|
protectedvirtual |
Forwards a Path Establishment Answer Packet. Adds the information about the route in the routing table of the current node.
| Packet* | Pointer to a Path Establishment packet with option field set to ANSWER to forward. |
References ack_error_state, ack_warnings_counter_, clearHops(), hdr_uwip::daddr(), getDelay(), getNumberOfHopToSink(), hop_table, hop_table_length, HOPCOUNT, ipAddr_, isZero(), LESSCONGESTED, hdr_sun_path_est::list_of_hops(), hdr_sun_path_est::list_of_hops_length(), metrics_, number_of_pathestablishment_, paths_selected, period_status_, hdr_sun_path_est::pointer(), printDebug_, printIP(), hdr_sun_path_est::ptype(), hdr_sun_path_est::quality(), quality_link, rmhopTableTmr_, hdr_uwip::saddr(), setNumberOfHopToSink(), sink_associated, hdr_sun_path_est::sinkAssociated(), SNR, timer_route_validity_, trace_, and tracePacket().
Referenced by recv().

|
protectedvirtual |
Send back an error packet to the previous hop. It uses the information contained in the header of the packet.
| Packet* | Pointer to a Packet to forward to the next hop. |
References hdr_uwip::daddr(), getDelay(), hdr_sun_path_est::list_of_hops(), hdr_sun_path_est::list_of_hops_length(), number_of_pathestablishment_, period_status_, hdr_sun_path_est::pointer(), trace_, and tracePacket().
Referenced by recv().

|
protectedvirtual |
Sets the number of hops that the current node needs to reach the sink.
| int& | Number of hops to the sink. The value must be greater or equal to 1. |
References getNumberOfHopToSink(), num_hop_to_sink, and snr_to_sink_.
Referenced by bufferManager(), evaluatePath(), expTimerHopTable(), lostSink(), receiveProbe(), recv(), searchPath(), and sendRouteBack().

|
staticprotected |
Returns a nsaddr_t address from an IP written as a string in the form "x.x.x.x".
| char* | IP in string form |
Referenced by command().
|
protectedvirtual |
Traces a packet.
| Packet | to be traced. |
| String | optional for the packet. |
References createTraceString(), hdr_uwip::daddr(), ipAddr_, PT_SUN_ACK, hdr_uwip::saddr(), hdr_uwcbr::sn(), trace_, hdr_sun_ack::uid(), and writeInTrace().
Referenced by answerPath(), bufferManager(), forwardDataPacket(), recv(), replyPathEstSearch(), searchPath(), sendBackAck(), sendRouteBack(), and sendRouteErrorBack().

|
protectedvirtual |
Updates the number of acks received by the current node. To be used when the node receives an ack.
References acks_array_full, list_acks, list_acks_max_time_, LISTLENGTH, and pointer_acks_.
Referenced by recv().
|
protectedvirtual |
Updates the number of packets processed by the current node. To be used when the node receives or generates a packet.
References list_packets, list_packets_max_time_, LISTLENGTH, packets_array_full, and pointer_packets_.
Referenced by recv().
|
protectedvirtual |
Updates the field quality in the packet passed as parameter. The value written in the packet depends on the metric field.
| Packet* | Pointer to a packet in which to update the quality field. |
References getLoad(), getNumberOfHopToSink(), getPacketsLastMinute(), HOPCOUNT, isZero(), LESSCONGESTED, metrics_, hdr_sun_path_est::quality(), SNR, and snr_to_sink_.
Referenced by replyPathEstSearch().

|
protectedvirtual |
Opens the trace file, writes the string passed as input and closes the file.
| String | to write in the trace file. |
References trace_file_, and trace_file_name_.
Referenced by tracePacket().
|
friend |
Friend class used to implement the timer on Acks.
|
friend |
Friend class used to implement the timer on the Buffer.
|
friend |
Friend class used to implement the timer on Hop Tables.
|
friend |
Friend class used to implement the timer on the Search Path mechanism.
|
friend |
Friend class used to implement the timer on Probes.
|
protected |
true if the node is not in an error state (that means that it discovered a broken link), false if the link to the next hop is considered valid.
Referenced by evaluatePath(), recv(), and sendRouteBack().
|
protected |
Number of acks lost since the last reset.
Referenced by evaluatePath(), recv(), and sendRouteBack().
|
protected |
true if list of acks is full, false otherwise.
Referenced by getAcksLastMinute(), and updateAcksCount().
|
protected |
Parameters used by Load metric. It is a correlation factor.
Referenced by getLoad(), and SunIPRoutingNode().
|
protected |
Buffer used to store data packets.
Referenced by bufferManager(), command(), and recv().
|
protected |
Maximum length of the data buffer.
Referenced by recv(), and SunIPRoutingNode().
|
protected |
BufferTimer object.
Referenced by bufferManager(), and SunIPRoutingNode().
|
protected |
Structure that contains the number of data packets sent by the current node to the sink, for different values of hop count. It is used for statistics purposes.
Referenced by bufferManager(), command(), and SunIPRoutingNode().
|
protected |
Flag to enable or disable the possibility to send Path Error packets.
Referenced by bufferManager(), and SunIPRoutingNode().
|
protected |
List of IPs to reach the sink.
Referenced by bufferManager(), clearHops(), evaluatePath(), initPktDataPacket(), printHopTable(), sendRouteBack(), SunIPRoutingNode(), and ~SunIPRoutingNode().
|
protected |
Current length of the hop_table.
Referenced by clearHops(), evaluatePath(), initPktDataPacket(), printHopTable(), and sendRouteBack().
|
protected |
IP of the current node.
Referenced by addMyIpInList(), answerPath(), bufferManager(), clearHops(), command(), createRouteError(), evaluatePath(), expTimerHopTable(), forwardDataPacket(), initialize(), initPktAck(), initPktDataPacket(), initPktPathEstAnswer(), initPktPathEstSearch(), isMyIpInList(), receiveProbe(), recv(), recvAsyncClMsg(), replyPathEstSearch(), searchPath(), sendBackAck(), sendRouteBack(), SunIPRoutingNode(), tracePacket(), and ~SunIPRoutingNode().
|
protected |
List of the last LISTLENGTH temporal instants in which the node received acks.
Referenced by getAcksLastMinute(), and updateAcksCount().
|
protected |
Clock of the last ack received by the node.
Referenced by getAcksLastMinute(), and updateAcksCount().
|
protected |
List of the last LISTLENGTH temporal instants in which the node received data packets.
Referenced by getPacketsLastMinute(), and updatePacketsCount().
|
protected |
Clock of the last packet received by the node.
Referenced by getPacketsLastMinute(), and updatePacketsCount().
|
static |
Used by the load metric to set the number of the acks tracked.
Referenced by getAcksLastMinute(), getPacketsLastMinute(), updateAcksCount(), and updatePacketsCount().
|
protected |
Maximum number of Ack errors tollerated by the node.
Referenced by bufferManager(), and SunIPRoutingNode().
|
protected |
Maximum Number of transmissions performed: real retransmissions counter the counter is increased only when the packet is sent downlayer
Referenced by bufferManager(), and SunIPRoutingNode().
|
protected |
Metric used by the current node.
Referenced by evaluatePath(), sendRouteBack(), SunIPRoutingNode(), and updateQuality().
|
static |
Used by the load metric to set the period to consider for the evaluation of the metric.
Referenced by getAcksLastMinute(), and getPacketsLastMinute().
|
protected |
Number of times the node is established as realy node by the other nodes of the network
Referenced by answerPath(), and getNPathsEstablished().
|
protected |
Number of hops needed to reach the sink using tha path saved tn the routing table. If the node is directly connected this value is equal to 1, is the node doesn't have any valid path to the sink this value is equal to 0
Referenced by command(), getNumberOfHopToSink(), and setNumberOfHopToSink().
|
staticprotected |
Comulative number of Ack packets processed by SunIPRoutingNode objects.
Referenced by getAckCount(), and sendBackAck().
|
staticprotected |
Comulative number of Data packets processed by SunIPRoutingNode objects.
Referenced by bufferManager(), forwardDataPacket(), and getDataCount().
|
staticprotected |
Comulative number of packets dropped by SunIPRoutingNode objects, reason: the buffer is full.
Referenced by getDataDropsCountBuffer(), and recv().
|
staticprotected |
Comulative number of packets dropped by SunIPRoutingNode objects, reason: max number of retransmission reached.
Referenced by bufferManager(), and getDataDropsCountMaxRetx().
|
staticprotected |
Comulative number of Path Establishment packets processed by SunIPRoutingNode objects.
Referenced by answerPath(), getPathEstablishmentCount(), replyPathEstSearch(), searchPath(), sendRouteBack(), and sendRouteErrorBack().
|
staticprotected |
Comulative number of Data packets forwarded by the network.
Referenced by bufferManager(), forwardDataPacket(), and getForwardedCount().
|
protected |
Used to convert to string.
Referenced by createTraceString().
|
protected |
true if list of packets is full, false otherwise.
Referenced by getPacketsLastMinute(), and updatePacketsCount().
|
protected |
Map containing the nodes selected as relay to the sink and the number of times each node was selected
Referenced by evaluatePath(), printSelectedRoutes(), and sendRouteBack().
|
protected |
Period of the Poisson traffic for data packets in the buffer.
Referenced by bufferManager(), forwardDataPacket(), and SunIPRoutingNode().
|
protected |
Period of the Poisson traffic for status and ack packets.
Referenced by answerPath(), replyPathEstSearch(), searchPath(), sendBackAck(), sendRouteBack(), sendRouteErrorBack(), and SunIPRoutingNode().
|
protected |
|
protected |
Keep track of the total number of packet retransmitted.
Referenced by bufferManager(), command(), and forwardDataPacket().
|
protected |
Pointer of the first avaiable space in list_acks list.
Referenced by updateAcksCount().
|
protected |
Pointer of the first avaiable space in list_packets list.
Referenced by updatePacketsCount().
|
protected |
Enable (1) or disable (0) the Poisson traffic for SUN packets.
Referenced by getDelay(), and SunIPRoutingNode().
|
protected |
Flag to enable or disable dirrefent levels of debug.
Referenced by answerPath(), bufferManager(), clearHops(), createRouteError(), evaluatePath(), expTimerHopTable(), forwardDataPacket(), receiveProbe(), recv(), replyPathEstSearch(), searchPath(), sendBackAck(), sendRouteBack(), SunIPRoutingNode(), and ~SunIPRoutingNode().
|
protected |
Value below which if a node receives a probe it discards it.
Referenced by receiveProbe(), and SunIPRoutingNode().
|
protected |
Quality of the link from the node to the sink.
Referenced by clearHops(), evaluatePath(), and sendRouteBack().
|
protected |
If == 1 when a node identify a broken link it will automatically free its buffer.
Referenced by bufferManager(), recv(), and SunIPRoutingNode().
|
protected |
RemoveHopTableTimer object.
Referenced by evaluatePath(), and sendRouteBack().
|
protected |
Enables a mechanism used to modify the timer_buffer_ in case of the sending time is shorter than the time needed to receive acks.
Referenced by recv(), and SunIPRoutingNode().
|
protected |
Flag to enable or disable the possibility to send search_path packets.
Referenced by bufferManager(), recv(), and searchPathExpire().
|
protected |
SearchPathTimer object.
Referenced by bufferManager(), and recv().
|
protected |
IP of the sink associated to the node.
Referenced by bufferManager(), clearHops(), evaluatePath(), forwardDataPacket(), initPktDataPacket(), initPktPathEstAnswer(), lostSink(), receiveProbe(), and sendRouteBack().
|
protected |
SinkProbeTimer object.
Referenced by receiveProbe().
|
protected |
SNR between the sink and the current node.
Referenced by receiveProbe(), setNumberOfHopToSink(), and updateQuality().
|
protected |
Timer for buffer management.
Referenced by bufferManager(), recv(), and SunIPRoutingNode().
|
protected |
Maximum validity time for a route entry.
Referenced by evaluatePath(), sendRouteBack(), and SunIPRoutingNode().
|
protected |
Timer for the search path mechanism.
Referenced by bufferManager(), recv(), and SunIPRoutingNode().
|
protected |
Maximum validity time for a sink probe.
Referenced by receiveProbe(), and SunIPRoutingNode().
|
protected |
Flag used to enable or disable the trace file for nodes,
Referenced by answerPath(), bufferManager(), command(), forwardDataPacket(), recv(), replyPathEstSearch(), searchPath(), sendBackAck(), sendRouteBack(), sendRouteErrorBack(), and tracePacket().
|
protected |
Ofstream used to write the trace file in the disk.
Referenced by command(), and writeInTrace().
|
protected |
Name of the trace file writter for the current node.
Referenced by command(), writeInTrace(), and ~SunIPRoutingNode().
|
protected |
Used as separator among elements in an entr of the tracefile.
Referenced by createTraceString(), and SunIPRoutingNode().