Ai
1 Star 0 Fork 0

叶海丰/ipmi-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cmd_set_chassis_capabilities.go 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
叶海丰 提交于 2024-08-02 08:43 +08:00 . init
package ipmi
// 28.7 Set Chassis Capabilities Command
type SetChassisCapabilitiesRequest struct {
ProvideFrontPanelLockout bool
ProvideIntrusionSensor bool
FRUDeviceAddress uint8
SDRDeviceAddress uint8
SELDeviceAddress uint8
SystemManagementDeviceAddress uint8
BridgeDeviceAddress uint8
}
type SetChassisCapabilitiesResponse struct {
}
func (req *SetChassisCapabilitiesRequest) Pack() []byte {
out := make([]byte, 5)
var b uint8 = 0
if req.ProvideFrontPanelLockout {
b = setBit1(b)
}
if req.ProvideIntrusionSensor {
b = setBit0(b)
}
packUint8(b, out, 0)
packUint8(req.FRUDeviceAddress, out, 1)
packUint8(req.SDRDeviceAddress, out, 2)
packUint8(req.SELDeviceAddress, out, 3)
packUint8(req.SystemManagementDeviceAddress, out, 4)
return out
}
func (req *SetChassisCapabilitiesRequest) Command() Command {
return CommandSetChassisCapabilities
}
func (res *SetChassisCapabilitiesResponse) CompletionCodes() map[uint8]string {
return map[uint8]string{}
}
func (res *SetChassisCapabilitiesResponse) Unpack(msg []byte) error {
return nil
}
func (res *SetChassisCapabilitiesResponse) Format() string {
return ""
}
func (c *Client) SetChassisCapabilities(request *SetChassisCapabilitiesRequest) (response *SetChassisCapabilitiesResponse, err error) {
response = &SetChassisCapabilitiesResponse{}
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

搜索帮助