43#define HDR_UWTRACK(p) (hdr_uwTracker::access(p))
55 : TclClass(
"Module/UW/SC/TRACKER")
80 Tcl &tcl = Tcl::instance();
83 if (strcasecmp(argv[1],
"setLeaderId") == 0) {
86 tcl.resultf(
"%s",
"leader_id Setted\n");
105 std::cout << NOW <<
" UwSCTrackerModule::recv(Packet* p)"
106 <<
" ROV (" << m.getSource()
107 <<
") removed current detected mine"
108 <<
" at position X = " << uwscf_track_h->
x()
109 <<
" Y = " << uwscf_track_h->
y()
110 <<
" Z = " << uwscf_track_h->
z() << std::endl;
113 Position mine_position;
114 mine_position.setX(uwscf_track_h->
x());
115 mine_position.setY(uwscf_track_h->
y());
116 mine_position.setZ(uwscf_track_h->
z());
119 if (mine.getDist(&mine_position) == 0)
129 std::cout << NOW <<
" UwSCTrackerModule::recv(Packet* p)"
130 <<
" ROV (" << m.getSource()
131 <<
") tracked a mine at position: X = "
132 << mine_position.getX()
133 <<
" , Y = " << mine_position.getY()
134 <<
" , Z = " << mine_position.getZ() << std::endl;
Class that manages cross layer messages that require the track position of the ROV follower.
void setTrackPosition(Position *position)
Sets the track position.
Class that manages cross layer messages that require the status of a mine tracked from a rov follower...
void setMineStatus(bool remove)
Sets the current mine status.
int debug_
Flag to enable several levels of debug.
virtual void recv(Packet *)
Performs the reception of packets from upper and lower layers.
Class that represents the binding with the tcl configuration script.
TclObject * create(int, const char *const *)
Creates the TCL object needed for the tcl language interpretation.
UwSCTrackerModuleClass()
Constructor of the class.
UwSCTrackerModule class adds to the UwTrackerModule class the possibility to send cross layer message...
virtual int command(int argc, const char *const *argv) override
TCL command interpreter.
std::list< Position > tracked_mines
Positions of the mines tracked by the follower.
int leader_id
ID of the Tracker leader.
UwSCTrackerModule()
Default Constructor of UwSCTrackerModule class.
virtual void recv(Packet *) override
Performs the reception of packets from upper and lower layers.
UwTrackerModule class is used to track mobile nodes via sonar and share tracking information via pack...
virtual int command(int argc, const char *const *argv)
TCL command interpreter.
hdr_uwSCFTracker describes the position and status of the current detected mine.
float & y()
Reference to the y variable.
float & x()
Reference to the x variable.
bool & mine_remove()
Reference to the speed variable.
float & z()
Reference to the z variable.
#define HDR_UWSCFTRACK(p)
UwSCTrackerModuleClass class_module_uwSCTracker
Provides the definition of the class UWSCTRACKER.