1
0

ANTChannel.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. /*
  2. This software is subject to the license described in the License.txt file
  3. included with this software distribution. You may not use this file except in compliance
  4. with this license.
  5. Copyright (c) Dynastream Innovations Inc. 2012
  6. All rights reserved.
  7. */
  8. /*
  9. For every available channel of a connected device, an instance of this class is created.
  10. The main program will then call for the created tab page and add it to the main page tab control.
  11. All the ANT communication in a channel is driven by this class, along with the opening,
  12. closing, and setting parameters of the ANT channel. The channel holds an event timer which is
  13. used to open the channel after all parameters are set and then on every tick calls the simulator class
  14. for an update to the transmit buffer and the timer interval.
  15. This class also receives and handles the channel event messages.
  16. */
  17. #pragma once
  18. using namespace System;
  19. using namespace System::ComponentModel;
  20. using namespace System::Collections;
  21. using namespace System::Windows::Forms;
  22. using namespace System::Data;
  23. using namespace System::Drawing;
  24. #include "StdAfx.h"
  25. #include "types.h"
  26. #include "antmessage.h"
  27. #include "antdefines.h"
  28. #include "ISimBase.h"
  29. #include "SimTypes.h"
  30. typedef enum
  31. {
  32. STATE_CHANNEL_CLOSED,
  33. STATE_CHANNEL_OPENING,
  34. STATE_CHANNEL_OPEN
  35. } AntChannelState;
  36. public value struct CapabilitiesStruct
  37. {
  38. UCHAR ucStandardOptions;
  39. UCHAR ucAdvancedOptions;
  40. UCHAR ucAdvancedOptions2;
  41. };
  42. typedef enum
  43. {
  44. PLATFORM_AP1_ANT11TR,
  45. PLATFORM_AP2_USB2_AT3,
  46. PLATFORM_C7,
  47. PLATFORM_UNKNOWN,
  48. } ANTPlatform;
  49. // List of TxPower Level Settings
  50. #define TXPOWER_SETTINGS1 {L"-20 dBm", L"-10 dBm", L"-5 dBm", L"0 dBm", L"N/A"}
  51. #define TXPOWER_SETTINGS2 {L"-18 dBm", L"-12 dBm", L"-6 dBm", L"0 dBm", L"N/A"}
  52. #define TXPOWER_SETTINGS3 {L"-20 dBm", L"-10 dBm", L"-4 dBm", L"0 dBm", L"+4 dBm"}
  53. #define TXPOWER_SETTINGS_UNKNOWN {L"0", L"1", L"2", L"3", L"4"}
  54. public ref class ANTChannel : public System::Windows::Forms::Form{
  55. public:
  56. ANTChannel(UCHAR ucInstanceNum_, UCHAR ucSimType_, ANTPlatform eHWType_, CapabilitiesStruct sCapabilities_);
  57. ~ANTChannel();
  58. ref struct ANTEventTable abstract sealed
  59. {
  60. static initonly array<UCHAR>^ aucCode =
  61. {
  62. RESPONSE_NO_ERROR,
  63. EVENT_RX_SEARCH_TIMEOUT,
  64. EVENT_RX_FAIL,
  65. EVENT_TX,
  66. EVENT_TRANSFER_RX_FAILED,
  67. EVENT_TRANSFER_TX_COMPLETED,
  68. EVENT_TRANSFER_TX_FAILED,
  69. EVENT_CHANNEL_CLOSED,
  70. EVENT_RX_FAIL_GO_TO_SEARCH,
  71. EVENT_CHANNEL_COLLISION,
  72. EVENT_TRANSFER_TX_START,
  73. CHANNEL_IN_WRONG_STATE,
  74. CHANNEL_NOT_OPENED,
  75. CHANNEL_ID_NOT_SET,
  76. CLOSE_ALL_CHANNELS,
  77. TRANSFER_IN_PROGRESS,
  78. TRANSFER_SEQUENCE_NUMBER_ERROR,
  79. TRANSFER_IN_ERROR,
  80. INVALID_MESSAGE,
  81. INVALID_NETWORK_NUMBER,
  82. INVALID_LIST_ID,
  83. INVALID_SCAN_TX_CHANNEL,
  84. NVM_FULL_ERROR,
  85. NVM_WRITE_ERROR
  86. };
  87. static initonly array<String^>^ aucDescr =
  88. {
  89. "RESPONSE_NO_ERROR",
  90. "EVENT_RX_SEARCH_TIMEOUT",
  91. "EVENT_RX_FAIL",
  92. "EVENT_TX",
  93. "EVENT_TRANSFER_RX_FAILED",
  94. "EVENT_TRANSFER_TX_COMPLETED",
  95. "EVENT_TRANSFER_TX_FAILED",
  96. "EVENT_CHANNEL_CLOSED",
  97. "EVENT_RX_FAIL_GO_TO_SEARCH",
  98. "EVENT_CHANNEL_COLLISION",
  99. "EVENT_TRANSFER_TX_START",
  100. "CHANNEL_IN_WRONG_STATE",
  101. "CHANNEL_NOT_OPENED",
  102. "CHANNEL_ID_NOT_SET",
  103. "CLOSE_ALL_CHANNELS",
  104. "TRANSFER_IN_PROGRESS",
  105. "TRANSFER_SEQUENCE_NUMBER_ERROR",
  106. "TRANSFER_IN_ERROR",
  107. "INVALID_MESSAGE",
  108. "INVALID_NETWORK_NUMBER",
  109. "INVALID_LIST_ID",
  110. "INVALID_SCAN_TX_CHANNEL",
  111. "NVM_FULL_ERROR",
  112. "NVM_WRITE_ERROR"
  113. };
  114. };
  115. public:
  116. UCHAR ucMyChannelNum;
  117. public:
  118. void ANTChannelEvent(UCHAR ucEvent_, UCHAR* pcBuffer_);
  119. void ANTProtocolEvent(UCHAR ucMessageCode_, UCHAR* pcBuffer_);
  120. System::Windows::Forms::TabPage^ getTab(){return this->tabPage_ChannelTab;}
  121. private:
  122. BOOL OpenChannel(UCHAR ucChannelType_);
  123. void ChannelOpenFailed();
  124. void sendSimMsg();
  125. void updateMesgPeriod(USHORT usMesgPeriod_);
  126. void sendAckMsg(UCHAR* pucTxBuffer_);
  127. void sendBroadcastMsg(UCHAR* pucTxBuffer_);
  128. BOOL ValidateChannelID();
  129. void SetPairingBit();
  130. #pragma region Windows Form Designer Control Events
  131. System::Void UpdateRawTxDisplay(System::String^ strLabel_, UCHAR* pucBuffer_);
  132. System::Void timer_SimEvent_Tick(System::Object^ sender, System::Timers::ElapsedEventArgs^ e);
  133. System::Void comboBox_SimSelect_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e);
  134. System::Void checkBox_TxEnable_CheckedChanged(System::Object^ sender, System::EventArgs^ e);
  135. System::Void checkBox_PairingOn_CheckedChanged(System::Object^ sender, System::EventArgs^ e);
  136. System::Void button_getChannelID_Click(System::Object^ sender, System::EventArgs^ e);
  137. System::Void checkBox_DisplayAsHex_CheckedChanged(System::Object^ sender, System::EventArgs^ e);
  138. System::Void button_Clear_Click(System::Object^ sender, System::EventArgs^ e);
  139. System::Void comboBox_TxPowerSelect_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e);
  140. System::Void tabPage_ChannelTab_Enter(System::Object^ sender, System::EventArgs^ e);
  141. #pragma endregion
  142. private:
  143. ISimBase^ curSimulator; // Current (active) simulator handle
  144. System::Timers::Timer^ timer_SimEvent; // Timer, for event-driven simulations
  145. UCHAR ucSimType; // Simulation type
  146. USHORT usMyDeviceNum; // Device number
  147. UCHAR ucMyDeviceType; // Device type
  148. UCHAR ucMyTxType; // Transmission type
  149. USHORT usMyMsgPeriod; // Message period
  150. DOUBLE dCurEventTime; // Current time (ms), for event-driven simulations
  151. BOOL bPairingBit; // Use pairing bit
  152. BOOL bDisplayHex; // Display in hex values (otherwise, use decimal values)
  153. AntChannelState eMyChannelState; // ANT Channel State
  154. BOOL bMyCheckInternalRaise; // Indicates whther checkbox was set by user or internally
  155. BOOL bAlreadyUnAssigned; // For dealing with differences in how AP2 search timeouts
  156. CapabilitiesStruct sMyCapabilities; // Copy of the Capabilities bytes
  157. BOOL bTXPowerUIEnabled; // Indicates if control ready to respond to user events
  158. static INT iTheTXPowerLevel = DEFAULT_RADIO_TX_POWER;
  159. #pragma region Windows Form Designer Control Declarations
  160. private: System::Windows::Forms::Panel^ panelPanelTestControl;
  161. private: System::Windows::Forms::TabControl^ tabControl1;
  162. private: System::Windows::Forms::TabPage^ tabPage_ChannelTab;
  163. private: System::Windows::Forms::RichTextBox^ richTextBox_RawTxDisplay;
  164. private: System::Windows::Forms::CheckBox^ checkBox_TxEnable;
  165. private: System::Windows::Forms::ComboBox^ comboBox_SimSelect;
  166. private: System::Windows::Forms::Panel^ panel_channelSettings;
  167. private: System::Windows::Forms::TextBox^ textBox_DeviceID;
  168. private: System::Windows::Forms::Label^ label_DeviceId;
  169. private: System::Windows::Forms::Label^ label_DeviceType;
  170. private: System::Windows::Forms::TextBox^ textBox_DeviceType;
  171. private: System::Windows::Forms::Label^ label_TransmitPeriod;
  172. private: System::Windows::Forms::TextBox^ textBox_TransmitPeriod;
  173. private: System::Windows::Forms::Label^ label_TransmissionType;
  174. private: System::Windows::Forms::TextBox^ textBox_TransmissionType;
  175. private: System::Windows::Forms::CheckBox^ checkBox_DisplayAsHex;
  176. private: System::Windows::Forms::Label^ label_TxTime;
  177. private: System::Windows::Forms::Label^ label_RawBox;
  178. private: System::Windows::Forms::Label^ label_TxTimeDisplay;
  179. private: System::Windows::Forms::Label^ label_ChannelConfig;
  180. private: System::Windows::Forms::Panel^ panel_Sim_PLACEHOLDER;
  181. private: System::Windows::Forms::Panel^ panel_SimDisplay_PLACEHOLDER;
  182. private: System::Windows::Forms::Button^ button_getChannelID;
  183. private: System::Windows::Forms::CheckBox^ checkBox_PairingOn;
  184. private: System::ComponentModel::IContainer^ components;
  185. private: System::Windows::Forms::Button^ button_Clear;
  186. private: System::Windows::Forms::ComboBox^ comboBox_TxPowerSelect;
  187. private: System::Windows::Forms::Label^ label_TxPower;
  188. private:
  189. /// <summary>
  190. /// Required designer variable.
  191. /// </summary>
  192. #pragma endregion
  193. #pragma region Windows Form Designer generated code
  194. /// <summary>
  195. /// Required method for Designer support - do not modify
  196. /// the contents of this method with the code editor.
  197. /// </summary>
  198. void InitializeComponent(void)
  199. {
  200. this->tabControl1 = (gcnew System::Windows::Forms::TabControl());
  201. this->tabPage_ChannelTab = (gcnew System::Windows::Forms::TabPage());
  202. this->button_Clear = (gcnew System::Windows::Forms::Button());
  203. this->label_RawBox = (gcnew System::Windows::Forms::Label());
  204. this->label_TxTime = (gcnew System::Windows::Forms::Label());
  205. this->panel_SimDisplay_PLACEHOLDER = (gcnew System::Windows::Forms::Panel());
  206. this->panel_Sim_PLACEHOLDER = (gcnew System::Windows::Forms::Panel());
  207. this->label_TxTimeDisplay = (gcnew System::Windows::Forms::Label());
  208. this->checkBox_DisplayAsHex = (gcnew System::Windows::Forms::CheckBox());
  209. this->richTextBox_RawTxDisplay = (gcnew System::Windows::Forms::RichTextBox());
  210. this->panel_channelSettings = (gcnew System::Windows::Forms::Panel());
  211. this->label_TxPower = (gcnew System::Windows::Forms::Label());
  212. this->comboBox_TxPowerSelect = (gcnew System::Windows::Forms::ComboBox());
  213. this->button_getChannelID = (gcnew System::Windows::Forms::Button());
  214. this->checkBox_PairingOn = (gcnew System::Windows::Forms::CheckBox());
  215. this->label_ChannelConfig = (gcnew System::Windows::Forms::Label());
  216. this->label_TransmissionType = (gcnew System::Windows::Forms::Label());
  217. this->textBox_TransmissionType = (gcnew System::Windows::Forms::TextBox());
  218. this->label_TransmitPeriod = (gcnew System::Windows::Forms::Label());
  219. this->textBox_TransmitPeriod = (gcnew System::Windows::Forms::TextBox());
  220. this->label_DeviceType = (gcnew System::Windows::Forms::Label());
  221. this->textBox_DeviceType = (gcnew System::Windows::Forms::TextBox());
  222. this->label_DeviceId = (gcnew System::Windows::Forms::Label());
  223. this->textBox_DeviceID = (gcnew System::Windows::Forms::TextBox());
  224. this->checkBox_TxEnable = (gcnew System::Windows::Forms::CheckBox());
  225. this->comboBox_SimSelect = (gcnew System::Windows::Forms::ComboBox());
  226. this->tabControl1->SuspendLayout();
  227. this->tabPage_ChannelTab->SuspendLayout();
  228. this->panel_channelSettings->SuspendLayout();
  229. this->SuspendLayout();
  230. //
  231. // tabControl1
  232. //
  233. this->tabControl1->Controls->Add(this->tabPage_ChannelTab);
  234. this->tabControl1->Location = System::Drawing::Point(48, 39);
  235. this->tabControl1->Name = L"tabControl1";
  236. this->tabControl1->SelectedIndex = 0;
  237. this->tabControl1->Size = System::Drawing::Size(740, 325);
  238. this->tabControl1->TabIndex = 0;
  239. //
  240. // tabPage_ChannelTab
  241. //
  242. this->tabPage_ChannelTab->Controls->Add(this->button_Clear);
  243. this->tabPage_ChannelTab->Controls->Add(this->label_RawBox);
  244. this->tabPage_ChannelTab->Controls->Add(this->label_TxTime);
  245. this->tabPage_ChannelTab->Controls->Add(this->panel_SimDisplay_PLACEHOLDER);
  246. this->tabPage_ChannelTab->Controls->Add(this->panel_Sim_PLACEHOLDER);
  247. this->tabPage_ChannelTab->Controls->Add(this->label_TxTimeDisplay);
  248. this->tabPage_ChannelTab->Controls->Add(this->checkBox_DisplayAsHex);
  249. this->tabPage_ChannelTab->Controls->Add(this->richTextBox_RawTxDisplay);
  250. this->tabPage_ChannelTab->Controls->Add(this->panel_channelSettings);
  251. this->tabPage_ChannelTab->Controls->Add(this->checkBox_TxEnable);
  252. this->tabPage_ChannelTab->Controls->Add(this->comboBox_SimSelect);
  253. this->tabPage_ChannelTab->Location = System::Drawing::Point(4, 22);
  254. this->tabPage_ChannelTab->Name = L"tabPage_ChannelTab";
  255. this->tabPage_ChannelTab->Padding = System::Windows::Forms::Padding(3);
  256. this->tabPage_ChannelTab->Size = System::Drawing::Size(732, 299);
  257. this->tabPage_ChannelTab->TabIndex = 0;
  258. this->tabPage_ChannelTab->Text = L"Channel #";
  259. this->tabPage_ChannelTab->UseVisualStyleBackColor = true;
  260. this->tabPage_ChannelTab->Enter += gcnew System::EventHandler(this, &ANTChannel::tabPage_ChannelTab_Enter);
  261. //
  262. // button_Clear
  263. //
  264. this->button_Clear->Location = System::Drawing::Point(238, 6);
  265. this->button_Clear->Name = L"button_Clear";
  266. this->button_Clear->Size = System::Drawing::Size(56, 23);
  267. this->button_Clear->TabIndex = 12;
  268. this->button_Clear->Text = L"Clear";
  269. this->button_Clear->UseVisualStyleBackColor = true;
  270. this->button_Clear->Click += gcnew System::EventHandler(this, &ANTChannel::button_Clear_Click);
  271. //
  272. // label_RawBox
  273. //
  274. this->label_RawBox->AutoSize = true;
  275. this->label_RawBox->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Underline, System::Drawing::GraphicsUnit::Point,
  276. static_cast<System::Byte>(0)));
  277. this->label_RawBox->Location = System::Drawing::Point(13, 14);
  278. this->label_RawBox->Name = L"label_RawBox";
  279. this->label_RawBox->Size = System::Drawing::Size(106, 13);
  280. this->label_RawBox->TabIndex = 11;
  281. this->label_RawBox->Text = L"ANT Channel Output";
  282. //
  283. // label_TxTime
  284. //
  285. this->label_TxTime->AutoSize = true;
  286. this->label_TxTime->Location = System::Drawing::Point(13, 155);
  287. this->label_TxTime->Name = L"label_TxTime";
  288. this->label_TxTime->Size = System::Drawing::Size(75, 13);
  289. this->label_TxTime->TabIndex = 10;
  290. this->label_TxTime->Text = L"Total Tx Time:";
  291. //
  292. // panel_SimDisplay_PLACEHOLDER
  293. //
  294. this->panel_SimDisplay_PLACEHOLDER->Location = System::Drawing::Point(58, 188);
  295. this->panel_SimDisplay_PLACEHOLDER->Name = L"panel_SimDisplay_PLACEHOLDER";
  296. this->panel_SimDisplay_PLACEHOLDER->Size = System::Drawing::Size(200, 90);
  297. this->panel_SimDisplay_PLACEHOLDER->TabIndex = 9;
  298. this->panel_SimDisplay_PLACEHOLDER->Visible = false;
  299. //
  300. // panel_Sim_PLACEHOLDER
  301. //
  302. this->panel_Sim_PLACEHOLDER->Location = System::Drawing::Point(322, 50);
  303. this->panel_Sim_PLACEHOLDER->Name = L"panel_Sim_PLACEHOLDER";
  304. this->panel_Sim_PLACEHOLDER->Size = System::Drawing::Size(400, 140);
  305. this->panel_Sim_PLACEHOLDER->TabIndex = 8;
  306. this->panel_Sim_PLACEHOLDER->Visible = false;
  307. //
  308. // label_TxTimeDisplay
  309. //
  310. this->label_TxTimeDisplay->Location = System::Drawing::Point(113, 156);
  311. this->label_TxTimeDisplay->Name = L"label_TxTimeDisplay";
  312. this->label_TxTimeDisplay->Size = System::Drawing::Size(103, 12);
  313. this->label_TxTimeDisplay->TabIndex = 7;
  314. this->label_TxTimeDisplay->Text = L"0";
  315. //
  316. // checkBox_DisplayAsHex
  317. //
  318. this->checkBox_DisplayAsHex->AutoSize = true;
  319. this->checkBox_DisplayAsHex->Checked = true;
  320. this->checkBox_DisplayAsHex->CheckState = System::Windows::Forms::CheckState::Checked;
  321. this->checkBox_DisplayAsHex->Location = System::Drawing::Point(125, 12);
  322. this->checkBox_DisplayAsHex->Name = L"checkBox_DisplayAsHex";
  323. this->checkBox_DisplayAsHex->Size = System::Drawing::Size(91, 17);
  324. this->checkBox_DisplayAsHex->TabIndex = 8;
  325. this->checkBox_DisplayAsHex->Text = L"Display in hex";
  326. this->checkBox_DisplayAsHex->UseVisualStyleBackColor = true;
  327. this->checkBox_DisplayAsHex->CheckedChanged += gcnew System::EventHandler(this, &ANTChannel::checkBox_DisplayAsHex_CheckedChanged);
  328. //
  329. // richTextBox_RawTxDisplay
  330. //
  331. this->richTextBox_RawTxDisplay->BackColor = System::Drawing::SystemColors::Window;
  332. this->richTextBox_RawTxDisplay->Font = (gcnew System::Drawing::Font(L"Lucida Console", 8.25F, System::Drawing::FontStyle::Regular,
  333. System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
  334. this->richTextBox_RawTxDisplay->HideSelection = false;
  335. this->richTextBox_RawTxDisplay->Location = System::Drawing::Point(16, 30);
  336. this->richTextBox_RawTxDisplay->Name = L"richTextBox_RawTxDisplay";
  337. this->richTextBox_RawTxDisplay->ReadOnly = true;
  338. this->richTextBox_RawTxDisplay->Size = System::Drawing::Size(278, 122);
  339. this->richTextBox_RawTxDisplay->TabIndex = 0;
  340. this->richTextBox_RawTxDisplay->TabStop = false;
  341. this->richTextBox_RawTxDisplay->Text = L"Raw Data...";
  342. //
  343. // panel_channelSettings
  344. //
  345. this->panel_channelSettings->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
  346. this->panel_channelSettings->Controls->Add(this->label_TxPower);
  347. this->panel_channelSettings->Controls->Add(this->comboBox_TxPowerSelect);
  348. this->panel_channelSettings->Controls->Add(this->button_getChannelID);
  349. this->panel_channelSettings->Controls->Add(this->checkBox_PairingOn);
  350. this->panel_channelSettings->Controls->Add(this->label_ChannelConfig);
  351. this->panel_channelSettings->Controls->Add(this->label_TransmissionType);
  352. this->panel_channelSettings->Controls->Add(this->textBox_TransmissionType);
  353. this->panel_channelSettings->Controls->Add(this->label_TransmitPeriod);
  354. this->panel_channelSettings->Controls->Add(this->textBox_TransmitPeriod);
  355. this->panel_channelSettings->Controls->Add(this->label_DeviceType);
  356. this->panel_channelSettings->Controls->Add(this->textBox_DeviceType);
  357. this->panel_channelSettings->Controls->Add(this->label_DeviceId);
  358. this->panel_channelSettings->Controls->Add(this->textBox_DeviceID);
  359. this->panel_channelSettings->Location = System::Drawing::Point(322, 211);
  360. this->panel_channelSettings->Name = L"panel_channelSettings";
  361. this->panel_channelSettings->Size = System::Drawing::Size(400, 67);
  362. this->panel_channelSettings->TabIndex = 6;
  363. //
  364. // label_TxPower
  365. //
  366. this->label_TxPower->Location = System::Drawing::Point(333, 24);
  367. this->label_TxPower->Name = L"label_TxPower";
  368. this->label_TxPower->Size = System::Drawing::Size(52, 13);
  369. this->label_TxPower->TabIndex = 14;
  370. this->label_TxPower->Text = L"Tx Power";
  371. //
  372. // comboBox_TxPowerSelect
  373. //
  374. this->comboBox_TxPowerSelect->ForeColor = System::Drawing::SystemColors::WindowText;
  375. this->comboBox_TxPowerSelect->FormattingEnabled = true;
  376. this->comboBox_TxPowerSelect->Location = System::Drawing::Point(327, 40);
  377. this->comboBox_TxPowerSelect->Margin = System::Windows::Forms::Padding(3, 0, 3, 3);
  378. this->comboBox_TxPowerSelect->Name = L"comboBox_TxPowerSelect";
  379. this->comboBox_TxPowerSelect->Size = System::Drawing::Size(66, 21);
  380. this->comboBox_TxPowerSelect->TabIndex = 13;
  381. this->comboBox_TxPowerSelect->Text = L"Tx Power";
  382. this->comboBox_TxPowerSelect->SelectedIndexChanged += gcnew System::EventHandler(this, &ANTChannel::comboBox_TxPowerSelect_SelectedIndexChanged);
  383. //
  384. // button_getChannelID
  385. //
  386. this->button_getChannelID->Enabled = false;
  387. this->button_getChannelID->Location = System::Drawing::Point(267, 3);
  388. this->button_getChannelID->Name = L"button_getChannelID";
  389. this->button_getChannelID->Size = System::Drawing::Size(122, 19);
  390. this->button_getChannelID->TabIndex = 9;
  391. this->button_getChannelID->Text = L"Get Channel ID";
  392. this->button_getChannelID->UseVisualStyleBackColor = true;
  393. this->button_getChannelID->Visible = false;
  394. this->button_getChannelID->Click += gcnew System::EventHandler(this, &ANTChannel::button_getChannelID_Click);
  395. //
  396. // checkBox_PairingOn
  397. //
  398. this->checkBox_PairingOn->AutoSize = true;
  399. this->checkBox_PairingOn->Location = System::Drawing::Point(173, 5);
  400. this->checkBox_PairingOn->Name = L"checkBox_PairingOn";
  401. this->checkBox_PairingOn->Size = System::Drawing::Size(88, 17);
  402. this->checkBox_PairingOn->TabIndex = 7;
  403. this->checkBox_PairingOn->Text = L"Pairing Mode";
  404. this->checkBox_PairingOn->UseVisualStyleBackColor = true;
  405. this->checkBox_PairingOn->CheckedChanged += gcnew System::EventHandler(this, &ANTChannel::checkBox_PairingOn_CheckedChanged);
  406. //
  407. // label_ChannelConfig
  408. //
  409. this->label_ChannelConfig->AutoSize = true;
  410. this->label_ChannelConfig->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Underline,
  411. System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
  412. this->label_ChannelConfig->Location = System::Drawing::Point(5, 5);
  413. this->label_ChannelConfig->Name = L"label_ChannelConfig";
  414. this->label_ChannelConfig->Size = System::Drawing::Size(139, 13);
  415. this->label_ChannelConfig->TabIndex = 8;
  416. this->label_ChannelConfig->Text = L"ANT Channel Configuration:";
  417. //
  418. // label_TransmissionType
  419. //
  420. this->label_TransmissionType->AutoSize = true;
  421. this->label_TransmissionType->Location = System::Drawing::Point(60, 24);
  422. this->label_TransmissionType->Name = L"label_TransmissionType";
  423. this->label_TransmissionType->Size = System::Drawing::Size(95, 13);
  424. this->label_TransmissionType->TabIndex = 5;
  425. this->label_TransmissionType->Text = L"Transmission Type";
  426. //
  427. // textBox_TransmissionType
  428. //
  429. this->textBox_TransmissionType->Location = System::Drawing::Point(80, 40);
  430. this->textBox_TransmissionType->MaxLength = 10;
  431. this->textBox_TransmissionType->Name = L"textBox_TransmissionType";
  432. this->textBox_TransmissionType->Size = System::Drawing::Size(49, 20);
  433. this->textBox_TransmissionType->TabIndex = 4;
  434. this->textBox_TransmissionType->Text = L"1";
  435. //
  436. // label_TransmitPeriod
  437. //
  438. this->label_TransmitPeriod->AutoSize = true;
  439. this->label_TransmitPeriod->Location = System::Drawing::Point(233, 24);
  440. this->label_TransmitPeriod->Name = L"label_TransmitPeriod";
  441. this->label_TransmitPeriod->Size = System::Drawing::Size(93, 13);
  442. this->label_TransmitPeriod->TabIndex = 7;
  443. this->label_TransmitPeriod->Text = L"Tx Period (counts)";
  444. //
  445. // textBox_TransmitPeriod
  446. //
  447. this->textBox_TransmitPeriod->Location = System::Drawing::Point(251, 40);
  448. this->textBox_TransmitPeriod->MaxLength = 10;
  449. this->textBox_TransmitPeriod->Name = L"textBox_TransmitPeriod";
  450. this->textBox_TransmitPeriod->Size = System::Drawing::Size(49, 20);
  451. this->textBox_TransmitPeriod->TabIndex = 6;
  452. this->textBox_TransmitPeriod->Text = L"8192";
  453. //
  454. // label_DeviceType
  455. //
  456. this->label_DeviceType->AutoSize = true;
  457. this->label_DeviceType->Location = System::Drawing::Point(160, 24);
  458. this->label_DeviceType->Name = L"label_DeviceType";
  459. this->label_DeviceType->Size = System::Drawing::Size(68, 13);
  460. this->label_DeviceType->TabIndex = 3;
  461. this->label_DeviceType->Text = L"Device Type";
  462. //
  463. // textBox_DeviceType
  464. //
  465. this->textBox_DeviceType->Location = System::Drawing::Point(166, 40);
  466. this->textBox_DeviceType->MaxLength = 10;
  467. this->textBox_DeviceType->Name = L"textBox_DeviceType";
  468. this->textBox_DeviceType->Size = System::Drawing::Size(49, 20);
  469. this->textBox_DeviceType->TabIndex = 5;
  470. this->textBox_DeviceType->Text = L"1";
  471. //
  472. // label_DeviceId
  473. //
  474. this->label_DeviceId->AutoSize = true;
  475. this->label_DeviceId->Location = System::Drawing::Point(6, 24);
  476. this->label_DeviceId->Name = L"label_DeviceId";
  477. this->label_DeviceId->Size = System::Drawing::Size(55, 13);
  478. this->label_DeviceId->TabIndex = 1;
  479. this->label_DeviceId->Text = L"Device ID";
  480. //
  481. // textBox_DeviceID
  482. //
  483. this->textBox_DeviceID->Location = System::Drawing::Point(9, 40);
  484. this->textBox_DeviceID->MaxLength = 10;
  485. this->textBox_DeviceID->Name = L"textBox_DeviceID";
  486. this->textBox_DeviceID->Size = System::Drawing::Size(49, 20);
  487. this->textBox_DeviceID->TabIndex = 3;
  488. this->textBox_DeviceID->Text = L"33";
  489. //
  490. // checkBox_TxEnable
  491. //
  492. this->checkBox_TxEnable->AutoSize = true;
  493. this->checkBox_TxEnable->Location = System::Drawing::Point(545, 14);
  494. this->checkBox_TxEnable->Name = L"checkBox_TxEnable";
  495. this->checkBox_TxEnable->Size = System::Drawing::Size(94, 17);
  496. this->checkBox_TxEnable->TabIndex = 2;
  497. this->checkBox_TxEnable->Text = L"Open Channel";
  498. this->checkBox_TxEnable->UseVisualStyleBackColor = true;
  499. this->checkBox_TxEnable->CheckedChanged += gcnew System::EventHandler(this, &ANTChannel::checkBox_TxEnable_CheckedChanged);
  500. //
  501. // comboBox_SimSelect
  502. //
  503. this->comboBox_SimSelect->FormattingEnabled = true;
  504. this->comboBox_SimSelect->Location = System::Drawing::Point(322, 10);
  505. this->comboBox_SimSelect->Name = L"comboBox_SimSelect";
  506. this->comboBox_SimSelect->Size = System::Drawing::Size(205, 21);
  507. this->comboBox_SimSelect->TabIndex = 1;
  508. this->comboBox_SimSelect->Text = L"Select Simulator...";
  509. this->comboBox_SimSelect->SelectedIndexChanged += gcnew System::EventHandler(this, &ANTChannel::comboBox_SimSelect_SelectedIndexChanged);
  510. //
  511. // ANTChannel
  512. //
  513. this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
  514. this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  515. this->ClientSize = System::Drawing::Size(830, 412);
  516. this->Controls->Add(this->tabControl1);
  517. this->Name = L"ANTChannel";
  518. this->Text = L"ANTChannel";
  519. this->tabControl1->ResumeLayout(false);
  520. this->tabPage_ChannelTab->ResumeLayout(false);
  521. this->tabPage_ChannelTab->PerformLayout();
  522. this->panel_channelSettings->ResumeLayout(false);
  523. this->panel_channelSettings->PerformLayout();
  524. this->ResumeLayout(false);
  525. }
  526. #pragma endregion
  527. };