Conversation
campagn1
left a comment
There was a problem hiding this comment.
Great work! Some corrections need to be performed: I commented only one module, the suggestions apply to all.
Brava!
DESERT_Addons/uwauv/Makefile.am
Outdated
|
|
||
| lib_LTLIBRARIES = libuwauv.la | ||
|
|
||
| libuwauv_la_SOURCES = uwauv-module.cc uwauv-module.h uwauverror-module.cc uwauverror-module.h uwauverror-b-module.cc uwauverror-b-module.h uwauv-packet.h uwauvctr-module.cc uwauvctr-module.h uwauvctrer-module.cc uwauvctrer-module.h uwauvctrer-b-module.cc uwauvctrer-b-module.h initlib.cc |
There was a problem hiding this comment.
this is fine, but in principle be aware that only the cc (or cpp) files need to be listed
DESERT_Addons/uwauv/uwauv-module.cc
Outdated
| { | ||
| UWSMEPosition p = UWSMEPosition(); | ||
| posit=&p; | ||
| bind("ackTimeout_", (int*) &ackTimeout); |
DESERT_Addons/uwauv/uwauv-module.cc
Outdated
| , out_file_stats(0) | ||
| { | ||
| posit = p; | ||
| bind("ackTimeout_", (int*) &ackTimeout); |
DESERT_Addons/uwauv/uwauv-module.cc
Outdated
| else if(argc == 3){ | ||
| if (strcasecmp(argv[1], "setPosition") == 0) { | ||
| UWSMEPosition* p = dynamic_cast<UWSMEPosition*> (tcl.lookup(argv[2])); | ||
| posit=p; |
There was a problem hiding this comment.
check if cast succeded with
if(p) {posit = p; ...}
if it did not, print that it failed and return TCL_ERR
| if (atof(argv[2]) == 3) { | ||
| ackPolicy = ACK_PGBK_OR_TO; | ||
| return TCL_OK; | ||
| } |
There was a problem hiding this comment.
add else {cerr<< "Policy not supported" << std::endl; return TCL_ERR;}
| **/ | ||
| virtual int command(int argc, const char *const *argv); | ||
|
|
||
| virtual void setdest( |
There was a problem hiding this comment.
better doxygen (we will make it for smposition as well)
| virtual void setdest( | ||
| double x_dest, double y_dest, double z_dest, double spead); | ||
|
|
||
| virtual void adddest( |
|
|
||
| virtual void adddest(double x_dest, double y_dest, double z_dest); | ||
|
|
||
| virtual void setAlarm(bool alarm); |
There was a problem hiding this comment.
alarm for what? Add doxygen
| protected: | ||
| /** | ||
| * Method that updates both the position coordinates | ||
| */ |
|
|
||
| private: | ||
|
|
||
| std::vector<std::vector<double>> waypoints; |
There was a problem hiding this comment.
doxygen with
variable; /**< description here */
campagn1
left a comment
There was a problem hiding this comment.
check the intentation as in the old comment
DESERT_Addons/uwauv/uwauv-module.h
Outdated
| #define HDR_UWAUV_MONITORING(p) (hdr_uwAUV_monitoring::access(p)) | ||
| #define HDR_UWAUV_CTR(p) (hdr_uwAUV_ctr::access(p)) | ||
|
|
||
| using namespace std; |
There was a problem hiding this comment.
please, remove "using namespace std;"
DESERT_Addons/uwauv/Makefile.am
Outdated
| @@ -0,0 +1,51 @@ | |||
| # | |||
| # Copyright (c) 2007 Regents of the SIGNET lab, University of Padova. | |||
There was a problem hiding this comment.
We are trying to begin to be consistent on this, so i would put 2023 here. I know we never updated it, but we should start
DESERT_Addons/uwauv/uwauv-module.cc
Outdated
| , ackPriority(0) | ||
| , ackNotPgbk(0) | ||
| , drop_old_waypoints(0) | ||
| , log_flag(0) |
There was a problem hiding this comment.
I would call it sth more consisent, like "log_on_file", this way is more clear for what is this flag (we all know it's a flag)
DESERT_Addons/uwauv/uwauv-module.cc
Outdated
| ackPolicy = ACK_PGBK_OR_TO; | ||
| return TCL_OK; | ||
| }else{ | ||
| cerr<<"Plicy not supported" << std::endl; |
There was a problem hiding this comment.
| cerr<<"Plicy not supported" << std::endl; | |
| cerr<<"Policy not supported" << std::endl; |
|
|
||
| void UwAUVModule::recv(Packet* p) { | ||
|
|
||
| hdr_uwAUV_ctr* uwAUVh = hdr_uwAUV_ctr::access(p); |
There was a problem hiding this comment.
Are ALL the packets travelling in the network with this header for sure?
| @@ -0,0 +1,188 @@ | |||
| import csv | |||
| import matplotlib.pyplot as plt | |||
There was a problem hiding this comment.
this does not come with a standard python installation i guess. Did you installed a custom pip? if so, better write in a readme, so that someone else know in advance which deps he needs to be installed and how
| @@ -0,0 +1,152 @@ | |||
| import csv | |||
| import matplotlib.pyplot as plt | |||
| import tikzplotlib | |||
| @@ -0,0 +1,173 @@ | |||
| import csv | |||
| import matplotlib.pyplot as plt | |||
| @@ -0,0 +1,428 @@ | |||
| import matplotlib.pyplot as plt | |||
| 2361.830056,-99.802673,-48.175367,-15.000000 | ||
| 2391.136904,-99.950656,-24.868989,-15.000000 | ||
| 2422.005942,-100.000000,-0.000000,-15.000000 | ||
| 2622.000000,100.000000,0.000000,-15.000000 |
There was a problem hiding this comment.
@campagn1 is this used in other simulations? is this ok with the other tcl or do we have to do some no-regression on other tcls?
No description provided.