Led class

LED wrapper functions for Linux userspace sysfs LEDs.

Inheritance

Constructors

Led(String name)
Open the sysfs LED with the specified name.
Led.isolate(String json)
Duplicates an existing Led from a JSON string. This special constructor is used to transfer an existing Led to another isolate.

Properties

hashCode int
The hash code for this object.
no setterinherited
isolate bool
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Releases all internal native resources.
fromJson(String json) IsolateAPI
override
getBrightness() int
Returns the brightness of the led.
getErrno() int
Returns the libc errno of the last failure that occurred.
getHandle() int
override
getLedInfo() String
Returns a string representation of the led handle.
getLedName() String
Returns the name of the led.
getMaxBrightness() int
Returns the maximum possible brightness of the led.
isIsolate() bool
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read() bool
Reads the state of the led.
setBrightness(int value) → void
Sets the brightness of the led to value.
setHandle(int handle) → void
Set the address of the internal handle.
override
toJson() String
Converts a Led to a JSON string. See constructor isolate for details.
override
toString() String
A string representation of this object.
inherited
write(bool value) → void
Sets the state of the led to value.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getLedErrorCode(int value) LedErrorCode
Converts the native error code value to LedErrorCode.