AutoGRAPH.NET Service GetStage (EN)

Материал из TK
Версия от 13:46, 11 февраля 2016; Admin (обсуждение | вклад) (Новая страница: «Return single stage for specified devices. Subset of returning results GetTrips. == WCF == Definition: <pre>Dictionary<G…»)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Return single stage for specified devices. Subset of returning results GetTrips.

WCF

Definition:

Dictionary<Guid, RTripStage> GetStage(string schemaID, string deviceIDs, string SD, string ED, string stageName)
  • schemaID – schema ID
  • deviceIDs – device list, acquired by EnumDevices – field ID in RGroupItem class)
  • SD / ED – start and end of period for request. Server local time.
  • stageName - name or alias of stage (GeoFence, Motion, ...). stageName can be mask like 'Tank*', in this case will returned all tanks with name starting from Tank.

result:

public class RTripStage // отрезки рейса (например "Остановки", "Заправки/сливы")
{
   public string Name { get; set; }                     // stage name
   public string[] Params { get; set; }                 // column captions
   public RTripStageItem[] Items { get; set; }          // stage items
   public RParameterStatus[] Statuses { get; set; }     // list of used statuses for this stage
   public Dictionary<string,object> Total { get; set; } // summary data for this stage
}

public class RTripStageItem
{
   public int Index { get; set; }        // stage index (started from 0)
   public DateTime SD { get; set; }      // UTC date/time of stage begin
   public DateTime ED { get; set; }      // UTC date/time of stage end
   public int Status { get; set; }       // ID of status (0 = off, >0 = index of status in RTripStage.Statuses)
   public Guid StatusID { get; set; }    // ID of element (geofence for example, if status defined by geofences)
   public Guid[] StatusIDs { get; set; } // ID of elements (geofence for example, if status defined by geofences with configured overlapping)
   public string Caption { get; set; }   // name of status (Move, Park, ...), name of geofence or another element, driver name, ...
   public object[] Values { get; set; }  // values for each column (length and element order in this array always equal RTripStage.Params)
}

JSON

Calling:

http://localhost:8300/GetStage/Demo/d090286c-1fd6-4ef2-ae44-8091d04408d1/20150509-0000/20150511-2359/Motion

Date/time must be specified in yyyyMMdd or yyyyMMdd-HHmm format Device IDs is comma-separated.

Result: download file

AutoGRAPHNET Service GetStage.png