Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Multiple Channels, using ANTLib-DEMO_DLL Code

Rank

Total Posts: 16

Joined 2018-10-23

PM

Hi Folks,

still in progress to understand ANT+ and C++... But making progress...

May somebody help me to understand how to get the DEMO_DLL-Project from ANT_Libraries working with more than one Channel.


I understand that the Functions:
Test_ChannelCallback & Test_ResponseCallback are the intersting once.
And that UCHAR ucChannel_ are the ChannelNumber.

// Assign callback functions. One for serial message responses and the other for channel events. Each channel event can have
   // its own callback function defined. Since we are only going to open one channel, setup one callback function for the channel callback
   
ANT_AssignResponseFunction(Test_ResponseCallbackaucResponseBuffer);
   
ANT_AssignChannelEventFunction(USER_ANTCHANNEL,Test_ChannelCallbackaucChannelBuffer); 


I see that I could Call the ANT_AssignChannelEventFunction with the USER_ANTCHANNEL Variable, but how to call the ANT_AssignResponseFunction, with the Channelvariable?

Hope you are understanding my question and might help me out here.


Many thanks and regards
Steffen
     
Rank

Total Posts: 16

Joined 2018-10-23

PM

Ok,

got it! smile

Understood, that the process of starting a new Channel will be in the: Test_ResponseCallback function or and will be started : ANT_AssignChannel, etc.


Cool...
Works