public void ReinitializeRTs() { RTController0 = new RadioTelescopeController( new RadioTelescope( new SpectraCyberSimulatorController(new SpectraCyberSimulator()), new TestPLCDriver(IP, IP, Port, Port), MiscellaneousConstants.JOHN_RUDY_PARK, CalibrationOrientation ) ); RTController1 = new RadioTelescopeController( new RadioTelescope( new SpectraCyberSimulatorController(new SpectraCyberSimulator()), new TestPLCDriver(IP, IP, Port + 3, Port + 3), MiscellaneousConstants.JOHN_RUDY_PARK, CalibrationOrientation ) ); RTController2 = new RadioTelescopeController( new RadioTelescope( new SpectraCyberSimulatorController(new SpectraCyberSimulator()), new TestPLCDriver(IP, IP, Port + 6, Port + 6), MiscellaneousConstants.JOHN_RUDY_PARK, CalibrationOrientation ) ); }
public void ReinitializeRTs() { SensorNetworkServer server = new SensorNetworkServer(SnServerIp, SnServerPort, SnClientIp, SnClientPort, SnTelescopeId, true); RTController0 = new RadioTelescopeController( new RadioTelescope( new SpectraCyberSimulatorController(new SpectraCyberSimulator()), new TestPLCDriver(IP, IP, Port1, Port2, true), MiscellaneousConstants.JOHN_RUDY_PARK, CalibrationOrientation, 1, server ) ); RTController1 = new RadioTelescopeController( new RadioTelescope( new SpectraCyberSimulatorController(new SpectraCyberSimulator()), new TestPLCDriver(IP, IP, Port1 + 3, Port2 + 3, true), MiscellaneousConstants.JOHN_RUDY_PARK, CalibrationOrientation, 2, server ) ); RTController2 = new RadioTelescopeController( new RadioTelescope( new SpectraCyberSimulatorController(new SpectraCyberSimulator()), new TestPLCDriver(IP, IP, Port1 + 6, Port2 + 6, true), MiscellaneousConstants.JOHN_RUDY_PARK, CalibrationOrientation, 3, server ) ); }
public static void SetUp(TestContext context) { //PLCClientCommunicationHandler PLCClientCommHandler = new PLCClientCommunicationHandler(ip, port); TestRTPLC = new TestPLCDriver(ip, ip, port, port); SpectraCyberSimulatorController SCSimController = new SpectraCyberSimulatorController(new SpectraCyberSimulator()); Location location = MiscellaneousConstants.JOHN_RUDY_PARK; RadioTelescope TestRT = new RadioTelescope(SCSimController, TestRTPLC, location, new Orientation(0, 0)); TestRadioTelescopeController = new RadioTelescopeController(TestRT); TestRTPLC.StartAsyncAcceptingClients(); //TestRT.PLCClient.ConnectToServer(); }
public void Bringdown() { // RTC0.RadioTelescope.PLCDriver.Bring_down(); // RTC1.RadioTelescope.PLCDriver.Bring_down(); RTC0 = null; RTC1 = null; RTCMT0.RequestToKill(); RTCMT1.RequestToKill(); RTCMT1 = null; RTCMT0 = null; PLCCCH0 = null; PLCCCH1 = null; // PLCCCH0.Bring_down(); Thread.Sleep(100); }
public void BringUp() { IP = PLCConstants.LOCAL_HOST_IP; Port0 = 8112; Port1 = 8115; JohnRudyPark = MiscellaneousConstants.JOHN_RUDY_PARK; CalibrationOrientation = new Orientation(0, 90); PLCCCH0 = new SimulationPLCDriver(IP, IP, Port0, Port0, true, false); RTC0 = new RadioTelescopeController(new RadioTelescope(new SpectraCyberSimulatorController(new SpectraCyberSimulator()), PLCCCH0, JohnRudyPark, CalibrationOrientation, 1)); RTCMT0 = new RadioTelescopeControllerManagementThread(RTC0); PLCCCH1 = new SimulationPLCDriver(IP, IP, Port1, Port1, true, false); RTC1 = new RadioTelescopeController(new RadioTelescope(new SpectraCyberSimulatorController(new SpectraCyberSimulator()), PLCCCH1, JohnRudyPark, CalibrationOrientation, 2)); RTCMT1 = new RadioTelescopeControllerManagementThread(RTC1); }
public void Initialize() { RadioTelescope = new RadioTelescope(); AbstractPLCDriver PLC = new SimulationPLCDriver(PlcIp, McuIp, McuPort, PlcPort, true, false); RadioTelescope.PLCDriver = PLC; SensorNetworkServer SN = new SensorNetworkServer(SnServerIp, SnServerPort, SnClientIp, SnClientPort, SnTelescopeId, true); RadioTelescope.SensorNetworkServer = SN; RtController = new RadioTelescopeController(RadioTelescope); AbstractWeatherStation WS = new SimulationWeatherStation(1000); ControlRoom = new ControlRoom(WS, 80); ControlRoom.mobileControlServer.rtController = RtController; PrivListener = new PrivateObject(ControlRoom.mobileControlServer); }
public void testInit() { TestRTPLC = new TestPLCDriver(ip, ip, 15001, 15003, true); // TestRTPLC = new ProductionPLCDriver("192.168.0.70", "192.168.0.50" , 502 , 502 ); SpectraCyberSimulatorController SCSimController = new SpectraCyberSimulatorController(new SpectraCyberSimulator()); Location location = MiscellaneousConstants.JOHN_RUDY_PARK; SensorNetworkServer = new SensorNetworkServer(IPAddress.Parse("127.0.0.1"), 3000, "127.0.0.1", 3001, 500, false); RadioTelescope TestRT = new RadioTelescope(SCSimController, TestRTPLC, location, new Orientation(0, 0)); TestRT.SensorNetworkServer = SensorNetworkServer; //TestRT.SensorNetworkServer.StartSensorMonitoringRoutine(); TestRT.WeatherStation = new SimulationWeatherStation(1000); TestRadioTelescopeController = new RadioTelescopeController(TestRT); // Override motor temperature sensors TestRadioTelescopeController.overrides.overrideAzimuthMotTemp = true; TestRadioTelescopeController.overrides.overrideElevatMotTemp = true; TestRTPLC.setTelescopeType(RadioTelescopeTypeEnum.HARD_STOPS); TestRTPLC.StartAsyncAcceptingClients(); TestRTPLC.Configure_MCU(.06, .06, 300, 300); }
public void SetParent(RadioTelescopeController rt) { Parent = rt; }