diff --git a/docs/html/annotated.html b/docs/html/annotated.html new file mode 100644 index 0000000..2691b30 --- /dev/null +++ b/docs/html/annotated.html @@ -0,0 +1,93 @@ + + + + + + + +B15F: Class List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+ + + + + + + + + + + + + +
 CB15F
 CDot
 CDriverException
 CPlottyFile
 CTimeoutException
 CUSART
 CUSARTException
 CView
 CViewInfo
 CViewMonitor
 CViewPromt
 CViewSelection
+
+
+ + + + diff --git a/docs/html/b15f_8cpp_source.html b/docs/html/b15f_8cpp_source.html new file mode 100644 index 0000000..a5975dc --- /dev/null +++ b/docs/html/b15f_8cpp_source.html @@ -0,0 +1,125 @@ + + + + + + + +B15F: drv/b15f.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
b15f.cpp
+
+
+
1 #include "b15f.h"
2 
3 B15F *B15F::instance = nullptr;
4 errorhandler_t B15F::errorhandler = nullptr;
5 
6 
7 /*************************************
8  * Grundfunktionen des B15F Treibers *
9  *************************************/
10 
12 {
13  if (!instance)
14  instance = new B15F();
15 
16  return *instance;
17 }
18 
19 void B15F::reconnect()
20 {
21  uint8_t tries = RECONNECT_TRIES;
22  while (tries--)
23  {
25  discard();
26 
27  if (testConnection())
28  return;
29  }
30 
31  abort("Verbindung kann nicht repariert werden");
32 }
33 
34 void B15F::discard(void)
35 {
36  try
37  {
38  uint8_t rq[] =
39  {
40  RQ_DISCARD
41  };
42 
43  usart.clearOutputBuffer();
44  for (uint8_t i = 0; i < 16; i++)
45  {
46  usart.transmit(&rq[0], 0, sizeof(rq)); // sende discard Befehl (verwerfe input)
47  delay_ms(4);
48  }
49  usart.clearInputBuffer();
50  }
51  catch (std::exception &ex)
52  {
53  abort(ex);
54  }
55 }
56 
58 {
59  // erzeuge zufälliges Byte
60  srand(time(NULL));
61  uint8_t dummy = rand() % 256;
62 
63  uint8_t rq[] =
64  {
65  RQ_TEST,
66  dummy
67  };
68  usart.transmit(&rq[0], 0, sizeof(rq));
69 
70  uint8_t aw[2];
71  usart.receive(&aw[0], 0, sizeof(aw));
72 
73  return aw[0] == MSG_OK && aw[1] == dummy;
74 }
75 
76 bool B15F::testIntConv()
77 {
78  srand(time(NULL));
79  uint16_t dummy = rand() % (0xFFFF / 3);
80 
81  uint8_t rq[] =
82  {
83  RQ_INT_TEST,
84  static_cast<uint8_t >(dummy & 0xFF),
85  static_cast<uint8_t >(dummy >> 8)
86  };
87  usart.transmit(&rq[0], 0, sizeof(rq));
88 
89  uint16_t aw;
90  usart.receive(reinterpret_cast<uint8_t *>(&aw), 0, sizeof(aw));
91 
92  return aw == dummy * 3;
93 }
94 
95 
96 std::vector<std::string> B15F::getBoardInfo(void)
97 {
98  std::vector<std::string> info;
99 
100  uint8_t rq[] =
101  {
102  RQ_INFO
103  };
104  usart.transmit(&rq[0], 0, sizeof(rq));
105 
106  uint8_t n;
107  usart.receive(&n, 0, sizeof(n));
108  while (n--)
109  {
110  uint8_t len;
111  usart.receive(&len, 0, sizeof(len));
112 
113  char str[len + 1];
114  str[len] = '\0';
115  usart.receive(reinterpret_cast<uint8_t *>(&str[0]), 0, len);
116 
117  info.push_back(std::string(str));
118  }
119 
120  uint8_t aw;
121  usart.receive(&aw, 0, sizeof(aw));
122  if (aw != MSG_OK)
123  abort("Board Info fehlerhalft: code " + std::to_string((int) aw));
124 
125  return info;
126 }
127 
128 void B15F::delay_ms(uint16_t ms)
129 {
130  std::this_thread::sleep_for(std::chrono::milliseconds(ms));
131 }
132 
133 void B15F::delay_us(uint16_t us)
134 {
135  std::this_thread::sleep_for(std::chrono::microseconds(us));
136 }
137 
138 void B15F::reverse(uint8_t& b)
139 {
140  b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
141  b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
142  b = (b & 0xAA) >> 1 | (b & 0x55) << 1;
143 }
144 
145 // https://stackoverflow.com/a/478960
146 std::string B15F::exec(std::string cmd)
147 {
148  std::array<char, 128> buffer;
149  std::string result;
150  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd.c_str(), "r"), pclose);
151  if (!pipe)
152  {
153  throw std::runtime_error("popen() failed!");
154  }
155  while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr)
156  {
157  result += buffer.data();
158  }
159  return result;
160 }
161 
162 void B15F::abort(std::string msg)
163 {
164  DriverException ex(msg);
165  abort(ex);
166 }
167 
168 void B15F::abort(std::exception &ex)
169 {
170  if (errorhandler)
171  errorhandler(ex);
172  else
173  {
174  std::cerr << "NOTICE: B15F::errorhandler not set" << std::endl;
175  std::cout << ex.what() << std::endl;
176  throw DriverException(ex.what());
177  }
178 }
179 
180 void B15F::setAbortHandler(errorhandler_t func)
181 {
182  errorhandler = func;
183 }
184 
185 /*************************************/
186 
187 
188 
189 /*************************
190  * Steuerbefehle für B15 *
191  *************************/
192 
194 {
195  uint8_t rq[] =
196  {
197  RQ_SELF_TEST
198  };
199  usart.transmit(&rq[0], 0, sizeof(rq));
200 
201  uint8_t aw;
202  usart.receive(&aw, 0, sizeof(aw));
203  return aw == MSG_OK;
204 }
205 
206 bool B15F::digitalWrite0(uint8_t port)
207 {
208  uint8_t rq[] =
209  {
210  RQ_DIGITAL_WRITE_0,
211  port
212  };
213  usart.transmit(&rq[0], 0, sizeof(rq));
214 
215  uint8_t aw;
216  usart.receive(&aw, 0, sizeof(aw));
217  return aw == MSG_OK;
218 }
219 
220 bool B15F::digitalWrite1(uint8_t port)
221 {
222  uint8_t rq[] =
223  {
224  RQ_DIGITAL_WRITE_1,
225  port
226  };
227  usart.transmit(&rq[0], 0, sizeof(rq));
228 
229  uint8_t aw;
230  usart.receive(&aw, 0, sizeof(aw));
231  return aw == MSG_OK;
232 }
233 
234 uint8_t B15F::digitalRead0()
235 {
236  usart.clearInputBuffer();
237  uint8_t rq[] =
238  {
239  RQ_DIGITAL_READ_0
240  };
241  usart.transmit(&rq[0], 0, sizeof(rq));
242 
243  uint8_t aw;
244  usart.receive(&aw, 0, sizeof(aw));
245  return aw;
246 }
247 
248 uint8_t B15F::digitalRead1()
249 {
250  usart.clearInputBuffer();
251  uint8_t rq[] =
252  {
253  RQ_DIGITAL_READ_1
254  };
255  usart.transmit(&rq[0], 0, sizeof(rq));
256 
257  uint8_t aw;
258  usart.receive(&aw, 0, sizeof(aw));
259  return aw;
260 }
261 
262 uint8_t B15F::readDipSwitch()
263 {
264  usart.clearInputBuffer();
265  uint8_t rq[] =
266  {
267  RQ_READ_DIP_SWITCH
268  };
269  usart.transmit(&rq[0], 0, sizeof(rq));
270 
271  uint8_t aw;
272  usart.receive(&aw, 0, sizeof(aw));
273 
274  reverse(aw); // DIP Schalter muss invertiert werden!
275 
276  return aw;
277 }
278 
279 bool B15F::analogWrite0(uint16_t value)
280 {
281  uint8_t rq[] =
282  {
283  RQ_ANALOG_WRITE_0,
284  static_cast<uint8_t >(value & 0xFF),
285  static_cast<uint8_t >(value >> 8)
286  };
287  usart.transmit(&rq[0], 0, sizeof(rq));
288 
289  uint8_t aw;
290  usart.receive(&aw, 0, sizeof(aw));
291  return aw == MSG_OK;
292 }
293 
294 bool B15F::analogWrite1(uint16_t value)
295 {
296  uint8_t rq[] =
297  {
298  RQ_ANALOG_WRITE_1,
299  static_cast<uint8_t >(value & 0xFF),
300  static_cast<uint8_t >(value >> 8)
301  };
302  usart.transmit(&rq[0], 0, sizeof(rq));
303 
304  uint8_t aw;
305  usart.receive(&aw, 0, sizeof(aw));
306  return aw == MSG_OK;
307 }
308 
309 uint16_t B15F::analogRead(uint8_t channel)
310 {
311  usart.clearInputBuffer();
312  if (channel > 7)
313  abort("Bad ADC channel: " + std::to_string(channel));
314 
315  uint8_t rq[] =
316  {
317  RQ_ANALOG_READ,
318  channel
319  };
320 
321  usart.transmit(&rq[0], 0, sizeof(rq));
322 
323  uint16_t aw;
324  usart.receive(reinterpret_cast<uint8_t *>(&aw), 0, sizeof(aw));
325 
326  if (aw > 1023)
327  abort("Bad ADC data detected (1)");
328  return aw;
329 }
330 
331 void
332 B15F::analogSequence(uint8_t channel_a, uint16_t *buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t *buffer_b,
333  uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count)
334 {
335  // prepare pointers
336  buffer_a += offset_a;
337  buffer_b += offset_b;
338 
339 
340  usart.clearInputBuffer();
341  uint8_t rq[] =
342  {
343  RQ_ADC_DAC_STROKE,
344  channel_a,
345  channel_b,
346  static_cast<uint8_t >(start & 0xFF),
347  static_cast<uint8_t >(start >> 8),
348  static_cast<uint8_t >(delta & 0xFF),
349  static_cast<uint8_t >(delta >> 8),
350  static_cast<uint8_t >(count & 0xFF),
351  static_cast<uint8_t >(count >> 8)
352  };
353 
354  usart.transmit(&rq[0], 0, sizeof(rq));
355 
356  for (uint16_t i = 0; i < count; i++)
357  {
358  if (buffer_a)
359  {
360  usart.receive(reinterpret_cast<uint8_t *>(&buffer_a[i]), 0, 2);
361 
362  if (buffer_a[i] > 1023) // check for broken usart connection
363  abort("Bad ADC data detected (2)");
364  }
365  else
366  {
367  usart.drop(2);
368  }
369 
370  if (buffer_b)
371  {
372  usart.receive(reinterpret_cast<uint8_t *>(&buffer_b[i]), 0, 2);
373 
374  if (buffer_b[i] > 1023) // check for broken usart connection
375  abort("Bad ADC data detected (3)");
376  }
377  else
378  {
379  usart.drop(2);
380  }
381  }
382 
383  uint8_t aw;
384  usart.receive(&aw, 0, sizeof(aw));
385  if(aw != MSG_OK)
386  abort("Sequenz unterbrochen");
387 }
388 
389 uint8_t B15F::pwmSetFrequency(uint32_t freq)
390 {
391  usart.clearInputBuffer();
392 
393  uint8_t rq[] =
394  {
395  RQ_PWM_SET_FREQ,
396  static_cast<uint8_t>((freq >> 0) & 0xFF),
397  static_cast<uint8_t>((freq >> 8) & 0xFF),
398  static_cast<uint8_t>((freq >> 16) & 0xFF),
399  static_cast<uint8_t>((freq >> 24) & 0xFF)
400  };
401 
402  usart.transmit(&rq[0], 0, sizeof(rq));
403 
404  uint8_t aw;
405  usart.receive(&aw, 0, sizeof(aw));
406  return aw;
407 }
408 
409 bool B15F::pwmSetValue(uint8_t value)
410 {
411  usart.clearInputBuffer();
412 
413  uint8_t rq[] =
414  {
415  RQ_PWM_SET_VALUE,
416  value
417  };
418 
419  usart.transmit(&rq[0], 0, sizeof(rq));
420 
421  uint8_t aw;
422  usart.receive(&aw, 0, sizeof(aw));
423  return aw == MSG_OK;
424 }
425 
426 bool B15F::setMem8(volatile uint16_t* adr, uint8_t val)
427 {
428  usart.clearInputBuffer();
429 
430  uint8_t rq[] =
431  {
432  RQ_SET_MEM_8,
433  static_cast<uint8_t >(reinterpret_cast<size_t>(adr) & 0xFF),
434  static_cast<uint8_t >(reinterpret_cast<size_t>(adr) >> 8),
435  val
436  };
437 
438  usart.transmit(&rq[0], 0, sizeof(rq));
439 
440  uint8_t aw;
441  usart.receive(&aw, 0, sizeof(aw));
442  return aw == val;
443 }
444 
445 uint8_t B15F::getMem8(volatile uint16_t* adr)
446 {
447  usart.clearInputBuffer();
448 
449  uint8_t rq[] =
450  {
451  RQ_GET_MEM_8,
452  static_cast<uint8_t >(reinterpret_cast<size_t>(adr) & 0xFF),
453  static_cast<uint8_t >(reinterpret_cast<size_t>(adr) >> 8)
454  };
455 
456  usart.transmit(&rq[0], 0, sizeof(rq));
457 
458  uint8_t aw;
459  usart.receive(&aw, 0, sizeof(aw));
460  return aw;
461 }
462 
463 bool B15F::setMem16(volatile uint16_t* adr, uint16_t val)
464 {
465  usart.clearInputBuffer();
466 
467  uint8_t rq[] =
468  {
469  RQ_SET_MEM_16,
470  static_cast<uint8_t >(reinterpret_cast<size_t>(adr) & 0xFF),
471  static_cast<uint8_t >(reinterpret_cast<size_t>(adr) >> 8),
472  static_cast<uint8_t >(val & 0xFF),
473  static_cast<uint8_t >(val >> 8)
474  };
475 
476  usart.transmit(&rq[0], 0, sizeof(rq));
477 
478  uint16_t aw;
479  usart.receive(reinterpret_cast<uint8_t *>(&aw), 0, sizeof(aw));
480  return aw == val;
481 }
482 
483 uint16_t B15F::getMem16(volatile uint16_t* adr)
484 {
485  usart.clearInputBuffer();
486 
487  uint8_t rq[] =
488  {
489  RQ_GET_MEM_16,
490  static_cast<uint8_t >(reinterpret_cast<size_t>(adr) & 0xFF),
491  static_cast<uint8_t >(reinterpret_cast<size_t>(adr) >> 8)
492  };
493 
494  usart.transmit(&rq[0], 0, sizeof(rq));
495 
496  uint16_t aw;
497  usart.receive(reinterpret_cast<uint8_t *>(&aw), 0, sizeof(aw));
498  return aw;
499 }
500 
501 bool B15F::setRegister(volatile uint8_t* adr, uint8_t val)
502 {
503  return setMem8(reinterpret_cast<volatile uint16_t*>(adr), val);
504 }
505 
506 uint8_t B15F::getRegister(volatile uint8_t* adr)
507 {
508  return getMem8(reinterpret_cast<volatile uint16_t*>(adr));
509 }
510 
511 /*************************/
512 
513 
514 /**********************
515  * Private Funktionen *
516  **********************/
517 
518 B15F::B15F()
519 {
520  init();
521 }
522 
523 
524 void B15F::init()
525 {
526 
527  std::string device = exec("bash -c 'ls /dev/ttyUSB*'");
528  while (device.find(' ') != std::string::npos || device.find('\n') != std::string::npos ||
529  device.find('\t') != std::string::npos)
530  device.pop_back();
531 
532  if (device.length() == 0)
533  abort("Adapter nicht gefunden");
534 
535  std::cout << PRE << "Verwende Adapter: " << device << std::endl;
536 
537 
538  std::cout << PRE << "Stelle Verbindung mit Adapter her... " << std::flush;
539  usart.setBaudrate(BAUDRATE);
540  usart.openDevice(device);
541  std::cout << "OK" << std::endl;
542 
543 
544  std::cout << PRE << "Teste Verbindung... " << std::flush;
545  uint8_t tries = 3;
546  while (tries--)
547  {
548  // verwerfe Daten, die µC noch hat
549  //discard();
550 
551  if (!testConnection())
552  continue;
553 
554  if (!testIntConv())
555  continue;
556 
557  break;
558  }
559  if (tries == 0)
560  abort("Verbindungstest fehlgeschlagen. Neueste Version im Einsatz?");
561  std::cout << "OK" << std::endl;
562 
563 
564  // Gib board info aus
565  std::vector<std::string> info = getBoardInfo();
566  std::cout << PRE << "AVR Firmware Version: " << info[0] << " um " << info[1] << " Uhr (" << info[2] << ")"
567  << std::endl;
568 }
+
B15F::exec
static std::string exec(std::string cmd)
Definition: b15f.cpp:145
+
B15F::getMem16
uint16_t getMem16(volatile uint16_t *adr)
Definition: b15f.cpp:481
+
B15F::delay_us
void delay_us(uint16_t us)
Definition: b15f.cpp:132
+
B15F::digitalRead0
uint8_t digitalRead0(void)
Definition: b15f.cpp:232
+
B15F::pwmSetFrequency
uint8_t pwmSetFrequency(uint32_t freq)
Definition: b15f.cpp:387
+
B15F::analogSequence
void analogSequence(uint8_t channel_a, uint16_t *buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t *buffer_b, uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count)
Definition: b15f.cpp:330
+
B15F::testConnection
bool testConnection(void)
Definition: b15f.cpp:56
+
B15F::readDipSwitch
uint8_t readDipSwitch(void)
Definition: b15f.cpp:260
+
B15F::getRegister
uint8_t getRegister(volatile uint8_t *adr)
Definition: b15f.cpp:504
+
B15F::delay_ms
void delay_ms(uint16_t ms)
Definition: b15f.cpp:127
+
B15F::getInstance
static B15F & getInstance(void)
Definition: b15f.cpp:10
+
B15F
Definition: b15f.h:33
+
USART::transmit
void transmit(uint8_t *buffer, uint16_t offset, uint8_t len)
Definition: usart.cpp:75
+
B15F::abort
static void abort(std::string msg)
Definition: b15f.cpp:161
+
USART::receive
void receive(uint8_t *buffer, uint16_t offset, uint8_t len)
Definition: usart.cpp:84
+
USART::clearInputBuffer
void clearInputBuffer(void)
Definition: usart.cpp:54
+
USART::clearOutputBuffer
void clearOutputBuffer(void)
Definition: usart.cpp:61
+
B15F::analogRead
uint16_t analogRead(uint8_t channel)
Definition: b15f.cpp:307
+
B15F::digitalWrite0
bool digitalWrite0(uint8_t)
Definition: b15f.cpp:204
+
B15F::PRE
const std::string PRE
B15F stdout prefix.
Definition: b15f.h:287
+
B15F::reverse
void reverse(uint8_t &b)
Definition: b15f.cpp:137
+
USART::setBaudrate
void setBaudrate(uint32_t baudrate)
Definition: usart.cpp:131
+
B15F::activateSelfTestMode
bool activateSelfTestMode(void)
Definition: b15f.cpp:191
+
B15F::getBoardInfo
std::vector< std::string > getBoardInfo(void)
Definition: b15f.cpp:95
+
B15F::RECONNECT_TIMEOUT
constexpr static uint16_t RECONNECT_TIMEOUT
Time in ms after which a reconnect attempt aborts.
Definition: b15f.h:290
+
B15F::analogWrite1
bool analogWrite1(uint16_t port)
Definition: b15f.cpp:292
+
B15F::setMem16
bool setMem16(volatile uint16_t *adr, uint16_t val)
Definition: b15f.cpp:461
+
B15F::digitalWrite1
bool digitalWrite1(uint8_t)
Definition: b15f.cpp:218
+
B15F::pwmSetValue
bool pwmSetValue(uint8_t value)
Definition: b15f.cpp:407
+
B15F::discard
void discard(void)
Definition: b15f.cpp:33
+
B15F::setRegister
bool setRegister(volatile uint8_t *adr, uint8_t val)
Definition: b15f.cpp:499
+
B15F::MSG_OK
constexpr static uint8_t MSG_OK
Value to acknowledge a received command.
Definition: b15f.h:288
+
USART::openDevice
void openDevice(std::string device)
Definition: usart.cpp:9
+
B15F::digitalRead1
uint8_t digitalRead1(void)
Definition: b15f.cpp:246
+
B15F::setMem8
bool setMem8(volatile uint16_t *adr, uint8_t val)
Definition: b15f.cpp:424
+
B15F::reconnect
void reconnect(void)
Definition: b15f.cpp:18
+
B15F::BAUDRATE
constexpr static uint32_t BAUDRATE
USART baudrate for communication with the MCU.
Definition: b15f.h:293
+
B15F::setAbortHandler
static void setAbortHandler(errorhandler_t func)
Definition: b15f.cpp:179
+
USART::drop
void drop(uint8_t len)
Definition: usart.cpp:114
+
B15F::getMem8
uint8_t getMem8(volatile uint16_t *adr)
Definition: b15f.cpp:443
+
B15F::analogWrite0
bool analogWrite0(uint16_t port)
Definition: b15f.cpp:277
+
B15F::RECONNECT_TRIES
constexpr static uint8_t RECONNECT_TRIES
Maximum count of reconnect attempts after which the driver stops.
Definition: b15f.h:292
+
B15F::testIntConv
bool testIntConv(void)
Definition: b15f.cpp:75
+
DriverException
Definition: driverexception.h:10
+ + + + diff --git a/docs/html/b15f_8h_source.html b/docs/html/b15f_8h_source.html new file mode 100644 index 0000000..e9abdb8 --- /dev/null +++ b/docs/html/b15f_8h_source.html @@ -0,0 +1,120 @@ + + + + + + + +B15F: drv/b15f.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
b15f.h
+
+
+
1 #ifndef B15F_H
2 #define B15F_H
3 
4 #include <iostream>
5 #include <bits/stdc++.h>
6 #include <string>
7 #include <fstream>
8 #include <cstdlib>
9 #include <chrono>
10 #include <cstdint>
11 #include <vector>
12 
13 #include <unistd.h>
14 #include <fcntl.h>
15 #include <sys/ioctl.h>
16 #include <termios.h>
17 
18 #include "requests.h"
19 #include "usart.h"
20 #include "driverexception.h"
21 #include "timeoutexception.h"
22 
23 // wichtig für die Register-Zugriffe
24 #define _AVR_IO_H_ 1 // Erzwinge die Inklusion
25 #include "/usr/lib/avr/include/avr/sfr_defs.h"
26 #include "/usr/lib/avr/include/avr/iom1284p.h"
27 
28 typedef std::function<void(std::exception&)> errorhandler_t;
29 
30 
33 class B15F
34 {
35 public:
36 
37  /*************************************
38  * Grundfunktionen des B15F Treibers *
39  *************************************/
40 
45  static B15F& getInstance(void);
46 
51  void reconnect(void);
52 
57  void discard(void);
58 
63  bool testConnection(void);
64 
69  bool testIntConv(void);
70 
75  std::vector<std::string> getBoardInfo(void);
76 
81  void delay_ms(uint16_t ms);
82 
87  void delay_us(uint16_t us);
88 
94  void reverse(uint8_t& b);
95 
100  static std::string exec(std::string cmd);
101 
106  static void abort(std::string msg);
107 
112  static void abort(std::exception& ex);
113 
118  static void setAbortHandler(errorhandler_t func);
119 
120  /*************************************/
121 
122 
123 
124  /*************************
125  * Steuerbefehle für B15 *
126  *************************/
127 
133  bool activateSelfTestMode(void);
134 
140  bool digitalWrite0(uint8_t);
141 
147  bool digitalWrite1(uint8_t);
148 
154  uint8_t digitalRead0(void);
155 
161  uint8_t digitalRead1(void);
162 
168  uint8_t readDipSwitch(void);
169 
175  bool analogWrite0(uint16_t port);
176 
182  bool analogWrite1(uint16_t port);
183 
189  uint16_t analogRead(uint8_t channel);
190 
206  void analogSequence(uint8_t channel_a, uint16_t* buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t* buffer_b, uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count);
207 
216  uint8_t pwmSetFrequency(uint32_t freq);
217 
223  bool pwmSetValue(uint8_t value);
224 
234  bool setMem8(volatile uint16_t* adr, uint8_t val);
235 
243  uint8_t getMem8(volatile uint16_t* adr);
244 
254  bool setMem16(volatile uint16_t* adr, uint16_t val);
255 
263  uint16_t getMem16(volatile uint16_t* adr);
264 
274  bool setRegister(volatile uint8_t* adr, uint8_t val);
275 
283  uint8_t getRegister(volatile uint8_t* adr);
284 
285  /*************************/
286 
287 
288  // CONSTANTS
289  const std::string PRE = "[B15F] ";
290  constexpr static uint8_t MSG_OK = 0xFF;
291  constexpr static uint8_t MSG_FAIL = 0xFE;
292  constexpr static uint16_t RECONNECT_TIMEOUT = 64;
293  constexpr static uint16_t WDT_TIMEOUT = 15;
294  constexpr static uint8_t RECONNECT_TRIES = 3;
295  constexpr static uint32_t BAUDRATE = 57600;
296 
297 private:
298 
302  B15F(void);
303 
308  void init(void);
309 
310  USART usart;
311  static B15F* instance;
312  static errorhandler_t errorhandler;
313 };
314 
315 #endif // B15F_H
+
B15F::exec
static std::string exec(std::string cmd)
Definition: b15f.cpp:145
+
B15F::MSG_FAIL
constexpr static uint8_t MSG_FAIL
Value to reject a received command.
Definition: b15f.h:289
+
B15F::getMem16
uint16_t getMem16(volatile uint16_t *adr)
Definition: b15f.cpp:481
+
B15F::delay_us
void delay_us(uint16_t us)
Definition: b15f.cpp:132
+
B15F::digitalRead0
uint8_t digitalRead0(void)
Definition: b15f.cpp:232
+
B15F::pwmSetFrequency
uint8_t pwmSetFrequency(uint32_t freq)
Definition: b15f.cpp:387
+
B15F::analogSequence
void analogSequence(uint8_t channel_a, uint16_t *buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t *buffer_b, uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count)
Definition: b15f.cpp:330
+
B15F::testConnection
bool testConnection(void)
Definition: b15f.cpp:56
+
B15F::readDipSwitch
uint8_t readDipSwitch(void)
Definition: b15f.cpp:260
+
B15F::getRegister
uint8_t getRegister(volatile uint8_t *adr)
Definition: b15f.cpp:504
+
B15F::delay_ms
void delay_ms(uint16_t ms)
Definition: b15f.cpp:127
+
B15F::getInstance
static B15F & getInstance(void)
Definition: b15f.cpp:10
+
B15F
Definition: b15f.h:33
+
B15F::abort
static void abort(std::string msg)
Definition: b15f.cpp:161
+
USART
Definition: usart.h:16
+
B15F::analogRead
uint16_t analogRead(uint8_t channel)
Definition: b15f.cpp:307
+
B15F::digitalWrite0
bool digitalWrite0(uint8_t)
Definition: b15f.cpp:204
+
B15F::PRE
const std::string PRE
B15F stdout prefix.
Definition: b15f.h:287
+
B15F::reverse
void reverse(uint8_t &b)
Definition: b15f.cpp:137
+
B15F::activateSelfTestMode
bool activateSelfTestMode(void)
Definition: b15f.cpp:191
+
B15F::getBoardInfo
std::vector< std::string > getBoardInfo(void)
Definition: b15f.cpp:95
+
B15F::RECONNECT_TIMEOUT
constexpr static uint16_t RECONNECT_TIMEOUT
Time in ms after which a reconnect attempt aborts.
Definition: b15f.h:290
+
B15F::analogWrite1
bool analogWrite1(uint16_t port)
Definition: b15f.cpp:292
+
B15F::setMem16
bool setMem16(volatile uint16_t *adr, uint16_t val)
Definition: b15f.cpp:461
+
B15F::digitalWrite1
bool digitalWrite1(uint8_t)
Definition: b15f.cpp:218
+
B15F::pwmSetValue
bool pwmSetValue(uint8_t value)
Definition: b15f.cpp:407
+
B15F::discard
void discard(void)
Definition: b15f.cpp:33
+
B15F::setRegister
bool setRegister(volatile uint8_t *adr, uint8_t val)
Definition: b15f.cpp:499
+
B15F::MSG_OK
constexpr static uint8_t MSG_OK
Value to acknowledge a received command.
Definition: b15f.h:288
+
B15F::digitalRead1
uint8_t digitalRead1(void)
Definition: b15f.cpp:246
+
B15F::setMem8
bool setMem8(volatile uint16_t *adr, uint8_t val)
Definition: b15f.cpp:424
+
B15F::WDT_TIMEOUT
constexpr static uint16_t WDT_TIMEOUT
Time in ms after which the watch dog timer resets the MCU.
Definition: b15f.h:291
+
B15F::reconnect
void reconnect(void)
Definition: b15f.cpp:18
+
B15F::BAUDRATE
constexpr static uint32_t BAUDRATE
USART baudrate for communication with the MCU.
Definition: b15f.h:293
+
B15F::setAbortHandler
static void setAbortHandler(errorhandler_t func)
Definition: b15f.cpp:179
+
B15F::getMem8
uint8_t getMem8(volatile uint16_t *adr)
Definition: b15f.cpp:443
+
B15F::analogWrite0
bool analogWrite0(uint16_t port)
Definition: b15f.cpp:277
+
B15F::RECONNECT_TRIES
constexpr static uint8_t RECONNECT_TRIES
Maximum count of reconnect attempts after which the driver stops.
Definition: b15f.h:292
+
B15F::testIntConv
bool testIntConv(void)
Definition: b15f.cpp:75
+ + + + diff --git a/docs/html/bc_s.png b/docs/html/bc_s.png new file mode 100644 index 0000000..224b29a Binary files /dev/null and b/docs/html/bc_s.png differ diff --git a/docs/html/bdwn.png b/docs/html/bdwn.png new file mode 100644 index 0000000..940a0b9 Binary files /dev/null and b/docs/html/bdwn.png differ diff --git a/docs/html/classB15F-members.html b/docs/html/classB15F-members.html new file mode 100644 index 0000000..6ed2de5 --- /dev/null +++ b/docs/html/classB15F-members.html @@ -0,0 +1,118 @@ + + + + + + + +B15F: Member List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
B15F Member List
+
+
+ +

This is the complete list of members for B15F, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
abort(std::string msg)B15Fstatic
abort(std::exception &ex)B15Fstatic
activateSelfTestMode(void)B15F
analogRead(uint8_t channel)B15F
analogSequence(uint8_t channel_a, uint16_t *buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t *buffer_b, uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count)B15F
analogWrite0(uint16_t port)B15F
analogWrite1(uint16_t port)B15F
BAUDRATEB15Fstatic
delay_ms(uint16_t ms)B15F
delay_us(uint16_t us)B15F
digitalRead0(void)B15F
digitalRead1(void)B15F
digitalWrite0(uint8_t)B15F
digitalWrite1(uint8_t)B15F
discard(void)B15F
exec(std::string cmd)B15Fstatic
getBoardInfo(void)B15F
getInstance(void)B15Fstatic
getMem16(volatile uint16_t *adr)B15F
getMem8(volatile uint16_t *adr)B15F
getRegister(volatile uint8_t *adr)B15F
MSG_FAILB15Fstatic
MSG_OKB15Fstatic
PREB15F
pwmSetFrequency(uint32_t freq)B15F
pwmSetValue(uint8_t value)B15F
readDipSwitch(void)B15F
reconnect(void)B15F
RECONNECT_TIMEOUTB15Fstatic
RECONNECT_TRIESB15Fstatic
reverse(uint8_t &b)B15F
setAbortHandler(errorhandler_t func)B15Fstatic
setMem16(volatile uint16_t *adr, uint16_t val)B15F
setMem8(volatile uint16_t *adr, uint8_t val)B15F
setRegister(volatile uint8_t *adr, uint8_t val)B15F
testConnection(void)B15F
testIntConv(void)B15F
WDT_TIMEOUTB15Fstatic
+ + + + diff --git a/docs/html/classB15F.html b/docs/html/classB15F.html new file mode 100644 index 0000000..668e644 --- /dev/null +++ b/docs/html/classB15F.html @@ -0,0 +1,1230 @@ + + + + + + + +B15F: B15F Class Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+Public Member Functions | +Static Public Member Functions | +Public Attributes | +Static Public Attributes | +List of all members
+
+
B15F Class Reference
+
+
+ +

#include <b15f.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

void reconnect (void)
 
void discard (void)
 
bool testConnection (void)
 
bool testIntConv (void)
 
std::vector< std::string > getBoardInfo (void)
 
void delay_ms (uint16_t ms)
 
void delay_us (uint16_t us)
 
void reverse (uint8_t &b)
 
bool activateSelfTestMode (void)
 
bool digitalWrite0 (uint8_t)
 
bool digitalWrite1 (uint8_t)
 
uint8_t digitalRead0 (void)
 
uint8_t digitalRead1 (void)
 
uint8_t readDipSwitch (void)
 
bool analogWrite0 (uint16_t port)
 
bool analogWrite1 (uint16_t port)
 
uint16_t analogRead (uint8_t channel)
 
void analogSequence (uint8_t channel_a, uint16_t *buffer_a, uint32_t offset_a, uint8_t channel_b, uint16_t *buffer_b, uint32_t offset_b, uint16_t start, int16_t delta, uint16_t count)
 
uint8_t pwmSetFrequency (uint32_t freq)
 
bool pwmSetValue (uint8_t value)
 
bool setMem8 (volatile uint16_t *adr, uint8_t val)
 
uint8_t getMem8 (volatile uint16_t *adr)
 
bool setMem16 (volatile uint16_t *adr, uint16_t val)
 
uint16_t getMem16 (volatile uint16_t *adr)
 
bool setRegister (volatile uint8_t *adr, uint8_t val)
 
uint8_t getRegister (volatile uint8_t *adr)
 
+ + + + + + + + + + + +

+Static Public Member Functions

static B15FgetInstance (void)
 
static std::string exec (std::string cmd)
 
static void abort (std::string msg)
 
static void abort (std::exception &ex)
 
static void setAbortHandler (errorhandler_t func)
 
+ + + + +

+Public Attributes

+const std::string PRE = "[B15F] "
 B15F stdout prefix.
 
+ + + + + + + + + + + + + + + + + + + +

+Static Public Attributes

+constexpr static uint8_t MSG_OK = 0xFF
 Value to acknowledge a received command.
 
+constexpr static uint8_t MSG_FAIL = 0xFE
 Value to reject a received command.
 
+constexpr static uint16_t RECONNECT_TIMEOUT = 64
 Time in ms after which a reconnect attempt aborts.
 
+constexpr static uint16_t WDT_TIMEOUT = 15
 Time in ms after which the watch dog timer resets the MCU.
 
+constexpr static uint8_t RECONNECT_TRIES = 3
 Maximum count of reconnect attempts after which the driver stops.
 
+constexpr static uint32_t BAUDRATE = 57600
 USART baudrate for communication with the MCU.
 
+

Detailed Description

+

main driver class

+ +

Definition at line 33 of file b15f.h.

+

Member Function Documentation

+ +

◆ abort() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
void B15F::abort (std::exception & ex)
+
+static
+
+

Multithread sicherer Abbruch des B15F-Treibers

Parameters
+ + +
exException als Abbruchursache
+
+
+ +

Definition at line 167 of file b15f.cpp.

+ +
+
+ +

◆ abort() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
void B15F::abort (std::string msg)
+
+static
+
+

Multithread sicherer Abbruch des B15F-Treibers

Parameters
+ + +
msgBeschreibung der Abbruchursache
+
+
+ +

Definition at line 161 of file b15f.cpp.

+ +
+
+ +

◆ activateSelfTestMode()

+ +
+
+ + + + + + + + +
bool B15F::activateSelfTestMode (void )
+
+

Versetzt das Board in den Selbsttest-Modus WICHTIG: Es darf dabei nichts an den Klemmen angeschlossen sein!

Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 191 of file b15f.cpp.

+ +
+
+ +

◆ analogRead()

+ +
+
+ + + + + + + + +
uint16_t B15F::analogRead (uint8_t channel)
+
+

Liest den Wert des Analog-Digital-Converters (ADC / ADU)

Parameters
+ + +
channelKanalwahl von 0 - 7
+
+
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 307 of file b15f.cpp.

+ +
+
+ +

◆ analogSequence()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void B15F::analogSequence (uint8_t channel_a,
uint16_t * buffer_a,
uint32_t offset_a,
uint8_t channel_b,
uint16_t * buffer_b,
uint32_t offset_b,
uint16_t start,
int16_t delta,
uint16_t count 
)
+
+

DAC 0 wird auf den Startwert gesetzt und dann schrittweise um Delta inkrementiert. Für jeden eingestelleten DAC-Wert werden zwei ADCs (channel_a und channel_b) angesprochen und die Werte übermittelt. Die Werte werden in buffer_a für Kanal a und buffer_b für Kanal b gespeichert.

Parameters
+ + + + + + + + + + +
channel_aAuswahl des ADC a, von 0 - 7
buffer_aSpeichertort für Werte des Kanals a
offset_aAnzahl an Werten des Kanals a, die im Speicher übersprungen werden sollen
channel_bAuswahl des ADC b, von 0 - 7
buffer_bSpeichertort für Werte des Kanals b
offset_bAnzahl an Werten des Kanals b, die im Speicher übersprungen werden
startStartwert des DACs
deltaSchrittweite, mit welcher der DAC inkrementiert wird
countAnzahl an Inkrementierungen
+
+
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 330 of file b15f.cpp.

+ +
+
+ +

◆ analogWrite0()

+ +
+
+ + + + + + + + +
bool B15F::analogWrite0 (uint16_t port)
+
+

Setzt den Wert des Digital-Analog-Converters (DAC / DAU) 0

Parameters
+ + +
port10-Bit Wert
+
+
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 277 of file b15f.cpp.

+ +
+
+ +

◆ analogWrite1()

+ +
+
+ + + + + + + + +
bool B15F::analogWrite1 (uint16_t port)
+
+

Setzt den Wert des Digital-Analog-Converters (DAC / DAU) 1

Parameters
+ + +
port10-Bit Wert
+
+
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 292 of file b15f.cpp.

+ +
+
+ +

◆ delay_ms()

+ +
+
+ + + + + + + + +
void B15F::delay_ms (uint16_t ms)
+
+

Lässt den Treiber für eine angegebene Zeit pausieren

Parameters
+ + +
msVerzögerung in Millisekunden
+
+
+ +

Definition at line 127 of file b15f.cpp.

+ +
+
+ +

◆ delay_us()

+ +
+
+ + + + + + + + +
void B15F::delay_us (uint16_t us)
+
+

Lässt den Treiber für eine angegebene Zeit pausieren

Parameters
+ + +
usVerzögerung in Microsekunden
+
+
+ +

Definition at line 132 of file b15f.cpp.

+ +
+
+ +

◆ digitalRead0()

+ +
+
+ + + + + + + + +
uint8_t B15F::digitalRead0 (void )
+
+

Liest den Wert des digitalen Eingabeports 0

Returns
Wert für gesamten Port
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 232 of file b15f.cpp.

+ +
+
+ +

◆ digitalRead1()

+ +
+
+ + + + + + + + +
uint8_t B15F::digitalRead1 (void )
+
+

Liest den Wert des digitalen Eingabeports 1

Returns
Wert für gesamten Port
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 246 of file b15f.cpp.

+ +
+
+ +

◆ digitalWrite0()

+ +
+
+ + + + + + + + +
bool B15F::digitalWrite0 (uint8_t port)
+
+

Setzt den Wert des digitalen Ausgabeports 0

Parameters
+ + +
portWert für gesamten Port
+
+
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 204 of file b15f.cpp.

+ +
+
+ +

◆ digitalWrite1()

+ +
+
+ + + + + + + + +
bool B15F::digitalWrite1 (uint8_t port)
+
+

Setzt den Wert des digitalen Ausgabeports 1

Parameters
+ + +
portWert für gesamten Port
+
+
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 218 of file b15f.cpp.

+ +
+
+ +

◆ discard()

+ +
+
+ + + + + + + + +
void B15F::discard (void )
+
+

Verwirft Daten im USART Puffer auf dieser Maschine und B15

Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 33 of file b15f.cpp.

+ +
+
+ +

◆ exec()

+ +
+
+ + + + + +
+ + + + + + + + +
std::string B15F::exec (std::string cmd)
+
+static
+
+

Führt ein Befehl auf dieser Maschine aus und liefert stdout zurück

Parameters
+ + +
cmdDer Befehl
+
+
+ +

Definition at line 145 of file b15f.cpp.

+ +
+
+ +

◆ getBoardInfo()

+ +
+
+ + + + + + + + +
std::vector< std::string > B15F::getBoardInfo (void )
+
+

Liefert Informationen zur aktuellen Firmware des B15

Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 95 of file b15f.cpp.

+ +
+
+ +

◆ getInstance()

+ +
+
+ + + + + +
+ + + + + + + + +
B15F & B15F::getInstance (void )
+
+static
+
+

Liefert eine Referenz zur aktuellen Treiber-Instanz, die Verbindung wird gegebenenfalls automatisch hergestellt.

Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 10 of file b15f.cpp.

+ +
+
+ +

◆ getMem16()

+ +
+
+ + + + + + + + +
uint16_t B15F::getMem16 (volatile uint16_t * adr)
+
+

Liefert den Wert einer MCU Speicherzelle der Größe 16 Bit. Diese kann ein Register oder RAM-Daten sein.

Parameters
+ + +
adrSpeicheradresse
+
+
+
Returns
Wert der Speicherzelle
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 481 of file b15f.cpp.

+ +
+
+ +

◆ getMem8()

+ +
+
+ + + + + + + + +
uint8_t B15F::getMem8 (volatile uint16_t * adr)
+
+

Liefert den Wert einer MCU Speicherzelle der Größe 8 Bit. Diese kann ein Register oder RAM-Daten sein.

Parameters
+ + +
adrSpeicheradresse
+
+
+
Returns
Wert der Speicherzelle
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 443 of file b15f.cpp.

+ +
+
+ +

◆ getRegister()

+ +
+
+ + + + + + + + +
uint8_t B15F::getRegister (volatile uint8_t * adr)
+
+

Liefert den Wert eines 8-Bit MCU Registers. Diese Funktion arbeitet analog zu getMem8(), jedoch mit einer 8-Bit Adresse.

Parameters
+ + +
adrSpeicheradresse
+
+
+
Returns
Wert des Registers
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 504 of file b15f.cpp.

+ +
+
+ +

◆ pwmSetFrequency()

+ +
+
+ + + + + + + + +
uint8_t B15F::pwmSetFrequency (uint32_t freq)
+
+

Setzt die Register so, dass näherungsweise die gewünschte Frequenz erzeugt wird. Ist freq == 0 wird PWM deaktiviert. Standardfrequenz: 31300 (empfohlen, da dann TOP == 255)

Parameters
+ + +
freqPWM Frequenz
+
+
+
Returns
Top Wert des PWM Value für die gesetzte Frequenz
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 387 of file b15f.cpp.

+ +
+
+ +

◆ pwmSetValue()

+ +
+
+ + + + + + + + +
bool B15F::pwmSetValue (uint8_t value)
+
+

Setzt den PWM Wert.

Parameters
+ + +
valuePWM Wert [0..0xFF]
+
+
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 407 of file b15f.cpp.

+ +
+
+ +

◆ readDipSwitch()

+ +
+
+ + + + + + + + +
uint8_t B15F::readDipSwitch (void )
+
+

Liest den Wert des digitalen Eingabeports, an dem der DIP-switch angeschlossen ist (S7)

Returns
Wert für gesamten Port
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 260 of file b15f.cpp.

+ +
+
+ +

◆ reconnect()

+ +
+
+ + + + + + + + +
void B15F::reconnect (void )
+
+

Versucht die Verbindung zum B15 wiederherzustellen

Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 18 of file b15f.cpp.

+ +
+
+ +

◆ reverse()

+ +
+
+ + + + + + + + +
void B15F::reverse (uint8_t & b)
+
+

Invertiert das Bitmuster eines Bytes z.B.: 10100001 --> 10000101

Parameters
+ + +
bByte, das invertiert wird
+
+
+ +

Definition at line 137 of file b15f.cpp.

+ +
+
+ +

◆ setAbortHandler()

+ +
+
+ + + + + +
+ + + + + + + + +
void B15F::setAbortHandler (errorhandler_t func)
+
+static
+
+

Setzt eine Fehlerbehandlungsroutine für den Treiberabbruch (abort)

Parameters
+ + +
funcFunktion, die Exception als Parameter bekommt
+
+
+ +

Definition at line 179 of file b15f.cpp.

+ +
+
+ +

◆ setMem16()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool B15F::setMem16 (volatile uint16_t * adr,
uint16_t val 
)
+
+

Setzt direkt den Wert einer MCU Speicherzelle der Größe 16 Bit. Diese kann ein Register oder RAM-Daten sein. Wichtig: bei einer falschen Adresse kann das Board 15 ernsthaften Schaden nehmen!

Parameters
+ + + +
adrSpeicheradresse
valNeuer Wert für die Zelle
+
+
+
Returns
true, falls Vorgang erfolgreich
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 461 of file b15f.cpp.

+ +
+
+ +

◆ setMem8()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool B15F::setMem8 (volatile uint16_t * adr,
uint8_t val 
)
+
+

Setzt direkt den Wert einer MCU Speicherzelle der Größe 8 Bit. Diese kann ein Register oder RAM-Daten sein. Wichtig: bei einer falschen Adresse kann das Board 15 ernsthaften Schaden nehmen!

Parameters
+ + + +
adrSpeicheradresse
valNeuer Wert für die Zelle
+
+
+
Returns
true, falls Vorgang erfolgreich
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 424 of file b15f.cpp.

+ +
+
+ +

◆ setRegister()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool B15F::setRegister (volatile uint8_t * adr,
uint8_t val 
)
+
+

Setzt direkt den Wert eines 8-Bit MCU Registers. Diese Funktion arbeitet analog zu setMem8(), jedoch mit einer 8-Bit Adresse. Wichtig: bei einer falschen Adresse kann das Board 15 ernsthaften Schaden nehmen!

Parameters
+ + + +
adrSpeicheradresse
valNeuer Wert für das Register
+
+
+
Returns
true, falls Vorgang erfolgreich
+
Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 499 of file b15f.cpp.

+ +
+
+ +

◆ testConnection()

+ +
+
+ + + + + + + + +
bool B15F::testConnection (void )
+
+

Testet die USART Verbindung auf Funktion

Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 56 of file b15f.cpp.

+ +
+
+ +

◆ testIntConv()

+ +
+
+ + + + + + + + +
bool B15F::testIntConv (void )
+
+

Testet die Integer Konvertierung der USART Verbindung

Exceptions
+ + +
DriverException
+
+
+ +

Definition at line 75 of file b15f.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/docs/html/classDot-members.html b/docs/html/classDot-members.html new file mode 100644 index 0000000..f5a30a8 --- /dev/null +++ b/docs/html/classDot-members.html @@ -0,0 +1,84 @@ + + + + + + + +B15F: Member List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
Dot Member List
+
+
+ +

This is the complete list of members for Dot, including all inherited members.

+ + + + + +
Dot(uint16_t x, uint16_t y, uint8_t curve)Dot
getCurve(void) constDot
getX(void) constDot
getY(void) constDot
+ + + + diff --git a/docs/html/classDot.html b/docs/html/classDot.html new file mode 100644 index 0000000..5599dbe --- /dev/null +++ b/docs/html/classDot.html @@ -0,0 +1,204 @@ + + + + + + + +B15F: Dot Class Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+Public Member Functions | +List of all members
+
+
Dot Class Reference
+
+
+ +

#include <dot.h>

+ + + + + + + + + + +

+Public Member Functions

 Dot (uint16_t x, uint16_t y, uint8_t curve)
 
uint16_t getX (void) const
 
uint16_t getY (void) const
 
uint8_t getCurve (void) const
 
+

Detailed Description

+

Immutable dot class with x and y coordinate and curve index. Dots with the same curve index get the same color by plotty.

+ +

Definition at line 12 of file dot.h.

+

Constructor & Destructor Documentation

+ +

◆ Dot()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Dot::Dot (uint16_t x,
uint16_t y,
uint8_t curve 
)
+
+

Constructor with x and y coordinate and curve index.

+ +

Definition at line 3 of file dot.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ getCurve()

+ +
+
+ + + + + + + + +
uint8_t Dot::getCurve (void ) const
+
+

Returns the curve index.

+ +

Definition at line 19 of file dot.cpp.

+ +
+
+ +

◆ getX()

+ +
+
+ + + + + + + + +
uint16_t Dot::getX (void ) const
+
+

Returns the x coordinate.

+ +

Definition at line 9 of file dot.cpp.

+ +
+
+ +

◆ getY()

+ +
+
+ + + + + + + + +
uint16_t Dot::getY (void ) const
+
+

Returns the y coordinate.

+ +

Definition at line 14 of file dot.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/docs/html/classDriverException-members.html b/docs/html/classDriverException-members.html new file mode 100644 index 0000000..bab0a2b --- /dev/null +++ b/docs/html/classDriverException-members.html @@ -0,0 +1,85 @@ + + + + + + + +B15F: Member List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
DriverException Member List
+
+
+ +

This is the complete list of members for DriverException, including all inherited members.

+ + + + + + +
DriverException(const char *message) (defined in DriverException)DriverExceptioninlineexplicit
DriverException(const std::string &message) (defined in DriverException)DriverExceptioninlineexplicit
msg_ (defined in DriverException)DriverExceptionprotected
what() const (defined in DriverException)DriverExceptioninlinevirtual
~DriverException() (defined in DriverException)DriverExceptioninlinevirtual
+ + + + diff --git a/docs/html/classDriverException.html b/docs/html/classDriverException.html new file mode 100644 index 0000000..e07842c --- /dev/null +++ b/docs/html/classDriverException.html @@ -0,0 +1,117 @@ + + + + + + + +B15F: DriverException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
DriverException Class Reference
+
+
+ +

#include <driverexception.h>

+
+ + Inheritance diagram for DriverException:
+
+
+ + + + + + + + + +

+Public Member Functions

DriverException (const char *message)
 
DriverException (const std::string &message)
 
+virtual const char * what () const throw ()
 
+ + + +

+Protected Attributes

+std::string msg_
 
+

Detailed Description

+

Exception driver problems, for instance incompatible firmware version.

+ +

Definition at line 10 of file driverexception.h.

+

The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/classDriverException.png b/docs/html/classDriverException.png new file mode 100644 index 0000000..5b60bc7 Binary files /dev/null and b/docs/html/classDriverException.png differ diff --git a/docs/html/classPlottyFile-members.html b/docs/html/classPlottyFile-members.html new file mode 100644 index 0000000..ded9b93 --- /dev/null +++ b/docs/html/classPlottyFile-members.html @@ -0,0 +1,108 @@ + + + + + + + +B15F: Member List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
PlottyFile Member List
+
+
+ +

This is the complete list of members for PlottyFile, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
addDot(Dot &dot)PlottyFile
addDot(Dot dot)PlottyFile
getDescPara(void) constPlottyFile
getDescX(void) constPlottyFile
getDescY(void) constPlottyFile
getFunctionType(void) constPlottyFile
getParaFirstCurve(void) constPlottyFile
getParaStepWidth(void) constPlottyFile
getQuadrant(void) constPlottyFile
getRefX(void) constPlottyFile
getRefY(void) constPlottyFile
getUnitPara(void) constPlottyFile
getUnitX(void) constPlottyFile
getUnitY(void) constPlottyFile
setDescPara(std::string desc_para)PlottyFile
setDescX(std::string desc_x)PlottyFile
setDescY(std::string desc_y)PlottyFile
setFunctionType(FunctionType function_type)PlottyFile
setParaFirstCurve(uint16_t para_first)PlottyFile
setParaStepWidth(uint16_t para_stepwidth)PlottyFile
setQuadrant(uint8_t quadrant)PlottyFile
setRefX(uint16_t ref_x)PlottyFile
setRefY(uint16_t ref_y)PlottyFile
setUnitPara(std::string unit_para)PlottyFile
setUnitX(std::string unit_x)PlottyFile
setUnitY(std::string unit_y)PlottyFile
startPlotty(std::string filename)PlottyFile
writeToFile(std::string filename)PlottyFile
+ + + + diff --git a/docs/html/classPlottyFile.html b/docs/html/classPlottyFile.html new file mode 100644 index 0000000..9a24386 --- /dev/null +++ b/docs/html/classPlottyFile.html @@ -0,0 +1,819 @@ + + + + + + + +B15F: PlottyFile Class Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+Public Member Functions | +List of all members
+
+
PlottyFile Class Reference
+
+
+ +

#include <plottyfile.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

void addDot (Dot &dot)
 
void addDot (Dot dot)
 
void setFunctionType (FunctionType function_type)
 
void setQuadrant (uint8_t quadrant)
 
void setRefX (uint16_t ref_x)
 
void setRefY (uint16_t ref_y)
 
void setParaFirstCurve (uint16_t para_first)
 
void setParaStepWidth (uint16_t para_stepwidth)
 
void setUnitX (std::string unit_x)
 
void setDescX (std::string desc_x)
 
void setUnitY (std::string unit_y)
 
void setDescY (std::string desc_y)
 
void setUnitPara (std::string unit_para)
 
void setDescPara (std::string desc_para)
 
FunctionType getFunctionType (void) const
 
uint8_t getQuadrant (void) const
 
uint16_t getRefX (void) const
 
uint16_t getRefY (void) const
 
uint16_t getParaFirstCurve (void) const
 
uint16_t getParaStepWidth (void) const
 
std::string getUnitX (void) const
 
std::string getDescX (void) const
 
std::string getUnitY (void) const
 
std::string getDescY (void) const
 
std::string getUnitPara (void) const
 
std::string getDescPara (void) const
 
void writeToFile (std::string filename)
 
void startPlotty (std::string filename)
 
+

Detailed Description

+

Wrapper class for convenient plot file creation, needed to display graphs using plotty.

+ +

Definition at line 20 of file plottyfile.h.

+

Member Function Documentation

+ +

◆ addDot() [1/2]

+ +
+
+ + + + + + + + +
void PlottyFile::addDot (Dotdot)
+
+

Adds a dot to the plotty file.

Parameters
+ + +
dotthe dot
+
+
+ +

Definition at line 3 of file plottyfile.cpp.

+ +
+
+ +

◆ addDot() [2/2]

+ +
+
+ + + + + + + + +
void PlottyFile::addDot (Dot dot)
+
+

Adds a dot by reference to the plotty file.

Parameters
+ + +
dotthe dot
+
+
+ +

Definition at line 8 of file plottyfile.cpp.

+ +
+
+ +

◆ getDescPara()

+ +
+
+ + + + + + + + +
std::string PlottyFile::getDescPara (void ) const
+
+
Returns
description of parameter
+ +

Definition at line 130 of file plottyfile.cpp.

+ +
+
+ +

◆ getDescX()

+ +
+
+ + + + + + + + +
std::string PlottyFile::getDescX (void ) const
+
+
Returns
description of x axis
+ +

Definition at line 110 of file plottyfile.cpp.

+ +
+
+ +

◆ getDescY()

+ +
+
+ + + + + + + + +
std::string PlottyFile::getDescY (void ) const
+
+
Returns
description of y axis
+ +

Definition at line 120 of file plottyfile.cpp.

+ +
+
+ +

◆ getFunctionType()

+ +
+
+ + + + + + + + +
FunctionType PlottyFile::getFunctionType (void ) const
+
+
Returns
the FunctionType
+ +

Definition at line 75 of file plottyfile.cpp.

+ +
+
+ +

◆ getParaFirstCurve()

+ +
+
+ + + + + + + + +
uint16_t PlottyFile::getParaFirstCurve (void ) const
+
+
Returns
initial parameter value
+ +

Definition at line 95 of file plottyfile.cpp.

+ +
+
+ +

◆ getParaStepWidth()

+ +
+
+ + + + + + + + +
uint16_t PlottyFile::getParaStepWidth (void ) const
+
+
Returns
parameter stepwith
+ +

Definition at line 100 of file plottyfile.cpp.

+ +
+
+ +

◆ getQuadrant()

+ +
+
+ + + + + + + + +
uint8_t PlottyFile::getQuadrant (void ) const
+
+
Returns
the quadrant
+ +

Definition at line 80 of file plottyfile.cpp.

+ +
+
+ +

◆ getRefX()

+ +
+
+ + + + + + + + +
uint16_t PlottyFile::getRefX (void ) const
+
+
Returns
x reference (max) value
+ +

Definition at line 85 of file plottyfile.cpp.

+ +
+
+ +

◆ getRefY()

+ +
+
+ + + + + + + + +
uint16_t PlottyFile::getRefY (void ) const
+
+
Returns
y reference (max) value
+ +

Definition at line 90 of file plottyfile.cpp.

+ +
+
+ +

◆ getUnitPara()

+ +
+
+ + + + + + + + +
std::string PlottyFile::getUnitPara (void ) const
+
+
Returns
unit of parameter
+ +

Definition at line 125 of file plottyfile.cpp.

+ +
+
+ +

◆ getUnitX()

+ +
+
+ + + + + + + + +
std::string PlottyFile::getUnitX (void ) const
+
+
Returns
unit of x axis
+ +

Definition at line 105 of file plottyfile.cpp.

+ +
+
+ +

◆ getUnitY()

+ +
+
+ + + + + + + + +
std::string PlottyFile::getUnitY (void ) const
+
+
Returns
unit of y axis
+ +

Definition at line 115 of file plottyfile.cpp.

+ +
+
+ +

◆ setDescPara()

+ +
+
+ + + + + + + + +
void PlottyFile::setDescPara (std::string desc_para)
+
+

Sets the description of the parameter.

Parameters
+ + +
para_firstdescription
+
+
+ +

Definition at line 70 of file plottyfile.cpp.

+ +
+
+ +

◆ setDescX()

+ +
+
+ + + + + + + + +
void PlottyFile::setDescX (std::string desc_x)
+
+

Sets the description of the x axis.

Parameters
+ + +
para_firstdescription
+
+
+ +

Definition at line 50 of file plottyfile.cpp.

+ +
+
+ +

◆ setDescY()

+ +
+
+ + + + + + + + +
void PlottyFile::setDescY (std::string desc_y)
+
+

Sets the description of the y axis.

Parameters
+ + +
para_firstdescription
+
+
+ +

Definition at line 60 of file plottyfile.cpp.

+ +
+
+ +

◆ setFunctionType()

+ +
+
+ + + + + + + + +
void PlottyFile::setFunctionType (FunctionType function_type)
+
+

Sets the FunctionType of this plotty file.

Parameters
+ + +
function_typeenum value
+
+
+ +

Definition at line 13 of file plottyfile.cpp.

+ +
+
+ +

◆ setParaFirstCurve()

+ +
+
+ + + + + + + + +
void PlottyFile::setParaFirstCurve (uint16_t para_first)
+
+

Sets initial value of the parameter. Gets used together with the stepwith to label the curves.

Parameters
+ + +
para_firstinitial parameter value
+
+
+ +

Definition at line 35 of file plottyfile.cpp.

+ +
+
+ +

◆ setParaStepWidth()

+ +
+
+ + + + + + + + +
void PlottyFile::setParaStepWidth (uint16_t para_stepwidth)
+
+

Sets the stepwith the parameter got increased with each curve.

Parameters
+ + +
para_firstparameter stepwith
+
+
+ +

Definition at line 40 of file plottyfile.cpp.

+ +
+
+ +

◆ setQuadrant()

+ +
+
+ + + + + + + + +
void PlottyFile::setQuadrant (uint8_t quadrant)
+
+

Sets the quadrant of this plot.

Parameters
+ + +
quadrantquadrant number (1..4)
+
+
+ +

Definition at line 18 of file plottyfile.cpp.

+ +
+
+ +

◆ setRefX()

+ +
+
+ + + + + + + + +
void PlottyFile::setRefX (uint16_t ref_x)
+
+

Sets reference (max) value of the x axis

Parameters
+ + +
ref_xreference value
+
+
+ +

Definition at line 25 of file plottyfile.cpp.

+ +
+
+ +

◆ setRefY()

+ +
+
+ + + + + + + + +
void PlottyFile::setRefY (uint16_t ref_y)
+
+

Sets reference (max) value of the y axis

Parameters
+ + +
ref_yreference value
+
+
+ +

Definition at line 30 of file plottyfile.cpp.

+ +
+
+ +

◆ setUnitPara()

+ +
+
+ + + + + + + + +
void PlottyFile::setUnitPara (std::string unit_para)
+
+

Sets the unit of the parameter.

Parameters
+ + +
para_firstunit
+
+
+ +

Definition at line 65 of file plottyfile.cpp.

+ +
+
+ +

◆ setUnitX()

+ +
+
+ + + + + + + + +
void PlottyFile::setUnitX (std::string unit_x)
+
+

Sets the unit of the x axis.

Parameters
+ + +
para_firstunit
+
+
+ +

Definition at line 45 of file plottyfile.cpp.

+ +
+
+ +

◆ setUnitY()

+ +
+
+ + + + + + + + +
void PlottyFile::setUnitY (std::string unit_y)
+
+

Sets the unit of the y axis.

Parameters
+ + +
para_firstunit
+
+
+ +

Definition at line 55 of file plottyfile.cpp.

+ +
+
+ +

◆ startPlotty()

+ +
+
+ + + + + + + + +
void PlottyFile::startPlotty (std::string filename)
+
+

Starts plotty with a plot file.

Parameters
+ + +
filenameplot path
+
+
+ +

Definition at line 196 of file plottyfile.cpp.

+ +
+
+ +

◆ writeToFile()

+ +
+
+ + + + + + + + +
void PlottyFile::writeToFile (std::string filename)
+
+

Saves the PlottyFile in a binary format, ready to open with plotty.

Parameters
+ + +
filenamedesired plot path
+
+
+ +

Definition at line 147 of file plottyfile.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/docs/html/classTimeoutException-members.html b/docs/html/classTimeoutException-members.html new file mode 100644 index 0000000..cbd10bb --- /dev/null +++ b/docs/html/classTimeoutException-members.html @@ -0,0 +1,85 @@ + + + + + + + +B15F: Member List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
TimeoutException Member List
+
+
+ +

This is the complete list of members for TimeoutException, including all inherited members.

+ + + + + + +
msgTimeoutExceptionprotected
TimeoutException(const char *message)TimeoutExceptioninlineexplicit
TimeoutException(const std::string &message)TimeoutExceptioninlineexplicit
what() constTimeoutExceptioninlinevirtual
~TimeoutException()=defaultTimeoutExceptionvirtual
+ + + + diff --git a/docs/html/classTimeoutException.html b/docs/html/classTimeoutException.html new file mode 100644 index 0000000..4f9fbc5 --- /dev/null +++ b/docs/html/classTimeoutException.html @@ -0,0 +1,247 @@ + + + + + + + +B15F: TimeoutException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
TimeoutException Class Reference
+
+
+ +

#include <timeoutexception.h>

+
+ + Inheritance diagram for TimeoutException:
+
+
+ + + + + + + + + + + +

+Public Member Functions

 TimeoutException (const char *message)
 
 TimeoutException (const std::string &message)
 
virtual ~TimeoutException ()=default
 
virtual const char * what () const throw ()
 
+ + + + +

+Protected Attributes

+std::string msg
 failure description
 
+

Detailed Description

+

Exception for USART related timeouts.

+ +

Definition at line 9 of file timeoutexception.h.

+

Constructor & Destructor Documentation

+ +

◆ TimeoutException() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
TimeoutException::TimeoutException (const char * message)
+
+inlineexplicit
+
+

Constructor

Parameters
+ + +
messageas c-string
+
+
+ +

Definition at line 16 of file timeoutexception.h.

+ +
+
+ +

◆ TimeoutException() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
TimeoutException::TimeoutException (const std::string & message)
+
+inlineexplicit
+
+

Constructor

Parameters
+ + +
messageas c++-string
+
+
+ +

Definition at line 24 of file timeoutexception.h.

+ +
+
+ +

◆ ~TimeoutException()

+ +
+
+ + + + + +
+ + + + + + + +
virtual TimeoutException::~TimeoutException ()
+
+virtualdefault
+
+

Standard-destructor

+ +
+
+

Member Function Documentation

+ +

◆ what()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + +
virtual const char* TimeoutException::what () const
throw (
)
+
+inlinevirtual
+
+

Get failure description

Returns
error message as c-string
+ +

Definition at line 37 of file timeoutexception.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/classTimeoutException.png b/docs/html/classTimeoutException.png new file mode 100644 index 0000000..d6f464d Binary files /dev/null and b/docs/html/classTimeoutException.png differ diff --git a/docs/html/classUSART-members.html b/docs/html/classUSART-members.html new file mode 100644 index 0000000..23ac216 --- /dev/null +++ b/docs/html/classUSART-members.html @@ -0,0 +1,94 @@ + + + + + + + +B15F: Member List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
USART Member List
+
+
+ +

This is the complete list of members for USART, including all inherited members.

+ + + + + + + + + + + + + + + +
clearInputBuffer(void)USART
clearOutputBuffer(void)USART
closeDevice(void)USART
drop(uint8_t len)USART
flushOutputBuffer(void)USART
getBaudrate(void)USART
getTimeout(void)USART
openDevice(std::string device)USART
receive(uint8_t *buffer, uint16_t offset, uint8_t len)USART
setBaudrate(uint32_t baudrate)USART
setTimeout(uint8_t timeout)USART
transmit(uint8_t *buffer, uint16_t offset, uint8_t len)USART
USART()=defaultUSARTexplicit
~USART(void)USARTvirtual
+ + + + diff --git a/docs/html/classUSART.html b/docs/html/classUSART.html new file mode 100644 index 0000000..7cd032b --- /dev/null +++ b/docs/html/classUSART.html @@ -0,0 +1,531 @@ + + + + + + + +B15F: USART Class Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+Public Member Functions | +List of all members
+
+
USART Class Reference
+
+
+ +

#include <usart.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 USART ()=default
 
virtual ~USART (void)
 
void openDevice (std::string device)
 
void closeDevice (void)
 
void clearInputBuffer (void)
 
void clearOutputBuffer (void)
 
void flushOutputBuffer (void)
 
void transmit (uint8_t *buffer, uint16_t offset, uint8_t len)
 
void receive (uint8_t *buffer, uint16_t offset, uint8_t len)
 
void drop (uint8_t len)
 
uint32_t getBaudrate (void)
 
uint8_t getTimeout (void)
 
void setBaudrate (uint32_t baudrate)
 
void setTimeout (uint8_t timeout)
 
+

Detailed Description

+

C++ Wrapper class for termios usart library.

+ +

Definition at line 16 of file usart.h.

+

Constructor & Destructor Documentation

+ +

◆ USART()

+ +
+
+ + + + + +
+ + + + + + + +
USART::USART ()
+
+explicitdefault
+
+

Standard-Konstruktor

+ +
+
+ +

◆ ~USART()

+ +
+
+ + + + + +
+ + + + + + + + +
USART::~USART (void )
+
+virtual
+
+

Destructor, ruft automatisch closeDevice() auf

+ +

Definition at line 4 of file usart.cpp.

+ +
+
+

Member Function Documentation

+ +

◆ clearInputBuffer()

+ +
+
+ + + + + + + + +
void USART::clearInputBuffer (void )
+
+

Verwirft Daten, die bereits im Puffer liegen, aber noch nicht gelesen wurden

Exceptions
+ + +
USARTException
+
+
+ +

Definition at line 54 of file usart.cpp.

+ +
+
+ +

◆ clearOutputBuffer()

+ +
+
+ + + + + + + + +
void USART::clearOutputBuffer (void )
+
+

Verwirft Daten, die bereits im Puffer liegen, aber noch nicht gesendet wurden

Exceptions
+ + +
USARTException
+
+
+ +

Definition at line 61 of file usart.cpp.

+ +
+
+ +

◆ closeDevice()

+ +
+
+ + + + + + + + +
void USART::closeDevice (void )
+
+

Schließt die USART Schnittstelle

Exceptions
+ + +
USARTException
+
+
+ +

Definition at line 43 of file usart.cpp.

+ +
+
+ +

◆ drop()

+ +
+
+ + + + + + + + +
void USART::drop (uint8_t len)
+
+

Receives n bytes but discards them

Parameters
+ + +
lencount of bytes to receive
+
+
+
Exceptions
+ + +
USARTException
+
+
+ +

Definition at line 114 of file usart.cpp.

+ +
+
+ +

◆ flushOutputBuffer()

+ +
+
+ + + + + + + + +
void USART::flushOutputBuffer (void )
+
+

Schreibt Daten, die bereits im Puffer liegen, aber noch nicht gesendet wurden

Exceptions
+ + +
USARTException
+
+
+ +

Definition at line 68 of file usart.cpp.

+ +
+
+ +

◆ getBaudrate()

+ +
+
+ + + + + + + + +
uint32_t USART::getBaudrate (void )
+
+

Liefert die eingestellte Baudrate Änderungen werden erst nach einem open() wirksam

+ +

Definition at line 121 of file usart.cpp.

+ +
+
+ +

◆ getTimeout()

+ +
+
+ + + + + + + + +
uint8_t USART::getTimeout (void )
+
+

Liefert den eingestellten Timeout (in Dezisekunden) Änderungen werden erst nach einem open() wirksam

+ +

Definition at line 126 of file usart.cpp.

+ +
+
+ +

◆ openDevice()

+ +
+
+ + + + + + + + +
void USART::openDevice (std::string device)
+
+

Öffnet die USART Schnittstelle

Parameters
+ + +
deviceLinux-Gerätepfad
+
+
+
Exceptions
+ + +
USARTException
+
+
+ +

Definition at line 9 of file usart.cpp.

+ +
+
+ +

◆ receive()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void USART::receive (uint8_t * buffer,
uint16_t offset,
uint8_t len 
)
+
+

Receives n bytes from USART and writes them into the buffer

Parameters
+ + + + +
buffertarget buffer
offsetin buffer (mostly 0)
lencount of bytes to receive
+
+
+
Exceptions
+ + +
USARTException
+
+
+ +

Definition at line 84 of file usart.cpp.

+ +
+
+ +

◆ setBaudrate()

+ +
+
+ + + + + + + + +
void USART::setBaudrate (uint32_t baudrate)
+
+

Setzt die Baudrate Änderungen werden erst nach openDevice() wirksam

+ +

Definition at line 131 of file usart.cpp.

+ +
+
+ +

◆ setTimeout()

+ +
+
+ + + + + + + + +
void USART::setTimeout (uint8_t timeout)
+
+

Setzt den Timeout (in Dezisekunden) Änderungen werden erst nach openDevice() wirksam

+ +

Definition at line 136 of file usart.cpp.

+ +
+
+ +

◆ transmit()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void USART::transmit (uint8_t * buffer,
uint16_t offset,
uint8_t len 
)
+
+

Sends n bytes from the buffer over USART

Parameters
+ + + + +
buffertarget buffer
offsetin buffer (mostly 0)
lencount of bytes to send
+
+
+
Exceptions
+ + +
USARTException
+
+
+ +

Definition at line 75 of file usart.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + diff --git a/docs/html/classUSARTException-members.html b/docs/html/classUSARTException-members.html new file mode 100644 index 0000000..319ec23 --- /dev/null +++ b/docs/html/classUSARTException-members.html @@ -0,0 +1,85 @@ + + + + + + + +B15F: Member List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
USARTException Member List
+
+
+ +

This is the complete list of members for USARTException, including all inherited members.

+ + + + + + +
msgUSARTExceptionprotected
USARTException(const char *message)USARTExceptioninlineexplicit
USARTException(const std::string &message)USARTExceptioninlineexplicit
what() constUSARTExceptioninlinevirtual
~USARTException()=defaultUSARTExceptionvirtual
+ + + + diff --git a/docs/html/classUSARTException.html b/docs/html/classUSARTException.html new file mode 100644 index 0000000..89036d2 --- /dev/null +++ b/docs/html/classUSARTException.html @@ -0,0 +1,247 @@ + + + + + + + +B15F: USARTException Class Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+Public Member Functions | +Protected Attributes | +List of all members
+
+
USARTException Class Reference
+
+
+ +

#include <usartexception.h>

+
+ + Inheritance diagram for USARTException:
+
+
+ + + + + + + + + + + +

+Public Member Functions

 USARTException (const char *message)
 
 USARTException (const std::string &message)
 
virtual ~USARTException ()=default
 
virtual const char * what () const throw ()
 
+ + + + +

+Protected Attributes

+std::string msg
 failure description
 
+

Detailed Description

+

Exception for USART problems, for instance buffer overflow.

+ +

Definition at line 9 of file usartexception.h.

+

Constructor & Destructor Documentation

+ +

◆ USARTException() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
USARTException::USARTException (const char * message)
+
+inlineexplicit
+
+

Constructor

Parameters
+ + +
messageas c-string
+
+
+ +

Definition at line 16 of file usartexception.h.

+ +
+
+ +

◆ USARTException() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
USARTException::USARTException (const std::string & message)
+
+inlineexplicit
+
+

Constructor

Parameters
+ + +
messageas c++-string
+
+
+ +

Definition at line 24 of file usartexception.h.

+ +
+
+ +

◆ ~USARTException()

+ +
+
+ + + + + +
+ + + + + + + +
virtual USARTException::~USARTException ()
+
+virtualdefault
+
+

Standard-destructor

+ +
+
+

Member Function Documentation

+ +

◆ what()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + +
virtual const char* USARTException::what () const
throw (
)
+
+inlinevirtual
+
+

Get failure description

Returns
error message as c-string
+ +

Definition at line 37 of file usartexception.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/docs/html/classUSARTException.png b/docs/html/classUSARTException.png new file mode 100644 index 0000000..0c9d8a0 Binary files /dev/null and b/docs/html/classUSARTException.png differ diff --git a/docs/html/classView-members.html b/docs/html/classView-members.html new file mode 100644 index 0000000..97893dd --- /dev/null +++ b/docs/html/classView-members.html @@ -0,0 +1,97 @@ + + + + + + + +B15F: Member List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
View Member List
+
+
+ +

This is the complete list of members for View, including all inherited members.

+ + + + + + + + + + + + + + + + + + +
calls (defined in View)Viewprotected
draw(void)=0 (defined in View)Viewpure virtual
getWinContext(void) (defined in View)Viewstatic
height (defined in View)Viewprotected
KEY_ENT (defined in View)Viewprotectedstatic
keypress(int &key)=0 (defined in View)Viewpure virtual
repaint(void) (defined in View)Viewvirtual
setTitle(std::string title) (defined in View)Viewvirtual
setWinContext(WINDOW *win) (defined in View)Viewstatic
start_x (defined in View)Viewprotected
start_y (defined in View)Viewprotected
str_split(const std::string &str, const std::string delim) (defined in View)Viewstatic
title (defined in View)Viewprotected
View(void) (defined in View)View
width (defined in View)Viewprotected
win (defined in View)Viewprotectedstatic
~View(void) (defined in View)Viewvirtual
+ + + + diff --git a/docs/html/classView.html b/docs/html/classView.html new file mode 100644 index 0000000..cce9df2 --- /dev/null +++ b/docs/html/classView.html @@ -0,0 +1,165 @@ + + + + + + + +B15F: View Class Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+Public Member Functions | +Static Public Member Functions | +Protected Attributes | +Static Protected Attributes | +List of all members
+
+
View Class Referenceabstract
+
+
+ +

#include <view.h>

+
+ + Inheritance diagram for View:
+
+
+ + + + + + + + + + + +

+Public Member Functions

+virtual void setTitle (std::string title)
 
+virtual void repaint (void)
 
+virtual void draw (void)=0
 
+virtual call_t keypress (int &key)=0
 
+ + + + + + + +

+Static Public Member Functions

+static void setWinContext (WINDOW *win)
 
+static WINDOW * getWinContext (void)
 
+static std::vector< std::string > str_split (const std::string &str, const std::string delim)
 
+ + + + + + + + + + + + + +

+Protected Attributes

+int width
 
+int height
 
+int start_x = 0
 
+int start_y = 0
 
+std::string title
 
+std::vector< call_t > calls
 
+ + + + + +

+Static Protected Attributes

+static WINDOW * win = nullptr
 
+constexpr static int KEY_ENT = 10
 
+

Detailed Description

+

Base class for multiple views with the ncurses user interface.

+ +

Definition at line 19 of file view.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/docs/html/classView.png b/docs/html/classView.png new file mode 100644 index 0000000..bcf3f8e Binary files /dev/null and b/docs/html/classView.png differ diff --git a/docs/html/classViewInfo-members.html b/docs/html/classViewInfo-members.html new file mode 100644 index 0000000..ad42b19 --- /dev/null +++ b/docs/html/classViewInfo-members.html @@ -0,0 +1,107 @@ + + + + + + + +B15F: Member List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
ViewInfo Member List
+
+
+ +

This is the complete list of members for ViewInfo, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
calls (defined in View)Viewprotected
close_offset_x (defined in ViewInfo)ViewInfoprotected
close_offset_y (defined in ViewInfo)ViewInfoprotected
draw(void) override (defined in ViewInfo)ViewInfovirtual
getWinContext(void) (defined in View)Viewstatic
height (defined in View)Viewprotected
KEY_ENT (defined in View)Viewprotectedstatic
keypress(int &key) override (defined in ViewInfo)ViewInfovirtual
label_close (defined in ViewInfo)ViewInfoprotected
repaint(void) (defined in View)Viewvirtual
setCall(call_t call) (defined in ViewInfo)ViewInfovirtual
setLabelClose(std::string label) (defined in ViewInfo)ViewInfovirtual
setText(std::string text) (defined in ViewInfo)ViewInfovirtual
setTitle(std::string title) (defined in View)Viewvirtual
setWinContext(WINDOW *win) (defined in View)Viewstatic
start_x (defined in View)Viewprotected
start_y (defined in View)Viewprotected
str_split(const std::string &str, const std::string delim) (defined in View)Viewstatic
text (defined in ViewInfo)ViewInfoprotected
text_offset_x (defined in ViewInfo)ViewInfoprotectedstatic
text_offset_y (defined in ViewInfo)ViewInfoprotectedstatic
title (defined in View)Viewprotected
View(void) (defined in View)View
ViewInfo(void) (defined in ViewInfo)ViewInfo
width (defined in View)Viewprotected
win (defined in View)Viewprotectedstatic
~View(void) (defined in View)Viewvirtual
+ + + + diff --git a/docs/html/classViewInfo.html b/docs/html/classViewInfo.html new file mode 100644 index 0000000..7016221 --- /dev/null +++ b/docs/html/classViewInfo.html @@ -0,0 +1,193 @@ + + + + + + + +B15F: ViewInfo Class Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+Public Member Functions | +Protected Attributes | +Static Protected Attributes | +List of all members
+
+
ViewInfo Class Reference
+
+
+ +

#include <view_info.h>

+
+ + Inheritance diagram for ViewInfo:
+
+
+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual void setText (std::string text)
 
+virtual void setLabelClose (std::string label)
 
+virtual void setCall (call_t call)
 
+virtual void draw (void) override
 
+virtual call_t keypress (int &key) override
 
- Public Member Functions inherited from View
+virtual void setTitle (std::string title)
 
+virtual void repaint (void)
 
+ + + + + + + + + + + + + + + + + + + + + + +

+Protected Attributes

+std::string text
 
+std::string label_close
 
+int close_offset_x = 0
 
+int close_offset_y = 0
 
- Protected Attributes inherited from View
+int width
 
+int height
 
+int start_x = 0
 
+int start_y = 0
 
+std::string title
 
+std::vector< call_t > calls
 
+ + + + + + + + + + +

+Static Protected Attributes

+constexpr static int text_offset_x = 2
 
+constexpr static int text_offset_y = 3
 
- Static Protected Attributes inherited from View
+static WINDOW * win = nullptr
 
+constexpr static int KEY_ENT = 10
 
+ + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from View
+static void setWinContext (WINDOW *win)
 
+static WINDOW * getWinContext (void)
 
+static std::vector< std::string > str_split (const std::string &str, const std::string delim)
 
+

Detailed Description

+

View for simple text message output.

+ +

Definition at line 8 of file view_info.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/docs/html/classViewInfo.png b/docs/html/classViewInfo.png new file mode 100644 index 0000000..aad65ce Binary files /dev/null and b/docs/html/classViewInfo.png differ diff --git a/docs/html/classViewMonitor-members.html b/docs/html/classViewMonitor-members.html new file mode 100644 index 0000000..860d56d --- /dev/null +++ b/docs/html/classViewMonitor-members.html @@ -0,0 +1,111 @@ + + + + + + + +B15F: Member List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
ViewMonitor Member List
+
+
+ +

This is the complete list of members for ViewMonitor, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
calls (defined in View)Viewprotected
close_offset_x (defined in ViewInfo)ViewInfoprotected
close_offset_y (defined in ViewInfo)ViewInfoprotected
draw(void) override (defined in ViewInfo)ViewInfovirtual
getWinContext(void) (defined in View)Viewstatic
height (defined in View)Viewprotected
KEY_ENT (defined in View)Viewprotectedstatic
keypress(int &key) override (defined in ViewMonitor)ViewMonitorvirtual
label_close (defined in ViewInfo)ViewInfoprotected
repaint(void) (defined in View)Viewvirtual
run_worker (defined in ViewMonitor)ViewMonitorprotected
setCall(call_t call) (defined in ViewInfo)ViewInfovirtual
setLabelClose(std::string label) (defined in ViewInfo)ViewInfovirtual
setText(std::string text) (defined in ViewInfo)ViewInfovirtual
setTitle(std::string title) (defined in View)Viewvirtual
setWinContext(WINDOW *win) (defined in View)Viewstatic
start_x (defined in View)Viewprotected
start_y (defined in View)Viewprotected
str_split(const std::string &str, const std::string delim) (defined in View)Viewstatic
t_worker (defined in ViewMonitor)ViewMonitorprotected
text (defined in ViewInfo)ViewInfoprotected
text_offset_x (defined in ViewInfo)ViewInfoprotectedstatic
text_offset_y (defined in ViewInfo)ViewInfoprotectedstatic
title (defined in View)Viewprotected
View(void) (defined in View)View
ViewInfo(void) (defined in ViewInfo)ViewInfo
ViewMonitor(void) (defined in ViewMonitor)ViewMonitor
width (defined in View)Viewprotected
win (defined in View)Viewprotectedstatic
worker(void) (defined in ViewMonitor)ViewMonitorprotectedvirtual
~View(void) (defined in View)Viewvirtual
+ + + + diff --git a/docs/html/classViewMonitor.html b/docs/html/classViewMonitor.html new file mode 100644 index 0000000..5f04ee9 --- /dev/null +++ b/docs/html/classViewMonitor.html @@ -0,0 +1,205 @@ + + + + + + + +B15F: ViewMonitor Class Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+Public Member Functions | +Protected Member Functions | +Protected Attributes | +List of all members
+
+
ViewMonitor Class Reference
+
+
+ +

#include <view_monitor.h>

+
+ + Inheritance diagram for ViewMonitor:
+
+
+ + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual call_t keypress (int &key) override
 
- Public Member Functions inherited from ViewInfo
+virtual void setText (std::string text)
 
+virtual void setLabelClose (std::string label)
 
+virtual void setCall (call_t call)
 
+virtual void draw (void) override
 
- Public Member Functions inherited from View
+virtual void setTitle (std::string title)
 
+virtual void repaint (void)
 
+ + + +

+Protected Member Functions

+virtual void worker (void)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Attributes

+volatile bool run_worker = true
 
+std::thread t_worker
 
- Protected Attributes inherited from ViewInfo
+std::string text
 
+std::string label_close
 
+int close_offset_x = 0
 
+int close_offset_y = 0
 
- Protected Attributes inherited from View
+int width
 
+int height
 
+int start_x = 0
 
+int start_y = 0
 
+std::string title
 
+std::vector< call_t > calls
 
+ + + + + + + + + + + + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from View
+static void setWinContext (WINDOW *win)
 
+static WINDOW * getWinContext (void)
 
+static std::vector< std::string > str_split (const std::string &str, const std::string delim)
 
- Static Protected Attributes inherited from ViewInfo
+constexpr static int text_offset_x = 2
 
+constexpr static int text_offset_y = 3
 
- Static Protected Attributes inherited from View
+static WINDOW * win = nullptr
 
+constexpr static int KEY_ENT = 10
 
+

Detailed Description

+

View to display all B15 inputs.

+ +

Definition at line 13 of file view_monitor.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/docs/html/classViewMonitor.png b/docs/html/classViewMonitor.png new file mode 100644 index 0000000..08ea716 Binary files /dev/null and b/docs/html/classViewMonitor.png differ diff --git a/docs/html/classViewPromt-members.html b/docs/html/classViewPromt-members.html new file mode 100644 index 0000000..b95ad6d --- /dev/null +++ b/docs/html/classViewPromt-members.html @@ -0,0 +1,113 @@ + + + + + + + +B15F: Member List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
ViewPromt Member List
+
+
+ +

This is the complete list of members for ViewPromt, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
button_offset_x (defined in ViewPromt)ViewPromtprotected
button_offset_y (defined in ViewPromt)ViewPromtprotected
call_confirm (defined in ViewPromt)ViewPromtprotected
calls (defined in View)Viewprotected
cancelable (defined in ViewPromt)ViewPromtprotected
draw(void) override (defined in ViewPromt)ViewPromtvirtual
getInput(void) (defined in ViewPromt)ViewPromtvirtual
getWinContext(void) (defined in View)Viewstatic
height (defined in View)Viewprotected
input (defined in ViewPromt)ViewPromtprotected
KEY_ENT (defined in View)Viewprotectedstatic
keypress(int &key) override (defined in ViewPromt)ViewPromtvirtual
label_cancel (defined in ViewPromt)ViewPromtprotected
label_confirm (defined in ViewPromt)ViewPromtprotected
message (defined in ViewPromt)ViewPromtprotected
repaint(void) (defined in View)Viewvirtual
selection (defined in ViewPromt)ViewPromtprotected
sep (defined in ViewPromt)ViewPromtprotected
setCancel(std::string name, bool cancelable) (defined in ViewPromt)ViewPromtvirtual
setConfirm(std::string name, call_t call) (defined in ViewPromt)ViewPromtvirtual
setMessage(std::string message) (defined in ViewPromt)ViewPromtvirtual
setTitle(std::string title) (defined in View)Viewvirtual
setWinContext(WINDOW *win) (defined in View)Viewstatic
start_x (defined in View)Viewprotected
start_y (defined in View)Viewprotected
str_split(const std::string &str, const std::string delim) (defined in View)Viewstatic
text_offset_x (defined in ViewPromt)ViewPromtprotectedstatic
text_offset_y (defined in ViewPromt)ViewPromtprotectedstatic
title (defined in View)Viewprotected
View(void) (defined in View)View
width (defined in View)Viewprotected
win (defined in View)Viewprotectedstatic
~View(void) (defined in View)Viewvirtual
+ + + + diff --git a/docs/html/classViewPromt.html b/docs/html/classViewPromt.html new file mode 100644 index 0000000..ca71666 --- /dev/null +++ b/docs/html/classViewPromt.html @@ -0,0 +1,213 @@ + + + + + + + +B15F: ViewPromt Class Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+Public Member Functions | +Protected Attributes | +Static Protected Attributes | +List of all members
+
+
ViewPromt Class Reference
+
+
+ +

#include <view_promt.h>

+
+ + Inheritance diagram for ViewPromt:
+
+
+ + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual void draw (void) override
 
+virtual void setMessage (std::string message)
 
+virtual void setConfirm (std::string name, call_t call)
 
+virtual void setCancel (std::string name, bool cancelable)
 
+virtual std::string getInput (void)
 
+virtual call_t keypress (int &key) override
 
- Public Member Functions inherited from View
+virtual void setTitle (std::string title)
 
+virtual void repaint (void)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Attributes

+size_t selection = 1
 
+std::string input
 
+std::string message = "Input"
 
+std::string label_confirm = "[ OK ]"
 
+std::string sep = " "
 
+std::string label_cancel = "[ Cancel ]"
 
+call_t call_confirm = nullptr
 
+bool cancelable = true
 
+int button_offset_x = 0
 
+int button_offset_y = 0
 
- Protected Attributes inherited from View
+int width
 
+int height
 
+int start_x = 0
 
+int start_y = 0
 
+std::string title
 
+std::vector< call_t > calls
 
+ + + + + + + + + + +

+Static Protected Attributes

+constexpr static int text_offset_x = 2
 
+constexpr static int text_offset_y = 2
 
- Static Protected Attributes inherited from View
+static WINDOW * win = nullptr
 
+constexpr static int KEY_ENT = 10
 
+ + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from View
+static void setWinContext (WINDOW *win)
 
+static WINDOW * getWinContext (void)
 
+static std::vector< std::string > str_split (const std::string &str, const std::string delim)
 
+

Detailed Description

+

View for basic user text input.

+ +

Definition at line 10 of file view_promt.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/docs/html/classViewPromt.png b/docs/html/classViewPromt.png new file mode 100644 index 0000000..525a1d7 Binary files /dev/null and b/docs/html/classViewPromt.png differ diff --git a/docs/html/classViewSelection-members.html b/docs/html/classViewSelection-members.html new file mode 100644 index 0000000..9f1f0a0 --- /dev/null +++ b/docs/html/classViewSelection-members.html @@ -0,0 +1,102 @@ + + + + + + + +B15F: Member List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
ViewSelection Member List
+
+
+ +

This is the complete list of members for ViewSelection, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + +
addChoice(std::string name, call_t call) (defined in ViewSelection)ViewSelectionvirtual
calls (defined in View)Viewprotected
choice_offset_x (defined in ViewSelection)ViewSelectionprotectedstatic
choice_offset_y (defined in ViewSelection)ViewSelectionprotectedstatic
choices (defined in ViewSelection)ViewSelectionprotected
draw(void) override (defined in ViewSelection)ViewSelectionvirtual
getWinContext(void) (defined in View)Viewstatic
height (defined in View)Viewprotected
KEY_ENT (defined in View)Viewprotectedstatic
keypress(int &key) override (defined in ViewSelection)ViewSelectionvirtual
repaint(void) (defined in View)Viewvirtual
selection (defined in ViewSelection)ViewSelectionprotected
setTitle(std::string title) (defined in View)Viewvirtual
setWinContext(WINDOW *win) (defined in View)Viewstatic
start_x (defined in View)Viewprotected
start_y (defined in View)Viewprotected
str_split(const std::string &str, const std::string delim) (defined in View)Viewstatic
title (defined in View)Viewprotected
View(void) (defined in View)View
width (defined in View)Viewprotected
win (defined in View)Viewprotectedstatic
~View(void) (defined in View)Viewvirtual
+ + + + diff --git a/docs/html/classViewSelection.html b/docs/html/classViewSelection.html new file mode 100644 index 0000000..8baa922 --- /dev/null +++ b/docs/html/classViewSelection.html @@ -0,0 +1,180 @@ + + + + + + + +B15F: ViewSelection Class Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+Public Member Functions | +Protected Attributes | +Static Protected Attributes | +List of all members
+
+
ViewSelection Class Reference
+
+
+ +

#include <view_selection.h>

+
+ + Inheritance diagram for ViewSelection:
+
+
+ + + + + + + + + + + + + + +

+Public Member Functions

+virtual void draw (void) override
 
+virtual void addChoice (std::string name, call_t call)
 
+virtual call_t keypress (int &key) override
 
- Public Member Functions inherited from View
+virtual void setTitle (std::string title)
 
+virtual void repaint (void)
 
+ + + + + + + + + + + + + + + + + + +

+Protected Attributes

+size_t selection = 0
 
+std::vector< std::string > choices
 
- Protected Attributes inherited from View
+int width
 
+int height
 
+int start_x = 0
 
+int start_y = 0
 
+std::string title
 
+std::vector< call_t > calls
 
+ + + + + + + + + + +

+Static Protected Attributes

+constexpr static int choice_offset_x = 2
 
+constexpr static int choice_offset_y = 3
 
- Static Protected Attributes inherited from View
+static WINDOW * win = nullptr
 
+constexpr static int KEY_ENT = 10
 
+ + + + + + + + +

+Additional Inherited Members

- Static Public Member Functions inherited from View
+static void setWinContext (WINDOW *win)
 
+static WINDOW * getWinContext (void)
 
+static std::vector< std::string > str_split (const std::string &str, const std::string delim)
 
+

Detailed Description

+

View for user selection input.

+ +

Definition at line 10 of file view_selection.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/docs/html/classViewSelection.png b/docs/html/classViewSelection.png new file mode 100644 index 0000000..53db457 Binary files /dev/null and b/docs/html/classViewSelection.png differ diff --git a/docs/html/classes.html b/docs/html/classes.html new file mode 100644 index 0000000..1c9bb5f --- /dev/null +++ b/docs/html/classes.html @@ -0,0 +1,113 @@ + + + + + + + +B15F: Class Index + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Class Index
+
+
+
b | d | p | t | u | v
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
  b  
+
DriverException   
  u  
+
ViewInfo   
  p  
+
ViewMonitor   
B15F   USART   ViewPromt   
  d  
+
PlottyFile   USARTException   ViewSelection   
  t  
+
  v  
+
Dot   
TimeoutException   View   
+
b | d | p | t | u | v
+
+ + + + diff --git a/docs/html/cli_8cpp_source.html b/docs/html/cli_8cpp_source.html new file mode 100644 index 0000000..04c3f56 --- /dev/null +++ b/docs/html/cli_8cpp_source.html @@ -0,0 +1,80 @@ + + + + + + + +B15F: cli.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
cli.cpp
+
+
+
1 //#define B15F_CLI_DEBUG
2 
3 #include <stdio.h>
4 #include <ncurses.h> // sudo apt-get install libncurses5-dev
5 #include <vector>
6 #include <string>
7 #include <iostream>
8 #include <signal.h>
9 #include <sys/ioctl.h>
10 #include <unistd.h>
11 #include <signal.h>
12 #include <future>
13 #include <thread>
14 #include <chrono>
15 #include "drv/b15f.h"
16 #include "ui/ui.h"
17 #include "ui/view_selection.h"
18 #include "ui/view_info.h"
19 #include "ui/view_monitor.h"
20 #include "ui/view_promt.h"
21 
22 constexpr uint8_t WIN_WIDTH = 80;
23 constexpr uint8_t WIN_HEIGHT = 24;
24 
25 volatile int win_changed_cooldown = 0;
26 volatile bool t_refresh_active = false;
27 
28 void signal_handler(int signal)
29 {
30  if(signal == SIGWINCH)
31  {
32  win_changed_cooldown = 10; // 100ms
33 
34  if (!t_refresh_active)
35  {
36  if(t_refresh.joinable())
37  t_refresh.join();
38  t_refresh_active = true;
39  t_refresh = std::thread([]()
40  {
41 
42  while(win_changed_cooldown--)
43  std::this_thread::sleep_for(std::chrono::milliseconds(10));
44 
45  t_refresh_active = false;
46 
47  if(win_stack.size())
48  win_stack.back()->repaint();
49 
50  });
51  }
52 
53  }
54  else if(signal == SIGINT)
55  {
56  cleanup();
57  std::cout << "SIGINT - Abbruch." << std::endl;
58  exit(EXIT_FAILURE);
59  }
60 }
61 
62 void abort_handler(std::exception& ex)
63 {
64  ViewInfo* view = new ViewInfo();
65  view->setTitle("Fehler");
66  std::string msg(ex.what());
67  msg += "\n\nBeende in 5 Sekunden.";
68  view->setText(msg.c_str());
69  view->setLabelClose("");
70  view->repaint();
71 
72  std::this_thread::sleep_for(std::chrono::milliseconds(5000));
73 
74  cleanup();
75  std::cerr << std::endl << "*** EXCEPTION ***" << std::endl << ex.what() << std::endl;
76  exit(EXIT_FAILURE);
77 }
78 
79 void init()
80 {
81  // init b15 driver
83 #ifndef B15F_CLI_DEBUG
84  std::cout << std::endl << "Starte in 3s ..." << std::endl;
85  sleep(3);
86 #endif
87  B15F::setAbortHandler(&abort_handler);
88 
89  // init all ncurses stuff
90  initscr();
91  start_color();
92  curs_set(0); // 0: invisible, 1: normal, 2: very visible
93  clear();
94  noecho();
95  cbreak(); // Line buffering disabled. pass on everything
96  mousemask(ALL_MOUSE_EVENTS, NULL);
97 
98  // connect signals to handler
99  signal(SIGWINCH, signal_handler);
100  signal(SIGINT, signal_handler);
101 
102  // set view context
103  View::setWinContext(newwin(WIN_HEIGHT, WIN_WIDTH, 0, 0));
104 }
105 
106 
107 int main()
108 {
109  init();
110 
111  int exit_code = EXIT_SUCCESS;
112 
113  show_main(0);
114 
115  cleanup();
116 
117  return exit_code;
118 }
+
ViewInfo
Definition: view_info.h:8
+
B15F::getInstance
static B15F & getInstance(void)
Definition: b15f.cpp:10
+
B15F::setAbortHandler
static void setAbortHandler(errorhandler_t func)
Definition: b15f.cpp:179
+ + + + diff --git a/docs/html/closed.png b/docs/html/closed.png new file mode 100644 index 0000000..98cc2c9 Binary files /dev/null and b/docs/html/closed.png differ diff --git a/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html b/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html new file mode 100644 index 0000000..45d394d --- /dev/null +++ b/docs/html/dir_1788f8309b1a812dcb800a185471cf6c.html @@ -0,0 +1,81 @@ + + + + + + + +B15F: ui Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ui Directory Reference
+
+
+
+ + + + diff --git a/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html b/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html new file mode 100644 index 0000000..da1db98 --- /dev/null +++ b/docs/html/dir_587c94d866dbb2f408f78cf41f9b2f8d.html @@ -0,0 +1,81 @@ + + + + + + + +B15F: drv Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
drv Directory Reference
+
+
+
+ + + + diff --git a/docs/html/doc.png b/docs/html/doc.png new file mode 100644 index 0000000..17edabf Binary files /dev/null and b/docs/html/doc.png differ diff --git a/docs/html/dot_8cpp_source.html b/docs/html/dot_8cpp_source.html new file mode 100644 index 0000000..8602bb6 --- /dev/null +++ b/docs/html/dot_8cpp_source.html @@ -0,0 +1,85 @@ + + + + + + + +B15F: drv/dot.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
dot.cpp
+
+
+
1 #include "dot.h"
2 
3 Dot::Dot(uint16_t x, uint16_t y, uint8_t curve) : x(x), y(y), curve(curve)
4 {
5  if(curve >= 64)
6  throw std::range_error("Kurvenindex muss im Bereich [0, 63] liegen");
7 }
8 
9 uint16_t Dot::getX() const
10 {
11  return x;
12 }
13 
14 uint16_t Dot::getY() const
15 {
16  return y;
17 }
18 
19 uint8_t Dot::getCurve(void) const
20 {
21  return curve;
22 }
+
Dot::getX
uint16_t getX(void) const
Definition: dot.cpp:9
+
Dot::getY
uint16_t getY(void) const
Definition: dot.cpp:14
+
Dot::getCurve
uint8_t getCurve(void) const
Definition: dot.cpp:19
+
Dot::Dot
Dot(uint16_t x, uint16_t y, uint8_t curve)
Definition: dot.cpp:3
+ + + + diff --git a/docs/html/dot_8h_source.html b/docs/html/dot_8h_source.html new file mode 100644 index 0000000..afb9290 --- /dev/null +++ b/docs/html/dot_8h_source.html @@ -0,0 +1,86 @@ + + + + + + + +B15F: drv/dot.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
dot.h
+
+
+
1 #ifndef DOT_H
2 #define DOT_H
3 
4 #include <cstdint>
5 #include <stdexcept>
6 
12 class Dot
13 {
14 public:
18  Dot(uint16_t x, uint16_t y, uint8_t curve);
19 
23  uint16_t getX(void) const;
24 
28  uint16_t getY(void) const;
29 
33  uint8_t getCurve(void) const;
34 
35 private:
36  uint16_t x, y;
37  uint8_t curve;
38 };
39 
40 
41 #endif // DOT_H
+
Dot::getX
uint16_t getX(void) const
Definition: dot.cpp:9
+
Dot
Definition: dot.h:12
+
Dot::getY
uint16_t getY(void) const
Definition: dot.cpp:14
+
Dot::getCurve
uint8_t getCurve(void) const
Definition: dot.cpp:19
+
Dot::Dot
Dot(uint16_t x, uint16_t y, uint8_t curve)
Definition: dot.cpp:3
+ + + + diff --git a/docs/html/doxygen.css b/docs/html/doxygen.css new file mode 100644 index 0000000..5bc13aa --- /dev/null +++ b/docs/html/doxygen.css @@ -0,0 +1,1766 @@ +/* The standard CSS for doxygen 1.8.16 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #FFFFFF; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #FFFFFF; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #FFFFFF; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +blockquote.DocNodeRTL { + border-left: 0; + border-right: 2px solid #9CAFD4; + margin: 0 4px 0 24px; + padding: 0 16px 0 12px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #DFE5F1; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + +} + +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.section.DocNodeRTL { + margin-right: 0px; + padding-right: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.note.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.deprecated.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.todo.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.test.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.bug.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +.PageDocRTL-title div.toc { + float: left !important; + text-align: right; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +.PageDocRTL-title div.toc li { + background-position-x: right !important; + padding-left: 0 !important; + padding-right: 10px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.PageDocRTL-title div.toc li.level1 { + margin-left: 0 !important; + margin-right: 0; +} + +.PageDocRTL-title div.toc li.level2 { + margin-left: 0 !important; + margin-right: 15px; +} + +.PageDocRTL-title div.toc li.level3 { + margin-left: 0 !important; + margin-right: 30px; +} + +.PageDocRTL-title div.toc li.level4 { + margin-left: 0 !important; + margin-right: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +/* +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTableHead tr { +} + +table.markdownTableBodyLeft td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft { + text-align: left +} + +th.markdownTableHeadRight { + text-align: right +} + +th.markdownTableHeadCenter { + text-align: center +} +*/ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +.DocNodeRTL { + text-align: right; + direction: rtl; +} + +.DocNodeLTR { + text-align: left; + direction: ltr; +} + +table.DocNodeRTL { + width: auto; + margin-right: 0; + margin-left: auto; +} + +table.DocNodeLTR { + width: auto; + margin-right: auto; + margin-left: 0; +} + +tt, code, kbd, samp +{ + display: inline-block; + direction:ltr; +} +/* @end */ + +u { + text-decoration: underline; +} + diff --git a/docs/html/doxygen.png b/docs/html/doxygen.png new file mode 100644 index 0000000..3ff17d8 Binary files /dev/null and b/docs/html/doxygen.png differ diff --git a/docs/html/driverexception_8h_source.html b/docs/html/driverexception_8h_source.html new file mode 100644 index 0000000..6109de2 --- /dev/null +++ b/docs/html/driverexception_8h_source.html @@ -0,0 +1,82 @@ + + + + + + + +B15F: drv/driverexception.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
driverexception.h
+
+
+
1 #ifndef DRIVEREXCEPTION_H
2 #define DRIVEREXCEPTION_H
3 
4 #include <exception>
5 
6 // SOURCE: https://stackoverflow.com/a/8152888
7 
10 class DriverException: public std::exception
11 {
12 public:
13  explicit DriverException(const char* message) : msg_(message)
14  {
15  }
16 
17  explicit DriverException(const std::string& message) : msg_(message)
18  {
19  }
20 
21  virtual ~DriverException() throw ()
22  {
23  }
24 
25  virtual const char* what() const throw ()
26  {
27  return msg_.c_str();
28  }
29 
30 protected:
31  std::string msg_;
32 };
33 
34 #endif // DRIVEREXCEPTION_H
35 
+
DriverException
Definition: driverexception.h:10
+ + + + diff --git a/docs/html/dynsections.js b/docs/html/dynsections.js new file mode 100644 index 0000000..c8e84aa --- /dev/null +++ b/docs/html/dynsections.js @@ -0,0 +1,127 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + + +B15F: File List + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+
[detail level 12]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
  drv
 b15f.cpp
 b15f.h
 dot.cpp
 dot.h
 driverexception.h
 plottyfile.cpp
 plottyfile.h
 requests.h
 timeoutexception.h
 usart.cpp
 usart.h
 usartexception.h
  ui
 ui.cpp
 ui.h
 view.cpp
 view.h
 view_info.cpp
 view_info.h
 view_monitor.cpp
 view_monitor.h
 view_promt.cpp
 view_promt.h
 view_selection.cpp
 view_selection.h
 cli.cpp
+
+
+ + + + diff --git a/docs/html/folderclosed.png b/docs/html/folderclosed.png new file mode 100644 index 0000000..bb8ab35 Binary files /dev/null and b/docs/html/folderclosed.png differ diff --git a/docs/html/folderopen.png b/docs/html/folderopen.png new file mode 100644 index 0000000..d6c7f67 Binary files /dev/null and b/docs/html/folderopen.png differ diff --git a/docs/html/functions.html b/docs/html/functions.html new file mode 100644 index 0000000..cb1b56b --- /dev/null +++ b/docs/html/functions.html @@ -0,0 +1,403 @@ + + + + + + + +B15F: Class Members + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+ +

- a -

+ + +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- g -

+ + +

- m -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- w -

+ + +

- ~ -

+
+ + + + diff --git a/docs/html/functions_func.html b/docs/html/functions_func.html new file mode 100644 index 0000000..bdaa77e --- /dev/null +++ b/docs/html/functions_func.html @@ -0,0 +1,370 @@ + + + + + + + +B15F: Class Members - Functions + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- a -

+ + +

- c -

+ + +

- d -

+ + +

- e -

+ + +

- f -

+ + +

- g -

+ + +

- o -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- u -

+ + +

- w -

+ + +

- ~ -

+
+ + + + diff --git a/docs/html/functions_vars.html b/docs/html/functions_vars.html new file mode 100644 index 0000000..c8b2400 --- /dev/null +++ b/docs/html/functions_vars.html @@ -0,0 +1,100 @@ + + + + + + + +B15F: Class Members - Variables + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/docs/html/hierarchy.html b/docs/html/hierarchy.html new file mode 100644 index 0000000..37f9113 --- /dev/null +++ b/docs/html/hierarchy.html @@ -0,0 +1,94 @@ + + + + + + + +B15F: Class Hierarchy + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Class Hierarchy
+
+
+
This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 123]
+ + + + + + + + + + + + + +
 CB15F
 CDot
 Cexception
 CDriverException
 CTimeoutException
 CUSARTException
 CPlottyFile
 CUSART
 CView
 CViewInfo
 CViewMonitor
 CViewPromt
 CViewSelection
+
+
+ + + + diff --git a/docs/html/index.html b/docs/html/index.html new file mode 100644 index 0000000..85b7169 --- /dev/null +++ b/docs/html/index.html @@ -0,0 +1,178 @@ + + + + + + + +B15F: B15F Benutzerhandbuch + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
B15F Benutzerhandbuch
+
+
+

Hinweise:
+ - Terminal-Befehle sind fett gedruckt
+ - Als Student/Studentin können Sie davon ausgehen, dass die Steuersoftware auf Ihrem Arbeitsplatz bereits installiert ist
+ - D.h. Sie müssen zu Beginn jeder Übung nur die Firmware neu aufspielen (Installation Abschnitt 3)
+

+

+Einführung

+

Das gesamte Softwareprojekt besteht aus zwei Teilen:
+Die Firmware ist die Software auf dem Mikrocontroller (MCU) des Board 15. Der Mikrocontroller steuert die Peripherie (ADCs, DACs, ...) über einen SPI-BUS.
+ Der zweite Teil von B15F ist die Steuersoftware, die auf dem PC ausgeführt wird. Diese sendet über eine USART-Schnittstelle (RS-232) Befehle an den Mikrocontroller.
+Die Steuersoftware besitzt ein CLI (command line interface) mit einer Benutzerschnittstelle für die einfache Fernsteuerung des B15F.
+Außerdem wird eine Bibliothek (b15fdrv) installiert, die eine einfache Entwicklung kleiner Steuerprogramme erlaubt.

+

+Installation

+

+Installation mit Installationsscript (empfohlen)

+

(a) Laden Sie das Installationsscript herunter
+ (b) Setzen Sie die Ausführungsberechtigung
+ (c) Starten Sie das Script
+

+

+Installation von Hand (falls Installationsscript mit Fehler abbricht)

+

+1. Abhängigkeiten installieren

+

(a) sudo apt-get update
+ (b) sudo apt-get install git avr-libc avrdude libncurses5-dev g++ astyle
+

+

+2. Das Repository klonen

+

(a) cd /home/famulus/
+ (b) git clone "https://github.com/devfix/b15f.git"
+

+

+3. Die Firmware installieren

+

(a) cd "/home/famulus/b15f/firmware"
+ (b) Passen Sie in der Datei Makefile die Option "MCU = ..." an die MCU des vorliegenden Boards an
+ (atmega1284 und atmega1284p sind nicht identisch!)
+ (c) make
+ Wenn udev richtig konfiguriert wurde:
+ (d I) make upload
+ Sonst:
+ (d II) sudo make upload
+

+

+4. Die Steuersoftware (Bibliothek & CLI) installieren

+

(a) cd "/home/famulus/b15f/control/src"
+ (b) make
+ (Die Warnungen durch doxygen können ignoriert werden.)

+

(c) sudo make install
+

+

+Aktualisierung

+

+Aktualisierung mit Installationsscript (empfohlen)

+

Wiederholen Sie den Schritt "Installation mit Installationsscript". Das Script erkennt die bereits installierte Version und aktualisiert diese.

+

+Aktualisierung von Hand (falls Installationsscript mit Fehler abbricht)

+

(a) cd /home/famulus/b15f/
+ (b) git pull –prune
+ (c) cd "/home/famulus/b15f/firmware"
+ (d) make clean
+ (e) cd "/home/famulus/b15f/control/src"
+ (f) make clean
+ (g) "Installation von Hand" ab Schritt 3 durchführen

+

+Die CommandLineInterface (CLI) benutzen

+

(a) Öffnen Sie ein Terminal und maximieren Sie das Fenster
+ (b) Start des CLI erfolgt durch b15fcli
+ (c) Die Navigation erfolgt durch <Tab>, die Pfeiltasten und <Enter> oder die Maus
+ (d) Mit <Strg + c> kann das Programm sofort verlassen werden

+

+Eigene Programme mit B15F schreiben

+

+Grundsätzliches

+

Verwendet wird die Bibliothekt b15fdrv. Die wichtigste Klasse für die Steuerung des Board 15 ist B15F.
+Dort befindet sich auch eine Übersicht der verfügbaren Befehle.
+

+

+Beispiele

+

In dem Verzeichnis b15f/control/examples sind einige Beispiele für die Verwendung einzelner B15F Funktionen.
+Zu jedem Beispiel gehört eine main.cpp mit dem Quellcode und eine Makefile-Datei. Durch das Makefile wird beim Kompilieren und Linken die Bibliothek b15fdrv automatisch einbezogen.
+Das Beispiel muss durch Sie also nur mit make kompiliert und mit .**/main.elf** gestartet werden.

+

+Den B15F Treiber verwenden

+

Benötigt wird der B15F-Header:
+#include <b15f/b15f.h>
+und der Header für die plottyfile-Generierung, falls mit Kennlinien gearbeitet werden soll:
+#include <b15f/plottyfile.h>

+

Für die Interaktion wird eine Referenz auf die aktuelle Treiberinstanz gespeichert:
+B15F& drv = B15F::getInstance();
+Falls noch keine existiert, wird automatisch eine erzeugt und Verbindung zum Board hergestellt.
+ Ab jetzt können auf dem Object drv verschiedene Methoden angewand werden, siehe B15F.
+

+

+Kennlinien mit plottyfile generieren

+

Die Beschreibung zu Plottyfile befindet sich hier.
+Nach dem Include von plottyfile kann ein neues Objekt erzeugt und konfiguriert werden:
+

{C++}
PlottyFile pf;
pf.setUnitX("V");
pf.setUnitY("V");
pf.setUnitPara("V");
pf.setDescX("U_{OUT}"); // Markdown wird unterstuetzt
pf.setDescY("U_{IN}");
pf.setDescPara("");
pf.setRefX(5);
pf.setRefY(5);
pf.setParaFirstCurve(0);
pf.setParaStepWidth(0);

Messpunkte können anschließend hinzugefügt werden.
+Dabei gehören Punkte mit dem gleichen Index für curve (uint8_t) zur selben Kurve und erhalten durch Plotty automatisch die gleiche Farbe.
+

{C++}
pf.addDot(Dot(x, y, curve));

Wichtig: Die Werte für x und y sind uint16_t, also keine Gleitkommazahlen. Stattdessen sind sie auf RefX und RefY bezogen.

+
+
+ + + + diff --git a/docs/html/jquery.js b/docs/html/jquery.js new file mode 100644 index 0000000..64861eb --- /dev/null +++ b/docs/html/jquery.js @@ -0,0 +1,35 @@ +/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w(" + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
plottyfile.cpp
+
+
+
1 #include "plottyfile.h"
2 
4 {
5  dots.push_back(dot);
6 }
7 
9 {
10  dots.push_back(dot);
11 }
12 
13 void PlottyFile::setFunctionType(FunctionType function_type)
14 {
15  this->function_type = function_type;
16 }
17 
18 void PlottyFile::setQuadrant(uint8_t quadrant)
19 {
20  if(quadrant < 1 || quadrant > 4)
21  throw std::range_error("Ungueltiger Quadrant");
22  this->quadrant = quadrant;
23 }
24 
25 void PlottyFile::setRefX(uint16_t ref_x)
26 {
27  this->ref_x = ref_x;
28 }
29 
30 void PlottyFile::setRefY(uint16_t ref_y)
31 {
32  this->ref_y = ref_y;
33 }
34 
35 void PlottyFile::setParaFirstCurve(uint16_t para_first)
36 {
37  this->para_first = para_first;
38 }
39 
40 void PlottyFile::setParaStepWidth(uint16_t para_stepwidth)
41 {
42  this->para_stepwidth = para_stepwidth;
43 }
44 
45 void PlottyFile::setUnitX(std::string unit_x)
46 {
47  this->unit_x = unit_x;
48 }
49 
50 void PlottyFile::setDescX(std::string desc_x)
51 {
52  this->desc_x = desc_x;
53 }
54 
55 void PlottyFile::setUnitY(std::string unit_y)
56 {
57  this->unit_y = unit_y;
58 }
59 
60 void PlottyFile::setDescY(std::string desc_y)
61 {
62  this->desc_y = desc_y;
63 }
64 
65 void PlottyFile::setUnitPara(std::string unit_para)
66 {
67  this->unit_para = unit_para;
68 }
69 
70 void PlottyFile::setDescPara(std::string desc_para)
71 {
72  this->desc_para = desc_para;
73 }
74 
75 FunctionType PlottyFile::getFunctionType() const
76 {
77  return function_type;
78 }
79 
80 uint8_t PlottyFile::getQuadrant() const
81 {
82  return quadrant;
83 }
84 
85 uint16_t PlottyFile::getRefX() const
86 {
87  return ref_x;
88 }
89 
90 uint16_t PlottyFile::getRefY() const
91 {
92  return ref_y;
93 }
94 
96 {
97  return para_first;
98 }
99 
101 {
102  return para_stepwidth;
103 }
104 
105 std::string PlottyFile::getUnitX() const
106 {
107  return unit_x;
108 }
109 
110 std::string PlottyFile::getDescX() const
111 {
112  return desc_x;
113 }
114 
115 std::string PlottyFile::getUnitY() const
116 {
117  return unit_y;
118 }
119 
120 std::string PlottyFile::getDescY() const
121 {
122  return desc_y;
123 }
124 
125 std::string PlottyFile::getUnitPara() const
126 {
127  return unit_para;
128 }
129 
130 std::string PlottyFile::getDescPara() const
131 {
132  return desc_para;
133 }
134 
135 void PlottyFile::prepStr(std::string& str, uint8_t len)
136 {
137  if(str.length() > len)
138  throw std::runtime_error("Zu grosser String.");
139 
140  if(str.length() != len)
141  str += '\n';
142 
143  while(str.length() < len)
144  str += '\0';
145 }
146 
147 void PlottyFile::writeToFile(std::string filename)
148 {
149  if(dots.empty())
150  throw std::length_error("Es wurden keine Punkte gespeichert.");
151 
152  prepStr(unit_x, STR_LEN_SHORT);
153  prepStr(desc_x, STR_LEN_LARGE);
154  prepStr(unit_y, STR_LEN_SHORT);
155  prepStr(desc_y, STR_LEN_LARGE);
156  prepStr(unit_para, STR_LEN_SHORT);
157  prepStr(desc_para, STR_LEN_LARGE);
158 
159  std::ofstream file(filename);
160 
161  // write file header
162  file.write(reinterpret_cast<char*>(&command), 1);
163  file.write(head.c_str(), head.length());
164  file.write(filetype.c_str(), filetype.length());
165  file.write(reinterpret_cast<char*>(&version), 2);
166  file.write(reinterpret_cast<char*>(&subversion), 2);
167  file.put(static_cast<uint8_t>(function_type));
168  file.write(reinterpret_cast<char*>(&quadrant), 1);
169  file.write(reinterpret_cast<char*>(&ref_x), 2);
170  file.write(reinterpret_cast<char*>(&ref_y), 2);
171  file.write(reinterpret_cast<char*>(&para_first), 2);
172  file.write(reinterpret_cast<char*>(&para_stepwidth), 2);
173  file.write(unit_x.c_str(), unit_x.length());
174  file.write(desc_x.c_str(), desc_x.length());
175  file.write(unit_y.c_str(), unit_y.length());
176  file.write(desc_y.c_str(), desc_y.length());
177  file.write(unit_para.c_str(), unit_para.length());
178  file.write(desc_para.c_str(), desc_para.length());
179  file.write(reinterpret_cast<const char*>(&eof), 1);
180 
181  // make sure header size is 256 Byte
182  while(file.tellp() < 256)
183  file.put(0);
184 
185  for(Dot& dot : dots)
186  {
187  file.put((dot.getX() >> 8) | (static_cast<uint8_t>(dot.getCurve()) << 2));
188  file.put(dot.getX() & 0xFF);
189  file.put(dot.getY() >> 8);
190  file.put(dot.getY() & 0xFF);
191  }
192 
193  file.close();
194 }
195 
196 void PlottyFile::startPlotty(std::string filename)
197 {
198  int code = system(("plotty --in " + filename).c_str());
199  if(code)
200  throw std::runtime_error("Fehler beim Aufruf von plotty");
201 }
+
void setParaStepWidth(uint16_t para_stepwidth)
Definition: plottyfile.cpp:40
+
uint8_t getQuadrant(void) const
Definition: plottyfile.cpp:80
+
void startPlotty(std::string filename)
Definition: plottyfile.cpp:196
+
void writeToFile(std::string filename)
Definition: plottyfile.cpp:147
+
void setUnitX(std::string unit_x)
Definition: plottyfile.cpp:45
+
void setUnitPara(std::string unit_para)
Definition: plottyfile.cpp:65
+
void setDescY(std::string desc_y)
Definition: plottyfile.cpp:60
+
void setQuadrant(uint8_t quadrant)
Definition: plottyfile.cpp:18
+
std::string getDescY(void) const
Definition: plottyfile.cpp:120
+
void setRefY(uint16_t ref_y)
Definition: plottyfile.cpp:30
+
std::string getDescX(void) const
Definition: plottyfile.cpp:110
+
void setFunctionType(FunctionType function_type)
Definition: plottyfile.cpp:13
+
void setDescX(std::string desc_x)
Definition: plottyfile.cpp:50
+
Definition: dot.h:12
+
void setRefX(uint16_t ref_x)
Definition: plottyfile.cpp:25
+
void setUnitY(std::string unit_y)
Definition: plottyfile.cpp:55
+
void addDot(Dot &dot)
Definition: plottyfile.cpp:3
+
void setDescPara(std::string desc_para)
Definition: plottyfile.cpp:70
+
uint16_t getParaStepWidth(void) const
Definition: plottyfile.cpp:100
+
std::string getDescPara(void) const
Definition: plottyfile.cpp:130
+
void setParaFirstCurve(uint16_t para_first)
Definition: plottyfile.cpp:35
+
std::string getUnitY(void) const
Definition: plottyfile.cpp:115
+
uint16_t getParaFirstCurve(void) const
Definition: plottyfile.cpp:95
+
uint16_t getRefX(void) const
Definition: plottyfile.cpp:85
+
std::string getUnitPara(void) const
Definition: plottyfile.cpp:125
+
FunctionType getFunctionType(void) const
Definition: plottyfile.cpp:75
+
uint16_t getRefY(void) const
Definition: plottyfile.cpp:90
+
std::string getUnitX(void) const
Definition: plottyfile.cpp:105
+ + + + diff --git a/docs/html/plottyfile_8h_source.html b/docs/html/plottyfile_8h_source.html new file mode 100644 index 0000000..d8ee077 --- /dev/null +++ b/docs/html/plottyfile_8h_source.html @@ -0,0 +1,110 @@ + + + + + + + +B15F: drv/plottyfile.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
plottyfile.h
+
+
+
1 #ifndef PLOTTYFILE_H
2 #define PLOTTYFILE_H
3 
4 #include <iostream>
5 #include <fstream>
6 #include <exception>
7 #include <vector>
8 #include <stdexcept>
9 #include "dot.h"
10 
11 enum FunctionType
12 {
13  CurveFamily = 'S',
14  Curve = 'C',
15  Level = 'P'
16 };
17 
21 {
22 public:
27  void addDot(Dot& dot);
28 
33  void addDot(Dot dot);
34 
39  void setFunctionType(FunctionType function_type);
40 
45  void setQuadrant(uint8_t quadrant);
46 
51  void setRefX(uint16_t ref_x);
52 
57  void setRefY(uint16_t ref_y);
58 
64  void setParaFirstCurve(uint16_t para_first);
65 
70  void setParaStepWidth(uint16_t para_stepwidth);
71 
76  void setUnitX(std::string unit_x);
77 
82  void setDescX(std::string desc_x);
83 
88  void setUnitY(std::string unit_y);
89 
94  void setDescY(std::string desc_y);
95 
100  void setUnitPara(std::string unit_para);
105  void setDescPara(std::string desc_para);
106 
107 
108 
112  FunctionType getFunctionType(void) const;
113 
117  uint8_t getQuadrant(void) const;
118 
122  uint16_t getRefX(void) const;
123 
127  uint16_t getRefY(void) const;
128 
132  uint16_t getParaFirstCurve(void) const;
133 
137  uint16_t getParaStepWidth(void) const;
138 
142  std::string getUnitX(void) const;
143 
147  std::string getDescX(void) const;
148 
152  std::string getUnitY(void) const;
153 
157  std::string getDescY(void) const;
158 
162  std::string getUnitPara(void) const;
163 
167  std::string getDescPara(void) const;
168 
169 
174  void writeToFile(std::string filename);
175 
180  void startPlotty(std::string filename);
181 private:
182  void prepStr(std::string& str, uint8_t len);
183 
184  std::vector<Dot> dots;
185 
186  int8_t command = 0x1D;
187  const std::string head = "HTWK-HWLab";
188  const std::string filetype = "MD";
189  int16_t version = 1;
190  int16_t subversion = 0;
191  FunctionType function_type = FunctionType::Curve;
192  uint8_t quadrant = 1;
193  uint16_t ref_x = 1023;
194  uint16_t ref_y = 1023;
195  uint16_t para_first = 1;
196  uint16_t para_stepwidth = 1;
197  std::string unit_x;
198  std::string desc_x;
199  std::string unit_y;
200  std::string desc_y;
201  std::string unit_para;
202  std::string desc_para;
203  const uint8_t eof = 0xD;
204 
205  constexpr static uint8_t STR_LEN_SHORT = 10;
206  constexpr static uint8_t STR_LEN_LARGE = 20;
207 };
208 
209 #endif // PLOTTYFILE_H
+
void setParaStepWidth(uint16_t para_stepwidth)
Definition: plottyfile.cpp:40
+
uint8_t getQuadrant(void) const
Definition: plottyfile.cpp:80
+
void startPlotty(std::string filename)
Definition: plottyfile.cpp:196
+
void writeToFile(std::string filename)
Definition: plottyfile.cpp:147
+
void setUnitX(std::string unit_x)
Definition: plottyfile.cpp:45
+
void setUnitPara(std::string unit_para)
Definition: plottyfile.cpp:65
+
void setDescY(std::string desc_y)
Definition: plottyfile.cpp:60
+
void setQuadrant(uint8_t quadrant)
Definition: plottyfile.cpp:18
+
std::string getDescY(void) const
Definition: plottyfile.cpp:120
+ +
void setRefY(uint16_t ref_y)
Definition: plottyfile.cpp:30
+
std::string getDescX(void) const
Definition: plottyfile.cpp:110
+
void setFunctionType(FunctionType function_type)
Definition: plottyfile.cpp:13
+
void setDescX(std::string desc_x)
Definition: plottyfile.cpp:50
+
Definition: dot.h:12
+
void setRefX(uint16_t ref_x)
Definition: plottyfile.cpp:25
+
void setUnitY(std::string unit_y)
Definition: plottyfile.cpp:55
+
void addDot(Dot &dot)
Definition: plottyfile.cpp:3
+
void setDescPara(std::string desc_para)
Definition: plottyfile.cpp:70
+
uint16_t getParaStepWidth(void) const
Definition: plottyfile.cpp:100
+
std::string getDescPara(void) const
Definition: plottyfile.cpp:130
+
void setParaFirstCurve(uint16_t para_first)
Definition: plottyfile.cpp:35
+
std::string getUnitY(void) const
Definition: plottyfile.cpp:115
+
uint16_t getParaFirstCurve(void) const
Definition: plottyfile.cpp:95
+
uint16_t getRefX(void) const
Definition: plottyfile.cpp:85
+
std::string getUnitPara(void) const
Definition: plottyfile.cpp:125
+
FunctionType getFunctionType(void) const
Definition: plottyfile.cpp:75
+
uint16_t getRefY(void) const
Definition: plottyfile.cpp:90
+
std::string getUnitX(void) const
Definition: plottyfile.cpp:105
+ + + + diff --git a/docs/html/requests_8h_source.html b/docs/html/requests_8h_source.html new file mode 100644 index 0000000..506dbff --- /dev/null +++ b/docs/html/requests_8h_source.html @@ -0,0 +1,81 @@ + + + + + + + +B15F: drv/requests.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
requests.h
+
+
+
1 #ifndef REQUESTS_H
2 #define REQUESTS_H
3 
4 constexpr static uint8_t RQ_DISCARD = 0;
5 constexpr static uint8_t RQ_TEST = 1;
6 constexpr static uint8_t RQ_INFO = 2;
7 constexpr static uint8_t RQ_INT_TEST = 3;
8 constexpr static uint8_t RQ_SELF_TEST = 4;
9 constexpr static uint8_t RQ_DIGITAL_WRITE_0 = 5;
10 constexpr static uint8_t RQ_DIGITAL_WRITE_1 = 6;
11 constexpr static uint8_t RQ_DIGITAL_READ_0 = 7;
12 constexpr static uint8_t RQ_DIGITAL_READ_1 = 8;
13 constexpr static uint8_t RQ_READ_DIP_SWITCH = 9;
14 constexpr static uint8_t RQ_ANALOG_WRITE_0 = 10;
15 constexpr static uint8_t RQ_ANALOG_WRITE_1 = 11;
16 constexpr static uint8_t RQ_ANALOG_READ = 12;
17 constexpr static uint8_t RQ_ADC_DAC_STROKE = 13;
18 constexpr static uint8_t RQ_PWM_SET_FREQ = 14;
19 constexpr static uint8_t RQ_PWM_SET_VALUE = 15;
20 constexpr static uint8_t RQ_SET_MEM_8 = 16;
21 constexpr static uint8_t RQ_GET_MEM_8 = 17;
22 constexpr static uint8_t RQ_SET_MEM_16 = 18;
23 constexpr static uint8_t RQ_GET_MEM_16 = 19;
24 
25 uint8_t const rq_len[] = {
26  1 /* RQ_DISCARD */,
27  1 /* RQ_TEST */ + 1 /* test byte */,
28  1 /* RQ_INFO */,
29  1 /* RQ_INT_TEST */ + 1 /* test int high low */ + 1 /* test int high high */,
30  1 /* RQ_SELF_TEST */,
31  1 /* RQ_DIGITAL_WRITE_0 */ + 1 /* port value */,
32  1 /* RQ_DIGITAL_WRITE_1 */ + 1 /* port value */,
33  1 /* RQ_DIGITAL_READ_0 */,
34  1 /* RQ_DIGITAL_READ_1 */,
35  1 /* RQ_READ_DIP_SWITCH */,
36  1 /* RQ_ANALOG_WRITE_0 */ + 1 /* test int high low */ + 1 /* test int high high */,
37  1 /* RQ_ANALOG_WRITE_1 */ + 1 /* test int high low */ + 1 /* test int high high */,
38  1 /* RQ_ANALOG_READ */ + 1 /* adc channel */,
39  1 /* RQ_ADC_DAC_STROKE */ + 1 /* channel a */ + 1 /* channel b */ + 1 /* start low */ + 1 /* start high */ + 1 /* delta low */ + 1 /* delta high */ + 1 /* count low */ + 1 /* count high */,
40  1 /* RQ_PWM_SET_FREQ */ + 1 /* freq low low */ + 1 /* freq low high */ + 1 /* freq high low */ + 1 /* freq high high */,
41  1 /* RQ_PWM_SET_VALUE */ + 1 /* pwm value */,
42  1 /* RQ_SET_MEM_8 */ + 1 /* memory address low */ + 1 /* memory address high */ + 1 /* memory value (8-bit) */,
43  1 /* RQ_GET_MEM_8 */ + 1 /* memory address low */ + 1 /* memory address high */,
44  1 /* RQ_SET_MEM_16 */ + 1 /* memory address low */ + 1 /* memory address high */ + 1 /* memory value low */ + 1 /* memory value high */,
45  1 /* RQ_GET_MEM_16 */ + 1 /* memory address low */ + 1 /* memory address high */,
46 };
47 
48 #endif // REQUESTS_H
+ + + + diff --git a/docs/html/search/all_0.html b/docs/html/search/all_0.html new file mode 100644 index 0000000..a52d5f0 --- /dev/null +++ b/docs/html/search/all_0.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_0.js b/docs/html/search/all_0.js new file mode 100644 index 0000000..c4bd927 --- /dev/null +++ b/docs/html/search/all_0.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['abort',['abort',['../classB15F.html#a3f09a418f9e3be5d1d750e4515c96f1e',1,'B15F::abort(std::string msg)'],['../classB15F.html#ac962a6a49bddd0e261a8c7d3aded23f8',1,'B15F::abort(std::exception &ex)']]], + ['activateselftestmode',['activateSelfTestMode',['../classB15F.html#ad9bf80ee2485fb5aac9926c6ef0731f1',1,'B15F']]], + ['adddot',['addDot',['../classPlottyFile.html#ae091e6eaaca16302f17572ac7dec6f7c',1,'PlottyFile::addDot(Dot &dot)'],['../classPlottyFile.html#a80e4b45219b4e9571992edfc28a28568',1,'PlottyFile::addDot(Dot dot)']]], + ['analogread',['analogRead',['../classB15F.html#ae0bd1f69751e2dc3c462db9213fc4627',1,'B15F']]], + ['analogsequence',['analogSequence',['../classB15F.html#ab82a324426c3063318c6cafb3089ae02',1,'B15F']]], + ['analogwrite0',['analogWrite0',['../classB15F.html#afc55fd590c7fa5c942d100cb60c4b0d3',1,'B15F']]], + ['analogwrite1',['analogWrite1',['../classB15F.html#a7f1becceac744f5cd2ad529748fd836f',1,'B15F']]] +]; diff --git a/docs/html/search/all_1.html b/docs/html/search/all_1.html new file mode 100644 index 0000000..0fcb704 --- /dev/null +++ b/docs/html/search/all_1.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_1.js b/docs/html/search/all_1.js new file mode 100644 index 0000000..5156238 --- /dev/null +++ b/docs/html/search/all_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['b15f',['B15F',['../classB15F.html',1,'']]], + ['baudrate',['BAUDRATE',['../classB15F.html#a7d548d6861cfc69753161bf9cda14f87',1,'B15F']]], + ['b15f_20benutzerhandbuch',['B15F Benutzerhandbuch',['../index.html',1,'']]] +]; diff --git a/docs/html/search/all_10.html b/docs/html/search/all_10.html new file mode 100644 index 0000000..c234738 --- /dev/null +++ b/docs/html/search/all_10.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_10.js b/docs/html/search/all_10.js new file mode 100644 index 0000000..f5a3874 --- /dev/null +++ b/docs/html/search/all_10.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['_7etimeoutexception',['~TimeoutException',['../classTimeoutException.html#a2f686b262d2ccffa0090fda9b44ab540',1,'TimeoutException']]], + ['_7eusart',['~USART',['../classUSART.html#a0c8eb1a939ca00921e22f6cbcc7bb749',1,'USART']]], + ['_7eusartexception',['~USARTException',['../classUSARTException.html#a0e008b3cb4974859e6bc8c8f8eb480be',1,'USARTException']]] +]; diff --git a/docs/html/search/all_2.html b/docs/html/search/all_2.html new file mode 100644 index 0000000..19c530f --- /dev/null +++ b/docs/html/search/all_2.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_2.js b/docs/html/search/all_2.js new file mode 100644 index 0000000..7200182 --- /dev/null +++ b/docs/html/search/all_2.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['clearinputbuffer',['clearInputBuffer',['../classUSART.html#a28a2b4c5ed66b2c3a81196f76884f156',1,'USART']]], + ['clearoutputbuffer',['clearOutputBuffer',['../classUSART.html#a756d268a8762c316f91ca3238972b0c1',1,'USART']]], + ['closedevice',['closeDevice',['../classUSART.html#af80d6291ac1d2df04cfa1d8d27458cc5',1,'USART']]] +]; diff --git a/docs/html/search/all_3.html b/docs/html/search/all_3.html new file mode 100644 index 0000000..1ae887f --- /dev/null +++ b/docs/html/search/all_3.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_3.js b/docs/html/search/all_3.js new file mode 100644 index 0000000..937a08b --- /dev/null +++ b/docs/html/search/all_3.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['delay_5fms',['delay_ms',['../classB15F.html#aaffce20afb9f06bc4b7556c70ce76416',1,'B15F']]], + ['delay_5fus',['delay_us',['../classB15F.html#adcaac8ae8db3c28eccb499fbd720361f',1,'B15F']]], + ['digitalread0',['digitalRead0',['../classB15F.html#ae0df6d423deeb2fd610968bd1c72060e',1,'B15F']]], + ['digitalread1',['digitalRead1',['../classB15F.html#afc76b612dd4faeee0ac02a66b65af5f2',1,'B15F']]], + ['digitalwrite0',['digitalWrite0',['../classB15F.html#a13797edea1c50278988373acbd110064',1,'B15F']]], + ['digitalwrite1',['digitalWrite1',['../classB15F.html#aa225e7fc813849634063e071ef25db1b',1,'B15F']]], + ['discard',['discard',['../classB15F.html#ae4740cd473f40a1a4121dfa66b25e1d5',1,'B15F']]], + ['dot',['Dot',['../classDot.html',1,'Dot'],['../classDot.html#ad975f119c0627a928790b3cd5ca6da05',1,'Dot::Dot()']]], + ['driverexception',['DriverException',['../classDriverException.html',1,'']]], + ['drop',['drop',['../classUSART.html#a038d00c0b3d8c0c13c3e7eae5dad7813',1,'USART']]] +]; diff --git a/docs/html/search/all_4.html b/docs/html/search/all_4.html new file mode 100644 index 0000000..14c90ef --- /dev/null +++ b/docs/html/search/all_4.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_4.js b/docs/html/search/all_4.js new file mode 100644 index 0000000..fb3f662 --- /dev/null +++ b/docs/html/search/all_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['exec',['exec',['../classB15F.html#a1a7ac52984ed7ecac008a3e4060eee3a',1,'B15F']]] +]; diff --git a/docs/html/search/all_5.html b/docs/html/search/all_5.html new file mode 100644 index 0000000..60fa53e --- /dev/null +++ b/docs/html/search/all_5.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_5.js b/docs/html/search/all_5.js new file mode 100644 index 0000000..3641ddc --- /dev/null +++ b/docs/html/search/all_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['flushoutputbuffer',['flushOutputBuffer',['../classUSART.html#adb6ff4d1cf1af79ca255c5a81780200d',1,'USART']]] +]; diff --git a/docs/html/search/all_6.html b/docs/html/search/all_6.html new file mode 100644 index 0000000..7180363 --- /dev/null +++ b/docs/html/search/all_6.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_6.js b/docs/html/search/all_6.js new file mode 100644 index 0000000..02c5955 --- /dev/null +++ b/docs/html/search/all_6.js @@ -0,0 +1,25 @@ +var searchData= +[ + ['getbaudrate',['getBaudrate',['../classUSART.html#a4918672d8069df205378a528b1892db3',1,'USART']]], + ['getboardinfo',['getBoardInfo',['../classB15F.html#a4f01677e73d6d172a2c1cae9427a591b',1,'B15F']]], + ['getcurve',['getCurve',['../classDot.html#ad0ae7dc1a9be3d8d985affc089b34396',1,'Dot']]], + ['getdescpara',['getDescPara',['../classPlottyFile.html#a536967daae3b382a5d6575f55450e198',1,'PlottyFile']]], + ['getdescx',['getDescX',['../classPlottyFile.html#a9cf7baa569be308c2cf6e07cadded09d',1,'PlottyFile']]], + ['getdescy',['getDescY',['../classPlottyFile.html#ab4a847fd71a804182f211233e194df45',1,'PlottyFile']]], + ['getfunctiontype',['getFunctionType',['../classPlottyFile.html#a88bb7d8350ed5fbc7a40e8d903c94bdb',1,'PlottyFile']]], + ['getinstance',['getInstance',['../classB15F.html#a8b4533d232c55ef2aa967e39e2d23380',1,'B15F']]], + ['getmem16',['getMem16',['../classB15F.html#a5f84a830f054fbede9444d3b9bb566c4',1,'B15F']]], + ['getmem8',['getMem8',['../classB15F.html#ad6314ec0a2701f6b2ea49b7623b9e1c4',1,'B15F']]], + ['getparafirstcurve',['getParaFirstCurve',['../classPlottyFile.html#a40828c93d66fe80166c4f603d5bdfa48',1,'PlottyFile']]], + ['getparastepwidth',['getParaStepWidth',['../classPlottyFile.html#a9da23f2bb8e6eb1837fc992ffd4057db',1,'PlottyFile']]], + ['getquadrant',['getQuadrant',['../classPlottyFile.html#a54e94e80061a27614f2d4d63697d3376',1,'PlottyFile']]], + ['getrefx',['getRefX',['../classPlottyFile.html#a7dd84b9f0826f3220fc6b5a4f1ce9890',1,'PlottyFile']]], + ['getrefy',['getRefY',['../classPlottyFile.html#ae6650c61a3b1a610ce716253418bd7f2',1,'PlottyFile']]], + ['getregister',['getRegister',['../classB15F.html#a9bd47da39928af6f51075bdc3fe73ddc',1,'B15F']]], + ['gettimeout',['getTimeout',['../classUSART.html#a19cf777956a038878fc2d2b58c3d2b41',1,'USART']]], + ['getunitpara',['getUnitPara',['../classPlottyFile.html#abcda4139adf8c5ab8a93b13b84ac097c',1,'PlottyFile']]], + ['getunitx',['getUnitX',['../classPlottyFile.html#af952ac5e2c40896acaf6a86063874fe3',1,'PlottyFile']]], + ['getunity',['getUnitY',['../classPlottyFile.html#a746b96036872dbece204e9739f3413b6',1,'PlottyFile']]], + ['getx',['getX',['../classDot.html#a029f0cc99c474122b77a708a317e7f77',1,'Dot']]], + ['gety',['getY',['../classDot.html#a8fcb987e6308d8184d1a2c8692227e58',1,'Dot']]] +]; diff --git a/docs/html/search/all_7.html b/docs/html/search/all_7.html new file mode 100644 index 0000000..ee6d2e4 --- /dev/null +++ b/docs/html/search/all_7.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js new file mode 100644 index 0000000..66df4a3 --- /dev/null +++ b/docs/html/search/all_7.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['msg',['msg',['../classTimeoutException.html#aa625fc0fae48a67737a98eafb91c9624',1,'TimeoutException::msg()'],['../classUSARTException.html#a14c80df95f216d221aa97cffbcd8dd79',1,'USARTException::msg()']]], + ['msg_5ffail',['MSG_FAIL',['../classB15F.html#a77d1ecf24b406c9204665d3b09c36f1e',1,'B15F']]], + ['msg_5fok',['MSG_OK',['../classB15F.html#ab01299858f74a6cec598688562e0ad02',1,'B15F']]] +]; diff --git a/docs/html/search/all_8.html b/docs/html/search/all_8.html new file mode 100644 index 0000000..7829aa4 --- /dev/null +++ b/docs/html/search/all_8.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js new file mode 100644 index 0000000..bd75d34 --- /dev/null +++ b/docs/html/search/all_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['opendevice',['openDevice',['../classUSART.html#a5f7e2abda2ec4a68a5fdb8ee2f8a940a',1,'USART']]] +]; diff --git a/docs/html/search/all_9.html b/docs/html/search/all_9.html new file mode 100644 index 0000000..e4242c7 --- /dev/null +++ b/docs/html/search/all_9.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_9.js b/docs/html/search/all_9.js new file mode 100644 index 0000000..1695de2 --- /dev/null +++ b/docs/html/search/all_9.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['plottyfile',['PlottyFile',['../classPlottyFile.html',1,'']]], + ['pre',['PRE',['../classB15F.html#a3b0fc1f85954b2d9c145af4a3af5b1ec',1,'B15F']]], + ['pwmsetfrequency',['pwmSetFrequency',['../classB15F.html#ac6f6532bb9550a0632c28b98c157d0a1',1,'B15F']]], + ['pwmsetvalue',['pwmSetValue',['../classB15F.html#af9aad3c0db5d5a8b37219d713e1977ee',1,'B15F']]] +]; diff --git a/docs/html/search/all_a.html b/docs/html/search/all_a.html new file mode 100644 index 0000000..47a4a78 --- /dev/null +++ b/docs/html/search/all_a.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_a.js b/docs/html/search/all_a.js new file mode 100644 index 0000000..ffd120f --- /dev/null +++ b/docs/html/search/all_a.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['readdipswitch',['readDipSwitch',['../classB15F.html#a6f858f21ea81d491b5031b3644a2239a',1,'B15F']]], + ['receive',['receive',['../classUSART.html#a0fdc238203852f00bd750127602b2a6a',1,'USART']]], + ['reconnect',['reconnect',['../classB15F.html#a52557b375443c180a044e7d4e80a1ae7',1,'B15F']]], + ['reconnect_5ftimeout',['RECONNECT_TIMEOUT',['../classB15F.html#a040951746fbfd632e12bd1ad14578816',1,'B15F']]], + ['reconnect_5ftries',['RECONNECT_TRIES',['../classB15F.html#a6c4895bdbcd71ff6743becf97985c2dc',1,'B15F']]], + ['reverse',['reverse',['../classB15F.html#a2937f22f1cfc9b533f4b5bf4db726a68',1,'B15F']]] +]; diff --git a/docs/html/search/all_b.html b/docs/html/search/all_b.html new file mode 100644 index 0000000..1320a43 --- /dev/null +++ b/docs/html/search/all_b.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_b.js b/docs/html/search/all_b.js new file mode 100644 index 0000000..07ce94c --- /dev/null +++ b/docs/html/search/all_b.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['setaborthandler',['setAbortHandler',['../classB15F.html#a55b0cd1ea582bda53d6979442640f8e9',1,'B15F']]], + ['setbaudrate',['setBaudrate',['../classUSART.html#aac63918a8b97ae63ee607cfa39e6d88d',1,'USART']]], + ['setdescpara',['setDescPara',['../classPlottyFile.html#a431904143c3c1164a2e8b8cfec3c77ab',1,'PlottyFile']]], + ['setdescx',['setDescX',['../classPlottyFile.html#aa0449c290265d55d6223b19cf0a88b0a',1,'PlottyFile']]], + ['setdescy',['setDescY',['../classPlottyFile.html#a38a3a4dfc76bc70523727584bf01d590',1,'PlottyFile']]], + ['setfunctiontype',['setFunctionType',['../classPlottyFile.html#a4e5ab1ebb012a5cc1a3d6458a4cd512f',1,'PlottyFile']]], + ['setmem16',['setMem16',['../classB15F.html#ae2dc09141f3300c751b57adacf2bed71',1,'B15F']]], + ['setmem8',['setMem8',['../classB15F.html#a965b879d92787203e0971db20e247dfe',1,'B15F']]], + ['setparafirstcurve',['setParaFirstCurve',['../classPlottyFile.html#aa676414793becb975506f48d6e949dd0',1,'PlottyFile']]], + ['setparastepwidth',['setParaStepWidth',['../classPlottyFile.html#a6caebd31e04e2e7081cc007047350355',1,'PlottyFile']]], + ['setquadrant',['setQuadrant',['../classPlottyFile.html#a1953ee0d9a87b7353c16139584e9c2ae',1,'PlottyFile']]], + ['setrefx',['setRefX',['../classPlottyFile.html#a80c2c2e97a454566f9c1f2c51e1d7f3e',1,'PlottyFile']]], + ['setrefy',['setRefY',['../classPlottyFile.html#a3a371228ddcc007e97eebe7cc04dffc2',1,'PlottyFile']]], + ['setregister',['setRegister',['../classB15F.html#ab446ecffab28d4515dfade79a8efc93d',1,'B15F']]], + ['settimeout',['setTimeout',['../classUSART.html#ad7fe866cebe920784d2b17602824c7ff',1,'USART']]], + ['setunitpara',['setUnitPara',['../classPlottyFile.html#abbac84109a1e0958a4ca5c270fac0986',1,'PlottyFile']]], + ['setunitx',['setUnitX',['../classPlottyFile.html#ab8d35a841ca9c325fca671cf34e03527',1,'PlottyFile']]], + ['setunity',['setUnitY',['../classPlottyFile.html#abb18c814f435926f741f7ceb310f3059',1,'PlottyFile']]], + ['startplotty',['startPlotty',['../classPlottyFile.html#a08a115ef10458cadfe76077d623313df',1,'PlottyFile']]] +]; diff --git a/docs/html/search/all_c.html b/docs/html/search/all_c.html new file mode 100644 index 0000000..32a3a1b --- /dev/null +++ b/docs/html/search/all_c.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_c.js b/docs/html/search/all_c.js new file mode 100644 index 0000000..37e3d29 --- /dev/null +++ b/docs/html/search/all_c.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['testconnection',['testConnection',['../classB15F.html#af01983594f2af98ab2b1e514aa036a5d',1,'B15F']]], + ['testintconv',['testIntConv',['../classB15F.html#a7b8a0e2a9156f7dcb05d097f23666a78',1,'B15F']]], + ['timeoutexception',['TimeoutException',['../classTimeoutException.html',1,'TimeoutException'],['../classTimeoutException.html#aa45912234da11ffc9dd3594a1bbc0218',1,'TimeoutException::TimeoutException(const char *message)'],['../classTimeoutException.html#ad6e5c200fbfd276f48a6c1163e2d2988',1,'TimeoutException::TimeoutException(const std::string &message)']]], + ['transmit',['transmit',['../classUSART.html#a41b19dd58f307015b73e154048cd74ca',1,'USART']]] +]; diff --git a/docs/html/search/all_d.html b/docs/html/search/all_d.html new file mode 100644 index 0000000..a386096 --- /dev/null +++ b/docs/html/search/all_d.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_d.js b/docs/html/search/all_d.js new file mode 100644 index 0000000..7e9d9bc --- /dev/null +++ b/docs/html/search/all_d.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['usart',['USART',['../classUSART.html',1,'USART'],['../classUSART.html#a5daed20dc595c43d87c4c28bb08a7449',1,'USART::USART()']]], + ['usartexception',['USARTException',['../classUSARTException.html',1,'USARTException'],['../classUSARTException.html#a3c359db129825703b91392d5128cf93d',1,'USARTException::USARTException(const char *message)'],['../classUSARTException.html#a643c0a8b7f0d81e2f1693a75b378e6c2',1,'USARTException::USARTException(const std::string &message)']]] +]; diff --git a/docs/html/search/all_e.html b/docs/html/search/all_e.html new file mode 100644 index 0000000..2931618 --- /dev/null +++ b/docs/html/search/all_e.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_e.js b/docs/html/search/all_e.js new file mode 100644 index 0000000..27f785f --- /dev/null +++ b/docs/html/search/all_e.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['view',['View',['../classView.html',1,'']]], + ['viewinfo',['ViewInfo',['../classViewInfo.html',1,'']]], + ['viewmonitor',['ViewMonitor',['../classViewMonitor.html',1,'']]], + ['viewpromt',['ViewPromt',['../classViewPromt.html',1,'']]], + ['viewselection',['ViewSelection',['../classViewSelection.html',1,'']]] +]; diff --git a/docs/html/search/all_f.html b/docs/html/search/all_f.html new file mode 100644 index 0000000..ca42a52 --- /dev/null +++ b/docs/html/search/all_f.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/all_f.js b/docs/html/search/all_f.js new file mode 100644 index 0000000..38b315c --- /dev/null +++ b/docs/html/search/all_f.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['wdt_5ftimeout',['WDT_TIMEOUT',['../classB15F.html#a158d13bc84aed6430cdede1396384e06',1,'B15F']]], + ['what',['what',['../classTimeoutException.html#a97eaf01fc39ddb94b060020b42fefd6e',1,'TimeoutException::what()'],['../classUSARTException.html#a2af5e3c00cd0585c7427c2e0420a8f15',1,'USARTException::what()']]], + ['writetofile',['writeToFile',['../classPlottyFile.html#a82c348e7fade2edcbc907e7c2bc2e305',1,'PlottyFile']]] +]; diff --git a/docs/html/search/classes_0.html b/docs/html/search/classes_0.html new file mode 100644 index 0000000..d585e6a --- /dev/null +++ b/docs/html/search/classes_0.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/classes_0.js b/docs/html/search/classes_0.js new file mode 100644 index 0000000..7622f87 --- /dev/null +++ b/docs/html/search/classes_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['b15f',['B15F',['../classB15F.html',1,'']]] +]; diff --git a/docs/html/search/classes_1.html b/docs/html/search/classes_1.html new file mode 100644 index 0000000..baeb182 --- /dev/null +++ b/docs/html/search/classes_1.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/classes_1.js b/docs/html/search/classes_1.js new file mode 100644 index 0000000..c2d5cc3 --- /dev/null +++ b/docs/html/search/classes_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['dot',['Dot',['../classDot.html',1,'']]], + ['driverexception',['DriverException',['../classDriverException.html',1,'']]] +]; diff --git a/docs/html/search/classes_2.html b/docs/html/search/classes_2.html new file mode 100644 index 0000000..d267279 --- /dev/null +++ b/docs/html/search/classes_2.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/classes_2.js b/docs/html/search/classes_2.js new file mode 100644 index 0000000..ca8950f --- /dev/null +++ b/docs/html/search/classes_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['plottyfile',['PlottyFile',['../classPlottyFile.html',1,'']]] +]; diff --git a/docs/html/search/classes_3.html b/docs/html/search/classes_3.html new file mode 100644 index 0000000..8a5cbe1 --- /dev/null +++ b/docs/html/search/classes_3.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/classes_3.js b/docs/html/search/classes_3.js new file mode 100644 index 0000000..b7d0b63 --- /dev/null +++ b/docs/html/search/classes_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['timeoutexception',['TimeoutException',['../classTimeoutException.html',1,'']]] +]; diff --git a/docs/html/search/classes_4.html b/docs/html/search/classes_4.html new file mode 100644 index 0000000..300b9ab --- /dev/null +++ b/docs/html/search/classes_4.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/classes_4.js b/docs/html/search/classes_4.js new file mode 100644 index 0000000..c030e1b --- /dev/null +++ b/docs/html/search/classes_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['usart',['USART',['../classUSART.html',1,'']]], + ['usartexception',['USARTException',['../classUSARTException.html',1,'']]] +]; diff --git a/docs/html/search/classes_5.html b/docs/html/search/classes_5.html new file mode 100644 index 0000000..e7afb2c --- /dev/null +++ b/docs/html/search/classes_5.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/classes_5.js b/docs/html/search/classes_5.js new file mode 100644 index 0000000..27f785f --- /dev/null +++ b/docs/html/search/classes_5.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['view',['View',['../classView.html',1,'']]], + ['viewinfo',['ViewInfo',['../classViewInfo.html',1,'']]], + ['viewmonitor',['ViewMonitor',['../classViewMonitor.html',1,'']]], + ['viewpromt',['ViewPromt',['../classViewPromt.html',1,'']]], + ['viewselection',['ViewSelection',['../classViewSelection.html',1,'']]] +]; diff --git a/docs/html/search/close.png b/docs/html/search/close.png new file mode 100644 index 0000000..9342d3d Binary files /dev/null and b/docs/html/search/close.png differ diff --git a/docs/html/search/functions_0.html b/docs/html/search/functions_0.html new file mode 100644 index 0000000..8a729f7 --- /dev/null +++ b/docs/html/search/functions_0.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_0.js b/docs/html/search/functions_0.js new file mode 100644 index 0000000..c4bd927 --- /dev/null +++ b/docs/html/search/functions_0.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['abort',['abort',['../classB15F.html#a3f09a418f9e3be5d1d750e4515c96f1e',1,'B15F::abort(std::string msg)'],['../classB15F.html#ac962a6a49bddd0e261a8c7d3aded23f8',1,'B15F::abort(std::exception &ex)']]], + ['activateselftestmode',['activateSelfTestMode',['../classB15F.html#ad9bf80ee2485fb5aac9926c6ef0731f1',1,'B15F']]], + ['adddot',['addDot',['../classPlottyFile.html#ae091e6eaaca16302f17572ac7dec6f7c',1,'PlottyFile::addDot(Dot &dot)'],['../classPlottyFile.html#a80e4b45219b4e9571992edfc28a28568',1,'PlottyFile::addDot(Dot dot)']]], + ['analogread',['analogRead',['../classB15F.html#ae0bd1f69751e2dc3c462db9213fc4627',1,'B15F']]], + ['analogsequence',['analogSequence',['../classB15F.html#ab82a324426c3063318c6cafb3089ae02',1,'B15F']]], + ['analogwrite0',['analogWrite0',['../classB15F.html#afc55fd590c7fa5c942d100cb60c4b0d3',1,'B15F']]], + ['analogwrite1',['analogWrite1',['../classB15F.html#a7f1becceac744f5cd2ad529748fd836f',1,'B15F']]] +]; diff --git a/docs/html/search/functions_1.html b/docs/html/search/functions_1.html new file mode 100644 index 0000000..d4929aa --- /dev/null +++ b/docs/html/search/functions_1.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_1.js b/docs/html/search/functions_1.js new file mode 100644 index 0000000..7200182 --- /dev/null +++ b/docs/html/search/functions_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['clearinputbuffer',['clearInputBuffer',['../classUSART.html#a28a2b4c5ed66b2c3a81196f76884f156',1,'USART']]], + ['clearoutputbuffer',['clearOutputBuffer',['../classUSART.html#a756d268a8762c316f91ca3238972b0c1',1,'USART']]], + ['closedevice',['closeDevice',['../classUSART.html#af80d6291ac1d2df04cfa1d8d27458cc5',1,'USART']]] +]; diff --git a/docs/html/search/functions_2.html b/docs/html/search/functions_2.html new file mode 100644 index 0000000..07e3fda --- /dev/null +++ b/docs/html/search/functions_2.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_2.js b/docs/html/search/functions_2.js new file mode 100644 index 0000000..06f50ef --- /dev/null +++ b/docs/html/search/functions_2.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['delay_5fms',['delay_ms',['../classB15F.html#aaffce20afb9f06bc4b7556c70ce76416',1,'B15F']]], + ['delay_5fus',['delay_us',['../classB15F.html#adcaac8ae8db3c28eccb499fbd720361f',1,'B15F']]], + ['digitalread0',['digitalRead0',['../classB15F.html#ae0df6d423deeb2fd610968bd1c72060e',1,'B15F']]], + ['digitalread1',['digitalRead1',['../classB15F.html#afc76b612dd4faeee0ac02a66b65af5f2',1,'B15F']]], + ['digitalwrite0',['digitalWrite0',['../classB15F.html#a13797edea1c50278988373acbd110064',1,'B15F']]], + ['digitalwrite1',['digitalWrite1',['../classB15F.html#aa225e7fc813849634063e071ef25db1b',1,'B15F']]], + ['discard',['discard',['../classB15F.html#ae4740cd473f40a1a4121dfa66b25e1d5',1,'B15F']]], + ['dot',['Dot',['../classDot.html#ad975f119c0627a928790b3cd5ca6da05',1,'Dot']]], + ['drop',['drop',['../classUSART.html#a038d00c0b3d8c0c13c3e7eae5dad7813',1,'USART']]] +]; diff --git a/docs/html/search/functions_3.html b/docs/html/search/functions_3.html new file mode 100644 index 0000000..40bd389 --- /dev/null +++ b/docs/html/search/functions_3.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_3.js b/docs/html/search/functions_3.js new file mode 100644 index 0000000..fb3f662 --- /dev/null +++ b/docs/html/search/functions_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['exec',['exec',['../classB15F.html#a1a7ac52984ed7ecac008a3e4060eee3a',1,'B15F']]] +]; diff --git a/docs/html/search/functions_4.html b/docs/html/search/functions_4.html new file mode 100644 index 0000000..8a4df4c --- /dev/null +++ b/docs/html/search/functions_4.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_4.js b/docs/html/search/functions_4.js new file mode 100644 index 0000000..3641ddc --- /dev/null +++ b/docs/html/search/functions_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['flushoutputbuffer',['flushOutputBuffer',['../classUSART.html#adb6ff4d1cf1af79ca255c5a81780200d',1,'USART']]] +]; diff --git a/docs/html/search/functions_5.html b/docs/html/search/functions_5.html new file mode 100644 index 0000000..2b983b2 --- /dev/null +++ b/docs/html/search/functions_5.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_5.js b/docs/html/search/functions_5.js new file mode 100644 index 0000000..02c5955 --- /dev/null +++ b/docs/html/search/functions_5.js @@ -0,0 +1,25 @@ +var searchData= +[ + ['getbaudrate',['getBaudrate',['../classUSART.html#a4918672d8069df205378a528b1892db3',1,'USART']]], + ['getboardinfo',['getBoardInfo',['../classB15F.html#a4f01677e73d6d172a2c1cae9427a591b',1,'B15F']]], + ['getcurve',['getCurve',['../classDot.html#ad0ae7dc1a9be3d8d985affc089b34396',1,'Dot']]], + ['getdescpara',['getDescPara',['../classPlottyFile.html#a536967daae3b382a5d6575f55450e198',1,'PlottyFile']]], + ['getdescx',['getDescX',['../classPlottyFile.html#a9cf7baa569be308c2cf6e07cadded09d',1,'PlottyFile']]], + ['getdescy',['getDescY',['../classPlottyFile.html#ab4a847fd71a804182f211233e194df45',1,'PlottyFile']]], + ['getfunctiontype',['getFunctionType',['../classPlottyFile.html#a88bb7d8350ed5fbc7a40e8d903c94bdb',1,'PlottyFile']]], + ['getinstance',['getInstance',['../classB15F.html#a8b4533d232c55ef2aa967e39e2d23380',1,'B15F']]], + ['getmem16',['getMem16',['../classB15F.html#a5f84a830f054fbede9444d3b9bb566c4',1,'B15F']]], + ['getmem8',['getMem8',['../classB15F.html#ad6314ec0a2701f6b2ea49b7623b9e1c4',1,'B15F']]], + ['getparafirstcurve',['getParaFirstCurve',['../classPlottyFile.html#a40828c93d66fe80166c4f603d5bdfa48',1,'PlottyFile']]], + ['getparastepwidth',['getParaStepWidth',['../classPlottyFile.html#a9da23f2bb8e6eb1837fc992ffd4057db',1,'PlottyFile']]], + ['getquadrant',['getQuadrant',['../classPlottyFile.html#a54e94e80061a27614f2d4d63697d3376',1,'PlottyFile']]], + ['getrefx',['getRefX',['../classPlottyFile.html#a7dd84b9f0826f3220fc6b5a4f1ce9890',1,'PlottyFile']]], + ['getrefy',['getRefY',['../classPlottyFile.html#ae6650c61a3b1a610ce716253418bd7f2',1,'PlottyFile']]], + ['getregister',['getRegister',['../classB15F.html#a9bd47da39928af6f51075bdc3fe73ddc',1,'B15F']]], + ['gettimeout',['getTimeout',['../classUSART.html#a19cf777956a038878fc2d2b58c3d2b41',1,'USART']]], + ['getunitpara',['getUnitPara',['../classPlottyFile.html#abcda4139adf8c5ab8a93b13b84ac097c',1,'PlottyFile']]], + ['getunitx',['getUnitX',['../classPlottyFile.html#af952ac5e2c40896acaf6a86063874fe3',1,'PlottyFile']]], + ['getunity',['getUnitY',['../classPlottyFile.html#a746b96036872dbece204e9739f3413b6',1,'PlottyFile']]], + ['getx',['getX',['../classDot.html#a029f0cc99c474122b77a708a317e7f77',1,'Dot']]], + ['gety',['getY',['../classDot.html#a8fcb987e6308d8184d1a2c8692227e58',1,'Dot']]] +]; diff --git a/docs/html/search/functions_6.html b/docs/html/search/functions_6.html new file mode 100644 index 0000000..f7d283d --- /dev/null +++ b/docs/html/search/functions_6.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_6.js b/docs/html/search/functions_6.js new file mode 100644 index 0000000..bd75d34 --- /dev/null +++ b/docs/html/search/functions_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['opendevice',['openDevice',['../classUSART.html#a5f7e2abda2ec4a68a5fdb8ee2f8a940a',1,'USART']]] +]; diff --git a/docs/html/search/functions_7.html b/docs/html/search/functions_7.html new file mode 100644 index 0000000..a74fe44 --- /dev/null +++ b/docs/html/search/functions_7.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_7.js b/docs/html/search/functions_7.js new file mode 100644 index 0000000..b0de2bf --- /dev/null +++ b/docs/html/search/functions_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['pwmsetfrequency',['pwmSetFrequency',['../classB15F.html#ac6f6532bb9550a0632c28b98c157d0a1',1,'B15F']]], + ['pwmsetvalue',['pwmSetValue',['../classB15F.html#af9aad3c0db5d5a8b37219d713e1977ee',1,'B15F']]] +]; diff --git a/docs/html/search/functions_8.html b/docs/html/search/functions_8.html new file mode 100644 index 0000000..75fc0be --- /dev/null +++ b/docs/html/search/functions_8.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_8.js b/docs/html/search/functions_8.js new file mode 100644 index 0000000..e68b82b --- /dev/null +++ b/docs/html/search/functions_8.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['readdipswitch',['readDipSwitch',['../classB15F.html#a6f858f21ea81d491b5031b3644a2239a',1,'B15F']]], + ['receive',['receive',['../classUSART.html#a0fdc238203852f00bd750127602b2a6a',1,'USART']]], + ['reconnect',['reconnect',['../classB15F.html#a52557b375443c180a044e7d4e80a1ae7',1,'B15F']]], + ['reverse',['reverse',['../classB15F.html#a2937f22f1cfc9b533f4b5bf4db726a68',1,'B15F']]] +]; diff --git a/docs/html/search/functions_9.html b/docs/html/search/functions_9.html new file mode 100644 index 0000000..7541c9e --- /dev/null +++ b/docs/html/search/functions_9.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_9.js b/docs/html/search/functions_9.js new file mode 100644 index 0000000..07ce94c --- /dev/null +++ b/docs/html/search/functions_9.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['setaborthandler',['setAbortHandler',['../classB15F.html#a55b0cd1ea582bda53d6979442640f8e9',1,'B15F']]], + ['setbaudrate',['setBaudrate',['../classUSART.html#aac63918a8b97ae63ee607cfa39e6d88d',1,'USART']]], + ['setdescpara',['setDescPara',['../classPlottyFile.html#a431904143c3c1164a2e8b8cfec3c77ab',1,'PlottyFile']]], + ['setdescx',['setDescX',['../classPlottyFile.html#aa0449c290265d55d6223b19cf0a88b0a',1,'PlottyFile']]], + ['setdescy',['setDescY',['../classPlottyFile.html#a38a3a4dfc76bc70523727584bf01d590',1,'PlottyFile']]], + ['setfunctiontype',['setFunctionType',['../classPlottyFile.html#a4e5ab1ebb012a5cc1a3d6458a4cd512f',1,'PlottyFile']]], + ['setmem16',['setMem16',['../classB15F.html#ae2dc09141f3300c751b57adacf2bed71',1,'B15F']]], + ['setmem8',['setMem8',['../classB15F.html#a965b879d92787203e0971db20e247dfe',1,'B15F']]], + ['setparafirstcurve',['setParaFirstCurve',['../classPlottyFile.html#aa676414793becb975506f48d6e949dd0',1,'PlottyFile']]], + ['setparastepwidth',['setParaStepWidth',['../classPlottyFile.html#a6caebd31e04e2e7081cc007047350355',1,'PlottyFile']]], + ['setquadrant',['setQuadrant',['../classPlottyFile.html#a1953ee0d9a87b7353c16139584e9c2ae',1,'PlottyFile']]], + ['setrefx',['setRefX',['../classPlottyFile.html#a80c2c2e97a454566f9c1f2c51e1d7f3e',1,'PlottyFile']]], + ['setrefy',['setRefY',['../classPlottyFile.html#a3a371228ddcc007e97eebe7cc04dffc2',1,'PlottyFile']]], + ['setregister',['setRegister',['../classB15F.html#ab446ecffab28d4515dfade79a8efc93d',1,'B15F']]], + ['settimeout',['setTimeout',['../classUSART.html#ad7fe866cebe920784d2b17602824c7ff',1,'USART']]], + ['setunitpara',['setUnitPara',['../classPlottyFile.html#abbac84109a1e0958a4ca5c270fac0986',1,'PlottyFile']]], + ['setunitx',['setUnitX',['../classPlottyFile.html#ab8d35a841ca9c325fca671cf34e03527',1,'PlottyFile']]], + ['setunity',['setUnitY',['../classPlottyFile.html#abb18c814f435926f741f7ceb310f3059',1,'PlottyFile']]], + ['startplotty',['startPlotty',['../classPlottyFile.html#a08a115ef10458cadfe76077d623313df',1,'PlottyFile']]] +]; diff --git a/docs/html/search/functions_a.html b/docs/html/search/functions_a.html new file mode 100644 index 0000000..5a5be63 --- /dev/null +++ b/docs/html/search/functions_a.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_a.js b/docs/html/search/functions_a.js new file mode 100644 index 0000000..c417073 --- /dev/null +++ b/docs/html/search/functions_a.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['testconnection',['testConnection',['../classB15F.html#af01983594f2af98ab2b1e514aa036a5d',1,'B15F']]], + ['testintconv',['testIntConv',['../classB15F.html#a7b8a0e2a9156f7dcb05d097f23666a78',1,'B15F']]], + ['timeoutexception',['TimeoutException',['../classTimeoutException.html#aa45912234da11ffc9dd3594a1bbc0218',1,'TimeoutException::TimeoutException(const char *message)'],['../classTimeoutException.html#ad6e5c200fbfd276f48a6c1163e2d2988',1,'TimeoutException::TimeoutException(const std::string &message)']]], + ['transmit',['transmit',['../classUSART.html#a41b19dd58f307015b73e154048cd74ca',1,'USART']]] +]; diff --git a/docs/html/search/functions_b.html b/docs/html/search/functions_b.html new file mode 100644 index 0000000..fc2d5aa --- /dev/null +++ b/docs/html/search/functions_b.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_b.js b/docs/html/search/functions_b.js new file mode 100644 index 0000000..7419b81 --- /dev/null +++ b/docs/html/search/functions_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['usart',['USART',['../classUSART.html#a5daed20dc595c43d87c4c28bb08a7449',1,'USART']]], + ['usartexception',['USARTException',['../classUSARTException.html#a3c359db129825703b91392d5128cf93d',1,'USARTException::USARTException(const char *message)'],['../classUSARTException.html#a643c0a8b7f0d81e2f1693a75b378e6c2',1,'USARTException::USARTException(const std::string &message)']]] +]; diff --git a/docs/html/search/functions_c.html b/docs/html/search/functions_c.html new file mode 100644 index 0000000..a1a1437 --- /dev/null +++ b/docs/html/search/functions_c.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_c.js b/docs/html/search/functions_c.js new file mode 100644 index 0000000..b730bff --- /dev/null +++ b/docs/html/search/functions_c.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['what',['what',['../classTimeoutException.html#a97eaf01fc39ddb94b060020b42fefd6e',1,'TimeoutException::what()'],['../classUSARTException.html#a2af5e3c00cd0585c7427c2e0420a8f15',1,'USARTException::what()']]], + ['writetofile',['writeToFile',['../classPlottyFile.html#a82c348e7fade2edcbc907e7c2bc2e305',1,'PlottyFile']]] +]; diff --git a/docs/html/search/functions_d.html b/docs/html/search/functions_d.html new file mode 100644 index 0000000..4375535 --- /dev/null +++ b/docs/html/search/functions_d.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/functions_d.js b/docs/html/search/functions_d.js new file mode 100644 index 0000000..f5a3874 --- /dev/null +++ b/docs/html/search/functions_d.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['_7etimeoutexception',['~TimeoutException',['../classTimeoutException.html#a2f686b262d2ccffa0090fda9b44ab540',1,'TimeoutException']]], + ['_7eusart',['~USART',['../classUSART.html#a0c8eb1a939ca00921e22f6cbcc7bb749',1,'USART']]], + ['_7eusartexception',['~USARTException',['../classUSARTException.html#a0e008b3cb4974859e6bc8c8f8eb480be',1,'USARTException']]] +]; diff --git a/docs/html/search/mag_sel.png b/docs/html/search/mag_sel.png new file mode 100644 index 0000000..39c0ed5 Binary files /dev/null and b/docs/html/search/mag_sel.png differ diff --git a/docs/html/search/nomatches.html b/docs/html/search/nomatches.html new file mode 100644 index 0000000..4377320 --- /dev/null +++ b/docs/html/search/nomatches.html @@ -0,0 +1,12 @@ + + + + + + + +
+
No Matches
+
+ + diff --git a/docs/html/search/pages_0.html b/docs/html/search/pages_0.html new file mode 100644 index 0000000..32cbf49 --- /dev/null +++ b/docs/html/search/pages_0.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/pages_0.js b/docs/html/search/pages_0.js new file mode 100644 index 0000000..31be983 --- /dev/null +++ b/docs/html/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['b15f_20benutzerhandbuch',['B15F Benutzerhandbuch',['../index.html',1,'']]] +]; diff --git a/docs/html/search/search.css b/docs/html/search/search.css new file mode 100644 index 0000000..3cf9df9 --- /dev/null +++ b/docs/html/search/search.css @@ -0,0 +1,271 @@ +/*---------------- Search Box */ + +#FSearchBox { + float: left; +} + +#MSearchBox { + white-space : nowrap; + float: none; + margin-top: 8px; + right: 0px; + width: 170px; + height: 24px; + z-index: 102; +} + +#MSearchBox .left +{ + display:block; + position:absolute; + left:10px; + width:20px; + height:19px; + background:url('search_l.png') no-repeat; + background-position:right; +} + +#MSearchSelect { + display:block; + position:absolute; + width:20px; + height:19px; +} + +.left #MSearchSelect { + left:4px; +} + +.right #MSearchSelect { + right:5px; +} + +#MSearchField { + display:block; + position:absolute; + height:19px; + background:url('search_m.png') repeat-x; + border:none; + width:115px; + margin-left:20px; + padding-left:4px; + color: #909090; + outline: none; + font: 9pt Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; +} + +#FSearchBox #MSearchField { + margin-left:15px; +} + +#MSearchBox .right { + display:block; + position:absolute; + right:10px; + top:8px; + width:20px; + height:19px; + background:url('search_r.png') no-repeat; + background-position:left; +} + +#MSearchClose { + display: none; + position: absolute; + top: 4px; + background : none; + border: none; + margin: 0px 4px 0px 0px; + padding: 0px 0px; + outline: none; +} + +.left #MSearchClose { + left: 6px; +} + +.right #MSearchClose { + right: 2px; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; + z-index:10000; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; +} + +.SRResult { + display: none; +} + +DIV.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/docs/html/search/search.js b/docs/html/search/search.js new file mode 100644 index 0000000..a554ab9 --- /dev/null +++ b/docs/html/search/search.js @@ -0,0 +1,814 @@ +/* + @licstart The following is the entire license notice for the + JavaScript code in this file. + + Copyright (C) 1997-2017 by Dimitri van Heesch + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + @licend The above is the entire license notice + for the JavaScript code in this file + */ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches.html'; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName == 'DIV' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName == 'DIV' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/variables_0.js b/docs/html/search/variables_0.js new file mode 100644 index 0000000..d1fd2cf --- /dev/null +++ b/docs/html/search/variables_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['baudrate',['BAUDRATE',['../classB15F.html#a7d548d6861cfc69753161bf9cda14f87',1,'B15F']]] +]; diff --git a/docs/html/search/variables_1.html b/docs/html/search/variables_1.html new file mode 100644 index 0000000..b243c42 --- /dev/null +++ b/docs/html/search/variables_1.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/variables_1.js b/docs/html/search/variables_1.js new file mode 100644 index 0000000..66df4a3 --- /dev/null +++ b/docs/html/search/variables_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['msg',['msg',['../classTimeoutException.html#aa625fc0fae48a67737a98eafb91c9624',1,'TimeoutException::msg()'],['../classUSARTException.html#a14c80df95f216d221aa97cffbcd8dd79',1,'USARTException::msg()']]], + ['msg_5ffail',['MSG_FAIL',['../classB15F.html#a77d1ecf24b406c9204665d3b09c36f1e',1,'B15F']]], + ['msg_5fok',['MSG_OK',['../classB15F.html#ab01299858f74a6cec598688562e0ad02',1,'B15F']]] +]; diff --git a/docs/html/search/variables_2.html b/docs/html/search/variables_2.html new file mode 100644 index 0000000..647df20 --- /dev/null +++ b/docs/html/search/variables_2.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/variables_2.js b/docs/html/search/variables_2.js new file mode 100644 index 0000000..570beea --- /dev/null +++ b/docs/html/search/variables_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['pre',['PRE',['../classB15F.html#a3b0fc1f85954b2d9c145af4a3af5b1ec',1,'B15F']]] +]; diff --git a/docs/html/search/variables_3.html b/docs/html/search/variables_3.html new file mode 100644 index 0000000..9dc9b89 --- /dev/null +++ b/docs/html/search/variables_3.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/variables_3.js b/docs/html/search/variables_3.js new file mode 100644 index 0000000..fbf0a47 --- /dev/null +++ b/docs/html/search/variables_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['reconnect_5ftimeout',['RECONNECT_TIMEOUT',['../classB15F.html#a040951746fbfd632e12bd1ad14578816',1,'B15F']]], + ['reconnect_5ftries',['RECONNECT_TRIES',['../classB15F.html#a6c4895bdbcd71ff6743becf97985c2dc',1,'B15F']]] +]; diff --git a/docs/html/search/variables_4.html b/docs/html/search/variables_4.html new file mode 100644 index 0000000..78cc2c7 --- /dev/null +++ b/docs/html/search/variables_4.html @@ -0,0 +1,30 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/docs/html/search/variables_4.js b/docs/html/search/variables_4.js new file mode 100644 index 0000000..9a9c561 --- /dev/null +++ b/docs/html/search/variables_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['wdt_5ftimeout',['WDT_TIMEOUT',['../classB15F.html#a158d13bc84aed6430cdede1396384e06',1,'B15F']]] +]; diff --git a/docs/html/splitbar.png b/docs/html/splitbar.png new file mode 100644 index 0000000..fe895f2 Binary files /dev/null and b/docs/html/splitbar.png differ diff --git a/docs/html/sync_off.png b/docs/html/sync_off.png new file mode 100644 index 0000000..3b443fc Binary files /dev/null and b/docs/html/sync_off.png differ diff --git a/docs/html/sync_on.png b/docs/html/sync_on.png new file mode 100644 index 0000000..e08320f Binary files /dev/null and b/docs/html/sync_on.png differ diff --git a/docs/html/tab_a.png b/docs/html/tab_a.png new file mode 100644 index 0000000..3b725c4 Binary files /dev/null and b/docs/html/tab_a.png differ diff --git a/docs/html/tab_b.png b/docs/html/tab_b.png new file mode 100644 index 0000000..e2b4a86 Binary files /dev/null and b/docs/html/tab_b.png differ diff --git a/docs/html/tab_h.png b/docs/html/tab_h.png new file mode 100644 index 0000000..fd5cb70 Binary files /dev/null and b/docs/html/tab_h.png differ diff --git a/docs/html/tab_s.png b/docs/html/tab_s.png new file mode 100644 index 0000000..ab478c9 Binary files /dev/null and b/docs/html/tab_s.png differ diff --git a/docs/html/tabs.css b/docs/html/tabs.css new file mode 100644 index 0000000..85a0cd5 --- /dev/null +++ b/docs/html/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0 1px 1px rgba(255,255,255,0.9);color:#283a5d;outline:0}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace!important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283a5d transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;-moz-border-radius:0!important;-webkit-border-radius:0;border-radius:0!important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox a:hover span.sub-arrow{border-color:white transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;-moz-border-radius:5px!important;-webkit-border-radius:5px;border-radius:5px!important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0!important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:white;text-shadow:0 1px 1px black}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent white}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px!important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} \ No newline at end of file diff --git a/docs/html/timeoutexception_8h_source.html b/docs/html/timeoutexception_8h_source.html new file mode 100644 index 0000000..458e529 --- /dev/null +++ b/docs/html/timeoutexception_8h_source.html @@ -0,0 +1,87 @@ + + + + + + + +B15F: drv/timeoutexception.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
timeoutexception.h
+
+
+
1 #ifndef TIMEOUTEXCEPTION_H
2 #define TIMEOUTEXCEPTION_H
3 
4 #include <exception>
5 #include <string>
6 
9 class TimeoutException: public std::exception
10 {
11 public:
16  explicit TimeoutException(const char* message) : msg(message)
17  {
18  }
19 
24  explicit TimeoutException(const std::string& message) : msg(message)
25  {
26  }
27 
31  virtual ~TimeoutException() = default;
32 
37  virtual const char* what() const throw ()
38  {
39  return msg.c_str();
40  }
41 
42 protected:
43  std::string msg;
44 };
45 
46 #endif // TIMEOUTEXCEPTION_H
+
virtual ~TimeoutException()=default
+
std::string msg
failure description
+
virtual const char * what() const
+
TimeoutException(const char *message)
+ +
TimeoutException(const std::string &message)
+ + + + diff --git a/docs/html/ui_8cpp_source.html b/docs/html/ui_8cpp_source.html new file mode 100644 index 0000000..ca5fec7 --- /dev/null +++ b/docs/html/ui_8cpp_source.html @@ -0,0 +1,96 @@ + + + + + + + +B15F: ui/ui.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ui.cpp
+
+
+
1 #include "ui.h"
2 #include "../drv/b15f.h"
3 
4 std::vector<View*> win_stack;
5 std::thread t_refresh;
6 
7 void show_main(int)
8 {
9  ViewSelection* view = new ViewSelection();
10  view->setTitle("B15F - Command Line Interface");
11  view->addChoice("[ Monitor - Eingaben beobachten ]", &show_monitor);
12  view->addChoice("[ Digitale Ausgabe BA0 ]", &show_digital_output0);
13  view->addChoice("[ Digitale Ausgabe BA1 ]", &show_digital_output1);
14  view->addChoice("[ Analoge Ausgabe AA0 ]", &show_analog_output0);
15  view->addChoice("[ Analoge Ausgabe AA1 ]", &show_analog_output1);
16  view->addChoice("[ Selbsttest des B15 ]", &show_selftest_info);
17  view->addChoice("[ Informationen ]", &show_info);
18  view->addChoice("", nullptr);
19  view->addChoice("[ Beenden ]", &finish);
20  view->repaint();
21 
22  win_stack.push_back(view);
23  input(0);
24 }
25 
26 void input(int)
27 {
28  call_t nextCall;
29  int key;
30  do
31  {
32  key = wgetch(View::getWinContext());
33  win_stack.back()->repaint();
34  nextCall = win_stack.back()->keypress(key);
35 
36  if(key == -1)
37  view_back(key);
38 
39  if(nextCall)
40  nextCall(key);
41  }
42  while(win_stack.size());
43 }
44 
45 void view_back(int)
46 {
47  if(win_stack.size())
48  {
49  delete win_stack.back();
50  win_stack.pop_back();
51  }
52  if(win_stack.size())
53  win_stack.back()->repaint();
54 }
55 
56 void finish(int)
57 {
58  cleanup();
59  exit(EXIT_SUCCESS);
60 }
61 
62 void cleanup()
63 {
64  if(t_refresh.joinable())
65  t_refresh.join();
66  clrtoeol();
67  refresh();
68  endwin();
69 }
70 
71 void show_info(int)
72 {
73  ViewInfo* view = new ViewInfo();
74  view->setTitle("Info");
75  view->setText("Informationen zu Board 15 Famulus Edition\n \nProjektseite: https://github.com/devfix/b15f/\nDokumentation: https://devfix.github.io/b15f/\n \nB15F Software entwickelt von Tristan Krause für das Hardware-Labor.\nKontakt: tristan.krause@stud.htwk-leipzig.de");
76  view->setLabelClose("[ Zurueck ]");
77  view->repaint();
78 
79  win_stack.push_back(view);
80  input(0);
81 }
82 
83 void show_monitor(int)
84 {
85  ViewMonitor* view = new ViewMonitor();
86  view->setTitle("Monitor");
87  view->setText("\nErfasse Messwerte...");
88  view->setLabelClose("[ Zurueck ]");
89  view->repaint();
90 
91  win_stack.push_back(view);
92  input(0);
93 }
94 
95 void show_invalid_port_input(int)
96 {
97  ViewInfo* view = new ViewInfo();
98  view->setTitle("Falsche Eingabe");
99  view->setText("Bitte geben Sie einen Wert aus dem Intervall [0, FF] an.");
100  view->setLabelClose("[ Schliessen ]");
101  view->repaint();
102 
103  win_stack.push_back(view);
104  input(0);
105 }
106 
107 void show_invalid_dac_input(int)
108 {
109  ViewInfo* view = new ViewInfo();
110  view->setTitle("Falsche Eingabe");
111  view->setText("Bitte geben Sie einen Wert aus dem Intervall [0, 1023] an.");
112  view->setLabelClose("[ Schliessen ]");
113  view->repaint();
114 
115  win_stack.push_back(view);
116  input(0);
117 }
118 
119 void write_digital_output0(int)
120 {
121  try
122  {
123  int d = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput(), 0, 16);
124  if(d > 255 || 0 > d)
125  throw std::invalid_argument("bad value");
126  uint8_t port = static_cast<uint8_t>(d);
127 
128  B15F& drv = B15F::getInstance();
129  drv.digitalWrite0(port);
130  view_back(0);
131  }
132  catch(std::invalid_argument& ex)
133  {
134  show_invalid_port_input(0);
135  }
136 }
137 
138 void write_digital_output1(int)
139 {
140  try
141  {
142  int d = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput(), 0, 16);
143  if(d > 255 || 0 > d)
144  throw std::invalid_argument("bad value");
145  uint8_t port = static_cast<uint8_t>(d);
146 
147  B15F& drv = B15F::getInstance();
148  drv.digitalWrite1(port);
149  view_back(0);
150  }
151  catch(std::invalid_argument& ex)
152  {
153  show_invalid_port_input(0);
154  }
155 }
156 
157 void write_analog_output0(int)
158 {
159  try
160  {
161  uint16_t port = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput());
162  if(port > 1023)
163  throw std::invalid_argument("bad value");
164 
165  B15F& drv = B15F::getInstance();
166  drv.analogWrite0(port);
167  view_back(0);
168  }
169  catch(std::invalid_argument& ex)
170  {
171  show_invalid_dac_input(0);
172  }
173 }
174 
175 void write_analog_output1(int)
176 {
177  try
178  {
179  uint16_t port = std::stoi(static_cast<ViewPromt*>(win_stack.back())->getInput());
180  if(port > 1023)
181  throw std::invalid_argument("bad value");
182 
183  B15F& drv = B15F::getInstance();
184  drv.analogWrite1(port);
185  view_back(0);
186  }
187  catch(std::invalid_argument& ex)
188  {
189  show_invalid_dac_input(0);
190  }
191 }
192 
193 void show_digital_output0(int)
194 {
195  ViewPromt* view = new ViewPromt();
196  view->setTitle("Digitale Ausgabe BE0");
197  view->setMessage("\nAusgabe Port-Wert (hex): 0x");
198  view->setCancel("[ Zurueck ]", true);
199  view->setConfirm("[ OK ]", &write_digital_output0);
200  view->repaint();
201 
202  win_stack.push_back(view);
203  input(0);
204 }
205 
206 void show_digital_output1(int)
207 {
208  ViewPromt* view = new ViewPromt();
209  view->setTitle("Digitale Ausgabe BE1");
210  view->setMessage("\nAusgabe Port-Wert (hex): 0x");
211  view->setCancel("[ Zurueck ]", true);
212  view->setConfirm("[ OK ]", &write_digital_output1);
213  view->repaint();
214 
215  win_stack.push_back(view);
216  input(0);
217 }
218 
219 void show_analog_output0(int)
220 {
221  ViewPromt* view = new ViewPromt();
222  view->setTitle("Analoge Ausgabe AA0");
223  view->setMessage("\nAusgabe 10-Bit-Wert (0...1023): ");
224  view->setCancel("[ Zurueck ]", true);
225  view->setConfirm("[ OK ]", &write_analog_output0);
226  view->repaint();
227 
228  win_stack.push_back(view);
229  input(0);
230 }
231 
232 void show_analog_output1(int)
233 {
234  ViewPromt* view = new ViewPromt();
235  view->setTitle("Analoge Ausgabe AA1");
236  view->setMessage("\nAusgabe 10-Bit-Wert (0...1023): ");
237  view->setCancel("[ Zurueck ]", true);
238  view->setConfirm("[ OK ]", &write_analog_output1);
239  view->repaint();
240 
241  win_stack.push_back(view);
242  input(0);
243 }
244 
245 void start_selftest(int)
246 {
247  B15F& drv = B15F::getInstance();
248  drv.activateSelfTestMode();
249 
250  ViewInfo* view = new ViewInfo();
251  view->setTitle("Selbsttest aktiv");
252  view->setText("Das B15 befindet sich jetzt im Selbsttestmodus.\n \nSelbsttest:\nZu Beginn geht der Reihe nach jede LED von BA0 bis BA1 an.\nDanach leuchten die LEDs an AA0 und AA1 kurz auf.\nZum Schluss spiegelt in einer Endlosschleife:\n* BA0 Port BE0\n* BA1 die DIP-Schalter S7\n* AA0 ADC0\n* AA1 ADC1");
253  view->setLabelClose("[ Selbsttest Beenden ]");
254  view->setCall(&stop_selftest);
255  view->repaint();
256 
257  win_stack.push_back(view);
258  input(0);
259 }
260 
261 void stop_selftest(int)
262 {
263  B15F& drv = B15F::getInstance();
264  drv.discard();
266  drv.reconnect();
267  drv.digitalWrite0(0);
268  drv.digitalWrite1(0);
269 }
270 
271 void show_selftest_info(int)
272 {
273  ViewInfo* view = new ViewInfo();
274  view->setTitle("Selbsttest");
275  view->setText("Bitte entfernen Sie jetzt alle Draehte von den Anschlussklemmen und\nbestätigen mit Enter.");
276  view->setLabelClose("[ Weiter ]");
277  view->setCall(&start_selftest);
278  view->repaint();
279 
280  win_stack.push_back(view);
281  input(0);
282 }
+ + +
void delay_ms(uint16_t ms)
Definition: b15f.cpp:127
+
static B15F & getInstance(void)
Definition: b15f.cpp:10
+
Definition: b15f.h:33
+
bool digitalWrite0(uint8_t)
Definition: b15f.cpp:204
+
bool activateSelfTestMode(void)
Definition: b15f.cpp:191
+ +
bool analogWrite1(uint16_t port)
Definition: b15f.cpp:292
+ +
bool digitalWrite1(uint8_t)
Definition: b15f.cpp:218
+
void discard(void)
Definition: b15f.cpp:33
+
constexpr static uint16_t WDT_TIMEOUT
Time in ms after which the watch dog timer resets the MCU.
Definition: b15f.h:291
+
void reconnect(void)
Definition: b15f.cpp:18
+
bool analogWrite0(uint16_t port)
Definition: b15f.cpp:277
+ + + + diff --git a/docs/html/ui_8h_source.html b/docs/html/ui_8h_source.html new file mode 100644 index 0000000..1531fd6 --- /dev/null +++ b/docs/html/ui_8h_source.html @@ -0,0 +1,81 @@ + + + + + + + +B15F: ui/ui.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ui.h
+
+
+
1 #ifndef UI_H
2 #define UI_H
3 
4 #include <vector>
5 #include "view_selection.h"
6 #include "view_info.h"
7 #include "view_monitor.h"
8 #include "view_promt.h"
9 
10 void show_main(int);
11 void input(int);
12 void view_back(int);
13 void finish(int);
14 void cleanup();
15 
16 void show_info(int);
17 void show_monitor(int);
18 void show_invalid_port_input(int);
19 void show_invalid_dac_input(int);
20 void write_digital_output0(int);
21 void write_digital_output1(int);
22 void write_analog_output0(int);
23 void write_analog_output1(int);
24 void show_digital_output0(int);
25 void show_digital_output1(int);
26 void show_analog_output0(int);
27 void show_analog_output1(int);
28 
29 // selftest group
30 void show_selftest_info(int);
31 void start_selftest(int);
32 void stop_selftest(int);
33 
34 
35 extern std::vector<View*> win_stack;
36 extern std::thread t_refresh;
37 
38 #endif // UI_H
+ + + + diff --git a/docs/html/usart_8cpp_source.html b/docs/html/usart_8cpp_source.html new file mode 100644 index 0000000..38250a0 --- /dev/null +++ b/docs/html/usart_8cpp_source.html @@ -0,0 +1,96 @@ + + + + + + + +B15F: drv/usart.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
usart.cpp
+
+
+
1 #include <stdexcept>
2 #include "usart.h"
3 
5 {
6  closeDevice();
7 }
8 
9 void USART::openDevice(std::string device)
10 {
11  // Benutze blockierenden Modus
12  file_desc = open(device.c_str(), O_RDWR | O_NOCTTY);// | O_NDELAY
13  if (file_desc <= 0)
14  throw USARTException("Fehler beim Öffnen des Gerätes");
15 
16  struct termios options;
17  int code = tcgetattr(file_desc, &options);
18  if (code)
19  throw USARTException("Fehler beim Lesen der Geräteparameter");
20 
21  options.c_cflag = CS8 | CLOCAL | CREAD;
22  options.c_iflag = IGNPAR;
23  options.c_oflag = 0;
24  options.c_lflag = 0;
25  options.c_cc[VMIN] = 0;
26  options.c_cc[VTIME] = timeout;
27  code = cfsetspeed(&options, baudrate);
28  if (code)
29  throw USARTException("Fehler beim Setzen der Baudrate");
30 
31  code = tcsetattr(file_desc, TCSANOW, &options);
32  if (code)
33  throw USARTException("Fehler beim Setzen der Geräteparameter");
34 
35  code = fcntl(file_desc, F_SETFL, 0); // blockierender Modus
36  if (code)
37  throw USARTException("Fehler beim Aktivieren des blockierenden Modus'");
38 
41 }
42 
44 {
45  if (file_desc > 0)
46  {
47  int code = close(file_desc);
48  if (code)
49  throw USARTException("Fehler beim Schließen des Gerätes");
50  file_desc = -1;
51  }
52 }
53 
55 {
56  int code = tcflush(file_desc, TCIFLUSH);
57  if (code)
58  throw USARTException("Fehler beim Leeren des Eingangspuffers");
59 }
60 
62 {
63  int code = tcflush(file_desc, TCOFLUSH);
64  if (code)
65  throw USARTException("Fehler beim Leeren des Ausgangspuffers");
66 }
67 
69 {
70  int code = tcdrain(file_desc);
71  if (code)
72  throw USARTException("Fehler beim Versenden des Ausgangspuffers");
73 }
74 
75 void USART::transmit(uint8_t *buffer, uint16_t offset, uint8_t len)
76 {
77  int code = write(file_desc, buffer + offset, len);
78  if (code != len)
79  throw USARTException(
80  std::string(__FUNCTION__) + " failed: " + std::string(__FILE__) + "#" + std::to_string(__LINE__) +
81  ", " + strerror(code) + " (code " + std::to_string(code) + " / " + std::to_string(len) + ")");
82 }
83 
84 void USART::receive(uint8_t *buffer, uint16_t offset, uint8_t len)
85 {
86  int bytes_avail, code;
87  auto start = std::chrono::steady_clock::now();
88  auto end = std::chrono::steady_clock::now();
89  do
90  {
91  code = ioctl(file_desc, FIONREAD, &bytes_avail);
92  if (code)
93  throw USARTException(
94  std::string(__FUNCTION__) + " failed: " + std::string(__FILE__) + "#" + std::to_string(__LINE__) +
95  ", " + strerror(code) + " (code " + std::to_string(code) + ")");
96 
97  end = std::chrono::steady_clock::now();
98  long elapsed =
99  std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() / 100; // in Dezisekunden
100  if (elapsed >= timeout)
101  throw TimeoutException(
102  std::string(__FUNCTION__) + " failed: " + std::string(__FILE__) + "#" + std::to_string(__LINE__) +
103  ", " + std::to_string(elapsed) + " / " + std::to_string(timeout) + " ds");
104  }
105  while (bytes_avail < len);
106 
107  code = read(file_desc, buffer + offset, len);
108  if (code != len)
109  throw USARTException(
110  std::string(__FUNCTION__) + " failed: " + std::string(__FILE__) + "#" + std::to_string(__LINE__) +
111  ", " + strerror(code) + " (code " + std::to_string(code) + " / " + std::to_string(len) + ")");
112 }
113 
114 void USART::drop(uint8_t len)
115 {
116  // Kann bestimmt noch eleganter gelöst werden
117  uint8_t dummy[len];
118  receive(&dummy[0], 0, len);
119 }
120 
122 {
123  return baudrate;
124 }
125 
127 {
128  return timeout;
129 }
130 
131 void USART::setBaudrate(uint32_t baudrate)
132 {
133  this->baudrate = baudrate;
134 }
135 
136 void USART::setTimeout(uint8_t timeout)
137 {
138  this->timeout = timeout;
139 }
+
uint32_t getBaudrate(void)
Definition: usart.cpp:121
+ +
void closeDevice(void)
Definition: usart.cpp:43
+
void transmit(uint8_t *buffer, uint16_t offset, uint8_t len)
Definition: usart.cpp:75
+
void receive(uint8_t *buffer, uint16_t offset, uint8_t len)
Definition: usart.cpp:84
+
void clearInputBuffer(void)
Definition: usart.cpp:54
+
uint8_t getTimeout(void)
Definition: usart.cpp:126
+
void clearOutputBuffer(void)
Definition: usart.cpp:61
+
void setBaudrate(uint32_t baudrate)
Definition: usart.cpp:131
+
virtual ~USART(void)
Definition: usart.cpp:4
+
void openDevice(std::string device)
Definition: usart.cpp:9
+
void drop(uint8_t len)
Definition: usart.cpp:114
+
void setTimeout(uint8_t timeout)
Definition: usart.cpp:136
+
void flushOutputBuffer(void)
Definition: usart.cpp:68
+ + + + + diff --git a/docs/html/usart_8h_source.html b/docs/html/usart_8h_source.html new file mode 100644 index 0000000..2a868bd --- /dev/null +++ b/docs/html/usart_8h_source.html @@ -0,0 +1,96 @@ + + + + + + + +B15F: drv/usart.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
usart.h
+
+
+
1 #ifndef USART_H
2 #define USART_H
3 
4 #include <cstdint>
5 #include <chrono>
6 #include <fcntl.h>
7 #include <unistd.h>
8 #include <termios.h>
9 #include <sys/ioctl.h>
10 #include <string.h>
11 #include "usartexception.h"
12 #include "timeoutexception.h"
13 
16 class USART
17 {
18 public:
19 
20  /*************************************************
21  * Methoden für die Verwaltung der Schnittstelle *
22  *************************************************/
23 
27  explicit USART() = default;
28 
32  virtual ~USART(void);
33 
39  void openDevice(std::string device);
40 
45  void closeDevice(void);
46 
51  void clearInputBuffer(void);
52 
57  void clearOutputBuffer(void);
58 
63  void flushOutputBuffer(void);
64 
65  /*************************************************/
66 
67 
68 
69  /*************************************
70  * Methoden für die Datenübertragung *
71  *************************************/
72 
80  void transmit(uint8_t *buffer, uint16_t offset, uint8_t len);
81 
89  void receive(uint8_t *buffer, uint16_t offset, uint8_t len);
90 
96  void drop(uint8_t len);
97 
98  /*************************************/
99 
100 
101 
102  /***************************************
103  * Methoden für einstellbare Parameter *
104  ***************************************/
105 
110  uint32_t getBaudrate(void);
111 
116  uint8_t getTimeout(void);
117 
122  void setBaudrate(uint32_t baudrate);
123 
128  void setTimeout(uint8_t timeout);
129 
130  /***************************************/
131 
132 private:
133 
134  int file_desc = -1;
135  uint32_t baudrate = 9600;
136  uint8_t timeout = 10;
137 };
138 
139 #endif // USART_H
+
uint32_t getBaudrate(void)
Definition: usart.cpp:121
+
USART()=default
+
void closeDevice(void)
Definition: usart.cpp:43
+
void transmit(uint8_t *buffer, uint16_t offset, uint8_t len)
Definition: usart.cpp:75
+
void receive(uint8_t *buffer, uint16_t offset, uint8_t len)
Definition: usart.cpp:84
+
void clearInputBuffer(void)
Definition: usart.cpp:54
+
uint8_t getTimeout(void)
Definition: usart.cpp:126
+
Definition: usart.h:16
+
void clearOutputBuffer(void)
Definition: usart.cpp:61
+
void setBaudrate(uint32_t baudrate)
Definition: usart.cpp:131
+
virtual ~USART(void)
Definition: usart.cpp:4
+
void openDevice(std::string device)
Definition: usart.cpp:9
+
void drop(uint8_t len)
Definition: usart.cpp:114
+
void setTimeout(uint8_t timeout)
Definition: usart.cpp:136
+
void flushOutputBuffer(void)
Definition: usart.cpp:68
+ + + + diff --git a/docs/html/usartexception_8h_source.html b/docs/html/usartexception_8h_source.html new file mode 100644 index 0000000..89f154f --- /dev/null +++ b/docs/html/usartexception_8h_source.html @@ -0,0 +1,87 @@ + + + + + + + +B15F: drv/usartexception.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
usartexception.h
+
+
+
1 #ifndef USARTEXCEPTION_H
2 #define USARTEXCEPTION_H
3 
4 #include <exception>
5 #include <string>
6 
9 class USARTException: public std::exception
10 {
11 public:
16  explicit USARTException(const char* message) : msg(message)
17  {
18  }
19 
24  explicit USARTException(const std::string& message) : msg(message)
25  {
26  }
27 
31  virtual ~USARTException() = default;
32 
37  virtual const char* what() const throw ()
38  {
39  return msg.c_str();
40  }
41 
42 protected:
43  std::string msg;
44 };
45 
46 #endif // USARTEXCEPTION_H
+
USARTException(const char *message)
+ +
virtual const char * what() const
+
std::string msg
failure description
+
USARTException(const std::string &message)
+
virtual ~USARTException()=default
+ + + + diff --git a/docs/html/view_8cpp_source.html b/docs/html/view_8cpp_source.html new file mode 100644 index 0000000..e907712 --- /dev/null +++ b/docs/html/view_8cpp_source.html @@ -0,0 +1,82 @@ + + + + + + + +B15F: ui/view.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
view.cpp
+
+
+
1 #include "view.h"
2 
3 WINDOW* View::win = nullptr;
4 
5 View::View()
6 {
7  if(!win)
8  {
9  B15F::abort("View::win not initialized, missing context");
10  }
11  getmaxyx(win, height, width); // init width and height
12  keypad(win, TRUE);
13 }
14 
15 View::~View()
16 {
17 }
18 
19 void View::setWinContext(WINDOW* win)
20 {
21  View::win = win;
22 }
23 
24 WINDOW* View::getWinContext()
25 {
26  return win;
27 }
28 
29 // from: https://stackoverflow.com/a/37454181
30 std::vector<std::string> View::str_split(const std::string& str, const std::string delim)
31 {
32  std::vector<std::string> tokens;
33  size_t prev = 0, pos = 0;
34  do
35  {
36  pos = str.find(delim, prev);
37  if (pos == std::string::npos) pos = str.length();
38  std::string token = str.substr(prev, pos-prev);
39  if (!token.empty()) tokens.push_back(token);
40  prev = pos + delim.length();
41  }
42  while (pos < str.length() && prev < str.length());
43  return tokens;
44 }
45 
46 
47 void View::setTitle(std::string title)
48 {
49  this->title = title;
50 }
51 
52 void View::repaint()
53 {
54  // get screen size
55  struct winsize size;
56  if (ioctl(0, TIOCGWINSZ, (char *) &size) < 0)
57  throw std::runtime_error("TIOCGWINSZ error");
58 
59 
60  start_x = floor((size.ws_col - width) / 2.);
61  start_y = floor((size.ws_row - height) / 2.);
62 
63  curs_set(0); // hide cursor
64  mvwin(win, start_y, start_x);
65  clear();
66  wclear(win);
67 
68  // generic draw
69  box(win, 0, 0);
70  int offset_x = (width - title.length()) / 2;
71  mvwprintw(win, 1, offset_x, "%s", title.c_str());
72 
73  // specific draw
74  draw();
75 
76  refresh();
77  wrefresh(win);
78 }
+
static void abort(std::string msg)
Definition: b15f.cpp:161
+ + + + diff --git a/docs/html/view_8h_source.html b/docs/html/view_8h_source.html new file mode 100644 index 0000000..d7f657e --- /dev/null +++ b/docs/html/view_8h_source.html @@ -0,0 +1,82 @@ + + + + + + + +B15F: ui/view.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
view.h
+
+
+
1 #ifndef VIEW_H
2 #define VIEW_H
3 
4 #include <iostream>
5 #include <cmath>
6 #include <vector>
7 #include <functional>
8 #include <ncurses.h> // sudo apt-get install libncurses5-dev
9 #include <sys/ioctl.h>
10 #include <unistd.h>
11 #include <signal.h>
12 #include "../drv/b15f.h"
13 
14 extern std::string ERR_MSG;
15 typedef std::function<void(int)> call_t;
16 
19 class View
20 {
21 public:
22  View(void);
23  virtual ~View(void);
24 
25  static void setWinContext(WINDOW* win);
26  static WINDOW* getWinContext(void);
27  static std::vector<std::string> str_split(const std::string& str, const std::string delim);
28 
29  virtual void setTitle(std::string title);
30 
31  virtual void repaint(void);
32 
33  virtual void draw(void) = 0;
34  virtual call_t keypress(int& key) = 0;
35 
36 
37 protected:
38  int width, height;
39  int start_x = 0, start_y = 0;
40  std::string title;
41  std::vector<call_t> calls;
42 
43  static WINDOW* win;
44  constexpr static int KEY_ENT = 10;
45 };
46 
47 #endif // VIEW_H
+
Definition: view.h:19
+ + + + diff --git a/docs/html/view__info_8cpp_source.html b/docs/html/view__info_8cpp_source.html new file mode 100644 index 0000000..d15929a --- /dev/null +++ b/docs/html/view__info_8cpp_source.html @@ -0,0 +1,81 @@ + + + + + + + +B15F: ui/view_info.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
view_info.cpp
+
+
+
1 #include "view_info.h"
2 
3 ViewInfo::ViewInfo()
4 {
5  calls.push_back(nullptr);
6 }
7 
8 void ViewInfo::setText(std::string text)
9 {
10  this->text = text;
11 }
12 
13 void ViewInfo::setLabelClose(std::string label)
14 {
15  this->label_close = label;
16 }
17 
18 void ViewInfo::setCall(call_t call)
19 {
20  calls[0] = call;
21 }
22 
23 void ViewInfo::draw()
24 {
25  int li = 0;
26  for(std::string line : str_split(text, "\n"))
27  mvwprintw(win, text_offset_y + li++, text_offset_x, "%s", line.c_str());
28 
29  close_offset_x = (width - label_close.length()) / 2;
30  close_offset_y = height - 2;
31 
32  wattron(win, A_REVERSE);
33  mvwprintw(win, close_offset_y, close_offset_x, "%s", label_close.c_str());
34  wattroff(win, A_REVERSE);
35 }
36 
37 call_t ViewInfo::keypress(int& key)
38 {
39  switch(key)
40  {
41 
42  case KEY_MOUSE:
43  {
44  // http://pronix.linuxdelta.de/C/Linuxprogrammierung/Linuxsystemprogrammieren_C_Kurs_Kapitel10b.shtml
45  MEVENT event;
46  if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
47  {
48  size_t column = start_x + close_offset_x;
49  size_t row = start_y + close_offset_y;
50  size_t mouse_x = event.x, mouse_y = event.y;
51  if(mouse_y == row && mouse_x >= column && mouse_x < column + label_close.length())
52  key = -1; // do return from view
53  }
54  break;
55  }
56  case KEY_ENT:
57  key = -1; // do return from view
58  break;
59  default:
60  break;
61  }
62  return calls[0];
63 }
+ + + + diff --git a/docs/html/view__info_8h_source.html b/docs/html/view__info_8h_source.html new file mode 100644 index 0000000..ad3a7ad --- /dev/null +++ b/docs/html/view__info_8h_source.html @@ -0,0 +1,83 @@ + + + + + + + +B15F: ui/view_info.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
view_info.h
+
+
+
1 #ifndef VIEW_INFO
2 #define VIEW_INFO
3 
4 #include "view.h"
5 
8 class ViewInfo : public View
9 {
10 public:
11  ViewInfo(void);
12  virtual void setText(std::string text);
13  virtual void setLabelClose(std::string label);;
14  virtual void setCall(call_t call);
15  virtual void draw(void) override;
16  virtual call_t keypress(int& key) override;
17 
18 protected:
19  std::string text;
20  std::string label_close;
21  int close_offset_x = 0;
22  int close_offset_y = 0;
23  constexpr static int text_offset_x = 2;
24  constexpr static int text_offset_y = 3;
25 };
26 
27 #endif // VIEW_INFO
+ +
Definition: view.h:19
+ + + + diff --git a/docs/html/view__monitor_8cpp_source.html b/docs/html/view__monitor_8cpp_source.html new file mode 100644 index 0000000..c0d70cf --- /dev/null +++ b/docs/html/view__monitor_8cpp_source.html @@ -0,0 +1,92 @@ + + + + + + + +B15F: ui/view_monitor.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
view_monitor.cpp
+
+
+
1 #include "view_monitor.h"
2 
3 ViewMonitor::ViewMonitor() : t_worker(&ViewMonitor::worker, this)
4 {
5 }
6 
7 call_t ViewMonitor::keypress(int& key)
8 {
9  switch(key)
10  {
11 
12  case KEY_MOUSE:
13  {
14  // http://pronix.linuxdelta.de/C/Linuxprogrammierung/Linuxsystemprogrammieren_C_Kurs_Kapitel10b.shtml
15  MEVENT event;
16  bool hit = false;
17  if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
18  {
19  size_t column = start_x + close_offset_x;
20  size_t row = start_y + close_offset_y;
21  size_t mouse_x = event.x, mouse_y = event.y;
22  if(mouse_y == row && mouse_x >= column && mouse_x < column + label_close.length())
23  hit = true;
24  }
25  if(!hit)
26  break;
27 
28  // fall through to next case
29  [[fallthrough]];
30  }
31  case KEY_ENT:
32  run_worker = false;
33  key = -1; // do return from view
34  wclear(win);
35  wrefresh(win);
36  t_worker.join();
37  break;
38  default:
39  break;
40  }
41  return calls[0];
42 }
43 
44 std::string ViewMonitor::fancyDigitalString(uint8_t& b)
45 {
46  std::string bitstring(std::bitset<8>(b).to_string());
47  std::reverse(bitstring.begin(), bitstring.end());
48 
49  std::stringstream str;
50  str << bitstring;
51  str << " ";
52  str << "0x" << std::setfill ('0') << std::setw(2) << std::hex << (int) b << std::dec;
53  return str.str();
54 }
55 
56 std::string ViewMonitor::fancyAnalogString(uint16_t& v)
57 {
58  std::stringstream str;
59  double volt = round(v * 100.0 * 5.0 / 1023.0) / 100.0;
60 
61  str << std::setfill ('0') << std::setw(4) << (int) v << " " << std::fixed << std::setprecision(2) << volt << " V ";
62 
63  str << "[";
64  uint8_t p = round(v * 40.0 / 1023.0);
65  for(uint8_t i = 0; i < p; i++)
66  str << "X";
67  for(uint8_t i = 0; i < 40 - p; i++)
68  str << " ";
69  str << "]" << std::endl;
70 
71  return str.str();
72 }
73 
74 void ViewMonitor::worker()
75 {
76  B15F& drv = B15F::getInstance();
77  while(run_worker)
78  {
79  try
80  {
81  std::this_thread::sleep_for(std::chrono::milliseconds(100));
82 
83  uint8_t be0 = drv.digitalRead0();
84  uint8_t be1 = drv.digitalRead1();
85  uint8_t dsw = drv.readDipSwitch();
86  uint16_t adc[8];
87  for(uint8_t i = 0; i < sizeof(adc) / sizeof(adc[0]); i++)
88  adc[i] = drv.analogRead(i);
89 
90 
91  std::stringstream str;
92 
93  // hline
94  for(uint8_t i = 0; i < width - 2 * text_offset_x; i++)
95  if(i % 2 == 0)
96  str << "-";
97  else
98  str << " ";
99  str << std::endl;
100 
101  str << "Digitale Enigaenge:" << std::endl;
102  str << "Binaere Eingabe 0: " << fancyDigitalString(be0) << std::endl;
103  str << "Binaere Eingabe 1: " << fancyDigitalString(be1) << std::endl;
104  str << "Dip Schalter (S7): " << fancyDigitalString(dsw) << std::endl;
105 
106  // hline
107  for(uint8_t i = 0; i < width - 2 * text_offset_x; i++)
108  if(i % 2 == 0)
109  str << "-";
110  else
111  str << " ";
112  str << std::endl;
113 
114  str << "Analoge Eingaenge:" << std::endl;
115  for(uint8_t i = 0; i < sizeof(adc) / sizeof(adc[0]); i++)
116  {
117  str << "Kanal " << std::to_string((int) i) << ": ";
118  str << fancyAnalogString(adc[i]) << std::endl;
119  }
120 
121  text = str.str();
122  repaint();
123  }
124  catch(DriverException& ex)
125  {
126  std::cout << "DriverException: " << ex.what() << std::endl;
127  drv.delay_ms(1000);
128  }
129  catch(...)
130  {
131  try
132  {
133  drv.reconnect();
134  }
135  catch(...)
136  {
137  B15F::abort("Die Verbindung ist unterbrochen worden. Wurde ein Stecker gezogen? :D");
138  return;
139  }
140  }
141  }
142 }
+ +
uint8_t digitalRead0(void)
Definition: b15f.cpp:232
+
uint8_t readDipSwitch(void)
Definition: b15f.cpp:260
+
void delay_ms(uint16_t ms)
Definition: b15f.cpp:127
+
static B15F & getInstance(void)
Definition: b15f.cpp:10
+
Definition: b15f.h:33
+
static void abort(std::string msg)
Definition: b15f.cpp:161
+
uint16_t analogRead(uint8_t channel)
Definition: b15f.cpp:307
+
uint8_t digitalRead1(void)
Definition: b15f.cpp:246
+
void reconnect(void)
Definition: b15f.cpp:18
+ + + + + diff --git a/docs/html/view__monitor_8h_source.html b/docs/html/view__monitor_8h_source.html new file mode 100644 index 0000000..bc70925 --- /dev/null +++ b/docs/html/view__monitor_8h_source.html @@ -0,0 +1,83 @@ + + + + + + + +B15F: ui/view_monitor.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
view_monitor.h
+
+
+
1 #ifndef VIEW_MONITOR_H
2 #define VIEW_MONITOR_H
3 
4 #include <thread>
5 #include <chrono>
6 #include <sstream>
7 #include <bitset>
8 #include "view_info.h"
9 #include "../drv/b15f.h"
10 
13 class ViewMonitor : public ViewInfo
14 {
15 
16 public:
17  ViewMonitor(void);
18  virtual call_t keypress(int& key) override;
19 
20 private:
21  std::string fancyDigitalString(uint8_t& b);
22  std::string fancyAnalogString(uint16_t& v);
23 
24 protected:
25  virtual void worker(void);
26  volatile bool run_worker = true;
27  std::thread t_worker;
28 
29 };
30 
31 #endif // VIEW_MONITOR_H
+ + + + + + diff --git a/docs/html/view__promt_8cpp_source.html b/docs/html/view__promt_8cpp_source.html new file mode 100644 index 0000000..e6f2d13 --- /dev/null +++ b/docs/html/view__promt_8cpp_source.html @@ -0,0 +1,81 @@ + + + + + + + +B15F: ui/view_promt.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
view_promt.cpp
+
+
+
1 #include "view_promt.h"
2 
3 void ViewPromt::draw()
4 {
5  curs_set(1); // show cursor
6 
7  int li = text_offset_y;
8  int ci = 0;
9  for(std::string line : str_split(message + input, "\n"))
10  {
11  mvwprintw(win, ++li, text_offset_x, "%s", line.c_str());
12  ci = line.length() + text_offset_x;
13  }
14 
15  button_offset_x = (width - label_cancel.length() - sep.length() - label_confirm.length()) / 2;
16  button_offset_y = height - text_offset_y;
17 
18  if(selection == 0)
19  {
20  wattron(win, A_REVERSE);
21  mvwprintw(win, button_offset_y, button_offset_x, "%s", label_cancel.c_str());
22  wattroff(win, A_REVERSE);
23  mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length(), "%s", sep.c_str());
24  mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length() + sep.length(), "%s", label_confirm.c_str());
25  }
26  else
27  {
28  mvwprintw(win, button_offset_y, button_offset_x, "%s", label_cancel.c_str());
29  mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length(), "%s", sep.c_str());
30  wattron(win, A_REVERSE);
31  mvwprintw(win, button_offset_y, button_offset_x + label_cancel.length() + sep.length(), "%s", label_confirm.c_str());
32  wattroff(win, A_REVERSE);
33  }
34  wmove(win, li, ci);
35 }
36 
37 void ViewPromt::setMessage(std::string message)
38 {
39  this->message = message;
40 }
41 
42 void ViewPromt::setConfirm(std::string name, std::function<void(int)> call)
43 {
44  label_confirm = name;
45  call_confirm = call;
46 }
47 
48 void ViewPromt::setCancel(std::string name, bool cancelable)
49 {
50  label_cancel = name;
51  this->cancelable = cancelable;
52 }
53 
54 std::string ViewPromt::getInput()
55 {
56  return input;
57 }
58 
59 std::function<void(int)> ViewPromt::keypress(int& key)
60 {
61  std::function<void(int)> ret = nullptr;
62  switch(key)
63  {
64  case KEY_BACKSPACE:
65  if(input.length())
66  input.pop_back();
67  break;
68  case '\t':
69  case KEY_LEFT:
70  case KEY_RIGHT:
71  selection = (selection + 1 ) % 2;
72  break;
73  case KEY_MOUSE:
74  {
75  // http://pronix.linuxdelta.de/C/Linuxprogrammierung/Linuxsystemprogrammieren_C_Kurs_Kapitel10b.shtml
76  MEVENT event;
77  bool hit = false;
78  if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
79  {
80  size_t column_start = start_x + button_offset_x;
81  size_t row_start = start_y + button_offset_y;
82  size_t mouse_x = event.x, mouse_y = event.y;
83  if(mouse_y == row_start)
84  {
85  if(cancelable && mouse_x >= column_start && mouse_x < column_start + label_cancel.length())
86  {
87  if(selection == 0 || event.bstate & BUTTON1_DOUBLE_CLICKED)
88  hit = true;
89  selection = 0;
90  }
91  if(mouse_x >= column_start + label_cancel.length() + sep.length() && mouse_x < column_start + label_cancel.length() + sep.length() + label_confirm.length())
92  {
93  if(selection == 1 || event.bstate & BUTTON1_DOUBLE_CLICKED)
94  hit = true;
95  selection = 1;
96  }
97  }
98  }
99  if(!hit)
100  break;
101 
102  // fall through to next case
103  [[fallthrough]];
104  }
105  case KEY_ENT:
106  if(selection == 0) // exit
107  key = -1; // do return from view
108  else
109  ret = call_confirm;
110  break;
111  default:
112  break;
113  }
114 
115  if(key >= ' ' && key <= '~')
116  input += (char) key;
117 
118  if(key != KEY_ENT)
119  repaint();
120  return ret;
121 }
+ + + + diff --git a/docs/html/view__promt_8h_source.html b/docs/html/view__promt_8h_source.html new file mode 100644 index 0000000..14ab7a2 --- /dev/null +++ b/docs/html/view__promt_8h_source.html @@ -0,0 +1,83 @@ + + + + + + + +B15F: ui/view_promt.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
view_promt.h
+
+
+
1 #ifndef VIEW_PROMT_H
2 #define VIEW_PROMT_H
3 
4 #include <vector>
5 #include <string>
6 #include "view.h"
7 
10 class ViewPromt : public View
11 {
12 public:
13  virtual void draw(void) override;
14  virtual void setMessage(std::string message);
15  virtual void setConfirm(std::string name, call_t call);
16  virtual void setCancel(std::string name, bool cancelable);
17  virtual std::string getInput(void);
18  virtual call_t keypress(int& key) override;
19 
20 protected:
21  size_t selection = 1;
22  std::string input;
23  std::string message = "Input";
24  std::string label_confirm = "[ OK ]";
25  std::string sep = " ";
26  std::string label_cancel = "[ Cancel ]";
27  call_t call_confirm = nullptr;
28  bool cancelable = true;
29  int button_offset_x = 0, button_offset_y = 0;
30  constexpr static int text_offset_x = 2;
31  constexpr static int text_offset_y = 2;
32 };
33 
34 #endif // VIEW_PROMT_H
+
Definition: view.h:19
+ + + + + diff --git a/docs/html/view__selection_8cpp_source.html b/docs/html/view__selection_8cpp_source.html new file mode 100644 index 0000000..652a9e7 --- /dev/null +++ b/docs/html/view__selection_8cpp_source.html @@ -0,0 +1,81 @@ + + + + + + + +B15F: ui/view_selection.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
view_selection.cpp
+
+
+
1 #include "view_selection.h"
2 
3 void ViewSelection::draw()
4 {
5  //curs_set(0); // hide cursor
6  for(size_t i = 0; i < choices.size(); i++)
7  {
8  if(selection == i)
9  wattron(win, A_REVERSE);
10  mvwprintw(win, i + choice_offset_y, choice_offset_x, "%s", choices[i].c_str());
11  if(selection == i)
12  wattroff(win, A_REVERSE);
13  }
14 }
15 
16 void ViewSelection::addChoice(std::string name, call_t call)
17 {
18  choices.push_back(name);
19  calls.push_back(call);
20 }
21 
22 call_t ViewSelection::keypress(int& key)
23 {
24  call_t ret = nullptr;
25  switch(key)
26  {
27  case KEY_UP:
28  do
29  selection = (selection - 1 + choices.size()) % choices.size();
30  while(!choices[selection].length() && choices.size());
31  break;
32 
33  case '\t':
34  case KEY_DOWN:
35  do
36  selection = (selection + 1) % choices.size();
37  while(!choices[selection].length() && choices.size());
38  break;
39 
40  case KEY_MOUSE:
41  {
42  // http://pronix.linuxdelta.de/C/Linuxprogrammierung/Linuxsystemprogrammieren_C_Kurs_Kapitel10b.shtml
43  MEVENT event;
44  bool hit = false;
45  if(getmouse(&event) == OK && event.bstate & (BUTTON1_CLICKED | BUTTON1_DOUBLE_CLICKED))
46  {
47  size_t column_start = start_x + choice_offset_x;
48  size_t row_start = start_y + choice_offset_y;
49  size_t mouse_x = event.x, mouse_y = event.y;
50  for(size_t i = 0; i < choices.size(); i++)
51  if(choices[i].length() && mouse_y == row_start + i && mouse_x >= column_start && mouse_x < column_start + choices[i].length())
52  {
53  if(selection == i || event.bstate & BUTTON1_DOUBLE_CLICKED)
54  hit = true;
55  selection = i;
56  }
57  }
58  if(!hit)
59  break;
60 
61  // fall through to next case
62  [[fallthrough]];
63  }
64 
65  case KEY_ENT:
66  if(selection == choices.size() - 1) // exit
67  key = -1; // do return from view
68  else
69  ret = calls[selection];
70  break;
71  default:
72  break;
73  }
74  repaint();
75  return ret;
76 }
+ + + + diff --git a/docs/html/view__selection_8h_source.html b/docs/html/view__selection_8h_source.html new file mode 100644 index 0000000..39fb378 --- /dev/null +++ b/docs/html/view__selection_8h_source.html @@ -0,0 +1,83 @@ + + + + + + + +B15F: ui/view_selection.h Source File + + + + + + + + + +
+
+ + + + + + +
+
B15F +
+
Board 15 Famulus Edition
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
view_selection.h
+
+
+
1 #ifndef VIEW_SELECTION_H
2 #define VIEW_SELECTION_H
3 
4 #include <vector>
5 #include <string>
6 #include "view.h"
7 
10 class ViewSelection : public View
11 {
12 public:
13  virtual void draw(void) override;
14  virtual void addChoice(std::string name, call_t call);
15  virtual call_t keypress(int& key) override;
16 
17 
18 protected:
19  size_t selection = 0;
20  std::vector<std::string> choices;
21 
22  constexpr static int choice_offset_x = 2;
23  constexpr static int choice_offset_y = 3;
24 };
25 
26 #endif // VIEW_SELECTION_H
+
Definition: view.h:19
+ + + + +