Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Achim Morschhauser
GeomagLogger
Commits
065a4fd4
Commit
065a4fd4
authored
Nov 06, 2018
by
Achim Morschhauser
Browse files
Baud rate codes
parent
5244e183
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/driver_obs_obsdaq.hpp
View file @
065a4fd4
...
...
@@ -11,6 +11,7 @@
#define _DRIVER_OBS_OBSDAQ_H
#include <string>
#include <unordered_map>
#include <Driver_Obs_Serial.hpp>
#include <data_obs_vector.hpp>
...
...
@@ -58,6 +59,10 @@ const char* filter_cmds[11];
/** Counting variable for binary data supplemental channels */
int
supp_count
;
/** Baud rate codes */
const
static
std
::
unordered_map
<
int
,
std
::
string
>
map_baud
;
//
// Constructors
//
...
...
src/driver_obs_obsdaq.cpp
View file @
065a4fd4
...
...
@@ -23,12 +23,26 @@
#include <sstream>
#include <iostream>
#include <iomanip>
#include <unordered_map>
// Library C++ headers
#include <buffer_obs.hpp> // Buffer for data
#include <data_obs_vector.hpp> // Vector data structure
#include <driver_obs_obsdaq.hpp> // Generic observatory driver
/*******************************************************************************
*******************************************************************************
* *
* Initialize static variables *
* *
*******************************************************************************
******************************************************************************/
// Baud rate codes (Table 5 of Manual)
const
std
::
unordered_map
<
int
,
std
::
string
>
driver_obs_obsdaq
::
map_baud
(
{{
1200
,
"03"
},{
2400
,
"04"
},{
4800
,
"05"
},{
9600
,
"06"
},{
19200
,
"07"
},
{
38400
,
"08"
},{
57600
,
"09"
},{
115200
,
"0A"
},{
307200
,
"0B"
}});
/*******************************************************************************
*******************************************************************************
* *
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment