| | |
| | | return;
|
| | | }
|
| | | //根据设备Type创建对应的设备对象
|
| | | var device = Common.LocalDevice.Current.NewDeviceObjectByDeviceId((DeviceType)jobject.Value<int>("Device_ID"));
|
| | | var device = Common.LocalDevice.Current.NewDeviceObjectByDeviceId((DeviceType)jobject.Value<int>("Device_ID"), jobject.Value<int>("Epoint"));
|
| | | if (device == null)
|
| | | {
|
| | | return;
|
| | |
| | |
|
| | | //设置设备功能类型 (不能在接收回路的地方写入,不然网关可能会超负荷)
|
| | | Common.LocalDevice.Current.RefreshDeviceFunctionType(device, device, true);
|
| | | System.Threading.Thread.Sleep(100);
|
| | | System.Threading.Thread.Sleep(200);
|
| | | //获取设备的固定属性
|
| | | HdlDeviceFixedAttributeLogic.Current.SetAllFixedAttributeToDevice(device);
|
| | | if (HdlDeviceFixedAttributeLogic.Current.SetAllFixedAttributeToDevice(device) == true)
|
| | | {
|
| | | System.Threading.Thread.Sleep(200);
|
| | | }
|
| | | }
|
| | |
|
| | | //目前就弄一个
|