Esempio n. 1
0
        public void Read(RawPDU raw)
        {
            uint len  = raw.Length;
            uint read = 0;

            while (read < len)
            {
                PDV pdv = new PDV();
                read += pdv.Read(raw);
                _pdvs.Add(pdv);
            }
        }
Esempio n. 2
0
        private bool CreatePDV(bool isLast)
        {
            uint len = Math.Min(GetBufferLength(), _max - (CurrentPduSize() + 6));

            //Platform.Log(LogLevel.Info, "Created PDV of length: {0}",len);
            if (_bytes == null || _bytes.Length != len || _pdu.PDVs.Count > 0)
            {
                _bytes = new byte[len];
            }
            _buffer.Read(_bytes, 0, (int)len);

            PDV pdv = new PDV(_pcid, _bytes, _command, isLast);
            _pdu.PDVs.Add(pdv);

            return pdv.IsLastFragment;
        }
Esempio n. 3
0
        private bool CreatePDV(bool isLast)
        {
            uint len = Math.Min(GetBufferLength(), _max - (CurrentPduSize() + 6));

            //Platform.Log(LogLevel.Info, "Created PDV of length: {0}",len);
            if (_bytes == null || _bytes.Length != len || _pdu.PDVs.Count > 0)
            {
                _bytes = new byte[len];
            }
            _buffer.Read(_bytes, 0, (int)len);

            PDV pdv = new PDV(_pcid, _bytes, _command, isLast);

            _pdu.PDVs.Add(pdv);

            return(pdv.IsLastFragment);
        }
Esempio n. 4
0
		public void Read(RawPDU raw)
		{
			uint len = raw.Length;
			uint read = 0;
			while (read < len)
			{
				PDV pdv = new PDV();
				read += pdv.Read(raw);
				_pdvs.Add(pdv);
			}
		}