Skip to content

DeviceKObject

Defined in: src/device.ts:78

A device’s kobject, i.e. /sys/devices/.../<name>.

new DeviceKObject(device, parent): DeviceKObject

Defined in: src/device.ts:79

Device

KObject

DeviceKObject

KObject.constructor

attributes: Map<string, Attribute>

Defined in: src/kobject.ts:21

These attributes use the kobject’s show and store.

KObject.attributes


children: Map<string, KEntry>

Defined in: src/kobject.ts:16

KObject.children


readonly device: Device

Defined in: src/device.ts:80


name: string

Defined in: src/kobject.ts:24

KObject.name


optional parent?: KObject | null

Defined in: src/kobject.ts:25

KObject.parent

get path(): string

Defined in: src/kobject.ts:34

The path of this kobject, relative to the root of sysfs.

string

KObject.path

[dispose](): void

Defined in: src/kobject.ts:72

void

KObject.[dispose]


add_uevent_attr(): void

Defined in: src/kobject.ts:115

void

KObject.add_uevent_attr


create_attribute(name, show?, store?, mode?): Attribute

Defined in: src/kobject.ts:132

string

((kobj) => string) | null

((kobj, value) => void) | null

number = ...

Defaults based on which of show and store were passed.

Attribute

KObject.create_attribute


dispose(): void

Defined in: src/kobject.ts:64

void

KObject.dispose


keys(): Iterable<string>

Defined in: src/kobject.ts:60

The names of everything in this kobject.

Iterable<string>

KObject.keys


lookup(name): KEntry | undefined

Defined in: src/kobject.ts:44

Resolve a single entry by name. Attributes that use this kobject’s show and store are bound before being returned.

string

KEntry | undefined

KObject.lookup


notify_uevent(action, env?): void

Defined in: src/kobject.ts:82

Notify listeners that something happened to kobj.

"add" | "remove" | "change" | "move" | "online" | "offline" | "bind" | "unbind"

UEventEnv = {}

void

KObject.notify_uevent


send_uevent(text): void

Defined in: src/kobject.ts:100

Send a uevent described by text, an action optionally followed by KEY=VALUE pairs. This is what writing to a uevent attribute does.

string

void

KObject.send_uevent


optional show(attr): string

Defined in: src/kobject.ts:76

Attribute

string

KObject.show


optional store(attr, value): void

Defined in: src/kobject.ts:77

Attribute

string

void

KObject.store


uevent(env): void

Defined in: src/device.ts:86

Add variables to the environment of uevents sent for this kobject and its descendants.

UEventEnv

void

notify_uevent

KObject.uevent