Пример #1
0
 /// <summary> Sends a float command from the queue. </summary>
 /// <param name="commandStrategy"> The command strategy to send. </param>
 private void SendSingleCommandFromQueue(CommandStrategy commandStrategy)
 {
     // Dequeue
     lock (Queue)
     {
         commandStrategy.DeQueue();
         // Process all generic dequeue strategies
         foreach (var generalStrategy in GeneralStrategies)
         {
             generalStrategy.OnDequeue();
         }
     }
     // Send command
     if (commandStrategy != null && commandStrategy.Command != null)
     {
         _sender.ExecuteSendCommand((SendCommand)commandStrategy.Command, SendQueue.InFrontQueue);
     }
 }
Пример #2
0
 /// <summary> Adds a commandStrategy to the commands string.  </summary>
 /// <param name="commandStrategy"> The command strategy to add. </param>
 private void AddToCommandsString(CommandStrategy commandStrategy)
 {
     // Dequeue
     lock (Queue)
     {
         commandStrategy.DeQueue();
         // Process all generic dequeue strategies
         foreach (var generalStrategy in GeneralStrategies)
         {
             generalStrategy.OnDequeue();
         }
     }
     // Add command
     if (commandStrategy != null && commandStrategy.Command != null)
     {
         _commandCount++;
         _sendBuffer += commandStrategy.Command.CommandString();
         if (Command.PrintLfCr)
         {
             _sendBuffer += Environment.NewLine;
         }
     }
 }
Пример #3
0
 /// <summary> Sends a float command from the queue. </summary>
 /// <param name="commandStrategy"> The command strategy to send. </param>
 private void SendSingleCommandFromQueue(CommandStrategy commandStrategy)
 {
     // Dequeue
     lock (Queue)
     {
         commandStrategy.DeQueue();
         // Process all generic dequeue strategies
         foreach (var generalStrategy in GeneralStrategies) { generalStrategy.OnDequeue(); }
     }
     // Send command
     if (commandStrategy != null && commandStrategy.Command != null)
         _sender.ExecuteSendCommand((SendCommand)commandStrategy.Command, SendQueue.InFrontQueue);
 }
Пример #4
0
 /// <summary> Adds a commandStrategy to the commands string.  </summary>
 /// <param name="commandStrategy"> The command strategy to add. </param>
 private void AddToCommandsString(CommandStrategy commandStrategy)
 {
     // Dequeue
     lock (Queue)
     {
         commandStrategy.DeQueue();
         // Process all generic dequeue strategies
         foreach (var generalStrategy in GeneralStrategies) { generalStrategy.OnDequeue(); }
     }
     // Add command
     if (commandStrategy != null && commandStrategy.Command != null) {
             _commandCount++;
             _sendBuffer += commandStrategy.Command.CommandString();
             if (Command.PrintLfCr) { _sendBuffer +=  Environment.NewLine; }
     }
 }