Exemple #1
0
        public AssemblerRobotTest()
        {
            _assembler = RobotFactory.CreateRobot<AssemblerRobot>();

            var dict = new Dictionary<string, string>();
            dict.Add("IPAddress", "192.168.1.200");

            _assembler.SetParameters(dict);
            _assembler.Initialise();
        }
Exemple #2
0
        public Assembler(ClusterConfig config)
            : base(config)
        {
            _assemblerRobot = config.Robots[typeof(AssemblerRobot)] as AssemblerRobot;
            this._cancelTokenSource = new CancellationTokenSource();
            this.LastOrderTray = null;

            if (_assemblerRobot == null)
            {
                throw new ArgumentException("Could not retrieve a AssemblerRobot from ClusterConfig");
            }

            _actionMap = new Dictionary<AssemblerAction, Action<AssemblerParams>>()
            {
                { AssemblerAction.Assemble, (x) => AssembleAsync(x.Magazine, x.OrderConfiguration) },
                { AssemblerAction.GetTabletMagazine, (x) => GetTabletMagazineAsync() },
                { AssemblerAction.ReturnTabletMagazine, (x) => ReturnTabletMagazineAsync() }
            };
        }