public void SendCommand(ConsoleCommand command) { BroadcastConsoleMessage( string.Format("command: {0} {1}", command.Name.ToString().ToLower(), string.Join(" ", command.Arguments))); SendCommandToRover(command); }
public ConsoleConnectionStatus Send(ConsoleCommand command) { if (Connection.State == ConnectionState.Disconnected) return ConsoleConnectionStatus.NoConnection; try { Hub.Invoke(ConsoleConstants.SendCommand, command).Wait(); return ConsoleConnectionStatus.Ok; } catch (Exception ex) { Logger.LogException(ex); return ConsoleConnectionStatus.OperationException; } }
private void ReadCommand() { string commandRawData = ReadCommandRawData(); _command = _commands.Parse(commandRawData); }
private void SendCommandToRover(ConsoleCommand command) { if (!string.IsNullOrWhiteSpace(_roverConnectionId)) Clients.Client(_roverConnectionId).RoverRequest(command); }