Slice property change event trigger - frequency change

  • 1
  • Question
  • Updated 4 years ago
I am trying to change slice frequency with slice.Freq = NewFrequency; 
It does change the frequency of the slice almost instantly, but it doesn't seem to be triggering slice property event handler. But if I change slice frequency in SSDR, event handler triggers. What am I doing wrong?

I need this event handler to trigger, what needs to be done?

Paul RN3A
Photo of Paul RN3A

Paul RN3A

  • 56 Posts
  • 6 Reply Likes

Posted 5 years ago

  • 1
Photo of Eric - KE5DTO

Eric - KE5DTO, Official Rep

  • 823 Posts
  • 289 Reply Likes
Based on what I am looking at, you should get a PropertyChanged event fired with that code so long as the NewFrequency is not the same as the existing one.  This is an optimization to avoid unnecessary events from being triggered when the data is not changing.  Could this be the issue?
Photo of Robert -- N5IKD

Robert -- N5IKD, Elmer

  • 488 Posts
  • 152 Reply Likes
The slice.PropertyChanged event works great now that I have it figured out. I do not see where it is documented on the wiki. Is it documented?

 Before I learned out to use the slice.PropertyChanged, I was trying to use the SlicePanReferenceChangeEventHandler (Slice slc) which never fired. When is this event triggered?
Photo of Eric - KE5DTO

Eric - KE5DTO, Official Rep

  • 823 Posts
  • 289 Reply Likes
The wiki is primarily for the Ethernet API at this point.  You can go to http://www.flexradio.com/flexlib for FlexLib Doxygen generated docs.

The SlicePanReferenceChangeEvent only fires when a Slice's Panadapter Reference is set.  Since we typically don't change a Panadapter reference once a Slice is initialized today, this probably isn't terribly useful for you.  I believe we use it in initialization.
Photo of James Whiteway

James Whiteway

  • 1002 Posts
  • 285 Reply Likes
Is that event Public in Flelib? If not, you may not be able to use it. I tried, (unsuccessfully) to use events that I found in different classes in Flexlib , only to find out that they were not visible outside the lib itself. Visual Studio's intellisense usually prevents you from calling non-public classes and events.
James
WD5GWY
Photo of Robert -- N5IKD

Robert -- N5IKD, Elmer

  • 488 Posts
  • 152 Reply Likes
The  SlicePanReferenceChangeEventHandler (Slice slc) is documented as "Delegate event handler for the SlicePanReferenceChange event", but I don't know how to trigger that.

The slice.PropertyChanged and radio.PropertyChanged events don't have any documentation that I can find in the Wiki, but I have figured out how to use it by reading posts in the Community.