Esempio n. 1
0
        public void receive()
        {
            try
            {
                m = mod.ReadMessage(Module.ReadType.NonBlocking);

                if (m.msg_type > 100)
                {
                    Utils.rtmaReceiverMessage("Received message {0}", m.msg_type);

                    object o;
                    if (m.msg_type == MT.NEURAL_DECODER_OUTPUT)
                    {
                        MDF.NEURAL_DECODER_OUTPUT rtmaIn = new MDF.NEURAL_DECODER_OUTPUT();
                        o = rtmaIn;
                        m.GetData(ref o);

                        mavlcm.MDF_NEURAL_DECODER_OUTPUT lcmOut = new mavlcm.MDF_NEURAL_DECODER_OUTPUT();
                        lcmOut.decoderoutput = rtmaIn.decoderoutput;
                        lcmOut.timestamp     = rtmaIn.timestamp;
                        lcmOut.header        = "test";

                        lCMTransmitter.transmit("NEURAL_DECODER_OUTPUT", lcmOut);
                    }
                }
            }
            catch (Exception e)
            {
                Console.Error.WriteLine("Ex: " + e);
                Environment.Exit(1);
            }
        }
        public mavlcm.MDF_NEURAL_DECODER_OUTPUT Copy()
        {
            mavlcm.MDF_NEURAL_DECODER_OUTPUT outobj = new mavlcm.MDF_NEURAL_DECODER_OUTPUT();
            outobj.header = this.header;

            outobj.decoderoutput = new double[(int)4];
            for (int a = 0; a < 4; a++)
            {
                outobj.decoderoutput[a] = this.decoderoutput[a];
            }

            outobj.timestamp = this.timestamp;

            return(outobj);
        }
 public static mavlcm.MDF_NEURAL_DECODER_OUTPUT _decodeRecursiveFactory(LCMDataInputStream ins)
 {
     mavlcm.MDF_NEURAL_DECODER_OUTPUT o = new mavlcm.MDF_NEURAL_DECODER_OUTPUT();
     o._decodeRecursive(ins);
     return(o);
 }