Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
Need the latest SmartSDR, Power Genius, Tuner Genius and Antenna Genius Software?
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
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
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
New Slice creation - slice.Index set to -1
Paul RN3A
Member
Hi all,
I can create new slice with the following example:
double freq = 14.123d;
string RXA = "ANT1";
string Mode = "CW";
Slice Slice1 = new Slice(radio);
Slice1 = radio.CreateSlice(freq, RXA, Mode);
Slice1.RequestSliceFromRadio();
The slice is successfully created in the readio, but...
- Slice1.Index shows -1
- The actual slice frequency and mode are different from requested.
The slice Index cannot be changed, it is read-only, so I cannot place newly created slice in my existing slice array.
What am I doing wrong?
Paul RN3A
I can create new slice with the following example:
double freq = 14.123d;
string RXA = "ANT1";
string Mode = "CW";
Slice Slice1 = new Slice(radio);
Slice1 = radio.CreateSlice(freq, RXA, Mode);
Slice1.RequestSliceFromRadio();
The slice is successfully created in the readio, but...
- Slice1.Index shows -1
- The actual slice frequency and mode are different from requested.
The slice Index cannot be changed, it is read-only, so I cannot place newly created slice in my existing slice array.
What am I doing wrong?
Paul RN3A
0
Answers
-
When are you checking the slice index? It is going to be -1 initially until the radio receives the slice create command (sent via the RequestSliceFromRadio function) and sends back a reply. Have you tried waiting before checking index? The best way to do this is probably to subscribe to the PropertyChanged event for the slice before calling RequestSliceFromRadio and then look for a change to RadioAck to true. When this happens, look at index and I bet it will be valid.
Obviously there are times when you request a slice and one won't be available. Like if you already have 8 slices on a 6700 (4 slices on a 6500). I'm sure this isn't the case here, but figured I would put it in the answer for completeness when others see this.0 -
Thank you Eric.
I still must be doing something wrong. Can you please explain.
When I create and request a new slice, it goes through Slice Add call, when it first appears, and then it several times calls slice Property change, and every time it does different things. The slice number appears to be correct at this point. But sometimes slice does not show up on the SSDR screen. And it obviously requires some time for the process to complete. Simply adding timer does not seem to be a good idea. There should be a reliable pattern. Which properties do I need to monitor to make a reliable decison that slice has been created and I can start changing it inside my program? And why new slice sometimes do not appear on SSDR screen?0 -
The pattern we use in SmartSDR-Win is:
1. Create the object -- usually through a call to the Radio class
Slice slc = radio.CreateSlice();
2. Attach to the PropertyChanged event to catch changes.
slc.PropertyChanged += new PropertyChangedHandler(slc_PropertyChanged);
3. Request the object from the radio using the class.
slc.RequestSliceFromRadio();
4. Wait for the RadioAck property to go from false to true in the PropertyChanged handler.
private void slc_PropertyChanged(object sender, PropertyChangedEventsArgs e)
{
Slice slc = sender as Slice;
if(slc == null) return; // caller wasn't a Slice -- program logic error likely
switch(e.PropertyName)
{
case "RadioAck":
if(slc.RadioAck)
// now go do interesting stuff since the radio is aware of the object
break;
}
}1 -
Thank you, Eric.
There are 8 slices possible in the radio (4 for 6500). How many slice property change event subscriptions need? One fits all, or equal to number of open slices?
0 -
This is really up to the application developer. Some people might want to do different things for different Slices. For example, the CAT code uses 2 different handlers I think as it handles things differently for VFOA and VFOB. In SmartSDR-Win, we end up needing access to the changing properties at several different levels, so you'll find PropertyChanged event handlers in several places in our code.0
-
Thank you, Eric.
I have palyed with it, and I have some findings.
1. When I create new slice, sometimes it does not appear on SSDR pan screen. However, it is there, because I can read it's frequency, mode, etc. Is it a bug?
2. For example, I create a new slice with the following command:
Slice1 = radio.CreateSlice(14.080d, "ANT1", "DIGL");
bool b = Slice1.RequestSliceFromRadio();
The slice which already exist in the current pan is set to CW, 14,023. The new slice seems to not accept frequency and mode settings. The slice is created, but on 14.000 and CW. New slice seems to follow the the nearest slice mode, antenna and other settings, with the exception of frequency. Is it a bug?
3. For example, my existing slice is set to 14.200, and Panadapter zoom level is set so, that 14.000 frequency mark is off the screen. When I create new slice, and as in #2 it defaults to 14.000, the new slice never appears on the Panadapter screen. The slice is still created, I can read it's properties. But if I change Pan zoom level in such a way that 14.000 is visible on the screen, in 90% of the cases slice appears there. The same behaviour exist on all bands, and depends on pan zoom level. Is it a bug?
0 -
I'm not sure about #1. I will have to double check our code to find out what the expected behavior is when you add a Slice outside of SmartSDR-Win.
I tested #2 and this looks like a bug. Thanks for reporting this.
If I understand what you are doing in #3, I think this is the same as #1. I will get back to you on this.0 -
#2 is definitely a bug and has been entered as DE1986. Thanks for reporting this.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
- 230 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