Пример #1
0
        public RobotServiceListener(IRobotServiceEventsReceiver eventReceiver)
        {
            if (eventReceiver == null)
            {
                throw new ArgumentNullException("eventReceiver");
            }

            _eventReceiver = eventReceiver;
        }
Пример #2
0
        public EV3ServiceListener(IRobotServiceEventsReceiver eventReceiver,
                                  IPAddress unityIP,
                                  ushort unityPort,
                                  ushort broadcastPort = EV3_UDP_BROADCAST_PORT)
            : base(eventReceiver)
        {
            _broadcastPort = broadcastPort;

            _udpClient = null;

            if (unityIP == null)
            {
                throw new ArgumentNullException("unityIP");
            }

            _unityIP   = unityIP;
            _unityPort = unityPort;

            _connectedSerials = new List <string>();
        }