Ejemplo n.º 1
0
        public void ProcessEmission(EmissionDescriptor emission)
        {
            if (emission.Header.FrameType != Emission.EmissionTypes.ReceivePacket)
            {
                return;
            }
            ReceivePacketEmission response = new ReceivePacketEmission();

            response.Unpack(emission.Data);
            List <byte> data = response.Data;

            switch (data[0])
            {
            case CONSTANTS.XM_HEADER_START_BYTE:
                this.ProcessTransmissionObjectHeader(data);
                break;

            case CONSTANTS.XM_PACKET_HEADER_START_BYTE:
                this.ProcessTransmissionPacket(data);
                break;

            default:
                break;
            }
        }
Ejemplo n.º 2
0
        public List <byte> ReceiveBytes()
        {
            EmissionDescriptor desc = this.emissionProcessor.WaitForEmission(EmissionTypes.ReceivePacket, 1000);

            this.emissionProcessor.RemoveEmission(desc.ID);
            ReceivePacketEmission response = new ReceivePacketEmission();

            response.Unpack(desc.Data);
            return(response.Data);
        }