1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
package ipmi
import "context"
// 24.2 Deactivate Payload Command
type DeactivatePayloadRequest struct {
PayloadType PayloadType
PayloadInstance uint8
}
type DeactivatePayloadResponse struct {
}
func (req DeactivatePayloadRequest) Command() Command {
return CommandDeactivatePayload
}
func (req *DeactivatePayloadRequest) Pack() []byte {
out := make([]byte, 6)
out[0] = byte(req.PayloadType)
out[1] = req.PayloadInstance
out[2] = 0
out[3] = 0
out[4] = 0
out[5] = 0
return out
}
func (res *DeactivatePayloadResponse) Unpack(msg []byte) error {
return nil
}
func (*DeactivatePayloadResponse) CompletionCodes() map[uint8]string {
return map[uint8]string{
0x80: "Payload already deactivated",
0x81: "Payload type is disabled",
}
}
func (res *DeactivatePayloadResponse) Format() string {
return ""
}
func (c *Client) DeactivatePayload(ctx context.Context, request *DeactivatePayloadRequest) (response *DeactivatePayloadResponse, err error) {
response = &DeactivatePayloadResponse{}
err = c.Exchange(ctx, request, response)
return
}
|