Exemple #1
0
        public ChatManager(ConsoleBotInstance botInstance)
        {
            m_Client = botInstance.Client;
            m_objManager = botInstance.ObjEvtManager;

            m_actionManager = new ActionManager(botInstance);
            m_Client.Self.ChatFromSimulator += new EventHandler<ChatEventArgs>(OnChatFromSimulator);

            // m_Sensor = new Sensor("jl2", "user2", botInstance.NetManager.Password, Constant.NODE_PERCEPT);
            m_Sensor = new Sensor("jl2", botInstance.NetManager.Username + "_client", botInstance.NetManager.Password, botInstance.NetManager.Username + "_percept");
            m_Sensor.SensorCreateEvent += new SensorCreateEventHandler(OnSensorCreateEvent);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Sensor ss = new Sensor("jl2", "user2", "bathstudent", "example");
            ss.SensorCreateEvent += new SensorCreateEventHandler(OnSensorCreated);

            JsonReading jr = new JsonReading();
            int cnt = 0;

            while (cnt < 152140)
            {
                TimeSpan ts = DateTime.UtcNow - dt;
                long millis = (long)ts.TotalMilliseconds;

                jr.AddValue("takenAt", (double)millis);
                jr.AddValue("ACTION", "convoyMember4,amMoving(true)");
                jr.AddValue("position", "153.04442797954152,0.0,262.3134876039802,149.5465600849747,0.0,262.43563584243896");

                ss.Publish(jr);
                jr.RemoveAll();
                cnt++;
                Thread.Sleep(100);

            }
        }