2012-11-19 Sergio Martin <sergio.martin@artica.es>
* pandora_windows_service.cc: Added new fields of agent in XML header like custom_id and url_address. Added coordinates data (not gis_exec yet) git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7157 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a9dabcf2aa
commit
34867c52ad
|
@ -1,3 +1,9 @@
|
||||||
|
2012-11-19 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* pandora_windows_service.cc: Added new fields of
|
||||||
|
agent in XML header like custom_id and url_address.
|
||||||
|
Added coordinates data (not gis_exec yet)
|
||||||
|
|
||||||
2012-11-19 Sergio Martin <sergio.martin@artica.es>
|
2012-11-19 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* modules/pandora_module.h
|
* modules/pandora_module.h
|
||||||
|
|
|
@ -369,6 +369,7 @@ string
|
||||||
Pandora_Windows_Service::getXmlHeader () {
|
Pandora_Windows_Service::getXmlHeader () {
|
||||||
char timestamp[20];
|
char timestamp[20];
|
||||||
string agent_name, os_name, os_version, encoding, value, xml, address, parent_agent_name;
|
string agent_name, os_name, os_version, encoding, value, xml, address, parent_agent_name;
|
||||||
|
string custom_id, url_address, latitude, longitude, altitude, position_description;
|
||||||
time_t ctime;
|
time_t ctime;
|
||||||
struct tm *ctime_tm = NULL;
|
struct tm *ctime_tm = NULL;
|
||||||
|
|
||||||
|
@ -426,6 +427,42 @@ Pandora_Windows_Service::getXmlHeader () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get Custom ID
|
||||||
|
custom_id = conf->getValue ("custom_id");
|
||||||
|
if (custom_id != "") {
|
||||||
|
xml += "\" custom_id=\"";
|
||||||
|
xml += custom_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get Url Address
|
||||||
|
url_address = conf->getValue ("url_address");
|
||||||
|
if (url_address != "") {
|
||||||
|
xml += "\" url_address=\"";
|
||||||
|
xml += url_address;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get Coordinates
|
||||||
|
latitude = conf->getValue ("latitude");
|
||||||
|
longitude = conf->getValue ("longitude");
|
||||||
|
if(latitude != "" && longitude != "") {
|
||||||
|
xml += "\" latitude=\"";
|
||||||
|
xml += latitude;
|
||||||
|
xml += "\" longitude=\"";
|
||||||
|
xml += longitude;
|
||||||
|
|
||||||
|
altitude = conf->getValue ("altitude");
|
||||||
|
if(altitude != "") {
|
||||||
|
xml += "\" altitude=\"";
|
||||||
|
xml += altitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
position_description = conf->getValue ("position_description");
|
||||||
|
if(position_description != "") {
|
||||||
|
xml += "\" position_description=\"";
|
||||||
|
xml += position_description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
xml += "\" interval=\"" + conf->getValue ("interval") +
|
xml += "\" interval=\"" + conf->getValue ("interval") +
|
||||||
"\" os_name=\"" + os_name +
|
"\" os_name=\"" + os_name +
|
||||||
"\" os_version=\"" + os_version +
|
"\" os_version=\"" + os_version +
|
||||||
|
|
Loading…
Reference in New Issue