Documentation
¶
Overview ¶
Package screenlink joins EPS2 framing to the retained screen-session core. Callers authenticate network input, serialize ALL connections and poll Tick. One Device owns the panel; opening a connection alone never grants ownership.
Index ¶
- type Connection
- type Device
- func (d *Device) Open() *Connection
- func (d *Device) Preempt() error
- func (d *Device) Reconfigure(id [16]byte) error
- func (d *Device) SetHealth(provider func() screenwire.HealthStatus)
- func (d *Device) SetPanelTrace(provider func() screenwire.PanelStatus)
- func (d *Device) Tick(now time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func (*Connection) Disconnect ¶
func (c *Connection) Disconnect() error
func (*Connection) Push ¶
Push accepts arbitrary fragmentation. write must consume borrowed ACK bytes before returning and impose a transport deadline; an ACK error disconnects. Framing failure is fatal for this transport: caller must close/reopen it.
func (*Connection) Revoked ¶
func (c *Connection) Revoked() bool
Revoked reports authentication-lifetime invalidation, not pixel ownership. A physical control callback can revoke even while only inspecting storage.
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func New ¶
func New(caps screenwire.Capabilities, boot [16]byte, sink streamrx.Sink, idle, total time.Duration, diagnose func(error) screenwire.Diagnostic) (*Device, error)
func (*Device) Open ¶
func (d *Device) Open() *Connection
Open follows transport authentication. USB priority is an explicit owner-loop decision through Preempt, never a consequence of receiving a Hello packet.
func (*Device) Preempt ¶
Preempt aborts incomplete staging. Commit is synchronous; the serialized owner cannot enter here until refresh/BUSY/power-off finishes.
func (*Device) Reconfigure ¶
Reconfigure revokes every connection, including authenticated but unbound ones. Call before credential mutation (zero ID) and after authoritative Load. The owner must also stop old network workers and discard their queued events; a worker must never open a fresh connection with stale authentication. It retains refresh cadence; storage generations are not screen generations.
func (*Device) SetHealth ¶
func (d *Device) SetHealth(provider func() screenwire.HealthStatus)
SetHealth is configured once before owner/network tasks start. The callback reads bounded cached state only: never radio/stack calls or hardware probes.
func (*Device) SetPanelTrace ¶
func (d *Device) SetPanelTrace(provider func() screenwire.PanelStatus)
SetPanelTrace installs an owner-serialized cached observer before tasks start. The provider must not read pins, advance timers, or perform any panel I/O.