private SensorPacket Parse(byte[] packet) { return(SensorPacket.Create( this.GetPacketTypeFrom(packet), this.GetTimeStampFrom(packet), this.GetPayloadFrom(packet) )); }
private void ReceiveData() { while (Running) { SensorPacket packet = Reader.ReadPacket(); if (packet == null) { return; } foreach (var packetHandler in PacketHandlers) { packet.Accept(packetHandler); } } }