Class RawResponse

java.lang.Object
org.metricshub.ipmi.client.RawResponse
All Implemented Interfaces:
ResponseData

public final class RawResponse extends Object implements ResponseData
The reply to a raw request (IpmiClient.raw(int, int)): its completion code and its data as the BMC sent them, whatever the completion code.
  • Method Details

    • completionCode

      public CompletionCode completionCode()
      Returns the completion code: CompletionCode.Ok when the BMC carried the request out, CompletionCode.Unknown for an OEM (01h-7Eh) or command-specific (80h-BEh) code, whose meaning only the command defines (see rawCompletionCode()).
      Returns:
      the completion code
    • rawCompletionCode

      public int rawCompletionCode()
      Returns the completion code byte as the BMC sent it.
      Returns:
      the completion code, 0 to 255
    • data

      public byte[] data()
      Returns the response data after the completion code, as the BMC sent it. Under the Group Extension network function (2Ch) the first byte is the defining body (DCh for DCMI), under OEM/Group (2Eh) the first three are an IANA enterprise number (IPMI 2.0 table 5-1). After an error completion code, a BMC usually sends no data, or only these bytes.
      Returns:
      a copy of the data, empty when the reply has none
    • toString

      public String toString()
      Overrides:
      toString in class Object