예제 #1
0
 public void Start(MTConnectAgentCore.Agent _agent)
 {
     agent = _agent;
     ParseDevice();
     Init(Utils.GetDirectoryExe() + this.szNCFilename);
     worker.Start();
 }
예제 #2
0
        protected override void OnStart(string[] args)
        {
            agent = new Agent();
            try
            {

                agent.Start();
            }
            catch (AgentException exp)
            {
                String msg = exp.Message;
                if (exp.InnerException != null)
                    msg = msg + "\n" + exp.InnerException.Message;
                eventLog1.WriteEntry(msg, System.Diagnostics.EventLogEntryType.Error);
            }
            catch (System.UnauthorizedAccessException eu)
            {
                eventLog1.WriteEntry("Access denied.  Please specify the user account that the MTConnect service can use to log on.", System.Diagnostics.EventLogEntryType.Error);
                throw eu;
            }
        }
예제 #3
0
        public void Reset()
        {
            Stop();
            ReadConfigFile();

            agent = new Agent();

            Start();

            aTimer.Interval = 2000; //  _cycletime;
            aTimer.AutoReset = false ;
            aTimer.Enabled = true;
        }
예제 #4
0
 public Form1()
 {
     InitializeComponent();
     agent = new Agent();
     this.button2.Enabled = false;
 }
예제 #5
0
 public void Start(MTConnectAgentCore.Agent _agent)
 {
     agent = _agent;
     ParseDevice();
     Init(Utils.GetDirectoryExe() + this.szNCFilename);
     worker.Start();
 }
예제 #6
0
 public IDictionary serveritems;            // OPC items in App.config file, server Group.
 #endregion
 public OPCMgr(MTConnectAgentCore.Agent _agent, string _device, string ipaddress)
 {
     agent      = _agent;
     device     = _device;
     sIpAddress = ipaddress;
 }