AutoGRAPH.NET Service GetOnlineInfo (EN) — различия между версиями

Материал из TK
Перейти к: навигация, поиск
(WCF)
Строка 4: Строка 4:
   
 
Definition:
 
Definition:
  +
<pre>
<pre>Dictionary<Guid, ROnlineInfo> GetOnlineInfo(string schemaID, Guid[] deviceIDs)</pre>
 
  +
Dictionary<Guid, ROnlineInfo> GetOnlineInfo(string schemaID, Guid[] deviceIDs)
  +
Dictionary<Guid, ROnlineInfo> GetOnlineInfoAll(string schemaID)
  +
</pre>
   
 
deviceIDs – list of device ID's (from [[AutoGRAPH.NET Service EnumDevices (EN)|EnumDevices]] list – ID field in RGroupItem)
 
deviceIDs – list of device ID's (from [[AutoGRAPH.NET Service EnumDevices (EN)|EnumDevices]] list – ID field in RGroupItem)

Версия 13:20, 11 февраля 2016

Get information about device last position.

WCF

Definition:

Dictionary<Guid, ROnlineInfo> GetOnlineInfo(string schemaID, Guid[] deviceIDs)
Dictionary<Guid, ROnlineInfo> GetOnlineInfoAll(string schemaID)

deviceIDs – list of device ID's (from EnumDevices list – ID field in RGroupItem)

Result:

public class ROnlineInfo
{
   public Guid ID { get; set; }                // device ID
   public string Name { get; set; }            // device name
   public RPoint LastPosition { get; set; }    // point of last position or null if no data or last position unknown
   public DateTime DT { get; set; }            // UTC date and time of last position
   public ROnlineState State { get; set; }     // device state
   public double Speed { get; set; }           // speed (in KM/H)
   public double Course { get; set; }          // direction of moving  in degrees (Nord is 0 degrees) or -1 if no coordinates
   public string Address { get; set; }         // address as string of last position or null if no coordinates
   public Dictionary<string,object> Final {get; set; } // final parameters
}

public enum ROnlineState
{
   Park = 0,     // stopped
   Move = 1,     // moving
   Flight = 2    // flying
}

public class RPoint
{
   public double Lat { get; set; }     // latitude
   public double Lng { get; set; }     // longitude
}

JSON

Calling:

http://localhost:8300/GetOnlineInfo/Demo/2682e6d3-5055-4a3b-b9c8-0b723c57512a,25f86189-adc9-445d-940c-abf860874622

If you want to pass many ID's in call - you must pass this identifiers as comma-separated.

Result: download file

AutoGRAPHNET Service GetOnlineInfo.png