System.IO.BACnet.BacnetClient.EncodeSegment C# (CSharp) Méthode

EncodeSegment() private méthode

private EncodeSegment ( BacnetAddress adr, byte invoke_id, Segmentation segmentation, BacnetConfirmedServices service, EncodeBuffer &buffer, Action apdu_content_encode ) : bool
adr BacnetAddress
invoke_id byte
segmentation Segmentation
service BacnetConfirmedServices
buffer EncodeBuffer
apdu_content_encode Action
Résultat bool
        private bool EncodeSegment(BacnetAddress adr, byte invoke_id, Segmentation segmentation, BacnetConfirmedServices service, out EncodeBuffer buffer, Action<EncodeBuffer> apdu_content_encode)
        {
            //encode (regular)
            buffer = EncodeSegmentHeader(adr, invoke_id, segmentation, service, false);
            apdu_content_encode(buffer);

            bool more_follows = (buffer.result & EncodeResult.NotEnoughBuffer) > 0;
            if (segmentation != null && more_follows)
            {
                //reencode in segmented
                EncodeSegmentHeader(adr, invoke_id, segmentation, service, true);
                apdu_content_encode(buffer);
                return true;
            }
            else if (more_follows)
                return true;
            else
            {
                return segmentation != null ? segmentation.sequence_number > 0 : false;
            }
        }
BacnetClient