[Positioning] CSV format: remove "Error" string

Result::to_csv() do not give a fixed "Error" string field before the
error value field any more.

Update comments to better document the CSV format.
This commit is contained in:
Matteo Cypriani 2011-08-18 11:27:38 +02:00
parent ab8ad83e52
commit 3f328e0e69
4 changed files with 19 additions and 7 deletions

View File

@ -6,8 +6,7 @@
/// Writes results to a CSV file
/**
* CSV format is:
* Mobile_MAC;Timestamp;Algorithm1;X;Y;Z;;AlgorithmN;X;Y;Z
* The CSV format is documented in ResultList::to_csv().
*/
class OutputCSV: public OutputMedium
{

View File

@ -5,8 +5,9 @@
/// Sends results to a remote host by UDP
/**
* The results are sent through an UDP socket as a CSV string value. The
* format used is the same as in OutputCSV.
* The results are sent through an UDP socket as a CSV string value.
* The format used is the same as in OutputCSV, and is documented in
* ResultList::to_csv().
*/
class OutputUDPSocket: public OutputNetworkSocket
{

View File

@ -76,7 +76,12 @@ bool Result::operator==(const Result &source) const
/**
* @return The result as a CSV string, \em without trailing '\n'.
* This function creates a CSV string from the Result's data.
*
* The format used is the following:
* Algorithm_name;X;Y;Z;Error;Area_name
*
* @return The result as a CSV string, \em without a trailing '\\n'.
*/
const string Result::to_csv() const
{
@ -87,7 +92,6 @@ const string Result::to_csv() const
<< ';' << position.get_x()
<< ';' << position.get_y()
<< ';' << position.get_z()
<< ';' << "Error"
<< ';' << error
<< ';' ;

View File

@ -46,7 +46,15 @@ bool ResultList::operator==(const ResultList &source) const
/**
* @return The results as a CSV string, \em without trailing '\n'.
* This function creates a CSV string from the Result's data.
*
* The format used is the following:
* Mobile_MAC;Request_type;Timestamp;[Algorithm_1];;[Algorithm_n]
*
* The CSV format for the [Algorithm_i] strings is documented in
* Result::to_csv().
*
* @return The results as a CSV string, \em without a trailing '\\n'.
*/
const string ResultList::to_csv() const
{