IWialonConnection

IWialonConnection is the main interface which allows to connect to Wialon server and retrieve needed objects from there.

Parameters Return Value Description
Login
BSTR Host
unsigned short Port
BSTR UserName
BSTR Password
IWialonCollection **UnitsCol To get all objects available to the current user. It is required to check each return value to be in existence (Not Nothing) or check return result (Error). To get newer data, disconnect from the server using the function Disconnect.
GetLastError
BSTR *Error To get the latest error from Wialon.
Disconnect
Disconnect from Wialon server in order to inquire fresh data later on (refresh).
GetReportsList
IWialonCollection **ReportsCol To get all available report templates. It is required to check each return value to be in existence (Not Nothing) or check return result (Error).
GetReportByID
unsigned From
unsigned To
long long UnitID
int TimeZoneOffset
BSTR Lang
long long ResourceID
long long ReportID
BSTR *ReportData To get a report by report or resource ID. This is an analogue of the function Generate from the IWialonReport interface. Starting and end time (From — To) is indicated in UNIX format, that is in seconds from the 1st of January 1970. Unit ID can be received from the collection of available units. Time zone (TimeZoneOffset) is indicated in seconds, for example, the value for Moscow is 10800, the shift from the prime meridian. The language Lang is indicated like domains (ru, en, etc). Report or resource ID can be received from the collection of available reports.
GetReportByIDU
int From
int To
int UnitID
int TimeZoneOffset
BSTR Lang
int ResourceID
int ReportID
BSTR *ReportData This is an analogue of the function GetReportByID compatible with applications which do not support 64-bit integer numbers. Not available in 64-bit version.
GetUnitGroups
IWialonCollection **UnitGroups To get all available unit groups IWialonUnitGroup.
GetUnitGroupByID
long long UnitGroupID IWialonUnitGroup **UnitGroup To get a unit group IWialonUnitGroup by its ID.
GetUnitGroupByIDU
int UnitGroupID IWialonUnitGroup **UnitGroup The analogue of the function GetUnitGroupByID compatible with applications which do not support 64-bit integer numbers. Not available in 64-bit version.
SetProxyMode
iBSTR Proxy
unsigned short ProxyPort
BSTR ProxyUserPwd
Set parameters to connect to proxy server (host, port, login:password).
GetLocationsText
BSTR Lats
BSTR Lons
int Count
BSTR *Text Get addresses by coordinates. Coordinates must be in text format separated with comma. Use dot as decimal delimiter. The number of coordinates is set in the third parameter, so the number of addresses, so the number of addresses returned will be as set. Addresses are returned in text format, separated with comma.