I’ve been giving a lot of thought to the best way to handle exporting and importing of channels into the GD-77 over the last few days, and I think I’ve finally come up with a reasonable idea to make it easier to export and import all the information that will allow channels to be exported and then imported with the minimum of hassle
Note. The changes I describe below have not been released yet as I’m still testing them…
- I’ve changed the Channels export to export all data associated with each channel (not just the limited subset which the CPS currently exports). This means that channels that are imported are not missing vital data needed for DMR operation.
- I’ve modified the Import feature so that it does not clear (delete) all channels before importing.
My new version, checks each channel as its imported, and if it matches an existing channel name, the existing channel is updated with the revised information from the CSV data.
- I’ve add (actually re-enabled a hidden feature), that allows groups of channels to be deleted.
- I’m going to remove the “Clear” button, as this is basically superseded by the “Delete Selected” button, as multiple rows can be deleted by clicking on the first row and shift clicking on the last row.
During the import, its currently possible to for a channel to use a Contact name, which is not in the list of digital contacts. This currently causes the “Contact” to be set to “None”. The same applies to Rx Groups and Scan lists.
In these cases, currently you would need to manually change these channels to select the correct Contact, Rx Group and / or Scan list.
However, I had a brainwave this morning, and I’ve realised that…
Ideal 1 (Contact data and Rx Group lists)
If I include the Contact Type and Contact Number, as part of the channel information, that I can create (add) new contacts (TGs or PCs), when a channel is imported.
Also if the RX Group referenced by a channel does not exist, I can use the Contact data to either find a Rx Group with that Contact in it, or possibly make a new Rx Group.
There is a slight problem with this method, because if I create a new Rx Group with the Contact assigned to the channel that’s being imported.
When the import function encounters the same Rx Group name again, it would presume that it was a pre-existing fully populated Rx Group list and not one that was created by the importer.
Probably the best way to overcome this issue is to check that the Rx Group specified for a channel, contains the Contact (TG) used by that Channel.
And if the Contact is not in the Rx Group, then try to add it to the Group.
This is not foolproof, because an Rx Group can only contain 32 Contacts, and a mall-formed CSV (created manually) could have omitted to correctly set the Rx Group.
Hence some error checking will need to be added to the import system to handle this, and perhaps abort the import if that occurs.
This will slow down the import process slightly, but I suspect the difference in speed will be barely noticeable on most modern PC’s
Idea 2 (Scan lists)
I don’t personally use Scan Lists, and I’m not sure why the Scan list needs to be specified in the Channel data at all.
Perhaps someone can explain why this is necessary….
However, if the importer encounters a Scan list name that is not an existing Scan list, then a new list could be created.
What I don’t know is whether the Scan list should have that channel in it, because at the moment the CPS does not seem to enforce this.
Idea 3 Zones
If the channel is in at least one Zone, I can include the Zone name in the data (CSV line) for that channel when its exported.
Then when importing each channel, I can check of a Zone exists with that name and if it does not, the importer can create the Zone and add the channel to it.
Like Rx Groups, if the Zone already exists, I’ll need to check that the Channel is in the Zone, and if not, I’ll need to add it.
I think if I make the changes described above, it should be possible to do almost a complete import, by just having a spreadsheet containing this augmented channel data.
It would not be able to handle instances when the same channel was in multiple zones or multiple scan lists, but I intend working on having separate systems to export and import both Zones and Scan lists (and probably Rx Groups, just for completeness).
And if all else fails, Colin G4EML has a very good Codeplug file < —- > multiple CSV system, which can be used instead.