code: public ModbusRequest buildDiagnostics(DiagnosticsSubFunctionCode subFunctionCode, int serverAddress, int data) throws ModbusNumberException {
          DiagnosticsRequest request = new DiagnosticsRequest();
          request.setServerAddress(serverAddress);
          request.setSubFunctionCode(subFunctionCode);
          request.setSubFunctionData(data);
          return request;
      }
docs: The function uses a sub-function code field in the query to define the type of test to
  be performed. The server echoes both the function code and sub-function code in a normal
  response. Some of the diagnostics cause data to be returned from the remote device in the
  data field of a normal response.
  
  @param subFunctionCode a sub-function code
  @param serverAddress   a slave address
  @param data            request data field
  @return DiagnosticsRequest instance
  @throws ModbusNumberException if server address is in-valid
  @see DiagnosticsRequest
  @see DiagnosticsSubFunctionCode