[Positioning] InputCSV: add debug info
This commit is contained in:
parent
77c66bf194
commit
c9d26033e9
|
@ -10,6 +10,8 @@
|
|||
using namespace std ;
|
||||
using std::tr1::unordered_map ;
|
||||
|
||||
#define DEBUG
|
||||
|
||||
|
||||
|
||||
/* *** Operations *** */
|
||||
|
@ -39,7 +41,12 @@ const Request& InputCSV::get_next_request()
|
|||
// Read Mobile MAC field
|
||||
string mac_mobile ;
|
||||
if (! file.read_field(mac_mobile)) // Wrong number of fields
|
||||
{
|
||||
#ifdef DEBUG
|
||||
cerr << "InputCSV: cannot read mac_mobile.\n" ;
|
||||
#endif // DEBUG
|
||||
return *current_request ;
|
||||
}
|
||||
const Mobile &mobile = Stock::find_create_mobile(mac_mobile) ;
|
||||
current_request->set_mobile(&mobile) ;
|
||||
|
||||
|
@ -50,6 +57,9 @@ const Request& InputCSV::get_next_request()
|
|||
{
|
||||
// Wrong number of fields: blank current request
|
||||
current_request->clear() ;
|
||||
#ifdef DEBUG
|
||||
cerr << "InputCSV: cannot read type.\n" ;
|
||||
#endif // DEBUG
|
||||
return *current_request ;
|
||||
}
|
||||
type = type_r ;
|
||||
|
@ -61,6 +71,9 @@ const Request& InputCSV::get_next_request()
|
|||
{
|
||||
// Wrong number of fields: blank current request
|
||||
current_request->clear() ;
|
||||
#ifdef DEBUG
|
||||
cerr << "InputCSV: cannot read timestamp.\n" ;
|
||||
#endif // DEBUG
|
||||
return *current_request ;
|
||||
}
|
||||
current_request->set_time_sent(timestamp) ;
|
||||
|
@ -71,6 +84,9 @@ const Request& InputCSV::get_next_request()
|
|||
{
|
||||
// Wrong number of fields: blank current request
|
||||
current_request->clear() ;
|
||||
#ifdef DEBUG
|
||||
cerr << "InputCSV: cannot read coordinates.\n" ;
|
||||
#endif // DEBUG
|
||||
return *current_request ;
|
||||
}
|
||||
|
||||
|
@ -81,6 +97,9 @@ const Request& InputCSV::get_next_request()
|
|||
{
|
||||
// Wrong number of fields: blank current request
|
||||
current_request->clear() ;
|
||||
#ifdef DEBUG
|
||||
cerr << "InputCSV: cannot read direction.\n" ;
|
||||
#endif // DEBUG
|
||||
return *current_request ;
|
||||
}
|
||||
if (direction_int != 0)
|
||||
|
@ -97,6 +116,9 @@ const Request& InputCSV::get_next_request()
|
|||
{
|
||||
// Wrong number of fields: blank current request
|
||||
current_request->clear() ;
|
||||
#ifdef DEBUG
|
||||
cerr << "InputCSV: cannot read mac_ap.\n" ;
|
||||
#endif // DEBUG
|
||||
return *current_request ;
|
||||
}
|
||||
const AccessPoint &ap = Stock::find_create_ap(mac_ap) ;
|
||||
|
|
Loading…
Reference in New Issue