Commit 61a8dd8a authored by Geithner, Thomas's avatar Geithner, Thomas Committed by Mall, Anon
Browse files

added coap_port as config parameter

parent 9536e98f
......@@ -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){
......@@ -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);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment