[Positioning] TCPEvAAL: send request's timestamp

This commit is contained in:
Matteo Cypriani 2011-07-24 12:35:33 +02:00
parent 1dfe30ea03
commit 9f5305b496
1 changed files with 6 additions and 2 deletions

View File

@ -94,7 +94,7 @@ bool OutputTCPSocketEvAAL::close_socket()
void OutputTCPSocketEvAAL::write(const Result &result)
{
const Point3D &position = result.get_position() ;
long timestamp = 1234567l ; // FIXME
Timestamp request_time = result.get_request()->get_time_sent() ;
int area_of_interest = 0 ; // FIXME
ostringstream str ;
@ -102,7 +102,7 @@ void OutputTCPSocketEvAAL::write(const Result &result)
<< "OwlPS "
<< position.get_x() << ' '
<< position.get_y() << ' '
<< timestamp << ' '
<< static_cast<uint64_t>(request_time) << ' '
<< area_of_interest << '\n' ;
if (send_data(str.str()))
@ -110,6 +110,10 @@ void OutputTCPSocketEvAAL::write(const Result &result)
}
/**
* @param results Must contain only one element, since the EvAAL format
* accepts only one algorithm result.
*/
void OutputTCPSocketEvAAL::write(const ResultList &results)
{
assert(results.get_results().size() == 1) ;