Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
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.

CreatePanadapter method

Drax
Drax Member
edited February 2017 in SmartSDR API
What is the Size object required by the Radio.CreatePanadapter method?  What dimensions should it be?  The code looks like it refers to both pixels and a buffer size.

Answers

  • Steve-N5AC
    Steve-N5AC Community Manager admin
    edited February 2017
    It is a Windows Size object which should specify the Width and Height in pixels for the desired panadapter viewport.
  • Drax
    Drax Member
    edited February 2014
    What if I just want it to be the width of the existing window?
  • Steve-N5AC
    Steve-N5AC Community Manager admin
    edited December 2016
    FlexLib doesn't know anything about your Window.  If you want to make it the size of a specific window, then retrieve the .Size property for the window and pass it to FlexLib in the CreatePanadapter call.  We also create a handler for a SizeChangedEvent on the windows we create and then trap the event.  Then you can use the NewSize property of SizeChangedEventArgs to change the size.

    The purpose of this is so the radio can send only data the belongs in the viewport and also scale it to fit.  As you shrink in either direction, the radio either scales the vertical data (dB) or reduces/increases the bins you see in the horizontal direction.
  • Drax
    Drax Member
    edited February 2014
    So a running instance of SmartSDR will not detect the addition of a new panadapter created outside of itself?  I have to create my own window and place a panadapter object on it?
  • Eric-KE5DTO
    Eric-KE5DTO Administrator, FlexRadio Employee admin
    edited December 2016
    We are actually kind of between implementations right now.  We needed some of this functionality in order for persistence to work.  For now though, if you create a Panadapter in another client, the window will show up in SmartSDR, but the UDP stream of data will be directed at your client.  This means that there will be no data line in SmartSDR.  This is something we will need to address in the future (an option to direct a data stream at SmartSDR).
  • Drax
    Drax Member
    edited February 2014
    I just want to send commands that cause actions in SmartSDR such as "Create a panadapter with a slice at 14.070 that's 3 kHz wide then direct the audio to DAX channel 1 and give me a handle to it so I can change it later."

    I know some of that is possible since SmartSDR CAT does it.  But the workings of CAT still elude me.

  • Eric-KE5DTO
    Eric-KE5DTO Administrator, FlexRadio Employee admin
    edited December 2016
    You should be able to just create a Slice and set the Frequency, FilterLow/High and DaxChannel properties to accomplish this I think.  Let me know if you need help getting started with doing this.
  • Drax
    Drax Member
    edited February 2014
    I'm looking at automating the larger picture though.  That was just a simple example.  What if I want to tell SmartSDR to create 6 slices on 4 panadapters then configure slice 3 to be on panadapter 2 receiving on 7.050 MHz DIGU, DAX channel 5?  (And then all the other slices with various permutations of setups) 
    Then ten seconds later I click a button in my application that wants to close panadapter 2, open a new panadapter, and then re-tune slice 3 to 50.100 MHz, DIGU, DAX channel 2.
    Is any of that possible?
  • Drax
    Drax Member
    edited February 2014
    I figured out how to create a slice and listen for its property change events.  

    Now how do I, as an example, alter the slice's frequency once the slice created event fires?  Simply setting the slice.freq = 14.010R isn't causing the slice in SmartSDR to change frequency.

    My code so far:
    https://dl.dropboxusercontent.com/u/24304293/RadioControl.vb

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.