FlexLib getting the active slice current band

  • 1
  • Question
  • Updated 4 years ago
Hello,

Tonight I have successfully connected to my 6300 through the FlexLib.

I gather up current frequency and mode from the active slice. But what I can’t figure out is how to get the current band?

Do I have to create a band plan then based on the frequency then figure out what band I’m in?

Or is there a way to get this information from the active slice.

Thanks
Mike AA5MC
Photo of Mike Colonna

Mike Colonna

  • 9 Posts
  • 3 Reply Likes

Posted 4 years ago

  • 1
Photo of Ray Andrews, K9DUR

Ray Andrews, K9DUR, Elmer

  • 243 Posts
  • 61 Reply Likes

Mike,

The band is a property of the panadapter class.  You should be able to use the Slice.Pandapter property to obtain the panadapter object that the slice is associated with & then read the Panadapter.Band property to get the band.

73, Ray, K9DUR

Photo of Mike Colonna

Mike Colonna

  • 9 Posts
  • 3 Reply Likes
Outstanding, thank you I'll take a look there...

Mike, AA5MC
(Edited)
Photo of James Whiteway

James Whiteway

  • 909 Posts
  • 226 Reply Likes
In the slice added event do something like this:

string bandinfo = slice.Panadapter.Band;
            lblBand.Text = bandinfo;

Works for me and when you change bands in SSDR it automagically updates!
james

WD5GWY


Saw your post days ago, but, I was out on the road and unable to post the code from memory and I didn't have my little Nextbook with me either.
(Edited)
Photo of James Whiteway

James Whiteway

  • 909 Posts
  • 226 Reply Likes
Looking at a later post by you, it seems you already figured this one out!!
james
WD5GWY
Photo of Mike Colonna

Mike Colonna

  • 9 Posts
  • 3 Reply Likes
Hi James , yes I did but I appreciate your answer . thank you