public void CommandDispatch() { HardwareSrv srv = HardwareSrv.GetInstance(); srv.Add(new M8051("M8051")); srv.Execute(new HardwareCommand("Camera", "M8051", "Open")); }
public void EquipmentTest_Basic() { Equipment e = new Equipment("0"); e.Execute(new Command("PowerOn")); Port b = new Port("0"); b.Execute( new Command( "Send", new Dictionary <string, string>() { { "Bytes", "00 01 02" } } ) ); PowerSupply ps = new PowerSupply("0"); ps.Execute(new Command("PowerOn")); ps.PPort = new Port("0"); ps.Execute(new Command("PowerOn")); ps.Execute(new Command("PowerOff")); HardwareSrv hardware = HardwareSrv.GetInstance(); hardware.Add(e); }