Documentation
¶
Index ¶
- Variables
- func IsEnumeration(data map[string]interface{}) (yes bool)
- func MultiplyReading(result core.ReadResult, data map[string]interface{}) (resultFloat float32, err error)
- func SnmpCurrentRead(device *sdk.Device) (readings []*output.Reading, err error)
- func SnmpFrequencyRead(device *sdk.Device) (readings []*output.Reading, err error)
- func SnmpIdentityRead(device *sdk.Device) (readings []*output.Reading, err error)
- func SnmpMinutesRead(device *sdk.Device) (readings []*output.Reading, err error)
- func SnmpPercentageRead(device *sdk.Device) (readings []*output.Reading, err error)
- func SnmpPowerRead(device *sdk.Device) (readings []*output.Reading, err error)
- func SnmpSecondsRead(device *sdk.Device) (readings []*output.Reading, err error)
- func SnmpStatusRead(device *sdk.Device) (readings []*output.Reading, err error)
- func SnmpTemperatureRead(device *sdk.Device) (readings []*output.Reading, err error)
- func SnmpVoltageRead(device *sdk.Device) (readings []*output.Reading, err error)
- func TranslateEnumeration(result core.ReadResult, data map[string]interface{}) (string, error)
Constants ¶
This section is empty.
Variables ¶
var SNMPDeviceHandlers = []*sdk.DeviceHandler{ &SnmpCurrent, &SnmpFrequency, &SnmpIdentity, &SnmpMinutes, &SnmpPercentage, &SnmpPower, &SnmpSeconds, &SnmpStatus, &SnmpTemperature, &SnmpVoltage, }
SNMPDeviceHandlers holds a reference to all of the device handlers used by the SNMP plugin.
var SnmpCurrent = sdk.DeviceHandler{ Name: "current", Read: SnmpCurrentRead, }
SnmpCurrent is the handler for the SNMP OIDs that report current.
var SnmpFrequency = sdk.DeviceHandler{ Name: "frequency", Read: SnmpFrequencyRead, }
SnmpFrequency is the handler for the SNMP OIDs that report frequency.
var SnmpIdentity = sdk.DeviceHandler{ Name: "identity", Read: SnmpIdentityRead, }
SnmpIdentity is the handler for the snmp-identity device.
var SnmpMinutes = sdk.DeviceHandler{ Name: "minutes", Read: SnmpMinutesRead, }
SnmpMinutes is the handler for the SNMP OIDs that report minutes.
var SnmpPercentage = sdk.DeviceHandler{ Name: "percentage", Read: SnmpPercentageRead, }
SnmpPercentage is the handler for the SNMP OIDs that report percentage.
var SnmpPower = sdk.DeviceHandler{ Name: "power", Read: SnmpPowerRead, }
SnmpPower is the handler for SNMP OIDs that report power.
var SnmpSeconds = sdk.DeviceHandler{ Name: "seconds", Read: SnmpSecondsRead, }
SnmpSeconds is the handler for the SNMP OIDs that report seconds.
var SnmpStatus = sdk.DeviceHandler{ Name: "status", Read: SnmpStatusRead, }
SnmpStatus is the handler for the snmp-status device.
var SnmpTemperature = sdk.DeviceHandler{ Name: "temperature", Read: SnmpTemperatureRead, }
SnmpTemperature is the handler for the SNMP OIDs that report temperature.
var SnmpVoltage = sdk.DeviceHandler{ Name: "voltage", Read: SnmpVoltageRead, }
SnmpVoltage is the handler for the SNMP OIDs that report voltage.
Functions ¶
func IsEnumeration ¶
IsEnumeration returns whether or not the SNMP device reading represents an enumeration for a synse device. data is the map associated with a synse device.
func MultiplyReading ¶
func MultiplyReading(result core.ReadResult, data map[string]interface{}) (resultFloat float32, err error)
MultiplyReading is a helper method to multiply out raw readings appropriately.
func SnmpCurrentRead ¶
SnmpCurrentRead is the read handler function for Synse SNMP devices that report current.
func SnmpFrequencyRead ¶
SnmpFrequencyRead is the read handler function for synse SNMP devices that report frequency.
func SnmpIdentityRead ¶
SnmpIdentityRead is the read handler function for snmp-identity devices.
func SnmpMinutesRead ¶
SnmpMinutesRead is the read handler function for Synse SNMP devices that report minutes.
func SnmpPercentageRead ¶
SnmpPercentageRead is the read handler function for Synse SNMP devices that report percentage.
func SnmpPowerRead ¶
SnmpPowerRead is the read handler function for synse SNMP devices that report power.
func SnmpSecondsRead ¶
SnmpSecondsRead is the read handler function for Synse SNMP devices that report seconds.
func SnmpStatusRead ¶
SnmpStatusRead is the read handler function for snmp-status devices.
func SnmpTemperatureRead ¶
SnmpTemperatureRead is the read handler function for synse SNMP devices that report temperature.
func SnmpVoltageRead ¶
SnmpVoltageRead is the read handler function for synse SNMP devices that report voltage.
func TranslateEnumeration ¶
func TranslateEnumeration(result core.ReadResult, data map[string]interface{}) (string, error)
TranslateEnumeration translates a read result to a string based on the enumeration. The caller should call IsEnumeration first for this translation to make sense.
Types ¶
This section is empty.