SmartSDR v3.8.19 and the SmartSDR v3.8.19 Release Notes | SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
SmartSDR v1.12.1 and the SmartSDR v1.12.1 Release Notes
Power Genius XL Utility v3.8.8 and the Power Genius XL Release Notes v3.8.8
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
Problem with Radio.MemoryList Property in FlexLib
I am trying to add memories from an external program & am experiencing anomalous behavior from FlexLib (v1.4.3).
My process is:
1. Call Memory.RequestMemoryFromRadio
2. Capture MemoryAdded event to get index of new memory
3. Use index of new memory to change memory settings to desired values..
The process works as expected.
With no memories stored in the radio, the Radio.MemoryList collection has a count of 0 as it should. Then I use the above process to add 2 memories to the radio. All is well -- the 2 new memories show up in the memories window in SmartSDR & Radio,MemoryList.Count = 2 like it should.
Then I repeat the process to add 2 more memories, using the same settings for each of the 2 new memories as I used before. Now the problem arises -- All 4 memories show up in the memories window in SmartSDR (expected), BUT Radio,MemoryList.Count = 2, not 4 as it should be. If I then delete the 2 new memories, the 2 remaining memories are displayed in the window, but the MemoryList count is now 0. I have to stop & re-start the client to get the number of memories in the collection back in sync with what is displayed in the memories window.
Am I missing something?
73, Ray, K9DUR
Comments
-
After you added the second 2 memory entries, are you still able to access all 4 memories using their index numbers? Or did the first 2 just disappear from the collection completely?
0 -
I just verified that the new Memory object should be added to the Radio.MemoryList before you ever see the MemoryAdded event fire. Something strange is definitely going on based on your description. We will look into this and see what we can find. Thanks for bringing this to our attention.
It may help if you share the code you are using to interface to FlexLib.0 -
Ray, when you say that you're adding 2 memories using the same settings for each one, how are you doing this? If you are calling RequestMemoryFromRadio() from the exact same memory object more than once, something like this can happen.0
-
Abed,
I have a function that allows me to read a .csv file (same format as the .csv file that SmartSDR creates when you export memories.)
I added 2 memories using the SmartSDR client & exported them to a .csv file. Then I deleted the memories, again using the client.
Then I added the 2 memories back to SmartSDR using my program. The procedure is:
- Read a memory record from the file.
Call the RequestMemoryFromRadio function.
Wait for the MemoryAdded event to fire & get the index of the new memory.
Step through the MemoryList collection looking for the memory that was added, using the index returned by the MemoryAdded event as the search criteria.
Change the properties of the memory object to the values read from the .csv file record.
Repeat steps 1-5 for the 2nd memory in the file.
When I do this the first time, all is as it should be. The problem arises when I repeat the procedure using the same file. All 4 memories appear in the memory window in the client, but the MemoryList.Count property returns = 2 instead of 4.
Ray
0 -
Abed,
Your question got me to thinking. I guess I was overcomplicating the procedure. I have changed my procedure as follows:
Read a memory record from the .csv file.
Create a new Memory object
Call the RequestMemoryFromRadio function on the new Memory
Change the properties of the Memory object to the values read from the .csv file.
Repeat steps 1-4 for the 2nd memory in the file.
I now have simpler, cleaner code, but the issue still remains.
Ray
0 -
I am not seeing this issue. Make sure your modifications are thread safe. The call to RquestMemoryFromRadio returns but the new memory object is not completely initialized. index is -1 until memory create response and RadioAck is false until memory initial properties from radio are received. So you should not update the memory object until RadioAck is true.
I am performing the following steps and have no issues
1. Hook the Radio object's MemoryAdded event
2. Create Memory object and "save a reference" to object that holds new memory details and a reference to new memory object, lets call it NewRadioMemory.
3. Call RequestMemoryFromRadio on new Memory object.
4. Wait for Radio MemoryAdded event. In the event handler make sure you check the create memory came from your invoke of RquestMemoryFromRadio by calling object.ReferenceEquals(mem, NewRadioMemory). Note MemoryAdded will provide a reference to newly created memory object (called mem). Now update your new memory object's properties using saved details object reference. If you are creating multiple memories then repeat step 2 & 3.
0
Leave a Comment
Categories
- All Categories
- 289 Community Topics
- 2.1K New Ideas
- 534 The Flea Market
- 7.5K Software
- 6K SmartSDR for Windows
- 146 SmartSDR for Maestro and M models
- 360 SmartSDR for Mac
- 249 SmartSDR for iOS
- 231 SmartSDR CAT
- 172 DAX
- 352 SmartSDR API
- 8.8K Radios and Accessories
- 7K FLEX-6000 Signature Series
- 26 FLEX-8000 Signature Series
- 850 Maestro
- 44 FlexControl
- 847 FLEX Series (Legacy) Radios
- 796 Genius Products
- 416 Power Genius XL Amplifier
- 277 Tuner Genius XL
- 103 Antenna Genius
- 243 Shack Infrastructure
- 166 Networking
- 404 Remote Operation (SmartLink)
- 130 Contesting
- 631 Peripherals & Station Integration
- 125 Amateur Radio Interests
- 870 Third-Party Software