Beispiel #1
0
        public QuickTest()
        {
            InitializeComponent();

              // udpPacket = new UdpPacket();
              // udpPacket.RemoteHostName = "192.168.0.200";
              // udpPacket.RemotePort = 10000;
              // udpPacket.LocalPort = 10000;
              // udpPacket.Open();
              // oscUdp = new Osc(udpPacket);

              usbPacket = new UsbPacket();
              usbPacket.Open();
              osc = new Osc(usbPacket);

              osc.SetAddressHandler("/analogin/7/value", TrimPotReading);
        }
        public DeskTimerForm()
        {
            InitializeComponent();

              // udpPacket = new UdpPacket();
              // udpPacket.RemoteHostName = "192.168.0.200";
              // udpPacket.RemotePort = 10000;
              // udpPacket.LocalPort = 10000;
              // udpPacket.Open();
              // osc = new Osc(udpPacket);

              usbPacket = new UsbPacket();
              usbPacket.Open();
              osc = new Osc(usbPacket);

              Working = true;
              ResetTimers();

              osc.SetAddressHandler("/analogin/0/value", SensorReading);
        }
        public CPUMonitorWindow()
        {
            InitializeComponent();

              cpuCounter = new PerformanceCounter();

              cpuCounter.CategoryName = "Processor";
              cpuCounter.CounterName = "% Processor Time";
              cpuCounter.InstanceName = "_Total";

              usbPacket = new UsbPacket();
              usbPacket.Open();
              osc = new Osc(usbPacket);

              // udpPacket = new UdpPacket();
              // udpPacket.RemoteHostName = "192.168.0.200";
              // udpPacket.RemotePort = 10000;
              // udpPacket.LocalPort = 10000;
              // udpPacket.Open();
              // osc = new Osc(udpPacket);
        }
Beispiel #4
0
    MCTest()
    {
        mct = new MCTestForm(this);

        //usbPacket = new UsbWin32Packet();
        usbPacket = new UsbPacket();
        usbPacket.Open();
        if (usbPacket.IsOpen())
          mct.SetUsbPortName(usbPacket.Name);
        oscUsb = null;
        oscUsb = new Osc(usbPacket);
        oscUsb.SetAllMessageHandler(UsbMessages);

        udpPacket = new UdpPacket();
        udpPacket.RemoteHostName = mct.GetUdpRemoteHostName();
        udpPacket.RemotePort = mct.GetUdpRemotePort();
        udpPacket.LocalPort = mct.GetUdpLocalPort();
        udpPacket.Open();
        oscUdp = new Osc(udpPacket);
        oscUdp.SetAllMessageHandler(UdpMessages);
        oscUdp.SetAddressHandler("/analogin/0/value", AIn0Message);

        Application.Run(mct);
    }