2
0

HRMSensor.h 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  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. #pragma once
  9. #include "StdAfx.h"
  10. #include "ISimBase.h"
  11. #include "hrm.h"
  12. #include "types.h"
  13. #include "antdefines.h"
  14. using namespace System;
  15. using namespace System::ComponentModel;
  16. using namespace System::Collections;
  17. using namespace System::Windows::Forms;
  18. using namespace System::Data;
  19. using namespace System::Drawing;
  20. public ref class HRMSensor : public System::Windows::Forms::Form, public ISimBase{
  21. public:
  22. HRMSensor(System::Timers::Timer^ channelTimer){
  23. InitializeComponent();
  24. timerHandle = channelTimer; // Get timer handle
  25. InitializeSim();
  26. }
  27. ~HRMSensor(){
  28. this->panel_Display->Controls->Clear();
  29. this->panel_Settings->Controls->Clear();
  30. delete this->panel_Display;
  31. delete this->panel_Settings;
  32. //clean up floating resources with the garbage collector
  33. GC::Collect(2);
  34. //Deletion of designer component
  35. if (components)
  36. {
  37. delete components;
  38. }
  39. }
  40. public:
  41. virtual void onTimerTock(USHORT eventTime);
  42. virtual void ANT_eventNotification(UCHAR ucEventCode_, UCHAR* pucEventBuffer_);
  43. virtual UCHAR getDeviceType(){return HRM_DEVICE_TYPE;}
  44. virtual UCHAR getTransmissionType(){return HRM_TX_TYPE;}
  45. virtual USHORT getTransmitPeriod(){return HRM_MSG_PERIOD;}
  46. virtual DOUBLE getTimerInterval(){return (double) ulTimerInterval;}
  47. virtual System::Windows::Forms::Panel^ getSimSettingsPanel(){return this->panel_Settings;}
  48. virtual System::Windows::Forms::Panel^ getSimTranslatedDisplay(){return this->panel_Display;}
  49. private:
  50. void InitializeSim();
  51. void HandleTransmit(UCHAR* pucTxBuffer_);
  52. void UpdateDisplay();
  53. void ForceUpdate();
  54. System::Void radioButton_SimTypeChanged (System::Object^ sender, System::EventArgs^ e);
  55. System::Void button_AdvancedUpdate_Click(System::Object^ sender, System::EventArgs^ e);
  56. System::Void button_UpdateTime_Click(System::Object^ sender, System::EventArgs^ e);
  57. System::Void numericUpDown_Prm_CurPulse_ValueChanged(System::Object^ sender, System::EventArgs^ e);
  58. System::Void checkBox_Legacy_CheckedChanged(System::Object^ sender, System::EventArgs^ e);
  59. System::Void checkBox_SendBasicPage_CheckedChanged(System::Object^ sender, System::EventArgs^ e);
  60. System::Void numericUpDown_Prm_MinMaxPulse_ValueChanged(System::Object^ sender, System::EventArgs^ e);
  61. private:
  62. // Simulator timer
  63. System::Timers::Timer^ timerHandle; // Timer handle
  64. ULONG ulTimerInterval; // Timer interval between simulated events
  65. // Simulator variables
  66. ULONG ulRunTime; // Time in ms
  67. ULONG ulRunTime16000; // Time in 1/16000s, for conversion between time base of ms to 1/1024s
  68. UCHAR ucReserved; // Reserved field
  69. UCHAR ucBackgroundCount; // To send multiple times the same extended message
  70. UCHAR ucNextBackgroundPage; // Next extended page to send
  71. UCHAR ucBPM; // Heart rate (bpm)
  72. UCHAR ucEventCount; // Heart beat count
  73. UCHAR ucMinPulse; // Minimum heart rate (bpm)
  74. UCHAR ucCurPulse; // Current heart rate (bpm)
  75. UCHAR ucMaxPulse; // Maximum heart rate (bpm)
  76. ULONG ulElapsedTime2; // Cumulative operating time (elapsed time) in 2 second resolution
  77. USHORT usTime1024; // Time of last heart beat event (1/1024 seconds)
  78. USHORT usPreviousTime1024; // Time of previous heart beat event (1/1024 seconds)
  79. // Background Data
  80. UCHAR ucMfgID; // Manufacturing ID
  81. UCHAR ucHwVersion; // Hardware version
  82. UCHAR ucSwVersion; // Software version
  83. UCHAR ucModelNum; // Model number
  84. USHORT usSerialNum; // Serial number
  85. // Status
  86. UCHAR ucSimDataType; // Method to generate simulated data
  87. BOOL bLegacy; // Enable simulation of legacy sensors
  88. BOOL bTxMinimum; // Enable transmission of basic data set
  89. BOOL bSweepAscending; // Sweep through heart rate values ascending
  90. private: System::Windows::Forms::Button^ button_AdvancedUpdate;
  91. private: System::Windows::Forms::Button^ button_UpdateTime;
  92. private: System::Windows::Forms::CheckBox^ checkBox_Legacy;
  93. private: System::Windows::Forms::CheckBox^ checkBox_SendBasicPage;
  94. private: System::Windows::Forms::Label^ label_AdvancedError;
  95. private: System::Windows::Forms::Label^ label_CurrentPulse;
  96. private: System::Windows::Forms::Label^ label_CurrentTime;
  97. private: System::Windows::Forms::Label^ label_CurrentTimeDisplay;
  98. private: System::Windows::Forms::Label^ label_ElapsedSecsDisplay;
  99. private: System::Windows::Forms::Label^ label_ElpTime;
  100. private: System::Windows::Forms::Label^ label_EventCount;
  101. private: System::Windows::Forms::Label^ label_HardwareVer;
  102. private: System::Windows::Forms::Label^ label_HRSimType;
  103. private: System::Windows::Forms::Label^ label_LastTime;
  104. private: System::Windows::Forms::Label^ label_LastTimeDisplay;
  105. private: System::Windows::Forms::Label^ label_ManfID;
  106. private: System::Windows::Forms::Label^ label_MaxPulse;
  107. private: System::Windows::Forms::Label^ label_MinPulse;
  108. private: System::Windows::Forms::Label^ label_ModelNum;
  109. private: System::Windows::Forms::Label^ label_Pulse;
  110. private: System::Windows::Forms::Label^ label_PulseTxd;
  111. private: System::Windows::Forms::Label^ label_SerialNum;
  112. private: System::Windows::Forms::Label^ label_SoftwareVer;
  113. private: System::Windows::Forms::Label^ label_TranslatedDisplayLabel;
  114. private: System::Windows::Forms::Label^ label_TxEventCount;
  115. private: System::Windows::Forms::Label^ label_TxPulseOf;
  116. private: System::Windows::Forms::NumericUpDown^ numericUpDown_Prm_CurPulse;
  117. private: System::Windows::Forms::NumericUpDown^ numericUpDown_Prm_MaxPulse;
  118. private: System::Windows::Forms::NumericUpDown^ numericUpDown_Prm_MinPulse;
  119. private: System::Windows::Forms::Panel^ panel_Display;
  120. private: System::Windows::Forms::Panel^ panel_Settings;
  121. private: System::Windows::Forms::RadioButton^ radioButton_HRFixed;
  122. private: System::Windows::Forms::RadioButton^ radioButton_HRStep;
  123. private: System::Windows::Forms::RadioButton^ radioButton_HRSweep;
  124. private: System::Windows::Forms::TabControl^ tabControl_Settings;
  125. private: System::Windows::Forms::TabPage^ tabPage_Advanced;
  126. private: System::Windows::Forms::TabPage^ tabPage_Parameters;
  127. private: System::Windows::Forms::TextBox^ textBox_ElpTimeChange;
  128. private: System::Windows::Forms::TextBox^ textBox_HardwareVerChange;
  129. private: System::Windows::Forms::TextBox^ textBox_ManfIDChange;
  130. private: System::Windows::Forms::TextBox^ textBox_ModelNumChange;
  131. private: System::Windows::Forms::TextBox^ textBox_SerialNumChange;
  132. private: System::Windows::Forms::TextBox^ textBox_SoftwareVerChange;
  133. private:
  134. /// <summary>
  135. /// Required designer variable.
  136. /// </summary>
  137. System::ComponentModel::Container ^components;
  138. #pragma region Windows Form Designer generated code
  139. /// <summary>
  140. /// Required method for Designer support - do not modify
  141. /// the contents of this method with the code editor.
  142. /// </summary>
  143. void InitializeComponent(void)
  144. {
  145. this->button_AdvancedUpdate = (gcnew System::Windows::Forms::Button());
  146. this->button_UpdateTime = (gcnew System::Windows::Forms::Button());
  147. this->checkBox_Legacy = (gcnew System::Windows::Forms::CheckBox());
  148. this->checkBox_SendBasicPage = (gcnew System::Windows::Forms::CheckBox());
  149. this->label_AdvancedError = (gcnew System::Windows::Forms::Label());
  150. this->label_CurrentPulse = (gcnew System::Windows::Forms::Label());
  151. this->label_CurrentTime = (gcnew System::Windows::Forms::Label());
  152. this->label_CurrentTimeDisplay = (gcnew System::Windows::Forms::Label());
  153. this->label_ElapsedSecsDisplay = (gcnew System::Windows::Forms::Label());
  154. this->label_ElpTime = (gcnew System::Windows::Forms::Label());
  155. this->label_EventCount = (gcnew System::Windows::Forms::Label());
  156. this->label_HardwareVer = (gcnew System::Windows::Forms::Label());
  157. this->label_HRSimType = (gcnew System::Windows::Forms::Label());
  158. this->label_LastTime = (gcnew System::Windows::Forms::Label());
  159. this->label_LastTimeDisplay = (gcnew System::Windows::Forms::Label());
  160. this->label_ManfID = (gcnew System::Windows::Forms::Label());
  161. this->label_MaxPulse = (gcnew System::Windows::Forms::Label());
  162. this->label_MinPulse = (gcnew System::Windows::Forms::Label());
  163. this->label_ModelNum = (gcnew System::Windows::Forms::Label());
  164. this->label_Pulse = (gcnew System::Windows::Forms::Label());
  165. this->label_PulseTxd = (gcnew System::Windows::Forms::Label());
  166. this->label_SerialNum = (gcnew System::Windows::Forms::Label());
  167. this->label_SoftwareVer = (gcnew System::Windows::Forms::Label());
  168. this->label_TranslatedDisplayLabel = (gcnew System::Windows::Forms::Label());
  169. this->label_TxEventCount = (gcnew System::Windows::Forms::Label());
  170. this->label_TxPulseOf = (gcnew System::Windows::Forms::Label());
  171. this->numericUpDown_Prm_CurPulse = (gcnew System::Windows::Forms::NumericUpDown());
  172. this->numericUpDown_Prm_MaxPulse = (gcnew System::Windows::Forms::NumericUpDown());
  173. this->numericUpDown_Prm_MinPulse = (gcnew System::Windows::Forms::NumericUpDown());
  174. this->panel_Settings = (gcnew System::Windows::Forms::Panel());
  175. this->panel_Display = (gcnew System::Windows::Forms::Panel());
  176. this->radioButton_HRFixed = (gcnew System::Windows::Forms::RadioButton());
  177. this->radioButton_HRStep = (gcnew System::Windows::Forms::RadioButton());
  178. this->radioButton_HRSweep = (gcnew System::Windows::Forms::RadioButton());
  179. this->tabControl_Settings = (gcnew System::Windows::Forms::TabControl());
  180. this->tabPage_Advanced = (gcnew System::Windows::Forms::TabPage());
  181. this->tabPage_Parameters = (gcnew System::Windows::Forms::TabPage());
  182. this->textBox_ElpTimeChange = (gcnew System::Windows::Forms::TextBox());
  183. this->textBox_HardwareVerChange = (gcnew System::Windows::Forms::TextBox());
  184. this->textBox_ManfIDChange = (gcnew System::Windows::Forms::TextBox());
  185. this->textBox_ModelNumChange = (gcnew System::Windows::Forms::TextBox());
  186. this->textBox_SerialNumChange = (gcnew System::Windows::Forms::TextBox());
  187. this->textBox_SoftwareVerChange = (gcnew System::Windows::Forms::TextBox());
  188. this->panel_Settings->SuspendLayout();
  189. this->tabControl_Settings->SuspendLayout();
  190. this->tabPage_Parameters->SuspendLayout();
  191. (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDown_Prm_MaxPulse))->BeginInit();
  192. (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDown_Prm_MinPulse))->BeginInit();
  193. (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDown_Prm_CurPulse))->BeginInit();
  194. this->tabPage_Advanced->SuspendLayout();
  195. this->panel_Display->SuspendLayout();
  196. this->SuspendLayout();
  197. //
  198. // panel_Settings
  199. //
  200. this->panel_Settings->Controls->Add(this->tabControl_Settings);
  201. this->panel_Settings->Location = System::Drawing::Point(322, 50);
  202. this->panel_Settings->Name = L"panel_Settings";
  203. this->panel_Settings->Size = System::Drawing::Size(400, 140);
  204. this->panel_Settings->TabIndex = 0;
  205. //
  206. // tabControl_Settings
  207. //
  208. this->tabControl_Settings->Controls->Add(this->tabPage_Parameters);
  209. this->tabControl_Settings->Controls->Add(this->tabPage_Advanced);
  210. this->tabControl_Settings->Location = System::Drawing::Point(0, 3);
  211. this->tabControl_Settings->Name = L"tabControl_Settings";
  212. this->tabControl_Settings->SelectedIndex = 0;
  213. this->tabControl_Settings->Size = System::Drawing::Size(397, 137);
  214. this->tabControl_Settings->TabIndex = 10;
  215. //
  216. // tabPage_Parameters
  217. //
  218. this->tabPage_Parameters->Controls->Add(this->checkBox_Legacy);
  219. this->tabPage_Parameters->Controls->Add(this->numericUpDown_Prm_MaxPulse);
  220. this->tabPage_Parameters->Controls->Add(this->checkBox_SendBasicPage);
  221. this->tabPage_Parameters->Controls->Add(this->numericUpDown_Prm_MinPulse);
  222. this->tabPage_Parameters->Controls->Add(this->numericUpDown_Prm_CurPulse);
  223. this->tabPage_Parameters->Controls->Add(this->label_HRSimType);
  224. this->tabPage_Parameters->Controls->Add(this->radioButton_HRStep);
  225. this->tabPage_Parameters->Controls->Add(this->radioButton_HRSweep);
  226. this->tabPage_Parameters->Controls->Add(this->radioButton_HRFixed);
  227. this->tabPage_Parameters->Controls->Add(this->label_MaxPulse);
  228. this->tabPage_Parameters->Controls->Add(this->label_CurrentPulse);
  229. this->tabPage_Parameters->Controls->Add(this->label_MinPulse);
  230. this->tabPage_Parameters->Controls->Add(this->label_Pulse);
  231. this->tabPage_Parameters->Location = System::Drawing::Point(4, 22);
  232. this->tabPage_Parameters->Name = L"tabPage_Parameters";
  233. this->tabPage_Parameters->Padding = System::Windows::Forms::Padding(3);
  234. this->tabPage_Parameters->Size = System::Drawing::Size(389, 111);
  235. this->tabPage_Parameters->TabIndex = 0;
  236. this->tabPage_Parameters->Text = L"Parameters";
  237. this->tabPage_Parameters->UseVisualStyleBackColor = true;
  238. //
  239. // checkBox_Legacy
  240. //
  241. this->checkBox_Legacy->AutoSize = true;
  242. this->checkBox_Legacy->Location = System::Drawing::Point(170, 91);
  243. this->checkBox_Legacy->Name = L"checkBox_Legacy";
  244. this->checkBox_Legacy->Size = System::Drawing::Size(61, 17);
  245. this->checkBox_Legacy->TabIndex = 20;
  246. this->checkBox_Legacy->Text = L"Legacy";
  247. this->checkBox_Legacy->UseVisualStyleBackColor = true;
  248. this->checkBox_Legacy->CheckedChanged += gcnew System::EventHandler(this, &HRMSensor::checkBox_Legacy_CheckedChanged);
  249. //
  250. // numericUpDown_Prm_MaxPulse
  251. //
  252. this->numericUpDown_Prm_MaxPulse->Enabled = false;
  253. this->numericUpDown_Prm_MaxPulse->Location = System::Drawing::Point(108, 60);
  254. this->numericUpDown_Prm_MaxPulse->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {255, 0, 0, 0});
  255. this->numericUpDown_Prm_MaxPulse->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
  256. this->numericUpDown_Prm_MaxPulse->Name = L"numericUpDown_Prm_MaxPulse";
  257. this->numericUpDown_Prm_MaxPulse->Size = System::Drawing::Size(45, 20);
  258. this->numericUpDown_Prm_MaxPulse->TabIndex = 4;
  259. this->numericUpDown_Prm_MaxPulse->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {180, 0, 0, 0});
  260. this->numericUpDown_Prm_MaxPulse->ValueChanged += gcnew System::EventHandler(this, &HRMSensor::numericUpDown_Prm_MinMaxPulse_ValueChanged);
  261. //
  262. // checkBox_SendBasicPage
  263. //
  264. this->checkBox_SendBasicPage->AutoSize = true;
  265. this->checkBox_SendBasicPage->Location = System::Drawing::Point(25, 91);
  266. this->checkBox_SendBasicPage->Name = L"checkBox_SendBasicPage";
  267. this->checkBox_SendBasicPage->Size = System::Drawing::Size(112, 17);
  268. this->checkBox_SendBasicPage->TabIndex = 19;
  269. this->checkBox_SendBasicPage->Text = L"Minimum Data Set";
  270. this->checkBox_SendBasicPage->UseVisualStyleBackColor = true;
  271. this->checkBox_SendBasicPage->CheckedChanged += gcnew System::EventHandler(this, &HRMSensor::checkBox_SendBasicPage_CheckedChanged);
  272. //
  273. // numericUpDown_Prm_MinPulse
  274. //
  275. this->numericUpDown_Prm_MinPulse->Enabled = false;
  276. this->numericUpDown_Prm_MinPulse->Location = System::Drawing::Point(108, 9);
  277. this->numericUpDown_Prm_MinPulse->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {255, 0, 0, 0});
  278. this->numericUpDown_Prm_MinPulse->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
  279. this->numericUpDown_Prm_MinPulse->Name = L"numericUpDown_Prm_MinPulse";
  280. this->numericUpDown_Prm_MinPulse->Size = System::Drawing::Size(45, 20);
  281. this->numericUpDown_Prm_MinPulse->TabIndex = 3;
  282. this->numericUpDown_Prm_MinPulse->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {45, 0, 0, 0});
  283. this->numericUpDown_Prm_MinPulse->ValueChanged += gcnew System::EventHandler(this, &HRMSensor::numericUpDown_Prm_MinMaxPulse_ValueChanged);
  284. //
  285. // numericUpDown_Prm_CurPulse
  286. //
  287. this->numericUpDown_Prm_CurPulse->Location = System::Drawing::Point(108, 34);
  288. this->numericUpDown_Prm_CurPulse->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {255, 0, 0, 0});
  289. this->numericUpDown_Prm_CurPulse->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
  290. this->numericUpDown_Prm_CurPulse->Name = L"numericUpDown_Prm_CurPulse";
  291. this->numericUpDown_Prm_CurPulse->Size = System::Drawing::Size(45, 20);
  292. this->numericUpDown_Prm_CurPulse->TabIndex = 2;
  293. this->numericUpDown_Prm_CurPulse->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {72, 0, 0, 0});
  294. this->numericUpDown_Prm_CurPulse->ValueChanged += gcnew System::EventHandler(this, &HRMSensor::numericUpDown_Prm_CurPulse_ValueChanged);
  295. //
  296. // label_HRSimType
  297. //
  298. this->label_HRSimType->AutoSize = true;
  299. this->label_HRSimType->Location = System::Drawing::Point(193, 12);
  300. this->label_HRSimType->Name = L"label_HRSimType";
  301. this->label_HRSimType->Size = System::Drawing::Size(77, 39);
  302. this->label_HRSimType->TabIndex = 12;
  303. this->label_HRSimType->Text = L"Heart Rate\r\nSimulator Type\r\n------------------";
  304. this->label_HRSimType->TextAlign = System::Drawing::ContentAlignment::MiddleRight;
  305. //
  306. // radioButton_HRStep
  307. //
  308. this->radioButton_HRStep->AutoSize = true;
  309. this->radioButton_HRStep->Location = System::Drawing::Point(283, 59);
  310. this->radioButton_HRStep->Name = L"radioButton_HRStep";
  311. this->radioButton_HRStep->Size = System::Drawing::Size(47, 17);
  312. this->radioButton_HRStep->TabIndex = 18;
  313. this->radioButton_HRStep->Text = L"Step";
  314. this->radioButton_HRStep->UseVisualStyleBackColor = true;
  315. this->radioButton_HRStep->CheckedChanged += gcnew System::EventHandler(this, &HRMSensor::radioButton_SimTypeChanged);
  316. //
  317. // radioButton_HRSweep
  318. //
  319. this->radioButton_HRSweep->AutoSize = true;
  320. this->radioButton_HRSweep->Location = System::Drawing::Point(283, 37);
  321. this->radioButton_HRSweep->Name = L"radioButton_HRSweep";
  322. this->radioButton_HRSweep->Size = System::Drawing::Size(58, 17);
  323. this->radioButton_HRSweep->TabIndex = 16;
  324. this->radioButton_HRSweep->Text = L"Sweep";
  325. this->radioButton_HRSweep->UseVisualStyleBackColor = true;
  326. this->radioButton_HRSweep->CheckedChanged += gcnew System::EventHandler(this, &HRMSensor::radioButton_SimTypeChanged);
  327. //
  328. // radioButton_HRFixed
  329. //
  330. this->radioButton_HRFixed->AutoSize = true;
  331. this->radioButton_HRFixed->Checked = true;
  332. this->radioButton_HRFixed->Location = System::Drawing::Point(283, 14);
  333. this->radioButton_HRFixed->Name = L"radioButton_HRFixed";
  334. this->radioButton_HRFixed->Size = System::Drawing::Size(50, 17);
  335. this->radioButton_HRFixed->TabIndex = 15;
  336. this->radioButton_HRFixed->TabStop = true;
  337. this->radioButton_HRFixed->Text = L"Fixed";
  338. this->radioButton_HRFixed->UseVisualStyleBackColor = true;
  339. this->radioButton_HRFixed->CheckedChanged += gcnew System::EventHandler(this, &HRMSensor::radioButton_SimTypeChanged);
  340. //
  341. // label_MaxPulse
  342. //
  343. this->label_MaxPulse->AutoSize = true;
  344. this->label_MaxPulse->Location = System::Drawing::Point(75, 63);
  345. this->label_MaxPulse->Name = L"label_MaxPulse";
  346. this->label_MaxPulse->Size = System::Drawing::Size(27, 13);
  347. this->label_MaxPulse->TabIndex = 3;
  348. this->label_MaxPulse->Text = L"Max";
  349. //
  350. // label_CurrentPulse
  351. //
  352. this->label_CurrentPulse->AutoSize = true;
  353. this->label_CurrentPulse->Location = System::Drawing::Point(61, 37);
  354. this->label_CurrentPulse->Name = L"label_CurrentPulse";
  355. this->label_CurrentPulse->Size = System::Drawing::Size(41, 13);
  356. this->label_CurrentPulse->TabIndex = 2;
  357. this->label_CurrentPulse->Text = L"Current";
  358. //
  359. // label_MinPulse
  360. //
  361. this->label_MinPulse->AutoSize = true;
  362. this->label_MinPulse->Location = System::Drawing::Point(78, 12);
  363. this->label_MinPulse->Name = L"label_MinPulse";
  364. this->label_MinPulse->Size = System::Drawing::Size(24, 13);
  365. this->label_MinPulse->TabIndex = 1;
  366. this->label_MinPulse->Text = L"Min";
  367. //
  368. // label_Pulse
  369. //
  370. this->label_Pulse->AutoSize = true;
  371. this->label_Pulse->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Underline, System::Drawing::GraphicsUnit::Point,
  372. static_cast<System::Byte>(0)));
  373. this->label_Pulse->Location = System::Drawing::Point(22, 11);
  374. this->label_Pulse->Name = L"label_Pulse";
  375. this->label_Pulse->Size = System::Drawing::Size(36, 13);
  376. this->label_Pulse->TabIndex = 0;
  377. this->label_Pulse->Text = L"Pulse:";
  378. //
  379. // tabPage_Advanced
  380. //
  381. this->tabPage_Advanced->Controls->Add(this->button_UpdateTime);
  382. this->tabPage_Advanced->Controls->Add(this->label_SoftwareVer);
  383. this->tabPage_Advanced->Controls->Add(this->label_HardwareVer);
  384. this->tabPage_Advanced->Controls->Add(this->label_ManfID);
  385. this->tabPage_Advanced->Controls->Add(this->label_ModelNum);
  386. this->tabPage_Advanced->Controls->Add(this->label_AdvancedError);
  387. this->tabPage_Advanced->Controls->Add(this->textBox_ElpTimeChange);
  388. this->tabPage_Advanced->Controls->Add(this->textBox_SoftwareVerChange);
  389. this->tabPage_Advanced->Controls->Add(this->button_AdvancedUpdate);
  390. this->tabPage_Advanced->Controls->Add(this->textBox_HardwareVerChange);
  391. this->tabPage_Advanced->Controls->Add(this->textBox_ModelNumChange);
  392. this->tabPage_Advanced->Controls->Add(this->textBox_SerialNumChange);
  393. this->tabPage_Advanced->Controls->Add(this->textBox_ManfIDChange);
  394. this->tabPage_Advanced->Controls->Add(this->label_ElapsedSecsDisplay);
  395. this->tabPage_Advanced->Controls->Add(this->label_SerialNum);
  396. this->tabPage_Advanced->Controls->Add(this->label_ElpTime);
  397. this->tabPage_Advanced->Location = System::Drawing::Point(4, 22);
  398. this->tabPage_Advanced->Name = L"tabPage_Advanced";
  399. this->tabPage_Advanced->Padding = System::Windows::Forms::Padding(3);
  400. this->tabPage_Advanced->Size = System::Drawing::Size(389, 111);
  401. this->tabPage_Advanced->TabIndex = 1;
  402. this->tabPage_Advanced->Text = L"Advanced";
  403. this->tabPage_Advanced->UseVisualStyleBackColor = true;
  404. //
  405. // button_UpdateTime
  406. //
  407. this->button_UpdateTime->Location = System::Drawing::Point(9, 76);
  408. this->button_UpdateTime->Name = L"button_UpdateTime";
  409. this->button_UpdateTime->Size = System::Drawing::Size(97, 20);
  410. this->button_UpdateTime->TabIndex = 16;
  411. this->button_UpdateTime->Text = L"Update Time";
  412. this->button_UpdateTime->UseVisualStyleBackColor = true;
  413. this->button_UpdateTime->Click += gcnew System::EventHandler(this, &HRMSensor::button_UpdateTime_Click);
  414. //
  415. // label_SoftwareVer
  416. //
  417. this->label_SoftwareVer->AutoSize = true;
  418. this->label_SoftwareVer->Location = System::Drawing::Point(147, 83);
  419. this->label_SoftwareVer->Name = L"label_SoftwareVer";
  420. this->label_SoftwareVer->Size = System::Drawing::Size(71, 13);
  421. this->label_SoftwareVer->TabIndex = 4;
  422. this->label_SoftwareVer->Text = L"Software Ver:";
  423. //
  424. // label_HardwareVer
  425. //
  426. this->label_HardwareVer->AutoSize = true;
  427. this->label_HardwareVer->Location = System::Drawing::Point(143, 61);
  428. this->label_HardwareVer->Name = L"label_HardwareVer";
  429. this->label_HardwareVer->Size = System::Drawing::Size(75, 13);
  430. this->label_HardwareVer->TabIndex = 3;
  431. this->label_HardwareVer->Text = L"Hardware Ver:";
  432. //
  433. // label_ManfID
  434. //
  435. this->label_ManfID->AutoSize = true;
  436. this->label_ManfID->Location = System::Drawing::Point(167, 13);
  437. this->label_ManfID->Name = L"label_ManfID";
  438. this->label_ManfID->Size = System::Drawing::Size(51, 13);
  439. this->label_ManfID->TabIndex = 1;
  440. this->label_ManfID->Text = L"Manf. ID:";
  441. //
  442. // label_ModelNum
  443. //
  444. this->label_ModelNum->AutoSize = true;
  445. this->label_ModelNum->Location = System::Drawing::Point(169, 37);
  446. this->label_ModelNum->Name = L"label_ModelNum";
  447. this->label_ModelNum->Size = System::Drawing::Size(49, 13);
  448. this->label_ModelNum->TabIndex = 5;
  449. this->label_ModelNum->Text = L"Model #:";
  450. //
  451. // label_AdvancedError
  452. //
  453. this->label_AdvancedError->AutoSize = true;
  454. this->label_AdvancedError->Location = System::Drawing::Point(280, 81);
  455. this->label_AdvancedError->Name = L"label_AdvancedError";
  456. this->label_AdvancedError->Size = System::Drawing::Size(32, 13);
  457. this->label_AdvancedError->TabIndex = 20;
  458. this->label_AdvancedError->Text = L"Error:";
  459. this->label_AdvancedError->Visible = false;
  460. //
  461. // textBox_ElpTimeChange
  462. //
  463. this->textBox_ElpTimeChange->Location = System::Drawing::Point(28, 41);
  464. this->textBox_ElpTimeChange->MaxLength = 8;
  465. this->textBox_ElpTimeChange->Name = L"textBox_ElpTimeChange";
  466. this->textBox_ElpTimeChange->Size = System::Drawing::Size(63, 20);
  467. this->textBox_ElpTimeChange->TabIndex = 21;
  468. this->textBox_ElpTimeChange->Text = L"0";
  469. this->textBox_ElpTimeChange->TextAlign = System::Windows::Forms::HorizontalAlignment::Right;
  470. //
  471. // textBox_SoftwareVerChange
  472. //
  473. this->textBox_SoftwareVerChange->Location = System::Drawing::Point(233, 81);
  474. this->textBox_SoftwareVerChange->MaxLength = 3;
  475. this->textBox_SoftwareVerChange->Name = L"textBox_SoftwareVerChange";
  476. this->textBox_SoftwareVerChange->Size = System::Drawing::Size(29, 20);
  477. this->textBox_SoftwareVerChange->TabIndex = 25;
  478. this->textBox_SoftwareVerChange->Text = L"1";
  479. //
  480. // button_AdvancedUpdate
  481. //
  482. this->button_AdvancedUpdate->Location = System::Drawing::Point(283, 41);
  483. this->button_AdvancedUpdate->Name = L"button_AdvancedUpdate";
  484. this->button_AdvancedUpdate->Size = System::Drawing::Size(97, 20);
  485. this->button_AdvancedUpdate->TabIndex = 27;
  486. this->button_AdvancedUpdate->Text = L"Update Prod Info";
  487. this->button_AdvancedUpdate->UseVisualStyleBackColor = true;
  488. this->button_AdvancedUpdate->Click += gcnew System::EventHandler(this, &HRMSensor::button_AdvancedUpdate_Click);
  489. //
  490. // textBox_HardwareVerChange
  491. //
  492. this->textBox_HardwareVerChange->Location = System::Drawing::Point(233, 59);
  493. this->textBox_HardwareVerChange->MaxLength = 3;
  494. this->textBox_HardwareVerChange->Name = L"textBox_HardwareVerChange";
  495. this->textBox_HardwareVerChange->Size = System::Drawing::Size(29, 20);
  496. this->textBox_HardwareVerChange->TabIndex = 24;
  497. this->textBox_HardwareVerChange->Text = L"1";
  498. //
  499. // textBox_ModelNumChange
  500. //
  501. this->textBox_ModelNumChange->Location = System::Drawing::Point(233, 35);
  502. this->textBox_ModelNumChange->MaxLength = 3;
  503. this->textBox_ModelNumChange->Name = L"textBox_ModelNumChange";
  504. this->textBox_ModelNumChange->Size = System::Drawing::Size(29, 20);
  505. this->textBox_ModelNumChange->TabIndex = 23;
  506. this->textBox_ModelNumChange->Text = L"1";
  507. //
  508. // textBox_SerialNumChange
  509. //
  510. this->textBox_SerialNumChange->Location = System::Drawing::Point(332, 9);
  511. this->textBox_SerialNumChange->MaxLength = 5;
  512. this->textBox_SerialNumChange->Name = L"textBox_SerialNumChange";
  513. this->textBox_SerialNumChange->Size = System::Drawing::Size(49, 20);
  514. this->textBox_SerialNumChange->TabIndex = 26;
  515. this->textBox_SerialNumChange->Text = L"12345";
  516. //
  517. // textBox_ManfIDChange
  518. //
  519. this->textBox_ManfIDChange->Location = System::Drawing::Point(233, 10);
  520. this->textBox_ManfIDChange->MaxLength = 3;
  521. this->textBox_ManfIDChange->Name = L"textBox_ManfIDChange";
  522. this->textBox_ManfIDChange->Size = System::Drawing::Size(29, 20);
  523. this->textBox_ManfIDChange->TabIndex = 22;
  524. this->textBox_ManfIDChange->Text = L"123";
  525. //
  526. // label_ElapsedSecsDisplay
  527. //
  528. this->label_ElapsedSecsDisplay->Location = System::Drawing::Point(34, 23);
  529. this->label_ElapsedSecsDisplay->Name = L"label_ElapsedSecsDisplay";
  530. this->label_ElapsedSecsDisplay->Size = System::Drawing::Size(55, 13);
  531. this->label_ElapsedSecsDisplay->TabIndex = 7;
  532. this->label_ElapsedSecsDisplay->Text = L"0";
  533. this->label_ElapsedSecsDisplay->TextAlign = System::Drawing::ContentAlignment::BottomRight;
  534. //
  535. // label_SerialNum
  536. //
  537. this->label_SerialNum->AutoSize = true;
  538. this->label_SerialNum->Location = System::Drawing::Point(280, 13);
  539. this->label_SerialNum->Name = L"label_SerialNum";
  540. this->label_SerialNum->Size = System::Drawing::Size(46, 13);
  541. this->label_SerialNum->TabIndex = 2;
  542. this->label_SerialNum->Text = L"Serial #:";
  543. //
  544. // label_ElpTime
  545. //
  546. this->label_ElpTime->AutoSize = true;
  547. this->label_ElpTime->Location = System::Drawing::Point(6, 6);
  548. this->label_ElpTime->Name = L"label_ElpTime";
  549. this->label_ElpTime->Size = System::Drawing::Size(88, 13);
  550. this->label_ElpTime->TabIndex = 0;
  551. this->label_ElpTime->Text = L"Elapsed Time (s):";
  552. //
  553. // panel_Display
  554. //
  555. this->panel_Display->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
  556. this->panel_Display->Controls->Add(this->label_LastTimeDisplay);
  557. this->panel_Display->Controls->Add(this->label_LastTime);
  558. this->panel_Display->Controls->Add(this->label_CurrentTimeDisplay);
  559. this->panel_Display->Controls->Add(this->label_CurrentTime);
  560. this->panel_Display->Controls->Add(this->label_EventCount);
  561. this->panel_Display->Controls->Add(this->label_TxEventCount);
  562. this->panel_Display->Controls->Add(this->label_TranslatedDisplayLabel);
  563. this->panel_Display->Controls->Add(this->label_PulseTxd);
  564. this->panel_Display->Controls->Add(this->label_TxPulseOf);
  565. this->panel_Display->Location = System::Drawing::Point(58, 188);
  566. this->panel_Display->Name = L"panel_Display";
  567. this->panel_Display->Size = System::Drawing::Size(200, 90);
  568. this->panel_Display->TabIndex = 1;
  569. //
  570. // label_LastTimeDisplay
  571. //
  572. this->label_LastTimeDisplay->AutoSize = true;
  573. this->label_LastTimeDisplay->Location = System::Drawing::Point(140, 64);
  574. this->label_LastTimeDisplay->Name = L"label_LastTimeDisplay";
  575. this->label_LastTimeDisplay->Size = System::Drawing::Size(16, 13);
  576. this->label_LastTimeDisplay->TabIndex = 7;
  577. this->label_LastTimeDisplay->Text = L"---";
  578. //
  579. // label_LastTime
  580. //
  581. this->label_LastTime->AutoSize = true;
  582. this->label_LastTime->Location = System::Drawing::Point(40, 64);
  583. this->label_LastTime->Name = L"label_LastTime";
  584. this->label_LastTime->Size = System::Drawing::Size(94, 13);
  585. this->label_LastTime->TabIndex = 5;
  586. this->label_LastTime->Text = L"Previous 1/1024s:";
  587. //
  588. // label_CurrentTimeDisplay
  589. //
  590. this->label_CurrentTimeDisplay->AutoSize = true;
  591. this->label_CurrentTimeDisplay->Location = System::Drawing::Point(140, 51);
  592. this->label_CurrentTimeDisplay->Name = L"label_CurrentTimeDisplay";
  593. this->label_CurrentTimeDisplay->Size = System::Drawing::Size(16, 13);
  594. this->label_CurrentTimeDisplay->TabIndex = 8;
  595. this->label_CurrentTimeDisplay->Text = L"---";
  596. //
  597. // label_CurrentTime
  598. //
  599. this->label_CurrentTime->AutoSize = true;
  600. this->label_CurrentTime->Location = System::Drawing::Point(47, 51);
  601. this->label_CurrentTime->Name = L"label_CurrentTime";
  602. this->label_CurrentTime->Size = System::Drawing::Size(87, 13);
  603. this->label_CurrentTime->TabIndex = 6;
  604. this->label_CurrentTime->Text = L"Current 1/1024s:";
  605. //
  606. // label_EventCount
  607. //
  608. this->label_EventCount->AutoSize = true;
  609. this->label_EventCount->Location = System::Drawing::Point(140, 38);
  610. this->label_EventCount->Name = L"label_EventCount";
  611. this->label_EventCount->Size = System::Drawing::Size(16, 13);
  612. this->label_EventCount->TabIndex = 2;
  613. this->label_EventCount->Text = L"---";
  614. //
  615. // label_TxEventCount
  616. //
  617. this->label_TxEventCount->AutoSize = true;
  618. this->label_TxEventCount->Location = System::Drawing::Point(22, 38);
  619. this->label_TxEventCount->Name = L"label_TxEventCount";
  620. this->label_TxEventCount->Size = System::Drawing::Size(112, 13);
  621. this->label_TxEventCount->TabIndex = 0;
  622. this->label_TxEventCount->Text = L"Transmit Event Count:";
  623. //
  624. // label_TranslatedDisplayLabel
  625. //
  626. this->label_TranslatedDisplayLabel->AutoSize = true;
  627. this->label_TranslatedDisplayLabel->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Underline,
  628. System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
  629. this->label_TranslatedDisplayLabel->Location = System::Drawing::Point(2, 2);
  630. this->label_TranslatedDisplayLabel->Name = L"label_TranslatedDisplayLabel";
  631. this->label_TranslatedDisplayLabel->Size = System::Drawing::Size(139, 13);
  632. this->label_TranslatedDisplayLabel->TabIndex = 4;
  633. this->label_TranslatedDisplayLabel->Text = L"Current HRM Transmission :";
  634. //
  635. // label_PulseTxd
  636. //
  637. this->label_PulseTxd->AutoSize = true;
  638. this->label_PulseTxd->Location = System::Drawing::Point(140, 25);
  639. this->label_PulseTxd->Name = L"label_PulseTxd";
  640. this->label_PulseTxd->Size = System::Drawing::Size(16, 13);
  641. this->label_PulseTxd->TabIndex = 3;
  642. this->label_PulseTxd->Text = L"---";
  643. //
  644. // label_TxPulseOf
  645. //
  646. this->label_TxPulseOf->AutoSize = true;
  647. this->label_TxPulseOf->Location = System::Drawing::Point(26, 25);
  648. this->label_TxPulseOf->Name = L"label_TxPulseOf";
  649. this->label_TxPulseOf->Size = System::Drawing::Size(108, 13);
  650. this->label_TxPulseOf->TabIndex = 1;
  651. this->label_TxPulseOf->Text = L"Transmitting Pulse of:";
  652. //
  653. // HRMSensor
  654. //
  655. this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
  656. this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
  657. this->ClientSize = System::Drawing::Size(794, 351);
  658. this->Controls->Add(this->panel_Display);
  659. this->Controls->Add(this->panel_Settings);
  660. this->Name = L"HRMSensor";
  661. this->Text = L"HRMSensor";
  662. this->panel_Settings->ResumeLayout(false);
  663. this->tabControl_Settings->ResumeLayout(false);
  664. this->tabPage_Parameters->ResumeLayout(false);
  665. this->tabPage_Parameters->PerformLayout();
  666. (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDown_Prm_MaxPulse))->EndInit();
  667. (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDown_Prm_MinPulse))->EndInit();
  668. (cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDown_Prm_CurPulse))->EndInit();
  669. this->tabPage_Advanced->ResumeLayout(false);
  670. this->tabPage_Advanced->PerformLayout();
  671. this->panel_Display->ResumeLayout(false);
  672. this->panel_Display->PerformLayout();
  673. this->ResumeLayout(false);
  674. }
  675. #pragma endregion
  676. };