AutoGRAPH.NET Service EnumParameters (EN)
Версия от 12:03, 11 февраля 2016; Admin (обсуждение | вклад) (Новая страница: «Get list of parameters for one or many devices. Unavailable devices don't included in result set. == WCF == Definition: <pre> Dictionary<Guid,RParameters> EnumP…»)
Get list of parameters for one or many devices. Unavailable devices don't included in result set.
WCF
Definition:
Dictionary<Guid,RParameters> EnumParameters(string schemaID, Guid[] deviceIDs)
deviceIDs – list of device IDs for request parameters (ID of devices can be read by EnumDevices – field ID in RGroupItem class)
Result:
public class RParameters { public Guid ID { get; set; } // device ID public RParameter[] FinalParams { get; set; } // final (total) parameters public RParameter[] OnlineParams { get; set; } // online (tabular) parameters } public class RParameter { public string Name { get; set; } // name (internal name, for example: Daylight, Speed, ...) public string Caption { get; set; } // caption (user friendly caption like "Day lighting", "Car speed", ...) public string GroupName { get; set; } // group name (parameter can grouped by group name) public ReturnType ReturnType { get; set; } // data type public string Unit { get; set; } // unit of measure (km/h, kg, tn, ...) public string Format { get; set; } // format string of parameter value (dd.MM.yyyy, ...) public RParameterStatus[] Statuses { get; set; } // list of parameter statuses (for switching parameters) // for example: parameter Motion have three statuses - Park, Motion, Flight } public class RParameterStatus { public int Value { get; set; } // ordinal value of status public string Caption { get; set; } // user friendly status caption public Guid ReferenceID { get; set; } // if status is Geofence/Driver/Implement - here will ID of element public Guid[] ReferenceIDs { get; set; } // if geofence configured with overlapping detection - here will list of all intersected geofences (maximum overlapping level is 4) } // parameter data types public enum ReturnType : int { Boolean = 0, Byte = 1, Int32 = 2, Int64 = 3, Double = 4, DateTime = 5, TimeSpan = 6, Guid = 7, Guid4 = 8, String = 9, Image = 10, Coordinates = 11 }
JSON
Calling:
http://localhost:8300/EnumParameters/Demo/2682e6d3-5055-4a3b-b9c8-0b723c57512a,9c60db53-5054-44f6-a708-8e3c9b62553f http://localhost:8300/EnumParameters?schemaID=Demo&IDs=2682e6d3-5055-4a3b-b9c8-0b723c57512a,9c60db53-5054-44f6-a708-8e3c9b62553f
- Demo - schema ID
- 2682e6d3-5055-4a3b-b9c8-0b723c57512a and 9c60db53-5054-44f6-a708-8e3c9b62553f - ID of devices from schema Demo. Device ID is comma-separated.
Result: download file
Parameters in AutoGRAPH.Pro: | |