public DockBasic( Grid g, FsmMemorySpace m, List <string> ivn, List <string> ovn ) { List <string> dockPos = new List <string> () { "dockPos" }; List <string> moveArgs = new List <string> () { "dockPos", "alt" }; requestDock = new RequestValueOverRadio(g, m, ivn, dockPos); undock = new Undock(g, m, null, null); moveAboveConnector = new MoveBasic(g, m, moveArgs, null); dock = new DockPlanetary(g, m, dockPos, null); requestDock.setNext(undock.getMe()); undock.setNext(moveAboveConnector.getMe()); moveAboveConnector.setNext(dock.getMe()); }
public Recharge( Grid g, FsmMemorySpace m, List <string> ivn, List <string> ovn ) : base(g, m, ivn, ovn) { }
public Undock( Grid g, FsmMemorySpace m, List <string> ivn, List <string> ovn ) : base(g, m, ivn, ovn) { }
public MoveBasic( Grid g, FsmMemorySpace m, List <string> ivn, List <string> ovn ) { goUp = new goAboveMyPos(g, m, ivn, null); goAbovePos = new goAbovePos(g, m, ivn, null); goUp.setNext(goAbovePos.getMe()); }
public FsmStateImplementation( Grid argG, FsmMemorySpace m, List <string> ivn, List <string> ovn ) { grid = argG; mem = m; inVarNames = ivn; outVarNames = ovn; }
public goAboveMyPos( Grid g, FsmMemorySpace m, List <string> ivn, List <string> ovn ) : base(g, m, ivn, ovn) { if (ivn.Count < 1) { throw new Exception( "goAbovePos: true => ivn.Count = " + ivn.Count); } }
public DockPlanetary( Grid g, FsmMemorySpace m, List <string> ivn, List <string> ovn ) : base(g, m, ivn, ovn) { if (ivn.Count < 1) { throw new Exception("DockPlanetary: ivn.Count = " + ivn.Count); } grid.gts.GetBlocksOfType( connectors, x => x.CubeGrid == grid.Me.CubeGrid); }
public static FsmState makeState( string name, Grid g, FsmMemorySpace mem, List <string> ia, List <string> oa ) { switch (name) { // substates case "MoveBasic": return(new MoveBasic(g, mem, ia, oa)); case "DockBasic": return(new DockBasic(g, mem, ia, oa)); // implementations case "RequestValueOverRadio": return(new RequestValueOverRadio(g, mem, ia, oa)); case "Undock": return(new Undock(g, mem, ia, oa)); case "Dock": return(new Dock(g, mem, ia, oa)); case "goAboveMyPos": return(new goAboveMyPos(g, mem, ia, oa)); case "goAbovePos": return(new goAbovePos(g, mem, ia, oa)); case "DockPlanetary": return(new DockPlanetary(g, mem, ia, oa)); case "Recharge": return(new Recharge(g, mem, ia, oa)); default: return(null); } }
public RequestValueOverRadio( Grid g, FsmMemorySpace m, List <string> ivn, List <string> ovn, int retryCnt = 60 ) : base(g, m, ivn, ovn) { if (ivn.Count < 2) { throw new Exception( "RequestValueOverRadio: invalid input var names list"); } if (ovn.Count < 1) { throw new Exception( "RequestValueOverRadio: invalid output var names list"); } proto = new ProtoRcv(grid); cntCap = retryCnt; }