Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

volatile keywords necessary?

Rank

Total Posts: 7

Joined 0

PM

Hello, I wrote an app in delphi some time ago, and I now want to implement speed and cadence and hrm display for this app. In the process of conversion from c++ to delphi I found these:

static volatile ANT_RESPONSE_FUNC pResponseFunc = NULL;
static volatile ANT_EVENT_RESPONSE_FUNC pEventResponseFunc = NULL;

volatile doesn't exists in delphi, so I like to ask you if is it absolutely necessary that type of storage for these functions. I'm afraid so, so I'm too afraid I have to pass all the app to C++. Thank you for any help.
skr      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

Which project are you attempting to port to Delphi? Is it the ANT PC Libraries or the Speed and Cadence Display Simulator?

Cheers      
Rank

Total Posts: 7

Joined 0

PM

Hi, I'm trying the simulator, I thought it would be easier. But if for the libraries the volatile thing would be easier, I would change. Thanks, cheers.

skr.

(Really thanks, I think I got it).      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

It would likely be easier if you read through the DEMO_DLL in the ANT Library Package instead, as the Simulator interfaces through managed libraries before reaching the C based ANT library.

Reading the profiles directly on how to decode SPD, CAD, SPD&CAD;, and HRM and implementing them in Delphi rather then porting the simulator directly would also likely be easier, I would only use the simulator as a rough guide on how to decode the data packets.

Cheers      
Rank

Total Posts: 7

Joined 0

PM

Thank you, I'll take a look to demo_dll, cheers.