1 Star 0 Fork 0

叶海丰/ipmi-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cmd_chassis_control.go 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
叶海丰 提交于 1年前 . init
package ipmi
type ChassisControl uint8
const (
ChassisControlPowerDown ChassisControl = 0 // down, off
ChassisControlPowerUp ChassisControl = 1
ChassisControlPowerCycle ChassisControl = 2
ChassisControlHardwareRest ChassisControl = 3
ChassisControlDiagnosticInterrupt ChassisControl = 4
ChassisControlSoftShutdown ChassisControl = 5
)
// 28.3 Chassis Control Command
type ChassisControlRequest struct {
ChassisControl ChassisControl
}
type ChassisControlResponse struct {
}
func (req *ChassisControlRequest) Pack() []byte {
out := make([]byte, 1)
packUint8(uint8(req.ChassisControl), out, 0)
return out
}
func (req *ChassisControlRequest) Command() Command {
return CommandChassisControl
}
func (res *ChassisControlResponse) CompletionCodes() map[uint8]string {
return map[uint8]string{}
}
func (res *ChassisControlResponse) Unpack(msg []byte) error {
return nil
}
func (res *ChassisControlResponse) Format() string {
return ""
}
func (c *Client) ChassisControl(control ChassisControl) (response *ChassisControlResponse, err error) {
request := &ChassisControlRequest{
ChassisControl: control,
}
response = &ChassisControlResponse{}
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

搜索帮助