pub enum Model {
Hp48Sx,
Hp48Gx,
Hp49G,
Hp38G,
Hp39G,
Unknown,
}Expand description
Calculator model, as far as the ROM version text tells.
Variants§
Hp48Sx
HP 48S/SX: no VERSION command, no XModem.
Hp48Gx
HP 48G/GX: HP48-x, Copyright HP 1993; XModem with checksum only.
Hp49G
HP 49G: XModem with checksum, HP’s CRC (D) and 1k blocks.
Hp38G
HP 38G: no Kermit server; it is the Kermit client of a PC “disk
drive”, asking for HP38DIR.CUR first, and has no XModem (wiki:
protocols/aplet-transfer).
Hp39G
HP 39G and HP 40G, which run the same ROM and look the same on the
wire: as the 38G with HP39DIR.CUR, and XModem for binary aplets
(“HP39/40 (Wire)”: 128-byte blocks, checksum).
Unknown
Anything else.
Implementations§
Source§impl Model
impl Model
Sourcepub fn from_version(version: Option<&str>) -> Model
pub fn from_version(version: Option<&str>) -> Model
The model from the VERSION text (Calculator::version): None
is the 48S/SX, which lacks the command; the 48G/GX says
HP48-R, Copyright HP 1993; the 49G says HP49-C Revision #1.18
(ROM 1.x) or HP48-C Revision #2.15 (2.x) and is told apart by its
copyright year (1999 or later) or an HP49.
Sourcepub fn from_directory_file(name: &[u8]) -> Option<Model>
pub fn from_directory_file(name: &[u8]) -> Option<Model>
The model that asks a “disk drive” for directory file name:
HP38DIR. (the 38G) or HP39DIR. (the 39G or 40G) and anything
after, in any case; None for other names.
Sourcepub fn has_xmodem(self) -> bool
pub fn has_xmodem(self) -> bool
Whether the model has XModem: XRECV/XSEND on the 48G/GX and
49G, “HP39/40 (Wire)” for aplets on the 39G and 40G (unknown models
are given the benefit of the doubt).
Sourcepub fn drives_transfers(self) -> bool
pub fn drives_transfers(self) -> bool
Whether the calculator drives every transfer as the Kermit client of a “disk drive” (the 38G, 39G and 40G), instead of running a Kermit server the computer drives.