devices

package
v0.0.0-...-fd38cd8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

SNMPDeviceHandlers holds a reference to all of the device handlers used by the SNMP plugin.

View Source
var SnmpCurrent = sdk.DeviceHandler{
	Name: "current",
	Read: SnmpCurrentRead,
}

SnmpCurrent is the handler for the SNMP OIDs that report current.

View Source
var SnmpFrequency = sdk.DeviceHandler{
	Name: "frequency",
	Read: SnmpFrequencyRead,
}

SnmpFrequency is the handler for the SNMP OIDs that report frequency.

View Source
var SnmpIdentity = sdk.DeviceHandler{
	Name: "identity",
	Read: SnmpIdentityRead,
}

SnmpIdentity is the handler for the snmp-identity device.

View Source
var SnmpMinutes = sdk.DeviceHandler{
	Name: "minutes",
	Read: SnmpMinutesRead,
}

SnmpMinutes is the handler for the SNMP OIDs that report minutes.

View Source
var SnmpPercentage = sdk.DeviceHandler{
	Name: "percentage",
	Read: SnmpPercentageRead,
}

SnmpPercentage is the handler for the SNMP OIDs that report percentage.

View Source
var SnmpPower = sdk.DeviceHandler{
	Name: "power",
	Read: SnmpPowerRead,
}

SnmpPower is the handler for SNMP OIDs that report power.

View Source
var SnmpSeconds = sdk.DeviceHandler{
	Name: "seconds",
	Read: SnmpSecondsRead,
}

SnmpSeconds is the handler for the SNMP OIDs that report seconds.

View Source
var SnmpStatus = sdk.DeviceHandler{
	Name: "status",
	Read: SnmpStatusRead,
}

SnmpStatus is the handler for the snmp-status device.

View Source
var SnmpTemperature = sdk.DeviceHandler{
	Name: "temperature",
	Read: SnmpTemperatureRead,
}

SnmpTemperature is the handler for the SNMP OIDs that report temperature.

View Source
var SnmpVoltage = sdk.DeviceHandler{
	Name: "voltage",
	Read: SnmpVoltageRead,
}

SnmpVoltage is the handler for the SNMP OIDs that report voltage.

Functions

func IsEnumeration

func IsEnumeration(data map[string]interface{}) (yes bool)

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

func SnmpCurrentRead(device *sdk.Device) (readings []*output.Reading, err error)

SnmpCurrentRead is the read handler function for Synse SNMP devices that report current.

func SnmpFrequencyRead

func SnmpFrequencyRead(device *sdk.Device) (readings []*output.Reading, err error)

SnmpFrequencyRead is the read handler function for synse SNMP devices that report frequency.

func SnmpIdentityRead

func SnmpIdentityRead(device *sdk.Device) (readings []*output.Reading, err error)

SnmpIdentityRead is the read handler function for snmp-identity devices.

func SnmpMinutesRead

func SnmpMinutesRead(device *sdk.Device) (readings []*output.Reading, err error)

SnmpMinutesRead is the read handler function for Synse SNMP devices that report minutes.

func SnmpPercentageRead

func SnmpPercentageRead(device *sdk.Device) (readings []*output.Reading, err error)

SnmpPercentageRead is the read handler function for Synse SNMP devices that report percentage.

func SnmpPowerRead

func SnmpPowerRead(device *sdk.Device) (readings []*output.Reading, err error)

SnmpPowerRead is the read handler function for synse SNMP devices that report power.

func SnmpSecondsRead

func SnmpSecondsRead(device *sdk.Device) (readings []*output.Reading, err error)

SnmpSecondsRead is the read handler function for Synse SNMP devices that report seconds.

func SnmpStatusRead

func SnmpStatusRead(device *sdk.Device) (readings []*output.Reading, err error)

SnmpStatusRead is the read handler function for snmp-status devices.

func SnmpTemperatureRead

func SnmpTemperatureRead(device *sdk.Device) (readings []*output.Reading, err error)

SnmpTemperatureRead is the read handler function for synse SNMP devices that report temperature.

func SnmpVoltageRead

func SnmpVoltageRead(device *sdk.Device) (readings []*output.Reading, err error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL