Go to the documentation of this file.00001
00007 #ifndef DEFINES_H_
00008 #define DEFINES_H_
00009
00010
00011
00012
00013
00014
00015
00016 #define DELAY
00017
00018 #define PERFORMANCE_LOGGING
00019 #define PERFORMANCE_LOGGING_UC_LINK_SUMMARY
00020 #define PERFORMANCE_LOGGING_MC_LINK_SUMMARY
00021 #define PERFORMANCE_LOGGING_UC_LINK_FRAMES
00022 #define PERFORMANCE_LOGGING_SERVICE_CALLS
00023
00024 unsigned char bcast_mac[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
00025
00026 #define ETH_TYPE 0x4148 //AH -> AD-HOC
00027
00028
00029 #define FRAME_TYPE_ACK 0x61 //a -> Acknowledgment (link frame)
00030 #define FRAME_TYPE_BEACON 0x42 //B -> BEACON
00031 #define FRAME_TYPE_REQUEST 0x52 //R -> Route Request
00032 #define FRAME_TYPE_REPLY 0x72 //r -> Route Response
00033 #define FRAME_TYPE_TRANSPORT_DATA 0x44 //D -> Data
00034 #define FRAME_TYPE_TRANSPORT_ACK 0x41 // A -> Acknowledgment (e2e frame)
00035 #define FRAME_TYPE_CR_DETECTION 0x64 // d -> Detection
00036 #define FRAME_TYPE_CR_SELECTION 0x53 // s -> Selection
00037 #define FRAME_TYPE_MC_ACK 0x6d // m -> Selection
00038 #define FRAME_TYPE_MC_NACK 0x4e // N -> Nack
00039 #define FRAME_TYPE_MC_ACTIVATION 0x59// Y
00040 #define FRAME_TYPE_MC_DISCONNECT 0x50 // P -> Prune
00041 #define FRAME_TYPE_BROADCAST 0x62 // b
00042
00043 #define FRAME_DATA_TYPE_FRONTIER 0x46 // F -> Frontier
00044 #define FRAME_DATA_TYPE_MAP 0x4d //M -> Map
00045 #define FRAME_DATA_TYPE_POSITION 0x50 //P -> Position
00046 #define FRAME_DATA_TYPE_ANY 0x41 //A -> Any (String)
00047 #define FRAME_DATA_TYPE_POINT 0x70 //p -> Point
00048 #define FRAME_DATA_TYPE_MAP_UPDATE 0x55 //U
00049 #define FRAME_DATA_TYPE_CONTROLL_MSG 0x43 //C
00050 #define FRAME_DATA_TYPE_AUCTION 0x61 //C
00051 #define FRAME_DATA_TYPE_CLUSTER 0x63 //C
00052 #define FRAME_DATA_TYPE_TWIST 0x54 //T -> Twist
00053 #define FRAME_DATA_TYPE_ROBOT_UPDATE 0x52 //R
00054
00055 #define FRAME_DATA_TYPE_QUATERNION 0x51 //0x51 in hex means Q in ASCII -> stands for QUATERNION
00056
00057
00058 #define MAX_INTERN_JOIN_ATTEMPS 5 //defines how often a robot will try to join a mc group
00059 #define MAX_JOIN_ATTEMPS 5 //defines how often a robot will try to join a mc group
00060 #define INTERVAL_WAIT_MC_RECONN 200 //[ms]if a node gets a prune message, it will will a little to give the network time for synconization
00061 #define INTERWAL_RECONNECT_MC_G 500 // ms
00062
00063 #define TIME_BEFORE_REMOVE_NEIGHBOR 5000 //[ms]
00064
00065
00066 #define MAX_TIME_CACHE_UNACK_CR_FRAMES 1500 //[ms]
00067 #define MAX_TIME_CACHE_UNUSED_ROUTES 5 * 60 * 1000 //[ms] -> 5min
00068 #define MAX_TIME_CACHE_PUBLISHED_PACKETS 10 * 1000 //[ms]
00069 #define MAX_TIME_CACHE_ROUTE_REQUEST 15 * 1000// [ms] Max time a route request will be cached
00070
00071 #define MAX_FRAMES_CACHED 200 //Max frames that are cached (to prevent multiple incoming of the same frame)
00072 #define INTERVAL_TO_RETRANSMIT_LINK_FRAMES 30// [ms] Interval to retransmit unacknowledged link frame
00073 #define MAX_RELAYS 3
00074
00075 #define RELAY_INDEX_MULTIPLICATOR 10
00076
00077
00078 #define INTERVAL_DEBUG_OUTPUT 3000
00079 #define INTERVAL_UPTDATE_THREAD_TO_DELETE_OBSOLETE_REQUESTS 1200 // [ms] Time that the thread to delete obsolete requests will sleep, after spin
00080 #define INTERVAL_RESEND_ROUTED_FRAME 100 //[ms] Time to re-send a unacknowledged routed frame
00081 #define INTERVAL_RESEND_ROUTE_REQUEST 1200 // [ms] Time to re-send a route request, if i get no response
00082 #define INTERVAL_DELETE_OLD_PACKETS 60000 //[ms]
00083 #define INTERVAL_WAIT_FOR_MCROUTES 2000 //[ms]
00084
00085
00086 #define INTERVAL_BETWEEN_MC_NACK_FRAMES 3000//[µs]
00087 #define INTERVAL_BETWEEN_RESEND_REQUESTED_FRAMES 5000 //[µs] 1000
00088 #define INTERVAL_REQUEST_FRAMES 30 // [ms] 100
00089 #define INTERVAL_RESEND_REQUESTED_FRAMES 1 // [ms]
00090 #define MAX_REQUESTED_FRAMES 40 // [FRAMES] //40
00091 #define START_RQUESTING_PACKET_FILL_LEVEL 0.7f //[%]
00092 #define START_RQUESTING_INTERVAL_AFTER_LAST_FRAME_GOT 200// [ms]
00093
00094 #define MAX_REQUESTED_FRAMES_IN_NACK 40
00095
00096
00097 #define DEBUG
00098
00099 #define TRY_REJOIN
00100
00101
00102 #define USE_CHANNEL_MODEL
00103
00104
00105 bool burst_multicast = true;
00106
00107 #endif
00108