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.

Metering question

Member ✭✭
edited May 2019 in SmartSDR API
1) In Radio.cs.3657


            else if (m.Name == "+13.8A") // A: before the fuse
                m.DataReady += new Meter.DataReadyEventHandler(Volts_DataReady);

I assume from the comment, that really should be "+13.8A", I don't understand the comment as what is really being expected is a voltage not amperage .

2) in Radio.cs.3642
                m.DataReady += new Meter.DataReadyEventHandler(FWDPW_DataReady);

If I understand C# events, this is adding an event sink of FWDPW_DataReady which, when invoked, passes the meter and the meter's value, as seen here at 3691

        private void FWDPW_DataReady(Meter meter, float data)
        {
            OnForwardPowerDataReady(data);
        }


This, in turn, invokes Radio.cs:3749
        private void OnForwardPowerDataReady(float data)
        {
            if (ForwardPowerDataReady != null)
                ForwardPowerDataReady(data);
        }

This seems a tad circular. it adds an event notification target in an instance of meter that reflect the event back to radio(a singleton really) that in turn reflects the event to whatever registered for the ForwardPowerNotification.

Since the passed back meter instance is stripped anyway, would it not be easier to pass it directly to OnForwardPowerDataReady. This would preserve the many to one relationship and save, what appears to be, a non productive event notification.

Another way to phrase this, perhaps, is what is the purpose of FWDPW_DataReady?

Thanks

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • Member ✭✭
    edited May 2019
    Is there a comment  for 13.8B after the fuse?
    I thought it was just 2 metering points for the Voltage, A before, and B after the fuse.
  • Member ✭✭
    edited November 2016
    Hi Jay,
       Nope..I just double checked. Just A. I did not know there were two points. Just because the code only checks the one, doesn't mean it couldn't check the other. To my knowledge, the only app that looks at voltage (clearly A) is DDUtil.
       I would have guessed it was a typo except there was a specific comment. I can certainly add a check for a B 'sink'.
  • Administrator, FlexRadio Employee admin
    edited May 2019
    Jay is correct we monitor the input voltage before and after the main fuse.
  • Member ✭✭
    edited November 2016
    Not familiar with flexmeter. I was referring to the metering logic in ssdr. That is where I was looking for 13.8B, as Jay mentioned..
  • Member ✭✭
    edited November 2016
    I was afraid this is what would happen. This thread would be marked answered prematurely. I'll move the unanswered to a new thread.
  • Member ✭✭
    edited November 2016
    Up to this point the discussion was on the first question re: 13.8A, vs. 13.8V. The substantive portion of the thread was the issue around the event wiring. I was hoping this would have been answered en masse rather than part, which is why I opened a specific thread regarding the other issue as I cannot go back and change the opening stmt. That second one got deleted as this was marked, incorrectly, answered. 
  • Administrator, FlexRadio Employee admin
    edited February 2017
    Walt,

    The ForwardPowerDataReady event (and other similar meters) were added to the Radio class so that the client could attach directly to them prior to the meters actually being there.  It also prevents having to reattach the events if the radio becomes disconnected.  It was a simplification for the client.

    While the circular nature of the calls can be confusing upon first glance, it works in the object oriented sense in that the Meter class is doing one thing (unpackaging meter data and exposing the data in a useful manner) and doing it well.  The fact that we happen to be using this functionality in the Radio class itself is a convenience.
  • Member ✭✭
    edited November 2016
    OK, thank you Eric!
  • Member ✭✭
    edited November 2016
    Tim, would you mark this answered please?
  • Member ✭✭
    edited August 2016
    Sorry Walt, I was just curious if both the A, and B voltage measurement points were mentioned in radio.cs. I should have just searched in radio.cs myself. I thought you might have been looking right at it. I had no intention of hijacking the thread.

    Jay - NO5J  
  • Member ✭✭
    edited November 2016
    No Jay, that is why your comment took me by surprise. I thought the A was for amp and when you mentioned the b point I didn't know what you were referring to

Leave a Comment