Skip to content

Commit

Permalink
Added protocol editor.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrueger committed Feb 10, 2025
1 parent 6e673fa commit 8be855f
Show file tree
Hide file tree
Showing 22 changed files with 505 additions and 93 deletions.
27 changes: 18 additions & 9 deletions crates/icbsetup/src/create/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,81 +563,90 @@ fn generate_security_level_data(security_file_path: &PathBuf) -> Res<()> {
fn generate_protocol_data(protocol_data_file: &PathBuf) -> Res<()> {
let mut protocols = SupportedProtocols::default();

protocols.protocols.push(Protocol {
protocols.push(Protocol {
is_enabled: true,
is_batch: false,
is_bi_directional: false,
char_code: "A".to_string(),
description: "Ascii".to_string(),
send_command: TransferProtocolType::ASCII,
recv_command: TransferProtocolType::ASCII,
});

protocols.protocols.push(Protocol {
protocols.push(Protocol {
is_enabled: true,
is_batch: false,
is_bi_directional: false,
char_code: "X".to_string(),
description: "Xmodem/Checksum".to_string(),
send_command: TransferProtocolType::XModem,
recv_command: TransferProtocolType::XModem,
});

protocols.protocols.push(Protocol {
protocols.push(Protocol {
is_enabled: true,
is_batch: false,
is_bi_directional: false,
char_code: "C".to_string(),
description: "Xmodem/CRC".to_string(),
send_command: TransferProtocolType::XModemCRC,
recv_command: TransferProtocolType::XModemCRC,
});

protocols.protocols.push(Protocol {
protocols.push(Protocol {
is_enabled: true,
is_batch: false,
is_bi_directional: false,
char_code: "O".to_string(),
description: "1K-Xmodem (a.k.a. non-BATCH Ymodem)".to_string(),
send_command: TransferProtocolType::XModem1k,
recv_command: TransferProtocolType::XModem1k,
});

protocols.protocols.push(Protocol {
protocols.push(Protocol {
is_enabled: true,
is_batch: false,
is_bi_directional: false,
char_code: "F".to_string(),
description: "1K-Xmodem/G (a.k.a. non-BATCH Ymodem/G)".to_string(),
send_command: TransferProtocolType::XModem1kG,
recv_command: TransferProtocolType::XModem1kG,
});

protocols.protocols.push(Protocol {
protocols.push(Protocol {
is_enabled: true,
is_batch: true,
is_bi_directional: false,
char_code: "Y".to_string(),
description: "Ymodem BATCH".to_string(),
send_command: TransferProtocolType::YModem,
recv_command: TransferProtocolType::YModem,
});

protocols.protocols.push(Protocol {
protocols.push(Protocol {
is_enabled: true,
is_batch: true,
is_bi_directional: false,
char_code: "G".to_string(),
description: "Ymodem/G BATCH".to_string(),
send_command: TransferProtocolType::YModemG,
recv_command: TransferProtocolType::YModemG,
});

protocols.protocols.push(Protocol {
protocols.push(Protocol {
is_enabled: true,
is_batch: true,
is_bi_directional: false,
char_code: "Z".to_string(),
description: "Zmodem (batch)".to_string(),
send_command: TransferProtocolType::ZModem,
recv_command: TransferProtocolType::ZModem,
});

protocols.protocols.push(Protocol {
protocols.push(Protocol {
is_enabled: true,
is_batch: true,
is_bi_directional: false,
char_code: "8".to_string(),
description: "Zmodem 8k (batch)".to_string(),
send_command: TransferProtocolType::ZModem8k,
Expand Down
1 change: 1 addition & 0 deletions crates/icbsetup/src/editors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ pub mod bullettins;
pub mod dirs;
pub mod door;
pub mod languages;
pub mod protocols;
pub mod sec_editor;
pub mod surveys;
Loading

0 comments on commit 8be855f

Please sign in to comment.