abla/device
Generated from source.
Import with import "abla/device".
Source: abla/device/entry.ab
Re-exports abla/net/contracts.
DeviceConnection (class)
resource class DeviceConnection(var descriptor: int, val error: NetworkError)
Owns a character device descriptor or holds the error that prevented it opening.
DeviceConnection.drop (method)
trusted fun drop(): void
Closes the held descriptor and clears it.
DeviceConnection.opened (extension fun)
fun DeviceConnection.opened(): bool
Returns whether the connection holds an open descriptor.
DeviceConnection.close (extension fun)
trusted fun DeviceConnection.close(): bool
Never retry close: an interrupted close may already have released the FD.
deviceOpen (fun)
trusted fun deviceOpen(path: string, readWrite: bool = false): DeviceConnection
Opens an existing character device or returns a closed connection with the error.
DeviceConnection.writeUntil (extension fun)
trusted fun DeviceConnection.writeUntil(
contents: string,
deadlineMilliseconds: int
): NetworkWriteOutcome
Absolute monotonic deadline. The final POLLOUT matters for usblp: a queued nonblocking transfer may otherwise be cancelled by an immediate close. This is readiness, not physical UART drain or proof of printing.
DeviceConnection.writeWithin (extension fun)
fun DeviceConnection.writeWithin(contents: string, timeoutMilliseconds: int): NetworkWriteOutcome
Relative timeout convenience; writeUntil itself takes an absolute deadline.
Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.