Inheritance: IBacNetApdu
示例#1
0
        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;
        }
示例#2
0
        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);
        }