Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Parse Channel Response/Event Messages

Rank

Total Posts: 7

Joined 2013-09-23

PM

In the product I am working on, I need to parse / contend with responses that may be more detailed then a regular profile. I've noticed the following in the sample projects:

case CHANNEL_CLOSED:
case CHANNEL_COLLISION:
case RX_FAIL:
case RX_FAIL_GO_TO_SEARCH:
case TRANSFER_RX_FAILED:
case TRANSFER_TX_COMPLETED:
case TRANSFER_TX_FAILED:
case TRANSFER_TX_START:
case UNKNOWN:
// TODO More complex communication will need to handle these events
break;
}
break;
case ANT_VERSION:
case BURST_TRANSFER_DATA:
case CAPABILITIES:
case CHANNEL_ID:
case CHANNEL_RESPONSE:
case CHANNEL_STATUS:
case SERIAL_NUMBER:
case OTHER:
// TODO More complex communication will need to handle these message types
break;


With logcat, I've seen payloads for some of these ( ie: CHANNEL_RESPONSE has a 3 byte payload ). I have looked through the pdf's in the dev area, I've also searched through these forums and am unable to locate the reference material which lists / identifies what these payloads are and what they mean. I see these messages coming through with their payloads and quite possibly need to handle them and/or make decisions based on them.

Does anyone know where this info is? Is there a list of enums, or a table of values that I am unaware of? Something more detailed then a general description that they exist, but rather the absolute values / ranges and what they mean.

Thanks in advance,

Andy      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Please refer to the ANT Message Protocol and Usage document, which describes in detail the payload of all ANT messages. The general message structure is described in Section 7. In particular, refer to Section 9.5.6.1 for the format of a channel response/event.      
Avatar
RankRankRankRank

Total Posts: 129

Joined 2010-11-30

PM

In the Android ANT API, all messages received from ANT can be created as the specific object in the com.dsi.ant.message.fromant package, thus requiring no parsing to be implemented by you.

The ANT Message Protocol and Usage document available on the Documents tab of the Developer Downloads contains a detailed list of all ANT messages you can send and receive from the ANT chip      
Rank

Total Posts: 7

Joined 2013-09-23

PM

Thanks!

Very much appreciated.

Andy