public SorterRobotTest() { _sorter = RobotFactory.CreateRobot<SorterRobot>(); var dict = new Dictionary<string, string>(); dict.Add("IPAddress", "192.168.1.201"); _sorter.SetParameters(dict); _sorter.Initialise(); }
public Sorter(ClusterConfig config) : base(config) { this.MaxShakeRetryAttempts = 1; this._vision = new SorterVision(config.Cameras["SorterCamera"] as Camera); this._robot = config.Robots[typeof(SorterRobot)] as SorterRobot; this._cancelTokenSource = new CancellationTokenSource(); if (_vision == null) { throw new ArgumentException("Could not create SorterVision"); } if (_robot == null) { throw new ArgumentException("Could not retrieve a SorterRobot from ClusterConfig"); } _actionMap = new Dictionary<SorterAction, Action<SorterParams>>() { { SorterAction.LoadToBuffer, (x) => LoadToBufferAsync() }, { SorterAction.LoadToConveyor, (x) => LoadToConveyorAsync() }, { SorterAction.Sort, (x) => SortAsync(x.Magazine) } }; }