screenusbhost

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package screenusbhost isolates EPS2 USB I/O in one bounded child process. One caller owns readiness, sending and session reset. Close may be concurrent. No display frame or private lease is passed to the child as process arguments.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfiguration = errors.New("screen USB: invalid local configuration or geometry")
	ErrWorker        = errors.New("screen USB: serial proxy failed")
	ErrClosed        = errors.New("screen USB: closed")
	ErrCooldown      = errors.New("screen USB: physical refresh cooldown has not elapsed")
)

Functions

func ProxyExitCode

func ProxyExitCode(err error) int

ProxyExitCode emits only a fixed, non-secret category from the supervised CLI. Unknown failures retain exit1; older workers remain compatible with the parent.

func SerialProxy

func SerialProxy(name string, input io.Reader, output io.Writer) (result error)

SerialProxy is the supervised child's only operation: one open CDC port, complete bounded EPS2 records, no rendering, fallback, retry or stdout text. The parent must supervise it: serial.Close alone does not bound kernel writes.

Types

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

func New

func New(executable, port string, size display.Size) (*Sender, error)

New takes trusted local paths and expected logical geometry. No enrollment is required for trusted physical USB; capabilities still validate EPS2 semantics.

func (*Sender) Changed

func (s *Sender) Changed() <-chan struct{}

func (*Sender) Close

func (s *Sender) Close() error

func (*Sender) ConfigurePartial

func (s *Sender) ConfigurePartial(policy refreshpolicy.Policy) error

func (*Sender) ConfigureRefresh

func (s *Sender) ConfigureRefresh(policy refreshpolicy.Policy) error

func (*Sender) Inspect

func (s *Sender) Inspect(ctx context.Context) (Snapshot, error)

Inspect performs read-only Hello and Health without acquiring or binding a lease. Opening USB/DTR still invokes normal USB priority and may abort an incomplete Wi-Fi upload. It never renders, uploads, refreshes or retries.

func (*Sender) InspectPanel

func (s *Sender) InspectPanel(ctx context.Context) (screenwire.PanelStatus, error)

InspectPanel reads one cached trace without retries or a screen lease. USB opening still has the existing DTR/priority effects, as documented by Inspect. Unsupported old firmware returns an error; absence is never a zero trace.

func (*Sender) ResetSession

func (s *Sender) ResetSession()

ResetSession is explicit permission to abandon unproven state, not permission to resend. The owner must invalidate its baseline before calling this method.

func (*Sender) Send

func (s *Sender) Send(ctx context.Context, frame display.Frame) error

func (*Sender) SendRegion

func (s *Sender) SendRegion(ctx context.Context, plan screendelivery.RegionPlan, options refreshpolicy.Options) error

func (*Sender) SendWithOptions

func (s *Sender) SendWithOptions(ctx context.Context, frame display.Frame, options refreshpolicy.Options) error

func (*Sender) WaitReady

func (s *Sender) WaitReady(ctx context.Context) (screendelivery.Readiness, error)

type Snapshot

type Snapshot struct {
	Capabilities screenwire.Capabilities
	Health       screenwire.HealthStatus
	Status       screenwire.Status
}

Jump to

Keyboard shortcuts

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