1 Star 0 Fork 0

叶海丰/ipmi-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cmd_reserve_device_sdr_repo.go 1022 Bytes
一键复制 编辑 原始数据 按行查看 历史
叶海丰 提交于 1年前 . init
package ipmi
// 35.4 Reserve Device SDR Repository Command
type ReserveDeviceSDRRepoRequest struct {
// empty
}
type ReserveDeviceSDRRepoResponse struct {
ReservationID uint16
}
func (req *ReserveDeviceSDRRepoRequest) Command() Command {
return CommandReserveDeviceSDRRepo
}
func (req *ReserveDeviceSDRRepoRequest) Pack() []byte {
return []byte{}
}
func (res *ReserveDeviceSDRRepoResponse) Unpack(msg []byte) error {
if len(msg) < 2 {
return ErrUnpackedDataTooShortWith(len(msg), 2)
}
res.ReservationID, _, _ = unpackUint16L(msg, 0)
return nil
}
func (r *ReserveDeviceSDRRepoResponse) CompletionCodes() map[uint8]string {
return map[uint8]string{}
}
func (res *ReserveDeviceSDRRepoResponse) Format() string {
return ""
}
// This command is used to obtain a Reservation ID.
func (c *Client) ReserveDeviceSDRRepo() (response *ReserveDeviceSDRRepoResponse, err error) {
request := &ReserveDeviceSDRRepoRequest{}
response = &ReserveDeviceSDRRepoResponse{}
err = c.Exchange(request, response)
return
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/rogax/ipmi-go.git
git@gitee.com:rogax/ipmi-go.git
rogax
ipmi-go
ipmi-go
86ae46cfb58e

搜索帮助