slice dump settings

  • 1
  • Question
  • Updated 3 years ago
I'm running SSDR and trying to use FlexLib.API to display (and later, input) radio settings. When my program first connects to the radio, it receives a bunch of property messages about the settings of the radio, but it only receives property messages about slice properties when those properties change. Is there a way to get messages about the current slice properties when my app first connects to the slice?  It would be nice to make my display program totally message driven. It would update the display when it gets a new message, but how do I get the current values?
Photo of Mark Erbaugh

Mark Erbaugh

  • 379 Posts
  • 34 Reply Likes

Posted 3 years ago

  • 1
Photo of William Hemmingsen

William Hemmingsen

  • 573 Posts
  • 278 Reply Likes
Not sure I 100% understand your question.  But if you send command "sub slice all"  it will return all the information on current open slices.  It also subscribes so that all future changes will be sent to the client.

But not sure if this is what you were asking.

William
Photo of Mark Erbaugh

Mark Erbaugh

  • 379 Posts
  • 34 Reply Likes
William,  that is what I am looking for, but I'm looking for a way to do it using the FlexLib API.  I think the sub slice all is a TCP/IP command.
Photo of Robbie - KI4TTZ

Robbie - KI4TTZ

  • 479 Posts
  • 77 Reply Likes
Edit: provided incorrect info -- looks like the sub commands happen after you connect() to the radio. Try adding a sleep/delay after you connect to give it time to get the data.

This is from radio.cs:

                // subscribe for status updates
                SendCommand("sub tx all");
                SendCommand("sub atu all");
                SendCommand("sub meter all");
                SendCommand("sub pan all");
                SendCommand("sub slice all");
                SendCommand("sub gps all");
                SendCommand("sub audio_stream all");
                SendCommand("sub cwx all");
                SendCommand("sub xvtr all");
                SendCommand("sub memories all");
                SendCommand("sub daxiq all");
                SendCommand("sub dax all");
(Edited)
Photo of Mark Erbaugh

Mark Erbaugh

  • 379 Posts
  • 34 Reply Likes
I tried setting the ProgramName and I'm still not seeing the properties that are already set on the slice.
Photo of Peter K1PGV

Peter K1PGV, Elmer

  • 541 Posts
  • 315 Reply Likes

Hi Mark,

You're exactly right:  The Slice and Radio Property Changed callback is exactly that. It's called when the value for a property changes.

As soon as the slice or radio instance is created you can read the value of the property.  For example, I do this for a set of Slice properties directly in my Slice Added callback:

private void radio_SliceAdded(Slice slice)

{

Debug.WriteLine("radio_SliceAdded fired\n");


_theSlice = slice;

//

// Initialize the slice attribute displays

//

// We don't get a "changed" event if a slice already exists when we start.

//

RxFilterLowTextBox.Text = _theSlice.FilterLow.ToString(CultureInfo.InvariantCulture);

RxFilterHighTextBox.Text = _theSlice.FilterHigh.ToString(CultureInfo.InvariantCulture);

rxWidthTextBox.Text =

( _theSlice.FilterHigh - _theSlice.FilterLow).ToString(CultureInfo.InvariantCulture);

AGCTrackBar.Value = _theSlice.AGCThreshold;

currentACGLabel.Text = _theSlice.AGCThreshold.ToString(CultureInfo.InvariantCulture);

//

// Display the current frequency

//

VFO1.Frequency = _theSlice.Freq;

... (etc) ...

(Man, it's hard to post code in this forum...  I wonder if we can get a plug-in or something installed that'd make posting formatted code easier and prettier).

Anyhow, pretty easy, huh??

Peter

K1PGV

(Edited)
Photo of Mark Erbaugh

Mark Erbaugh

  • 379 Posts
  • 34 Reply Likes
I think I have have to do that.