AutoGRAPH.NET Service GetTripTables (EN) — различия между версиями
Admin (обсуждение | вклад) (Новая страница: «Return tabular data for one or more devices with specified period. == WCF == Definition: <pre>Dictionary<Guid, RTripTables> GetTripTables(string schemaID, strin…») |
(нет различий)
|
Версия 13:37, 11 февраля 2016
Return tabular data for one or more devices with specified period.
WCF
Definition:
Dictionary<Guid, RTripTables> GetTripTables(string schemaID, string deviceIDs, string SD, string ED, string[] onlineParams, int tripSplitterIndex)/pre> *schemaID – schema ID *deviceIDs – list of device ID [[AutoGRAPH.NET Service EnumDevices (EN)|EnumDevices]] – ID field in RGroupItem class) *SD / ED – start and end of period for request. Server local time. *onlineParams - one or more tabular parameters (через запятую). Invalid or absent parameters will skipped in result set. *tripSplitterIndex - trip splitter (0 by default) or -1 if no splitting to trips Result: <pre> public class RTripTables { public Guid ID { get; set; } // device ID public string Name { get; set; } // device name public RTripTableItem[] Trips { get; set; }// trip list (if tripSplitterIndex==-1 only one element will in this array) } public class RTripTableItem { public int Index { get; set; } // trip index (started from 0) public DateTime SD { get; set; } // UTC date/time of trip begin public DateTime ED { get; set; } // UTC date/time of trip end public RPoint PointStart { get; set; } // point of trip begin public RPoint PointEnd { get; set; } // point of trip end public DateTime[] DT { get; set; } // UTC date/time for each point of track public RTripTableValues[] Values { get; set; } // tabular values for each parameter } public class RTripTableValues { public string Name { get; set; } // parameter name public string Caption { get; set; } // parameter caption public object[] Values { get; set; } // array of values for each point (length of this array equal of length RTripTableItem.Values). // Type of data depend from ReturnType field public RParameterStatus[] Statuses { get; set; } // list of used statuses public ReturnType ReturnType { get; set; } // data type public AddValueType ValueType { get; set; } // parameter modifier public string Unit { get; set; } // unit of measure or empty string public string Format { get; set; } // format string or empty } public enum AddValueType : int { Curr = 0, // current value (fuel level for example) First = 1, // first value in stage/trip (for example, begin of trip or begin of stage) Last = 2, // last value in stage/trip (for example, last of trip or last of stage) Diff = 3 // difference between values - current and previous // (for example fuel consumption as difference between current fuel level and previous fuel level) }
JSON
Вызов:
http://localhost:8300/GetTripTables/DemoCEBIT/d090286c-1fd6-4ef2-ae44-8091d04408d1/20151006/20151007-2359/Power,Speed,Signal,SpecConsum,GeoFence,SummaryLevel/0 http://localhost:8300/GetTripTables?schemaID=DemoCEBIT&IDs=d090286c-1fd6-4ef2-ae44-8091d04408d1&SD=20151006&ED=20151007-2359&onlineParams=Power,Speed,Signal,SpecConsum,GeoFence,SummaryLevel&tripSplitterIndex=0
Date/time must be specified in yyyyMMdd or yyyyMMdd-HHmm format
Device IDs is comma-separated.
Result: download file