1 Star 0 Fork 0

叶海丰/ipmi-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cmd_set_front_panel_enables.go 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
叶海丰 提交于 12个月前 . init
package ipmi
// 28.6 Set Front Panel Enables
// 定位
type SetFrontPanelEnablesRequest struct {
DisableSleepButton bool
DisableDiagnosticButton bool
DisableResetButton bool
DisablePoweroffButton bool
}
type SetFrontPanelEnablesResponse struct {
// empty
}
func (req *SetFrontPanelEnablesRequest) Pack() []byte {
out := make([]byte, 1)
var b uint8 = 0
if req.DisableSleepButton {
b = setBit3(b)
}
if req.DisableSleepButton {
b = setBit2(b)
}
if req.DisableSleepButton {
b = setBit1(b)
}
if req.DisableSleepButton {
b = setBit0(b)
}
packUint8(b, out, 1)
return out
}
func (req *SetFrontPanelEnablesRequest) Command() Command {
return CommandSetFrontPanelEnables
}
func (res *SetFrontPanelEnablesResponse) CompletionCodes() map[uint8]string {
return map[uint8]string{}
}
func (res *SetFrontPanelEnablesResponse) Unpack(msg []byte) error {
return nil
}
func (res *SetFrontPanelEnablesResponse) Format() string {
return ""
}
// The following command is used to enable or disable the buttons on the front panel of the chassis.
func (c *Client) SetFrontPanelEnables(disableSleepButton bool, disableDiagnosticButton bool, disableResetButton bool, disablePoweroffButton bool) (response *SetFrontPanelEnablesResponse, err error) {
request := &SetFrontPanelEnablesRequest{
DisableSleepButton: disableSleepButton,
DisableDiagnosticButton: disableDiagnosticButton,
DisableResetButton: disableResetButton,
DisablePoweroffButton: disablePoweroffButton,
}
response = &SetFrontPanelEnablesResponse{}
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

搜索帮助