/// <summary>
 /// Manages sending Kinect information as UDP to the specified hostname and port
 /// at least once a second.
 ///
 /// Uses the given gesture processor to process gestures into joysticks.
 /// </summary>
 /// <param name="gp">The IGestureProcessor to use to set joystick values.</param>
 /// <param name="kinectVersion">The version string to report to the Driver Station.</param>
 /// <param name="hostname">The destination hostname.</param>
 /// <param name="port">The destination port number.</param>
 public KinectProtocol_v1Manager(IGestureProcessor gp, String kinectVersion, String hostname, int port)
     : this(kinectVersion,
            hostname,
            port)
 {
     m_gestureProcessor = gp;
 }
예제 #2
0
 /// <summary>
 /// Manages sending Kinect information as UDP to the specified hostname and port
 /// at least once a second.
 ///
 /// Uses the FIRST gesture processor to process gestures into joysticks.
 /// </summary>
 /// <param name="kinectVersion">The version string to report to the Driver Station.</param>
 /// <param name="hostname">The destination hostname.</param>
 /// <param name="port">The destination port number.</param>
 public Version0Manager(String kinectVersion, String hostname, int port)
 {
     m_kinectVersion  = kinectVersion;
     m_kinectStatus   = "No Kinect";
     m_hostname       = hostname;
     m_port           = port;
     m_udpClient      = new UdpClient();
     m_version0Packet = new Version0();
     m_heartbeatTimer = new Timer(this.heartBeatExpired);
     m_heartbeatTimer.Change(HEARTBEAT_PERIOD_MS, HEARTBEAT_PERIOD_MS);
     m_started          = true;
     m_gestureProcessor = new FIRSTGestureProcessor();
 }
        /// <summary>
        /// Manages sending Kinect information as UDP to the specified hostname and port
        /// at least once a second.
        ///
        /// Uses the FIRST gesture processor to process gestures into joysticks.
        /// </summary>
        /// <param name="kinectVersion">The version string to report to the Driver Station.</param>
        /// <param name="hostname">The destination hostname.</param>
        /// <param name="port">The destination port number.</param>
        public KinectProtocol_v1Manager(String kinectVersion, String hostname, int port)
        {
            m_kinectVersion  = kinectVersion;
            m_kinectStatus   = "No Kinect";
            m_hostname       = hostname;
            m_port           = port;
            m_udpClient      = new UdpClient();
            m_version1Packet = new KinectProtocol_v1();
            m_heartbeatTimer = new Timer(this.HeartBeatExpired);
            m_heartbeatTimer.Change(HEARTBEAT_PERIOD_MS, HEARTBEAT_PERIOD_MS);
            m_gestureProcessor = new FIRSTGestureProcessor();

            NTKinect.Init();
        }