1 Star 0 Fork 0

叶海丰/ipmi-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cmd_get_sdr_repo_alloc_info.go 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
叶海丰 提交于 1年前 . init
package ipmi
import "fmt"
// 33.10 Get SDR Repository Allocation Info Command
type GetSDRRepoAllocInfoRequest struct {
// empty
}
type GetSDRRepoAllocInfoResponse struct {
PossibleAllocUnits uint16
AllocUnitsSize uint16 // Allocation unit size in bytes. 0000h indicates unspecified.
FreeAllocUnits uint16
LargestFreeBlock uint16
MaximumRecordSize uint8
}
func (req *GetSDRRepoAllocInfoRequest) Pack() []byte {
return nil
}
func (req *GetSDRRepoAllocInfoRequest) Command() Command {
return CommandGetSDRRepoAllocInfo
}
func (res *GetSDRRepoAllocInfoResponse) Unpack(msg []byte) error {
if len(msg) < 9 {
return ErrUnpackedDataTooShortWith(len(msg), 9)
}
res.PossibleAllocUnits, _, _ = unpackUint16L(msg, 0)
res.AllocUnitsSize, _, _ = unpackUint16L(msg, 2)
res.FreeAllocUnits, _, _ = unpackUint16L(msg, 4)
res.LargestFreeBlock, _, _ = unpackUint16L(msg, 6)
res.MaximumRecordSize, _, _ = unpackUint8(msg, 8)
return nil
}
func (res *GetSDRRepoAllocInfoResponse) CompletionCodes() map[uint8]string {
return map[uint8]string{}
}
func (res *GetSDRRepoAllocInfoResponse) Format() string {
return fmt.Sprintf("%v", res)
}
func (c *Client) GetSDRRepoAllocInfo() (response *GetSDRRepoAllocInfoResponse, err error) {
request := &GetSDRRepoAllocInfoRequest{}
response = &GetSDRRepoAllocInfoResponse{}
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

搜索帮助