Beispiel #1
0
        public static void sendMessage(CommandMessage command, Object data)
        {
            if (offlineMode)
            {
                switch (command)
                {
                    case (CommandMessage.StopReturn):
                        stopReturn(null);
                        break;
                    case (CommandMessage.StartSnap):
                        snapTake(null);
                        break;
                    case (CommandMessage.GoHome):
                        goHome(null);
                        break;
                    default:
                        break;
                }
                return;
            }

            if (!IsConnected) return;
            TransMessage tm = new TransMessage(command, data, CurrentStructureId);
            debugMessage("SENDING MESSAGE - " + tm.ToString());
            saclient.SendObject(tm, false);
        }
Beispiel #2
0
        static void processMessage(TransMessage tm)
        {
            if (offlineMode) return;

            switch (tm.Command)
            {
                case (CommandMessage.StopReturn):
                    stopReturn(null);
                    break;
                case (CommandMessage.StartSnap):
                    snapTake(null);
                    break;
                case (CommandMessage.GoHome):
                    goHome(null);
                    break;
                default:
                    break;
            }
        }