I just went through that myself. The first two questions: 1. Can one memory belong to multiple banks simultaneously? 2. Does every memory have to belong to at least one bank? The answers determine which base class you use for the bank model.
You need to implement a bank model so that Chirp can inquire, for example, which memories are in bank C?
You also need to implement get_bank(), set_bank(), clear_bank() for a memory (in the radio class), which will be called by the bank model.
Hopefully, that's enough to get you started.
On 5/23/2023 1:47 PM, Joseph Scanlan via chirp_devel wrote:
Does anyone have an example that will help me understand MemoryMapping, MappingModel, Bank, and BankModel classes? I’m working on a driver for the Icom IC-F520 land mobile radio.
The F520 has 256 channels and 16 banks. This is how they look in MEM_FORMAT:
struct { u16 capacity; } banks[16];
struct { char name[10]; u32 inhibit:1, freq_rx:31; u32 inhibit_tx:1, freq_tx:31; u8 rx_tone_off:1, rx_tone_digital:1, unk01:6; u8 rx_tone; u8 tx_tone_off:1, tx_tone_digital:1, unk02:6; u8 tx_tone; u8 unk03:3, tot_on:1, lockout_repeater:1, lockout_busy:1, power_rf:2; u8 log_in:2, log_out:2, unk04:1, text_on:1, unk05:1, two_tone_unk1:1; u8 unk06:4, two_tone_unk2:2 auto_reset_a:1, unk07:1; u8 narrow:1, scrambler_on:1, scrambler_inhibit:1, compander_on:1, unk08:4; u8 unk09; u8 scrabmler_code; u16 unk10; u16 unk11; u8 unk12:6, two_tone_index:2; } memory[256]; _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers