public HAL9000StatusArgs(HAL9000Status status)
 {
     this.isSystemReady = status.IsSystemReady;
     this.generalStatus = status.GeneralStatus;
     this.testBeingExecuted = status.TestBeingExecuted;
     this.isPaused = status.IsPaused;
 }
Пример #2
0
 public HAL9000StatusArgs(HAL9000Status status)
 {
     this.isSystemReady     = status.IsSystemReady;
     this.generalStatus     = status.GeneralStatus;
     this.testBeingExecuted = status.TestBeingExecuted;
     this.isPaused          = status.IsPaused;
 }
 public HAL9000CmdMan(HAL9000Status status)
     : base()
 {
     this.status = status;
     this.ResponseReceived += new ResponseReceivedEventHandler(HAL9000CmdMan_ResponseReceived);
     this.justinaCmdAndResp = new JustinaCmdAndResp[TotalExistingCommands];
     this.sortedCmdAndResp = new SortedList<string, JustinaCmdAndResp>();
     this.LoadJustinaCommands();
 }
Пример #4
0
 public HAL9000CmdMan(HAL9000Status status)
     : base()
 {
     this.status            = status;
     this.ResponseReceived += new ResponseReceivedEventHandler(HAL9000CmdMan_ResponseReceived);
     this.justinaCmdAndResp = new JustinaCmdAndResp[TotalExistingCommands];
     this.sortedCmdAndResp  = new SortedList <string, JustinaCmdAndResp>();
     this.LoadJustinaCommands();
 }
Пример #5
0
        public HAL9000Brain()
        {
            this.isAware = false;
            this.currentRoom = "unknown";
            this.currentRegion = "unknown";
            this.currentLocation = "unknown";
            this.knownPersons = new SortedList<string, Person>();
            this.knownRooms = new SortedList<string, string>();
            this.knownRegions = new SortedList<string, string>();
            this.knownLocations = new SortedList<string, string>();
            this.knownObjects = new SortedList<string, PhysicalObject>();
            this.languageProcessor = new NaturalLanguageProcessor(this);
            this.actionsToPerform = new List<SentenceImperative>();
            this.recognizedSentences = new Queue<string>();
            this.lastRecoGestures = new Queue<Gesture>();
            this.lastPersonFallDetected = new Queue<string>();
            this.sensorLectures = new Queue<string>();

            this.validRoomsFile = "ValidRooms.txt";
            this.validNamesFile = "ValidNames.txt";
            this.knownObjectsFile = "KnownObjects.txt";

            this.world = new World();
            this.foundHumans = new List<string>();

            this.currentRoomSharedVar = new StringSharedVariable("robotRoom");
            this.currentRegionSharedVar = new StringSharedVariable("robotRegion");
            this.currentLocationSharedVar = new StringSharedVariable("robotLocation");
            this.gestureSharedVariable = new StringSharedVariable("gesture");
            this.recogSpeechsSharedVar = new RecognizedSpeechSharedVariable("recognizedSpeech");
            this.skeletonsSharedVariable = new StringSharedVariable("hf_skeletons");
            this.nearestObjForLocDirection = new DoubleSharedVariable("mp_objforloc");
            this.svInGoorRegionForLoc = new IntSharedVariable("mp_ingoodregion");
            this.cell_phoneSharedVariable = new StringSharedVariable("cell_phone");
            this.fallSharedVariable = new StringSharedVariable("positionhumanfall");
            this.sensorsSharedVariable = new StringSharedVariable("home_sensors");

            this.isSuscribedToGestureVar = false;
            this.isSuscribedToLocationVar = false;
            this.isSuscribedToRegionVar = false;
            this.isSuscribedToRoomVar = false;
            this.isSuscribedToRecoSpeechs = false;
            this.isSuscribedToSkeletons = false;
            this.isSuscribedToNearesObjForLoc = false;
            this.isSuscribedToInGoodRegion = false;
            this.isSuscribedToCellphone = false;
            this.isSuscribedToFall = false;
            this.isSuscribedToHomeSensors = false;

            this.status = new HAL9000Status();
            this.status.BrainWaveType = BrainWaveType.Alpha;

            this.cmdMan = new HAL9000CmdMan(this.status);
            this.cnnMan = new ConnectionManager("ACT-PLN", 2025, this.cmdMan);
            this.cnnMan.ClientConnected += new System.Net.Sockets.TcpClientConnectedEventHandler(cnnMan_ClientConnected);
            this.cnnMan.ClientDisconnected += new System.Net.Sockets.TcpClientDisconnectedEventHandler(cnnMan_ClientDisconnected);
            this.cnnMan.DataReceived += new ConnectionManagerDataReceivedEH(cnnMan_DataReceived);
            this.cmdMan.SharedVariablesLoaded += new SharedVariablesLoadedEventHandler(cmdMan_SharedVariablesLoaded);
            this.SetupCommandExecuters();
            this.cnnMan.Start();
            this.cmdMan.Start();
        }