示例#1
0
        void Send(int SliceCount)
        {
            SRComms.Queue q = new SRComms.Queue(FPinInChannel[0]);
            for (int i = 0; i < SliceCount; i++)
            {
                q.Add(FPinInInput[0]);
            }

            SRComms.OnMessageSent(q);
        }
示例#2
0
        //called when data for any output pin is requested
        public void Evaluate(int SpreadMax)
        {
            if (FPackets.Channel != FPinInChannel[0])
            {
                FPackets = new SRComms.Queue(FPinInChannel[0]);
            }


            if (FConfigMode[0] == SendMode.Auto)
            {
                if (FPinInAddress.IsChanged || FInput.IsChanged)
                {
                    for (int i = 0; i < SpreadMax; i++)
                    {
                        if (FPinInAddress[i] == "")
                        {
                            continue;
                        }

                        OSCMessage p = new OSCMessage(FPinInAddress[i]);
                        for (int j = 0; j < FInput[i].SliceCount; j++)
                        {
                            p.Append((T)FInput[i][j]);
                        }
                        FPackets.Add(p);
                    }
                }
            }
            else
            {
                for (int i = 0; i < SpreadMax; i++)
                {
                    if (FPinInSend[i])
                    {
                        OSCMessage p = new OSCMessage(FPinInAddress[i]);
                        for (int j = 0; j < FInput[i].SliceCount; j++)
                        {
                            p.Append((T)FInput[i][j]);
                        }
                        FPackets.Add(p);
                    }
                }
            }
            if (FPackets.Count > 0)
            {
                SRComms.OnMessageSent(FPackets);
            }
            FPackets.Clear();
        }