NexStar/SharedResources.cs
/// <summary>
/// Example of a shared SendMessage method, the lock
/// prevents different drivers tripping over one another.
/// It needs error handling and assumes that the message will be sent unchanged
/// and that the reply will always be terminated by a "#" character.
/// </summary>
/// <param name="message"></param>
/// <returns></returns>
Example of a shared SendMessage method, the lock
prevents different drivers tripping over one another.
It needs error handling and assumes that the message will be sent unchanged
and that the reply will always be terminated by a "#" character.
Example of a shared SendMessage method the lock prevents different drivers tripping over one another . It needs error handling and assumes that the message will be sent unchanged and that the reply will always be terminated by a " # " character .
public static string SendMessage(string message)
        {
            lock (lockObject)
            {
                SharedSerial.Transmit(message);
                return SharedSerial.ReceiveTerminated("#");
            }
        }
public static string SendMessage ( string message ) { lock ( lockObject ) { SharedSerial . Transmit ( message ) ; return SharedSerial . ReceiveTerminated ( " " ) ; } }
Example of a shared SendMessage method, the lock
prevents different drivers tripping over one another.
Example of a shared SendMessage method the lock prevents different drivers tripping over one another .
// TODO replace this with your requirements
None
message
string
None