コード例 #1
0
        public void sendUnconfirmed(Address address, OctetString linkService, UnconfirmedRequestService serviceRequest, bool broadcast, bool initiated)
        {
            if (address == null)
            {
                throw new ArgumentException("address cannot be null");
            }
            if (address.Equals(linkService))
            {
                linkService = null;
            }

            /*
             * //DCC - neodesilat nic
             * if (Device.getDCCEnableDisable().equals(EnableDisable.disable))
             * {
             *  throw new BACnetException("Communication blocked by DCC.");
             * }
             * // Odesilat jenom I-Am, pokud bylo iniciovano
             * if (Device.getDCCEnableDisable().equals(EnableDisable.disableInitiation) && !initiated)
             * {
             *  throw new BACnetException("Communication blocked by DCC.");
             * }
             */

            // Unconfirmed services will never have to be segmented, so just send it.
            network.sendAPDU(address, linkService, new UnconfirmedRequest(serviceRequest), broadcast);
        }
コード例 #2
0
        public UnconfirmedRequest(ServicesSupported services, ByteStream queue)
        {
            queue.ReadByte();
            byte choiceId = queue.ReadByte();

            Service = UnconfirmedRequestService.createUnconfirmedRequestService(services, choiceId, queue);
            if (Service == null)
            {
                throw new BACnetErrorException(ErrorClass.Device, ErrorCode.ServiceRequestDenied);
            }
        }
コード例 #3
0
        /**
         * This parameter shall contain the parameters of the specific service that is being requested, encoded according to
         * the rules of 20.2. These parameters are defined in the individual service descriptions in this standard and are
         * represented in Clause 21 in accordance with the rules of ASN.1.
         */

        public UnconfirmedRequest(UnconfirmedRequestService service)
        {
            Service = service;
        }
コード例 #4
0
 //AdK - DCC
 internal void sendGlobalBroadcast(UnconfirmedRequestService serviceRequest, bool initiated)
 {
     applicationLayer.sendUnconfirmed(Address.GLOBAL, null, serviceRequest, true, initiated);
 }
コード例 #5
0
 public void sendUnconfirmed(Address address, OctetString linkService, UnconfirmedRequestService serviceRequest)
 {
     applicationLayer.sendUnconfirmed(address, linkService, serviceRequest, false);
 }
コード例 #6
0
 public void sendUnconfirmed(Address address, UnconfirmedRequestService serviceRequest)
 {
     applicationLayer.sendUnconfirmed(address, null, serviceRequest, false);
 }
コード例 #7
0
 public void sendUnconfirmed(Address address, OctetString linkService, UnconfirmedRequestService serviceRequest, bool broadcast)
 {
     sendUnconfirmed(address, linkService, serviceRequest, broadcast, false);
 }