|
const std::string | PRE = "[B15F] " |
|
|
constexpr static uint8_t | MSG_OK = 0xFF |
|
constexpr static uint8_t | MSG_FAIL = 0xFE |
|
constexpr static uint16_t | RECONNECT_TIMEOUT = 64 |
|
constexpr static uint16_t | WDT_TIMEOUT = 15 |
|
constexpr static uint8_t | RECONNECT_TRIES = 3 |
|
constexpr static uint32_t | BAUDRATE = 57600 |
|
Definition at line 24 of file b15f.h.
◆ abort() [1/2]
void B15F::abort |
( |
std::exception & |
ex | ) |
|
|
static |
Multithread sicherer Abbruch des B15F-Treibers
- Parameters
-
ex | Exception als Abbruchursache |
Definition at line 327 of file b15f.cpp.
◆ abort() [2/2]
void B15F::abort |
( |
std::string |
msg | ) |
|
|
static |
Multithread sicherer Abbruch des B15F-Treibers
- Parameters
-
msg | Beschreibung der Abbruchursache |
Definition at line 322 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
-
Definition at line 144 of file b15f.cpp.
◆ analogRead()
uint16_t B15F::analogRead |
( |
uint8_t |
channel | ) |
|
Liest den Wert des Analog-Digital-Converters (ADC / ADU)
- Parameters
-
channel | Kanalwahl von 0 - 7 |
- Exceptions
-
Definition at line 219 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 |
|
) |
| |
Komplexe Analoge Sequenz 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_a | Auswahl des ADC a, von 0 - 7 |
buffer_a | Speichertort für Werte des Kanals a |
offset_a | Anzahl an Werten des Kanals a, die im Speicher übersprungen werden sollen |
channel_b | Auswahl des ADC b, von 0 - 7 |
buffer_b | Speichertort für Werte des Kanals b |
offset_b | Anzahl an Werten des Kanals b, die im Speicher übersprungen werden |
start | Startwert des DACs |
delta | Schrittweite, mit welcher der DAC inkrementiert wird |
count | Anzahl an Inkrementierungen |
- Exceptions
-
Definition at line 241 of file b15f.cpp.
◆ analogWrite0()
bool B15F::analogWrite0 |
( |
uint16_t |
value | ) |
|
Setzt den Wert des Digital-Analog-Converters (DAC / DAU) 0
- Parameters
-
- Exceptions
-
Definition at line 199 of file b15f.cpp.
◆ analogWrite1()
bool B15F::analogWrite1 |
( |
uint16_t |
value | ) |
|
Setzt den Wert des Digital-Analog-Converters (DAC / DAU) 1
- Parameters
-
- Exceptions
-
Definition at line 209 of file b15f.cpp.
◆ delay_ms()
void B15F::delay_ms |
( |
uint16_t |
ms | ) |
|
Lässt den Treiber für eine angegebene Zeit pausieren
- Parameters
-
ms | Verzögerung in Millisekunden |
Definition at line 290 of file b15f.cpp.
◆ delay_us()
void B15F::delay_us |
( |
uint16_t |
us | ) |
|
Lässt den Treiber für eine angegebene Zeit pausieren
- Parameters
-
us | Verzögerung in Microsekunden |
Definition at line 295 of file b15f.cpp.
◆ digitalRead0()
uint8_t B15F::digitalRead0 |
( |
void |
| ) |
|
Liest den Wert des digitalen Eingabeports 0
- Returns
- Wert für gesamten Port
- Exceptions
-
Definition at line 172 of file b15f.cpp.
◆ digitalRead1()
uint8_t B15F::digitalRead1 |
( |
void |
| ) |
|
Liest den Wert des digitalen Eingabeports 1
- Returns
- Wert für gesamten Port
- Exceptions
-
Definition at line 181 of file b15f.cpp.
◆ digitalWrite0()
bool B15F::digitalWrite0 |
( |
uint8_t |
port | ) |
|
Setzt den Wert des digitalen Ausgabeports 0
- Parameters
-
port | Wert für gesamten Port |
- Exceptions
-
Definition at line 152 of file b15f.cpp.
◆ digitalWrite1()
bool B15F::digitalWrite1 |
( |
uint8_t |
port | ) |
|
Setzt den Wert des digitalen Ausgabeports 1
- Parameters
-
port | Wert für gesamten Port |
- Exceptions
-
Definition at line 162 of file b15f.cpp.
◆ discard()
void B15F::discard |
( |
void |
| ) |
|
Verwirft Daten im USART Puffer auf dieser Maschine und B15
- Exceptions
-
Definition at line 72 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
-
Definition at line 309 of file b15f.cpp.
◆ getBoardInfo()
std::vector< std::string > B15F::getBoardInfo |
( |
void |
| ) |
|
Liefert Informationen zur aktuellen Firmware des B15
- Exceptions
-
Definition at line 118 of file b15f.cpp.
◆ getInstance()
B15F & B15F::getInstance |
( |
void |
| ) |
|
|
static |
Liefert eine Referenz zur aktuellen Treiber-Instanz
- Exceptions
-
Definition at line 300 of file b15f.cpp.
◆ init()
Initialisiert und testet die Verbindung zum B15
- Exceptions
-
Definition at line 11 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
-
Definition at line 190 of file b15f.cpp.
◆ reconnect()
void B15F::reconnect |
( |
void |
| ) |
|
Versucht die Verbindung zum B15 wiederherzustellen
- Exceptions
-
Definition at line 57 of file b15f.cpp.
◆ setAbortHandler()
void B15F::setAbortHandler |
( |
errorhandler_t |
func | ) |
|
|
static |
Setzt eine Fehlerbehandlungsroutine für den Treiberabbruch (abort)
- Parameters
-
func | Funktion, die Exception als Parameter bekommt |
Definition at line 339 of file b15f.cpp.
◆ testConnection()
bool B15F::testConnection |
( |
void |
| ) |
|
Testet die USART Verbindung auf Funktion
- Exceptions
-
Definition at line 90 of file b15f.cpp.
◆ testIntConv()
bool B15F::testIntConv |
( |
void |
| ) |
|
Testet die Integer Konvertierung der USART Verbindung
- Exceptions
-
Definition at line 105 of file b15f.cpp.
The documentation for this class was generated from the following files:
- /home/famulus/Dokumente/b15f/control/src/drv/b15f.h
- /home/famulus/Dokumente/b15f/control/src/drv/b15f.cpp