Пример #1
0
        public void CommandBlind(string command, bool raw)
        {
            SharedResources.OATCommandMutex.WaitOne();

            try
            {
                SharedResources.SendMessage(command);
            }
            catch (Exception ex)
            {
                logMessage(LoggingFlags.Focuser, $"CommandBlind - Exception{ex.Message}");
            }
            finally
            {
                SharedResources.OATCommandMutex.ReleaseMutex();
            }
        }
Пример #2
0
        /// <summary>
        /// Required Interface functions of ITelescopeV3
        /// </summary>
        public void CommandBlind(string Command, bool Raw = false)
        {
            SharedResources.OATCommandMutex.WaitOne();

            try
            {
                SharedResources.SendMessage(Command);
            }
            catch (Exception ex)
            {
                LogMessage(LoggingFlags.Scope, "CommandBlind <! Exception : " + ex.Message);
            }
            finally
            {
                SharedResources.OATCommandMutex.ReleaseMutex();
            }
        }
Пример #3
0
        /// <summary>
        /// Required Interface functions of ITelescopeV3
        /// </summary>
        public void CommandBlind(string Command, bool Raw = false)
        {
            SharedResources.OATCommandMutex.WaitOne();

            try
            {
                LogMessage("CommandBlind", "Transmitting - " + Command);
                SharedResources.SendMessage(Command);
            }
            catch (Exception ex)
            {
                LogMessage("CommandBlind(" + Command + ")", "Error : " + ex.Message);
            }
            finally
            {
                SharedResources.OATCommandMutex.ReleaseMutex();
            }
        }
Пример #4
0
        public string CommandString(string command, bool raw)
        {
            SharedResources.OATCommandMutex.WaitOne();

            try
            {
                var response = SharedResources.SendMessage(command);
                return(response);
            }
            catch (Exception ex)
            {
                logMessage(LoggingFlags.Focuser, $"CommandString({command}) => Exception {ex.Message}");
                return("255");
            }
            finally
            {
                SharedResources.OATCommandMutex.ReleaseMutex();
            }
        }
Пример #5
0
        /// <summary>
        /// Required Interface functions of ITelescopeV3
        /// </summary>
        public string CommandString(string Command, bool raw = false)
        {
            SharedResources.OATCommandMutex.WaitOne();

            try
            {
                var response = SharedResources.SendMessage(Command);
                return(response);
            }
            catch (Exception ex)
            {
                LogMessage(LoggingFlags.Scope, "CommandString <! Exception :" + ex.Message);
                return("255");
            }
            finally
            {
                SharedResources.OATCommandMutex.ReleaseMutex();
            }
        }
Пример #6
0
        /// <summary>
        /// Required Interface functions of ITelescopeV3
        /// </summary>
        public string CommandString(string Command, bool raw = false)
        {
            SharedResources.OATCommandMutex.WaitOne();

            try
            {
                LogMessage("CommandString", "Transmitting - " + Command);
                var response = SharedResources.SendMessage(Command);
                LogMessage("CommandString", "Received       " + response);
                return(response);
            }
            catch (Exception ex)
            {
                LogMessage("CommandString(" + Command + ")", ex.Message);
                return("255");
            }
            finally
            {
                SharedResources.OATCommandMutex.ReleaseMutex();
            }
        }