Fawkes API  Fawkes Development Version
openprs.h
1 
2 /***************************************************************************
3  * openprs.h - OpenPRS aspect for Fawkes
4  *
5  * Created: Mon Aug 18 14:33:35 2014
6  * Copyright 2014 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef _PLUGINS_OPENPRS_ASPECT_OPENPRS_H_
25 #define _PLUGINS_OPENPRS_ASPECT_OPENPRS_H_
26 
27 #include <aspect/aspect.h>
28 #include <core/utils/lockptr.h>
29 
30 #include <list>
31 #include <string>
32 
33 namespace fawkes {
34 
35 class OpenPRSComm;
36 class OpenPRSAspectIniFin;
37 
38 class OpenPRSAspect : public virtual Aspect
39 {
40  friend OpenPRSAspectIniFin;
41 
42 public:
43  /** OPRS kernel operation mode. */
44  typedef enum {
45  OPRS, ///< command line mode
46  XOPRS ///< graphical mode
47  } Mode;
48 
49  OpenPRSAspect(const char *kernel_name, Mode mode = OPRS, const char *local_name = NULL);
50  virtual ~OpenPRSAspect();
51 
52  void add_openprs_data_path(const std::string &path);
53  void set_openprs_gdb_delay(const bool enable_gdb_delay);
54 
55 protected:
57  const std::string openprs_kernel_name;
59  const std::string openprs_local_name;
60 
61 private:
62  void init_OpenPRSAspect(LockPtr<OpenPRSComm> oprs_comm);
63  void finalize_OpenPRSAspect();
64 
65  std::list<std::string> openprs_data_paths_;
66  bool openprs_gdb_delay_;
67 };
68 
69 } // end namespace fawkes
70 
71 #endif
fawkes::OpenPRSAspect::openprs_kernel_mode
const Mode openprs_kernel_mode
Definition: openprs.h:62
fawkes::LockPtr
LockPtr<> is a reference-counting shared lockable smartpointer.
Definition: lockptr.h:60
fawkes::OpenPRSAspect::set_openprs_gdb_delay
void set_openprs_gdb_delay(const bool enable_gdb_delay)
Enable/disable GDB delay.
Definition: openprs.cpp:110
fawkes::OpenPRSAspect::openprs_local_name
const std::string openprs_local_name
Definition: openprs.h:63
fawkes::OpenPRSAspect::OPRS
command line mode
Definition: openprs.h:49
fawkes::OpenPRSAspect::openprs
LockPtr< OpenPRSComm > openprs
Definition: openprs.h:60
fawkes::OpenPRSAspect::~OpenPRSAspect
virtual ~OpenPRSAspect()
Virtual empty destructor.
Definition: openprs.cpp:84
fawkes::OpenPRSAspect::openprs_kernel_name
const std::string openprs_kernel_name
Definition: openprs.h:61
fawkes
fawkes::OpenPRSAspect::XOPRS
graphical mode
Definition: openprs.h:50
fawkes::OpenPRSAspect::add_openprs_data_path
void add_openprs_data_path(const std::string &path)
Add an OpenPRS data path.
Definition: openprs.cpp:96
fawkes::OpenPRSAspect::Mode
Mode
OPRS kernel operation mode.
Definition: openprs.h:48
fawkes::OpenPRSAspect::OpenPRSAspect
OpenPRSAspect(const char *kernel_name, Mode mode=OPRS, const char *local_name=NULL)
Constructor.
Definition: openprs.cpp:69