代码拉取完成,页面将自动刷新
package ipmi
// 28.5 Chassis Identify Command
// 用来定位设备,机箱定位 (机箱定位灯默认亮 interval 秒)
type ChassisIdentifyRequest struct {
IdentifyInterval uint8
ForceIdentifyOn bool
}
type ChassisIdentifyResponse struct {
// empty
}
func (req *ChassisIdentifyRequest) Pack() []byte {
out := make([]byte, 2)
packUint8(uint8(req.IdentifyInterval), out, 0)
var force uint8 = 0
if req.ForceIdentifyOn {
force = 1
}
packUint8(force, out, 1)
return out
}
func (req *ChassisIdentifyRequest) Command() Command {
return CommandChassisIdentify
}
func (res *ChassisIdentifyResponse) CompletionCodes() map[uint8]string {
return map[uint8]string{}
}
func (res *ChassisIdentifyResponse) Unpack(msg []byte) error {
return nil
}
func (res *ChassisIdentifyResponse) Format() string {
return ""
}
// This command causes the chassis to physically identify itself by a mechanism
// chosen by the system implementation; such as turning on blinking user-visible lights
// or emitting beeps via a speaker, LCD panel, etc.
func (c *Client) ChassisIdentify(interval uint8, force bool) (response *ChassisIdentifyResponse, err error) {
request := &ChassisIdentifyRequest{
IdentifyInterval: interval,
ForceIdentifyOn: force,
}
response = &ChassisIdentifyResponse{}
err = c.Exchange(request, response)
return
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。