code: @Override
      public DevCmdHistory_4 command_inout_history_4(final String commandName, final int maxSize) throws DevFailed {
          MDC.setContextMap(contextMap);
          xlogger.entry();
          checkInitialization();
          final long request = deviceMonitoring.startRequest("command_inout_history_4 " + commandName);
          final CommandImpl command = getCommand(commandName);
  
          DevCmdHistory_4 history = null;
          try {
              history = command.getHistory().toDevCmdHistory4(maxSize);
          } catch (final Exception e) {
              deviceMonitoring.addError();
              if (e instanceof DevFailed) {
                  throw (DevFailed) e;
              } else {
                  // with CORBA, the stack trace is not visible by the client if
                  // not inserted in DevFailed.
                  throw DevFailedUtils.newDevFailed(e);
              }
          } finally {
              deviceMonitoring.endRequest(request);
          }
          return history;
      }
docs: Command history. IDL 4 version.
  
  @param commandName the command name
  @param maxSize     the maximum depth of history
  @return the history
  @throws DevFailed