Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Geithner, Thomas
desk-control
Commits
61a8dd8a
Commit
61a8dd8a
authored
Oct 11, 2017
by
Geithner, Thomas
Committed by
Mall, Anon
Oct 11, 2017
Browse files
added coap_port as config parameter
parent
9536e98f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/config.h
View file @
61a8dd8a
...
...
@@ -34,6 +34,9 @@ public:
std
::
string
get
(
const
std
::
string
&
key
)
throw
(
ConfigException
);
std
::
string
get
(
const
std
::
string
&
key
,
const
std
::
string
&
default_value
);
int
get
(
const
std
::
string
&
key
,
const
int
&
default_value
){
return
stoi
(
get
(
key
,
std
::
to_string
(
default_value
)));
}
void
set
(
const
std
::
string
&
key
,
const
std
::
string
&
value
);
void
set
(
const
std
::
string
&
key
,
const
int
&
value
){
...
...
src/desk-main.cpp
View file @
61a8dd8a
...
...
@@ -11,16 +11,21 @@
#include
"config.h"
#include
<iostream>
#include
<cstdint>
using
namespace
std
;
using
namespace
desk
;
int
main
(
int
argc
,
char
**
argv
){
uint16_t
coap_port
;
Config
conf
(
"/etc/desk.conf"
);
LinakDesk
desk
(
conf
);
CmdFrontend
cf
(
desk
);
CoapFrontend
cof
(
desk
,
5678
);
coap_port
=
conf
.
get
(
"coap_port"
,
5678
);
CoapFrontend
cof
(
desk
,
coap_port
);
desk
.
doDeskControl
();
...
...
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