代码拉取完成,页面将自动刷新
package ipmi
// 35.6 Set Sensor Hysteresis Command
type SetSensorHysteresisRequest struct {
SensorNumber uint8
PositiveHysteresis uint8
NegativeHysteresis uint8
}
type SetSensorHysteresisResponse struct {
}
func (req *SetSensorHysteresisRequest) Command() Command {
return CommandSetSensorHysteresis
}
func (req *SetSensorHysteresisRequest) Pack() []byte {
out := make([]byte, 4)
packUint8(req.SensorNumber, out, 0)
packUint8(0xff, out, 1) // reserved for future "hysteresis mask" definition. Write as FFh
packUint8(req.PositiveHysteresis, out, 2)
packUint8(req.NegativeHysteresis, out, 3)
return out
}
func (res *SetSensorHysteresisResponse) Unpack(msg []byte) error {
return nil
}
func (r *SetSensorHysteresisResponse) CompletionCodes() map[uint8]string {
return map[uint8]string{}
}
func (res *SetSensorHysteresisResponse) Format() string {
return ""
}
// This command provides a mechanism for setting the hysteresis values associated
// with the thresholds of a sensor that has threshold based event generation.
func (c *Client) SetSensorHysteresis(sensorNumber uint8, positiveHysteresis uint8, negativeHysteresis uint8) (response *SetSensorHysteresisResponse, err error) {
request := &SetSensorHysteresisRequest{
SensorNumber: sensorNumber,
PositiveHysteresis: positiveHysteresis,
NegativeHysteresis: negativeHysteresis,
}
response = &SetSensorHysteresisResponse{}
err = c.Exchange(request, response)
return
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。