public BacNetObject CreateObject(uint instanceId, BacNetObject bacNetObject) { var npdu = new BacNetIpNpdu(); var apdu = new CreateObject(bacNetObject); IPEndPoint endPoint = null; foreach (BacNetRemoteDevice remoteDevice in BacNetDevice.Instance.Remote) { if (remoteDevice.InstanceNumber == instanceId) { npdu.Destination = remoteDevice.BacAddress; endPoint = remoteDevice.EndPoint; break; } } BacNetDevice.Instance.Services.Execute(npdu, apdu, endPoint); return apdu.NewObject; }
public BacNetObject CreateObject(uint instanceId, BacNetObject bacNetObject) { var npdu = new BacNetIpNpdu(); var apdu = new CreateObject(bacNetObject); IPEndPoint endPoint = null; foreach (BacNetRemoteDevice remoteDevice in BacNetDevice.Instance.Remote) { if (remoteDevice.InstanceNumber == instanceId) { npdu.Destination = remoteDevice.BacAddress; endPoint = remoteDevice.EndPoint; break; } } BacNetDevice.Instance.Services.Execute(npdu, apdu, endPoint); return(apdu.NewObject); }