Ejemplo n.º 1
0
        private void ReceivedDemuxByte(GetDspValue d)
        {
            //set demuxer for this channel
            var data = (DspCoefficients.DemuxBytes(McuDat.DemuxAlarm[_flow.Id % 12], _flowMux[_flow.Id % 12] + 2, _flowMux[_flow.Id % 12])).ToArray();
            var q    = new DspData(data, _main.Id);

            CommunicationViewModel.AddData(q);
        }
Ejemplo n.º 2
0
        public void DemuxMux()
        {
            var muz   = DspCoefficients.DemuxBytes(555, 3, 2).ToArray();
            var demux = DspCoefficients.DemuxSelected(SkipAdress(muz));

            Assert.AreEqual(2, demux);

            muz = DspCoefficients.DemuxBytes(1000, 10, 9).ToArray();
            var q = SkipAdress(muz);

            demux = DspCoefficients.DemuxSelected(q);
            Assert.AreEqual(9, demux);

            muz   = DspCoefficients.DemuxBytes(30, 2, 1).ToArray();
            demux = DspCoefficients.DemuxSelected(SkipAdress(muz));
            Assert.AreEqual(1, demux);
        }