ledmanager

package
v0.0.0-...-a6598b8 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "No version specified"

Set from Makefile

Functions

func DummyCmd

func DummyCmd()

func ExecuteForceDiskCmd

func ExecuteForceDiskCmd(deviceNetworkStatus *types.DeviceNetworkStatus,
	diskDevice string, blinkCount types.LedBlinkCount)

ExecuteForceDiskCmd does counter number of 200ms blinks and returns It assumes the init function has determined a diskRepeatCount and a disk.

func ExecuteLedCmd

func ExecuteLedCmd(deviceNetworkStatus *types.DeviceNetworkStatus,
	ledName string, blinkCount types.LedBlinkCount)

ExecuteLedCmd does counter number of 200ms blinks and returns

func InitDellCmd

func InitDellCmd(ledName string) string

InitDellCmd prepares "Cloud LED" on Dell IoT gateways by enabling GPIO endpoint

func InitForceDiskCmd

func InitForceDiskCmd(ledName string) string

InitForceDiskCmd determines the disk (using the largest disk) and measures the repetition count to get to 200ms dd time.

func InitLedCmd

func InitLedCmd(ledName string) string

InitLedCmd can use different LEDs in /sys/class/leds Disable existing trigger Write "none" to /sys/class/leds/<ledName>/trigger If comma-separated list try until one is found. Returns the led which worked.

func Run

func Run(ps *pubsub.PubSub, loggerArg *logrus.Logger, logArg *base.LogObject, arguments []string) int

Types

type AppStatusDisplayFunc

type AppStatusDisplayFunc func(ctx *ledManagerContext, arg []string, blink bool, color string)

AppStatusDisplayFunc takes an argument to list of leds

type DisplayFunc

type DisplayFunc func(deviceNetworkStatus *types.DeviceNetworkStatus,
	arg string, blinkCount types.LedBlinkCount)

DisplayFunc takes an argument which can be the name of a LED or display

type InitFunc

type InitFunc func(arg string) string

InitFunc takes an argument which can be the name of a LED or display The argument could be a comma-separated list. Returns the one which works

Jump to

Keyboard shortcuts

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