AutoGRAPH.NET Service EnumDevices (EN)
Версия от 22:12, 27 сентября 2015; Admin (обсуждение | вклад)
Get device list and groups in specified schema (like EnumGeoFences for geofences). You can restore hierarchy by matching ID ⇔ ParentID, starting from top level (root node have ParentID=null).
WCF
Definition:
REnumDevices EnumDevices(string schemaName)
Result:
public class REnumDevices { public RGroupItem[] Groups { get; set; } // groups public RDeviceItem[] Items { get; set; } // devices } public class RGroupItem { public Guid ID { get; set; } // unique device ID in schema public Guid? ParentID { get; set; } // ID of parent group public string Name { get; set; } // group name } public class RDeviceItem : RGroupItem { public int Serial { get; set; } // device serial number public bool Allowed { get; set; } // allowed or not ( = included this device in .agkey file) public RProperty[] Properties { get; set; } // list of device property (inherited properties also included) public RPoint FixedLocation { get; set; } // if this device is stationary, this field contain coordinates }
JSON
Calling:
http://localhost:8300/EnumDevices/Demo
Parameter Demo – schema name EnumSchemas.
Result: download file