552d87d75b
The park-buzi printer is a K200L (Xprinter/ICS XP-K200L; its LAN board and USB descriptor call it "POS-80"). Its board serves the Rongta's five-row status table under /prt_status.htm — but the reply carries no HTTP status line or headers, which node:http rejects, so the Rongta driver could never read it and the unit was filed in July as "no status page → generic driver" (reachability only). New `k200l` driver (printer-k200l.ts): prints through the generic ESC/POS device (same bytes, TCP 9100 or usblp) and reads the page over a raw socket, tolerant of both the headerless and a proper HTTP reply. Mapping mirrors the Rongta: board unreachable → offline; page not understood → degraded, never ready; any fault → degraded naming it; USB → reachability floor. The Rongta driver is untouched. Tests replay the captured headerless page (devices suite 76). Live against the lab unit: ready; with the cover open the board reports cover open, paper out, off-line. Wiki: new k200l-printer entity (names, network setup from factory 192.168.123.100, board quirks, status page, what it means for park-buzi — over USB the app never saw cover/paper state at all), cross-links on the Rongta, status-monitoring, USB-transport and WSL-networking pages (parking-net pinned to eth1 while the LAN NIC is eth0), index. Claude-Session: https://claude.ai/code/session_01FWncR69HgGPuei1dLrW3cU
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
// @parking/devices — device-agnostic adapters + the driver registry that lets
|
|
// an admin select between supported devices at first-run setup.
|
|
//
|
|
// See wiki/concepts/device-adapter-pattern.md and device-registry.md.
|
|
|
|
export * from "./interfaces.js";
|
|
export * from "./registry.js";
|
|
export { setDeviceLogSink, type DeviceLogSink } from "./drivers/common.js";
|
|
// Built-in drivers: the registrar plus the individual driver objects (used by
|
|
// hardware test scripts and any direct/programmatic device access).
|
|
export {
|
|
registerBuiltinDrivers,
|
|
dingtianDriver,
|
|
stubAccessDriver,
|
|
wiegandReaderDriver,
|
|
tcpipReaderDriver,
|
|
dingtianQrReaderDriver,
|
|
hikvisionDriver,
|
|
dahuaDriver,
|
|
rongtaDriver,
|
|
k200lDriver,
|
|
escposDriver,
|
|
} from "./drivers/index.js";
|
|
export { isPrinter, type PrinterRole } from "./drivers/printer-rongta.js";
|
|
// Albanian human date/time for printed slips (receipts, tickets, shift Z-report),
|
|
// kept in one place so all printed output formats dates identically.
|
|
export { stamp as formatStampSq } from "./drivers/printer-escpos.js";
|
|
export {
|
|
orderForRole,
|
|
printWithFailover,
|
|
printerRoleOf,
|
|
NoPrinterAvailableError,
|
|
type PrinterInstance,
|
|
} from "./printer-routing.js";
|