示例#1
0
        //@Brief Obtiene la versión del software del HostController
        //@Return String Versión del software del HostController
        public string GetSwHostController()
        {
            string swHostController = "";

            try
            {
                m_mutexHostControllerEndpoints.WaitOne();
                foreach (EndpointAddress ep in m_hostControllerEndpoints)
                {
                    BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.None);
                    JBCHostControllerServiceClient serviceClient = new JBCHostControllerServiceClient(binding, ep);

                    serviceClient.Open();
                    swHostController = serviceClient.GetHostControllerSwVersion();
                    serviceClient.Close();
                }
            }
            catch (Exception ex)
            {
                LoggerModule.logger.Error(System.Reflection.MethodInfo.GetCurrentMethod().Name + ". Error: " + ex.Message);
            }
            finally
            {
                m_mutexHostControllerEndpoints.ReleaseMutex();
            }

            return(swHostController);
        }