Classes | Functions | Variables
header.h File Reference
#include "ros/ros.h"
#include <stdint.h>
#include <stdio.h>
#include <time.h>
#include <sys/ioctl.h>
#include <boost/thread.hpp>
#include <boost/date_time.hpp>
#include <boost/crc.hpp>
#include <sys/socket.h>
#include <netinet/in.h>
#include <linux/if.h>
#include <netpacket/packet.h>
#include <net/ethernet.h>
#include <asm/types.h>
#include "adhoc_communication/ExpAuction.h"
#include "adhoc_communication/ExpFrontierElement.h"
#include "adhoc_communication/MmListOfPoints.h"
#include "adhoc_communication/MmRobotPosition.h"
#include "adhoc_communication/ExpFrontier.h"
#include "adhoc_communication/MmMapUpdate.h"
#include "adhoc_communication/RecvString.h"
#include "adhoc_communication/MmControl.h"
#include "adhoc_communication/MmPoint.h"
#include "adhoc_communication/ExpCluster.h"
#include "adhoc_communication/CMgrDimensions.h"
#include "adhoc_communication/CMgrRobotUpdate.h"
#include "adhoc_communication/ChangeMCMembership.h"
#include "adhoc_communication/SendExpCluster.h"
#include "adhoc_communication/SendMmMapUpdate.h"
#include "adhoc_communication/SendOccupancyGrid.h"
#include "adhoc_communication/GetNeighbors.h"
#include "adhoc_communication/SendExpFrontier.h"
#include "adhoc_communication/SendMmPoint.h"
#include "adhoc_communication/SendQuaternion.h"
#include "adhoc_communication/SendExpAuction.h"
#include "adhoc_communication/SendMmControl.h"
#include "adhoc_communication/SendMmRobotPosition.h"
#include "adhoc_communication/SendString.h"
#include "adhoc_communication/SendTwist.h"
#include "adhoc_communication/GetGroupState.h"
#include "adhoc_communication/SendCMgrRobotUpdate.h"
#include "adhoc_communication/ShutDown.h"
#include "adhoc_communication/BroadcastCMgrRobotUpdate.h"
#include "adhoc_communication/BroadcastString.h"
#include "nav_msgs/Odometry.h"
#include "std_msgs/String.h"
#include "geometry_msgs/Twist.h"
#include "functions.h"
#include "defines.h"
#include "EthernetFrame.h"
#include "EthernetFrame.cpp"
#include "structs.h"
#include "Beacon.cpp"
#include "Beacon.h"
#include "AckLinkFrame.h"
#include "AckLinkFrame.cpp"
#include "McAckFrame.h"
#include "McAckFrame.cpp"
#include "RouteRequest.h"
#include "RouteRequest.cpp"
#include "RouteResponse.cpp"
#include "RouteResponse.h"
#include "AckRoutedFrame.h"
#include "AckRoutedFrame.cpp"
#include "McRouteActivationFrame.h"
#include "McRouteActivationFrame.cpp"
#include "Packet.cpp"
#include "PositionSubscriber.h"
#include "PositionSubscriber.cpp"
#include "McDisconnectFrame.h"
#include "McDisconnectFrame.cpp"
#include "MultiHopBroadcastFrame.h"
#include "MultiHopBroadcastFrame.cpp"
#include "McNackFrame.h"
#include "McNackFrame.cpp"
#include "McHandler.h"
#include "McHandler.cpp"
#include "McPosAckObj.h"
#include "McPosAckObj.cpp"
#include <execinfo.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include "Logging.h"
#include "Logging.cpp"
#include "DebugFunctions.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  frame_packet_info

Functions

void addDownlinkToMcTree (mc_tree tree, mac downlink)
void cacheNackMcFrame (RoutedFrame rf)
void cleanRoutingTable ()
void close_raw_socket ()
bool connectedWith (unsigned char mac[6])
void deleteObsoleteRequests ()
void deleteOldPackets ()
void deliverMcAckFrame (stc_RoutedFrame &stc_rf, routing_entry &r, bool send_ack)
template<class t >
void desializeObject (unsigned char *serialized_pose_stamp, uint32_t length, t *obj)
void disconnectDownlinks (McTree *t)
int eth_raw_init ()
PacketgetFirstMcFrame (list< Packet > *packets)
std::string getHostnameFromMac (unsigned char mac[6])
std::string getListAsString (std::list< uint32_t > l)
std::string getListAsString (std::vector< uint32_t > l)
nav_msgs::OccupancyGrid getMapFromNetworkString (unsigned char *serializedMap, uint32_t length)
McPosAckObjgetMcAckObj (std::string *group, uint32_t p_id, uint32_t seq)
mc_tree getMCTree (std::string mc_name)
std::vector< McNackFramegetMissingFrames (Packet *p)
geometry_msgs::PoseStamped getPoseStampFromNetworkString (unsigned char *serializedPoseStamp, uint32_t length)
bool getRoute (routing_entry &r, std::string hostname)
bool gotAck (AckLinkFrame *frame)
bool gotFrameRecently (RoutedFrame incomingFrame)
void handler (int sig)
bool iAmMember (string group)
void initFrameTypes ()
void initParams (ros::NodeHandle *n)
void initRobotMacList (std::string *robot_mac)
bool isReachable (unsigned char mac[6])
void joinAllMcGroups ()
bool joinMCGroup (adhoc_communication::ChangeMCMembership::Request &req, adhoc_communication::ChangeMCMembership::Response &res)
 Service to tell the node to attempt to connect to a multicast group.
void mcLostConnection (hostname_mac host)
void processAckRoutedFrame (AckRoutedFrame *fr)
void processBeacon (Beacon *helloF)
void processBroadcastFrame (RoutedFrame *f)
void processIncomingFrames ()
void processMcAckFrame (McAckFrame *f)
void processMcActivationFrame (McRouteActivationFrame *f)
void processMcDisconnectDownlink (McDisconnectFrame *f)
void processMcDisconnectUplink (McDisconnectFrame *f)
void processRoutedFrame (RoutedFrame *f)
void processRouteRequest (RouteRequest req)
void processRouteResponse (RouteResponse rr)
void publishMap (nav_msgs::OccupancyGrid map, std::string topic)
template<class message >
void publishMessage (message m, string topic)
void publishPacket (Packet *p)
void receiveFrames ()
void reconnectToMcGroup (std::string group_name)
void requestPendingFrames ()
void resendLinkFrame (stc_frame f)
void resendMcFrame (boost::condition_variable &condi, stc_RoutedFrame *rf, routing_entry route)
void resendRequestedFrame (uint32_t *seq_num, uint32_t *packet_id, string *source_h, string *mc_group)
void resendRequestedFrameFromPacket (McNackFrame nack)
void resendRequestedFrames ()
void resendRoutedFrame (boost::condition_variable &condi, routing_entry route)
void resendRouteRequest (route_request &req, boost::condition_variable &con)
void resendUnackLinkFrame (string hostname_src, uint32_t id, unsigned char *mac, string network_string, uint8_t type)
void safeFrame (RoutedFrame incomingFrame)
void sendBeacons ()
void sendLinkAck (unsigned char *dest, unsigned char *confirmer_mac, uint32_t id, string source, bool cr, uint8_t type)
bool sendPacket (std::string &hostname_destination, std::string &payload, uint8_t data_type_, std::string &topic)
void socketSend (string network_string)
void testPacket ()
void updateTsRequestFrames (Packet p)

Variables

list< bcastsbcasts_l
int beacon_interval = 500
list< Packetcached_mc_packets_l
int delay = 1
bool enable_cooperative_relaying = false
struct eh_headerethernet_header
std::map< uint16_t, std::string > frame_types
RoutedFrame frames_received_recently_a [MAX_FRAMES_CACHED]
uint16_t frr_count = 0
uint16_t frr_index = 0
boost::condition_variable got_request_response
boost::condition_variable got_rframe_ack
int hop_limit_increment = 3
int hop_limit_max = 0
int hop_limit_min = 0
std::string hostname
list< RoutedFrameinc_frames_l
uint32_t incoming_frame_count = 0
uint32_t incoming_frames_lost = 0
unsigned char * interface = NULL
std::string interface_as_string = ""
int l_0_model = 33
std::string log_path = ""
double loss_ratio = 0
std::string mac_as_string = ""
std::map< unsigned char *, string > mac_hname_dict
int max_frame_size = 1500
int max_packet_size = 10000
list< McPosAckObj * > mc_ack_l
list< McTree * > mc_groups_l
boost::mutex mtx_cached_mc_packets
boost::mutex mtx_cr_entries
boost::mutex mtx_frames_received_recently
boost::mutex mtx_inc_rf_frames
boost::mutex mtx_mc_ack_l
boost::mutex mtx_mc_groups
boost::mutex mtx_neighbors
boost::mutex mtx_notify
boost::mutex mtx_packets_incomplete
boost::mutex mtx_relays
boost::mutex mtx_requested_frames
boost::mutex mtx_route_requests
boost::mutex mtx_routing_table
boost::mutex mtx_unack_cr_frames
boost::mutex mtx_unack_link_frames
boost::mutex mtx_unack_mc_cr_frames
boost::mutex mtx_unack_routed_frame
PositionSubscribermy_sim_position
int n_model = 4
ros::NodeHandlen_priv
ros::NodeHandlen_pub
list< hostname_macneighbors_l
std::string node_prefix = "adhoc_communication/"
int num_e2e_retrans = 10
int num_link_retrans = 3
int num_rreq = 1
int p_thres = -75
int p_tx = 15
uint32_t packet_id_ = -1
list< Packetpackets_incomplete_l
list< stc_packetpublished_packets_l
std::list< ros::Publisherpublishers_l
int raw_socket = 0
bool rebuild_mc_tree = false
bool recursive_mc_ack = false
list< McNackFramerequested_frames_l
list< PositionSubscriber * > robot_positions_l
int robots_in_simulation = 10
list< route_requestroute_requests_l
list< routing_entryrouting_table_l
std::string sim_robot_macs = ""
bool simulation_mode = false
struct sockaddr_ll socket_address
unsigned char src_mac [6]
std::string topic_new_robot = "new_robot"
std::string topic_remove_robot = "remove_robot"
list< ack_cr_infounack_cr_frames_l
list< stc_frameunack_link_frames_l
list< ack_cr_infounack_mc_cr_frames_l
stc_RoutedFrameunack_routed_frame

Function Documentation

void addDownlinkToMcTree ( mc_tree  tree,
mac  downlink 
)

Definition at line 929 of file header.h.

Definition at line 470 of file header.h.

void close_raw_socket ( )

Definition at line 397 of file header.h.

bool connectedWith ( unsigned char  mac[6])

Definition at line 836 of file header.h.

Definition at line 3302 of file adhoc_communication.cpp.

void deleteOldPackets ( )

Definition at line 3332 of file adhoc_communication.cpp.

void deliverMcAckFrame ( stc_RoutedFrame stc_rf,
routing_entry r,
bool  send_ack 
)

Definition at line 2035 of file adhoc_communication.cpp.

template<class t >
void desializeObject ( unsigned char *  serialized_pose_stamp,
uint32_t  length,
t *  obj 
)

Definition at line 1367 of file header.h.

void disconnectDownlinks ( McTree t)

Definition at line 848 of file header.h.

int eth_raw_init ( )

Definition at line 332 of file header.h.

Packet* getFirstMcFrame ( list< Packet > *  packets)

Definition at line 1230 of file header.h.

std::string getHostnameFromMac ( unsigned char  mac[6])

Definition at line 710 of file header.h.

std::string getListAsString ( std::list< uint32_t >  l)

Definition at line 1251 of file header.h.

std::string getListAsString ( std::vector< uint32_t >  l)

Definition at line 1241 of file header.h.

nav_msgs::OccupancyGrid getMapFromNetworkString ( unsigned char *  serializedMap,
uint32_t  length 
)
McPosAckObj* getMcAckObj ( std::string *  group,
uint32_t  p_id,
uint32_t  seq 
)

Definition at line 1725 of file adhoc_communication.cpp.

mc_tree getMCTree ( std::string  mc_name)
std::vector<McNackFrame> getMissingFrames ( Packet p)

Definition at line 1200 of file header.h.

geometry_msgs::PoseStamped getPoseStampFromNetworkString ( unsigned char *  serializedPoseStamp,
uint32_t  length 
)
bool getRoute ( routing_entry r,
std::string  hostname 
)

Definition at line 414 of file header.h.

bool gotAck ( AckLinkFrame frame)

Definition at line 1247 of file adhoc_communication.cpp.

bool gotFrameRecently ( RoutedFrame  incomingFrame)

Definition at line 624 of file header.h.

void handler ( int  sig)

Definition at line 130 of file header.h.

bool iAmMember ( string  group)

Definition at line 972 of file header.h.

void initFrameTypes ( )

Definition at line 483 of file header.h.

void initParams ( ros::NodeHandle n)

Definition at line 732 of file header.h.

void initRobotMacList ( std::string *  robot_mac)

Definition at line 1326 of file header.h.

bool isReachable ( unsigned char  mac[6])

Definition at line 790 of file header.h.

void joinAllMcGroups ( )

Definition at line 1123 of file header.h.

bool joinMCGroup ( adhoc_communication::ChangeMCMembership::Request &  req,
adhoc_communication::ChangeMCMembership::Response &  res 
)

Service to tell the node to attempt to connect to a multicast group.

Parameters:
[in]reqThe service request object.
[out]resThe service response object.

Implements the ROS service join_mc_group to tell a node to connect to a multicast group.

Definition at line 108 of file adhoc_communication.cpp.

Definition at line 864 of file header.h.

Definition at line 1790 of file adhoc_communication.cpp.

void processBeacon ( Beacon helloF)

Definition at line 2646 of file adhoc_communication.cpp.

Definition at line 2072 of file adhoc_communication.cpp.

Definition at line 2794 of file adhoc_communication.cpp.

Definition at line 1754 of file adhoc_communication.cpp.

Definition at line 2700 of file adhoc_communication.cpp.

Definition at line 546 of file header.h.

Definition at line 499 of file header.h.

Definition at line 1898 of file adhoc_communication.cpp.

Definition at line 2252 of file adhoc_communication.cpp.

Definition at line 2481 of file adhoc_communication.cpp.

void publishMap ( nav_msgs::OccupancyGrid  map,
std::string  topic 
)
template<class message >
void publishMessage ( message  m,
string  topic 
)

Definition at line 1628 of file adhoc_communication.cpp.

void publishPacket ( Packet p)

Definition at line 2994 of file adhoc_communication.cpp.

void receiveFrames ( )

Definition at line 1330 of file adhoc_communication.cpp.

void reconnectToMcGroup ( std::string  group_name)

Definition at line 1065 of file header.h.

Definition at line 1274 of file header.h.

Definition at line 3380 of file adhoc_communication.cpp.

void resendMcFrame ( boost::condition_variable &  condi,
stc_RoutedFrame rf,
routing_entry  route 
)

Definition at line 3273 of file adhoc_communication.cpp.

void resendRequestedFrame ( uint32_t *  seq_num,
uint32_t *  packet_id,
string *  source_h,
string *  mc_group 
)

Definition at line 980 of file header.h.

Definition at line 1031 of file header.h.

void resendRoutedFrame ( boost::condition_variable &  condi,
routing_entry  route 
)

Definition at line 3218 of file adhoc_communication.cpp.

void resendRouteRequest ( route_request req,
boost::condition_variable &  con 
)

Definition at line 3155 of file adhoc_communication.cpp.

void resendUnackLinkFrame ( string  hostname_src,
uint32_t  id,
unsigned char *  mac,
string  network_string,
uint8_t  type 
)

Definition at line 452 of file header.h.

void safeFrame ( RoutedFrame  incomingFrame)

Definition at line 683 of file header.h.

void sendBeacons ( )

Definition at line 1662 of file adhoc_communication.cpp.

void sendLinkAck ( unsigned char *  dest,
unsigned char *  confirmer_mac,
uint32_t  id,
string  source,
bool  cr,
uint8_t  type 
)

Definition at line 1739 of file adhoc_communication.cpp.

bool sendPacket ( std::string &  hostname_destination,
std::string &  payload,
uint8_t  data_type_,
std::string &  topic 
)

is broadcast

is multicast

Definition at line 715 of file adhoc_communication.cpp.

void socketSend ( string  network_string)

Definition at line 440 of file header.h.

void testPacket ( )

Definition at line 594 of file header.h.

Definition at line 1261 of file header.h.


Variable Documentation

Definition at line 173 of file header.h.

int beacon_interval = 500

Definition at line 234 of file header.h.

Definition at line 182 of file header.h.

int delay = 1

Definition at line 252 of file header.h.

Definition at line 235 of file header.h.

Definition at line 222 of file header.h.

std::map<uint16_t, std::string> frame_types

Definition at line 128 of file header.h.

Definition at line 194 of file header.h.

uint16_t frr_count = 0

Definition at line 196 of file header.h.

uint16_t frr_index = 0

Definition at line 195 of file header.h.

boost::condition_variable got_request_response

Definition at line 262 of file header.h.

boost::condition_variable got_rframe_ack

Definition at line 263 of file header.h.

Definition at line 232 of file header.h.

int hop_limit_max = 0

Definition at line 231 of file header.h.

int hop_limit_min = 0

Definition at line 230 of file header.h.

std::string hostname

Definition at line 148 of file header.h.

Definition at line 183 of file header.h.

uint32_t incoming_frame_count = 0

Definition at line 329 of file header.h.

uint32_t incoming_frames_lost = 0

Definition at line 330 of file header.h.

unsigned char* interface = NULL

Definition at line 147 of file header.h.

std::string interface_as_string = ""

Definition at line 150 of file header.h.

int l_0_model = 33

Definition at line 250 of file header.h.

std::string log_path = ""

Definition at line 241 of file header.h.

double loss_ratio = 0

Definition at line 238 of file header.h.

std::string mac_as_string = ""

Definition at line 149 of file header.h.

std::map<unsigned char*, string> mac_hname_dict

Definition at line 179 of file header.h.

int max_frame_size = 1500

Definition at line 229 of file header.h.

int max_packet_size = 10000

Definition at line 233 of file header.h.

Definition at line 168 of file header.h.

McHandler mc_handler & mc_groups_l

Definition at line 166 of file header.h.

boost::mutex mtx_cached_mc_packets

Definition at line 213 of file header.h.

boost::mutex mtx_cr_entries

Definition at line 201 of file header.h.

Definition at line 209 of file header.h.

boost::mutex mtx_inc_rf_frames

Definition at line 210 of file header.h.

boost::mutex mtx_mc_ack_l

Definition at line 215 of file header.h.

boost::mutex mtx_mc_groups

Definition at line 216 of file header.h.

boost::mutex mtx_neighbors

Definition at line 204 of file header.h.

boost::mutex mtx_notify

Definition at line 260 of file header.h.

boost::mutex mtx_packets_incomplete

Definition at line 212 of file header.h.

boost::mutex mtx_relays

Definition at line 199 of file header.h.

boost::mutex mtx_requested_frames

Definition at line 211 of file header.h.

boost::mutex mtx_route_requests

Definition at line 202 of file header.h.

boost::mutex mtx_routing_table

Definition at line 200 of file header.h.

boost::mutex mtx_unack_cr_frames

Definition at line 206 of file header.h.

boost::mutex mtx_unack_link_frames

Definition at line 205 of file header.h.

boost::mutex mtx_unack_mc_cr_frames

Definition at line 207 of file header.h.

boost::mutex mtx_unack_routed_frame

Definition at line 203 of file header.h.

Definition at line 189 of file header.h.

int n_model = 4

Definition at line 249 of file header.h.

Definition at line 257 of file header.h.

Definition at line 258 of file header.h.

Definition at line 180 of file header.h.

std::string node_prefix = "adhoc_communication/"

Definition at line 266 of file header.h.

int num_e2e_retrans = 10

Definition at line 227 of file header.h.

Definition at line 226 of file header.h.

int num_rreq = 1

Definition at line 228 of file header.h.

int p_thres = -75

Definition at line 247 of file header.h.

int p_tx = 15

Definition at line 248 of file header.h.

uint32_t packet_id_ = -1

Definition at line 151 of file header.h.

Definition at line 181 of file header.h.

Definition at line 186 of file header.h.

Definition at line 255 of file header.h.

int raw_socket = 0

Definition at line 219 of file header.h.

bool rebuild_mc_tree = false

Definition at line 236 of file header.h.

bool recursive_mc_ack = false

Definition at line 237 of file header.h.

Definition at line 184 of file header.h.

Definition at line 188 of file header.h.

Definition at line 246 of file header.h.

Definition at line 176 of file header.h.

Definition at line 177 of file header.h.

std::string sim_robot_macs = ""

Definition at line 242 of file header.h.

bool simulation_mode = false

Definition at line 245 of file header.h.

struct sockaddr_ll socket_address

Definition at line 220 of file header.h.

unsigned char src_mac[6]

Definition at line 221 of file header.h.

std::string topic_new_robot = "new_robot"

Definition at line 239 of file header.h.

std::string topic_remove_robot = "remove_robot"

Definition at line 240 of file header.h.

Definition at line 171 of file header.h.

Definition at line 170 of file header.h.

Definition at line 172 of file header.h.

Definition at line 175 of file header.h.



adhoc_communication
Author(s): Guenter Cwioro , Torsten Andre
autogenerated on Thu Jun 6 2019 20:59:43