/// <summary> /// Initializes the robot fleet including the Fleet Manager /// </summary> /// <param name="sizeOfFleet">Number of robots in the fleet</param> /// <param name="fleetManagerIP">The IP of the Fleet Manager</param> /// <param name="fleetManagerAuthToken">Authentication Token of the Fleet Manager</param> public Fleet(int sizeOfFleet, string fleetManagerIP, AuthenticationHeaderValue fleetManagerAuthToken) { robots = new Robot[sizeOfFleet]; //robotMapping = new int[2] { 4, 2 }; httpResponseTasks = new Task <HttpResponseMessage> [sizeOfFleet]; // Instantiates the group array groups = new short[8] { 0, (short)sizeOfFleet, 0, 0, 0, 0, 0, 0 }; logger(AREA, DEBUG, "Assigned Basics"); available = new ChargingGroup(2, "FullCharge", "/v2.0.0/charging_groups/2"); busy = new ChargingGroup(3, "EmptyCharge", "/v2.0.0/charging_groups/3"); instantiateRobots(sizeOfFleet, fleetManagerIP, fleetManagerAuthToken); }
/// <summary> /// Initializes the robot fleet, Fleet Manager excluded /// </summary> /// /// <param name="sizeOfFleet">Number of robots in the fleet</param> public Fleet(int sizeOfFleet) { robots = new Robot[sizeOfFleet]; // robotMapping = new int[2] { 4, 2 }; httpResponseTasks = new Task <HttpResponseMessage> [sizeOfFleet]; // Instantiates the group array groups = new short[8] { 0, (short)sizeOfFleet, 0, 0, 0, 0, 0, 0 }; // Initialize the robot group group = new RobotGroup[8]; for (int i = 0; i < 8; i++) { group[i] = new RobotGroup(); } available = new ChargingGroup(2, "FullCharge", "/v2.0.0/charging_groups/2"); busy = new ChargingGroup(3, "EmptyCharge", "/v2.0.0/charging_groups/3"); instantiateRobots(sizeOfFleet); }