Skip to content

Commit 0a668c9

Browse files
committed
Updates to documentation.
1 parent 6a8ecc5 commit 0a668c9

9 files changed

+513
-72
lines changed
+195
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<topic id="fc7d6894-c2f6-45d3-8edb-8c82ab0bb422" revisionNumber="1">
3+
<developerConceptualDocument
4+
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"
5+
xmlns:xlink="http://www.w3.org/1999/xlink">
6+
7+
<!--
8+
<summary>
9+
<para>Optional summary abstract</para>
10+
</summary>
11+
-->
12+
13+
<introduction>
14+
<!-- Uncomment this to generate an outline of the section and sub-section
15+
titles. Specify a numeric value as the inner text to limit it to
16+
a specific number of sub-topics when creating the outline. Specify
17+
zero (0) to limit it to top-level sections only. -->
18+
<!-- <autoOutline /> -->
19+
<para>
20+
The AntPlus class library supports a number of ANT+ device profiles as defined by Garmin/Dynastream. All device profiles
21+
are based on the abstract class AntDevice. Common data pages and timeout options are provided to support the device profiles.
22+
The following device profiles are supported -
23+
</para>
24+
<list class="bullet">
25+
<listItem>
26+
<para>Asset Tracker</para>
27+
</listItem>
28+
<listItem>
29+
<para>Bicycle Power</para>
30+
<list class="bullet">
31+
<listItem>
32+
<para>Crank Torque Frequency Sensor</para>
33+
</listItem>
34+
<listItem>
35+
<para>Standard Power Sensor</para>
36+
</listItem>
37+
<listItem>
38+
<para>Standard Crank Torque Sensor</para>
39+
</listItem>
40+
<listItem>
41+
<para>Standard Wheel Torque Sensor</para>
42+
</listItem>
43+
</list>
44+
</listItem>
45+
<listItem>
46+
<para>Bike Speed and Cadence</para>
47+
<list class="bullet">
48+
<listItem>
49+
<para>Bike Cadence Sensor</para>
50+
</listItem>
51+
<listItem>
52+
<para>Bike Speed Sensor</para>
53+
</listItem>
54+
<listItem>
55+
<para>Combined Speed and Cadence Sensor</para>
56+
</listItem>
57+
</list>
58+
</listItem>
59+
<listItem>
60+
<para>Fitness Equipment</para>
61+
<list class="bullet">
62+
<listItem>
63+
<para>Climber</para>
64+
</listItem>
65+
<listItem>
66+
<para>Elliptical</para>
67+
</listItem>
68+
<listItem>
69+
<para>Nordic Skier</para>
70+
</listItem>
71+
<listItem>
72+
<para>Rower</para>
73+
</listItem>
74+
<listItem>
75+
<para>Trainer/Stationary Bike</para>
76+
</listItem>
77+
<listItem>
78+
<para>Treadmill</para>
79+
</listItem>
80+
</list>
81+
</listItem>
82+
<listItem>
83+
<para>Geocache</para>
84+
</listItem>
85+
<listItem>
86+
<para>Heart Rate</para>
87+
</listItem>
88+
<listItem>
89+
<para>Muscle Oxygen</para>
90+
</listItem>
91+
<listItem>
92+
<para>Stride Based Speed and Distance Monitor</para>
93+
</listItem>
94+
<listItem>
95+
<para>Unknown</para>
96+
</listItem>
97+
</list>
98+
<para>
99+
See <codeEntityReference qualifyHint="false">G:SmallEarthTech.AntPlus.DeviceProfiles</codeEntityReference> for specific device details.
100+
</para>
101+
</introduction>
102+
103+
<!-- Add one or more top-level section elements. These are collapsible.
104+
If using <autoOutline />, add an address attribute to identify it
105+
and specify a title so that it can be jumped to with a hyperlink. -->
106+
<section>
107+
<title>AntDevice</title>
108+
<content>
109+
<para>
110+
This abstract class provides properties and methods common to all ANT devices. The virtual Parse method handles resetting the
111+
device timeout each time a message is received. The RequestDataPage method sends a data page request to the ANT device.
112+
The SendExtAcknowledgedMessage method sends commands/requests to the ANT device.
113+
</para>
114+
</content>
115+
</section>
116+
<section>
117+
<title>CommonDataPages</title>
118+
<content>
119+
<para>
120+
CommonDataPages are typically added to derived AntDevice classes as a read-only property if the ANT device supports common data pages.
121+
</para>
122+
<code language="c#">public CommonDataPages CommonDataPages { get; }</code>
123+
<para>
124+
The AntDevice constructor will create and assign the CommonDataPages class. Here's an example from the BikeRadar class -
125+
</para>
126+
<code language="c#" source="..\..\AntPlus\Examples\WpfUsbStickApp\CustomAntDevice\BikeRadar.cs" region="Ctor"/>
127+
</content>
128+
</section>
129+
<section>
130+
<title>AntDeviceCollection</title>
131+
<content>
132+
<para>
133+
This is a thread-safe observable collection of ANT devices. The constructor will initialize the ANT radio for continuous scan
134+
mode and direct all messages received from the ANT radio to a private handler. This handler will select an ANT device from
135+
the collection or create a new ANT device and add it to the collection. The message is then passed to the ANT device parser
136+
for handling by the device.
137+
</para>
138+
<alert class="note">
139+
<para>
140+
Prefer AntCollection and the hosting extensions if your application uses dependency injection. See <link xlink:href="825ed94a-e668-4d28-85ff-53cbb962a355"/> for details.
141+
</para>
142+
</alert>
143+
</content>
144+
</section>
145+
<section>
146+
<title>TimeoutOptions</title>
147+
<content>
148+
<para>
149+
Set either Timeout in milliseconds or MissedMessages to the number of missed messages before signaling device offline.
150+
Prefer MissedMessages as this scales the timeout to the ANT device broadcast message rate. Set Timeout to -1 to
151+
disable ANT device timeouts.
152+
</para>
153+
</content>
154+
</section>
155+
<relatedTopics>
156+
<codeEntityReference qualifyHint="false">G:SmallEarthTech.AntPlus.DeviceProfiles</codeEntityReference>
157+
<link xlink:href="825ed94a-e668-4d28-85ff-53cbb962a355"/>
158+
<!-- One or more of the following:
159+
- A local link
160+
- An external link
161+
- A code entity reference
162+
163+
<link xlink:href="Other Topic's ID"/>
164+
<link xlink:href="Other Topic's ID">Link inner text</link>
165+
166+
<externalLink>
167+
<linkText>Link text</linkText>
168+
<linkAlternateText>Optional alternate link text</linkAlternateText>
169+
<linkUri>URI</linkUri>
170+
</externalLink>
171+
172+
<codeEntityReference>API member ID</codeEntityReference>
173+
174+
Examples:
175+
176+
<link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8270" />
177+
<link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link>
178+
179+
<externalLink>
180+
<linkText>SHFB on GitHub</linkText>
181+
<linkAlternateText>Go to GitHub</linkAlternateText>
182+
<linkUri>https://GitHub.com/EWSoftware/SHFB</linkUri>
183+
</externalLink>
184+
185+
<codeEntityReference>T:TestDoc.TestClass</codeEntityReference>
186+
<codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference>
187+
<codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference>
188+
<codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference>
189+
<codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference>
190+
<codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference>
191+
<codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference>
192+
-->
193+
</relatedTopics>
194+
</developerConceptualDocument>
195+
</topic>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<topic id="2c4b4d97-d5ec-44ef-846e-d8849c278fad" revisionNumber="1">
3+
<developerConceptualDocument
4+
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5"
5+
xmlns:xlink="http://www.w3.org/1999/xlink">
6+
7+
<!--
8+
<summary>
9+
<para>Optional summary abstract</para>
10+
</summary>
11+
-->
12+
13+
<introduction>
14+
<!-- Uncomment this to generate an outline of the section and sub-section
15+
titles. Specify a numeric value as the inner text to limit it to
16+
a specific number of sub-topics when creating the outline. Specify
17+
zero (0) to limit it to top-level sections only. -->
18+
<!-- <autoOutline /> -->
19+
20+
<para>
21+
The AntRadioInterface class library defines interfaces and classes that implementations support and clients utilize.
22+
Implementations will derive and implement the interfaces appropriate to the underlying hardware that supports the ANT
23+
radio protocol. Clients will interact with an implementation of the AntRadioInterface to communicate with ANT devices.
24+
</para>
25+
<para>
26+
Implementations at a minimum implement the IAntRadio and IAntChannel interfaces and derive concrete classes from
27+
AntResponse and DeviceCapabilities. Implementations may optionally support IAntConfiguration, IAntControl, IAntUsbRadio,
28+
ICrypto, and IFitSettings interfaces.
29+
</para>
30+
<alert class="tip">
31+
<para>
32+
Implementations are free to implement the interfaces the underlying hardware supports. Even specific methods of required
33+
interfaces can and should throw NotImplementedException() if hardware doesn't support a particular method. This informs
34+
the application developer that the client and implementation are not aligned regarding expected functionality.
35+
</para>
36+
</alert>
37+
</introduction>
38+
39+
<!-- Add one or more top-level section elements. These are collapsible.
40+
If using <autoOutline />, add an address attribute to identify it
41+
and specify a title so that it can be jumped to with a hyperlink. -->
42+
<section address="Section1">
43+
<title>Interfaces and Classes</title>
44+
<content>
45+
<!-- Uncomment this to create a sub-section outline
46+
<autoOutline /> -->
47+
<para>
48+
These interfaces/classes largely mirror the Garmin/Dynastream ANT Message Protocol and Usage specification.
49+
</para>
50+
</content>
51+
<sections>
52+
<section>
53+
<title>AntResponse and DeviceCapabilities</title>
54+
<content>
55+
<para>
56+
Mandatory. Implementations will derive from these classes and provide constructors that take the underlying
57+
hardware data as an argument to populate the properties exposed by these classes.
58+
</para>
59+
</content>
60+
</section>
61+
<section>
62+
<title>IAntRadio</title>
63+
<content>
64+
<para>
65+
Mandatory. Methods that must be implemented are InitializeContinuousScanMode(), GetChannel(), GetDeviceCapabilities(),
66+
RequestMessageAndResponse() and the properties NumChannels, ProductDescription, SerialNumber and Version.
67+
</para>
68+
</content>
69+
</section>
70+
<section>
71+
<title>IAntChannel</title>
72+
<content>
73+
<para>
74+
Mandatory. SendExtAcknowledgedData/SendExtAcknowledgedDataAsync methods must be implemented; they are integral to
75+
working with ANT devices. The only property is ChannelNumber which should be assigned a value relevent to the
76+
implementation.
77+
</para>
78+
<alert class="tip">
79+
<para>
80+
Implementors: Consider using locks for methods that transmit data to ANT devices. The intent is to prevent overwriting the channel
81+
ID and data until the transmission succeeds or times out.
82+
</para>
83+
</alert>
84+
</content>
85+
</section>
86+
<section>
87+
<title>IAntConfiguration</title>
88+
<content>
89+
<para>Optional. Implementors will provide methods to configure the ANT radio.</para>
90+
</content>
91+
</section>
92+
<section>
93+
<title>IAntControl</title>
94+
<content>
95+
<para>Optional. Implementors will provide methods to control general operation of the ANT radio.</para>
96+
</content>
97+
</section>
98+
<section>
99+
<title>IAntUsbRadio</title>
100+
<content>
101+
<para>Optional. Implementors will provide methods and properties specific to ANT radios connected to USB ports.</para>
102+
</content>
103+
</section>
104+
<section>
105+
<title>ICrypto</title>
106+
<content>
107+
<para>Optional. Implementors will provide methods to configure cryptographic functions used by the ANT radio.</para>
108+
</content>
109+
</section>
110+
<section>
111+
<title>IFitSettings</title>
112+
<content>
113+
<para>Optional. Implementors will provide methods to manage the ANT radio fitness equipment state.</para>
114+
</content>
115+
</section>
116+
</sections>
117+
</section>
118+
119+
<relatedTopics>
120+
<codeEntityReference>T:SmallEarthTech.AntRadioInterface.IAntRadio</codeEntityReference>
121+
<codeEntityReference>T:SmallEarthTech.AntRadioInterface.IAntChannel</codeEntityReference>
122+
<codeEntityReference>T:SmallEarthTech.AntRadioInterface.AntResponse</codeEntityReference>
123+
<codeEntityReference>T:SmallEarthTech.AntRadioInterface.DeviceCapabilities</codeEntityReference>
124+
<codeEntityReference>T:SmallEarthTech.AntRadioInterface.IAntConfiguration</codeEntityReference>
125+
<codeEntityReference>T:SmallEarthTech.AntRadioInterface.IAntControl</codeEntityReference>
126+
<codeEntityReference>T:SmallEarthTech.AntRadioInterface.IAntUsbRadio</codeEntityReference>
127+
<codeEntityReference>T:SmallEarthTech.AntRadioInterface.ICrypto</codeEntityReference>
128+
<codeEntityReference>T:SmallEarthTech.AntRadioInterface.IFitSettings</codeEntityReference>
129+
<!-- One or more of the following:
130+
- A local link
131+
- An external link
132+
- A code entity reference
133+
134+
<link xlink:href="Other Topic's ID"/>
135+
<link xlink:href="Other Topic's ID">Link inner text</link>
136+
137+
<externalLink>
138+
<linkText>Link text</linkText>
139+
<linkAlternateText>Optional alternate link text</linkAlternateText>
140+
<linkUri>URI</linkUri>
141+
</externalLink>
142+
143+
<codeEntityReference>API member ID</codeEntityReference>
144+
145+
Examples:
146+
147+
<link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8270" />
148+
<link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link>
149+
150+
<externalLink>
151+
<linkText>SHFB on GitHub</linkText>
152+
<linkAlternateText>Go to GitHub</linkAlternateText>
153+
<linkUri>https://GitHub.com/EWSoftware/SHFB</linkUri>
154+
</externalLink>
155+
156+
<codeEntityReference>T:TestDoc.TestClass</codeEntityReference>
157+
<codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference>
158+
<codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference>
159+
<codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference>
160+
<codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference>
161+
<codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference>
162+
<codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference>
163+
-->
164+
</relatedTopics>
165+
</developerConceptualDocument>
166+
</topic>

0 commit comments

Comments
 (0)