public void ParseServiceData()
 {
     if (ServiceData != null)
     {
         ServiceRequest = ConfirmedRequestService.createConfirmedRequestService(serviceChoice, ServiceData);
         ServiceData    = null;
     }
 }
        /**
         * This field is used to allow parsing of only the APDU so that those fields are available in case there is a
         * problem parsing the service request.
         */

        public ConfirmedRequest(bool segmentedMessage, bool moreFollows, bool segmentedResponseAccepted,
                                MaxSegments maxSegmentsAccepted, MaxApduLength maxApduLengthAccepted, byte invokeId, int sequenceNumber,
                                int proposedWindowSize, ConfirmedRequestService serviceRequest)
        {
            setFields(segmentedMessage, moreFollows, segmentedResponseAccepted, maxSegmentsAccepted,
                      maxApduLengthAccepted,
                      invokeId, sequenceNumber, proposedWindowSize, serviceRequest.ChoiceId);

            ServiceRequest = serviceRequest;
        }
        public ConfirmedRequest(ServicesSupported servicesSupported, ByteStream queue)
        {
            byte b = queue.ReadByte();

            IsSegmentedMessage          = (b & 8) != 0;
            IsMoreFollows               = (b & 4) != 0;
            IsSegmentedResponseAccepted = (b & 2) != 0;

            b = queue.ReadByte();
            MaxSegmentsAccepted   = (MaxSegments)((byte)((b & 0x70) >> 4));
            MaxApduLengthAccepted = (MaxApduLength)((byte)(b & 0xf));
            InvokeId = queue.ReadByte();
            if (IsSegmentedMessage)
            {
                SequenceNumber     = queue.popU1B();
                ProposedWindowSize = queue.popU1B();
            }
            serviceChoice = queue.ReadByte();
            ServiceData   = new ByteStream(queue.ReadToEnd());

            ConfirmedRequestService.checkConfirmedRequestService(servicesSupported, serviceChoice);
        }
Beispiel #4
0
 public AcknowledgementService send(Address address, OctetString linkService, MaxApduLength maxAPDULength,
                                    Segmentation segmentationSupported, ConfirmedRequestService serviceRequest)
 {
     return(applicationLayer.send(address, linkService, (uint)maxAPDULength.GetMaxApduLength(), segmentationSupported, serviceRequest));
 }
Beispiel #5
0
 ////
 ////
 //// Message sending
 ////
 public AcknowledgementService send(RemoteDevice d, ConfirmedRequestService serviceRequest)
 {
     return(applicationLayer.send(d.Address, d.LinkService, d.MaxAPDULengthAccepted,
                                  d.SegmentationSupported, serviceRequest));
 }
Beispiel #6
0
 public AcknowledgementService send(Address address, OctetString linkService, uint maxApduLengthAccepted, Segmentation segmentationSupported, ConfirmedRequestService serviceRequest)
 {
     throw new NotImplementedException();
 }