public UDPOperatorCameraDevice(int ID, string IpAddress, int ListeningPort, int SendingPort)
        {
            PacketReconstructors = new PacketReconstructor(new Packet().GetBytes().Length, PacketReconstructedCBHandler);
            aUDPListener = new UDPListener(ListeningPort, ReceivedHandler);
            aUDPListenerStatistics = new UDPListenerStatistics(aUDPListener, 1000);

            aUDPSender = new UDPSender(IpAddress, SendingPort);

            ImageConverter = TypeDescriptor.GetConverter(typeof(Bitmap));
            this.ID = ID;
        }
        public UDPOperatorCameraDevice(int ID, string IpAddress, int ListeningPort, int SendingPort)
        {
            PacketReconstructors   = new PacketReconstructor(new Packet().GetBytes().Length, PacketReconstructedCBHandler);
            aUDPListener           = new UDPListener(ListeningPort, ReceivedHandler);
            aUDPListenerStatistics = new UDPListenerStatistics(aUDPListener, 1000);

            aUDPSender = new UDPSender(IpAddress, SendingPort);

            ImageConverter = TypeDescriptor.GetConverter(typeof(Bitmap));
            this.ID        = ID;
        }
        public UDPListenerStatistics( UDPListener aListener, int aTimerResolutionMiliSec)
        {
            Listener = aListener;
            TimerResolutionMiliSec = aTimerResolutionMiliSec;
            PreviousNumberOfFrames = 0;

            FpsTimer = new System.Timers.Timer();
            FpsTimer.Interval = TimerResolutionMiliSec;
            FpsTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);

            FpsTimer.Start();
        }
Example #4
0
        public UDPListenerStatistics(UDPListener aListener, int aTimerResolutionMiliSec)
        {
            Listener = aListener;
            TimerResolutionMiliSec = aTimerResolutionMiliSec;
            PreviousNumberOfFrames = 0;

            FpsTimer          = new System.Timers.Timer();
            FpsTimer.Interval = TimerResolutionMiliSec;
            FpsTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);

            FpsTimer.Start();
        }
 public void StartListening()
 {
     listener = new UDPListener(port, this.MessageReceivedHandler);
 }
 public void StartListening()
 {
     listener = new UDPListener(port, this.MessageReceivedHandler);
 }