raspberrypi_pinout_status

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 12 Imported by: 0

README

OpenHardwareMonitor Input Plugin

This input plugin will gather pins state from raspberry PI using command raspi-gpio

Configuration:
# # Get sensors data from Open Hardware Monitor via WMI
# [[inputs.raspberrypi_pinout_status]]
	
Measurements & Fields:
  • All pins or specify subset of raspberryPI pins.
Tags:
  • All measurements have the following tags:

    • name
    • parent
    • ???
Example Output:

Documentation

Index

Constants

View Source
const KillGrace = 5 * time.Second

KillGrace is the amount of time we allow a process to shutdown before sending a SIGKILL.

Variables

This section is empty.

Functions

func CombinedOutputTimeout

func CombinedOutputTimeout(c *exec.Cmd, timeout time.Duration) ([]byte, error)

func WaitTimeout

func WaitTimeout(c *exec.Cmd, timeout time.Duration) error

WaitTimeout waits for the given command to finish with a timeout. It assumes the command has already been started. If the command times out, it attempts to kill the process.

Types

type HostCommand

type HostCommand func(binary string, args ...string) (string, error)

type PinOutStatus

type PinOutStatus struct {
	GPIO     int
	Level    int
	FSelect  int
	Function string
	Pull     string
}

type RaspberrypiPinoutStatus

type RaspberrypiPinoutStatus struct {
	Log   telegraf.Logger `toml:"-"`
	GPins []int
	// contains filtered or unexported fields
}

func (*RaspberrypiPinoutStatus) Description

func (rpi *RaspberrypiPinoutStatus) Description() string

func (*RaspberrypiPinoutStatus) Gather

func (*RaspberrypiPinoutStatus) GetArgs

func (rpi *RaspberrypiPinoutStatus) GetArgs() []string

func (*RaspberrypiPinoutStatus) SampleConfig

func (rpi *RaspberrypiPinoutStatus) SampleConfig() string

Jump to

Keyboard shortcuts

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