I am using C# to write a simple Windows 10 desktop app to receive heart rate data from a Garmin chest belt. As example code I use what is provided in the application note "
Using the SimulANT+ Library for Simulating ANT+ Devices in C#" which works great for displaying the heart rate. In particular, the second line below takes care of displaying the heart rate, which comes directly from the example code provided:
heartRateDisplay = new HeartRateDisplay(channel0, networkAntPlus);
heartRateDisplay.HeartRateDataReceived += HeartRateDisplay_HeartRateDataReceived;
I now want to analogously show the battery status of the sensor. According to the SimulANT+ documentation, there should be an event:
HeartRateDisplay.BatteryStatusPageReceived. Unfortunately, visual studio does not show this event as option. In particular, the following does
not work:
heartRateDisplay.BatteryStatusPageReceived += do_something;
The above line is what I would consider to be the natural analogue of the first line, but it's not so, apparently.
Does anyone know how to correctly detect the BatteryStatusPageReceived event? Ideally, how one can attach a function to be called when this event occurs?
For completeness: I already know that page 7 is the one that contains the battery status info, and I have checked that my belt does indeed send this page every so often! I just need to know how to capture the event that is triggered when this page gets send.