Instrument Neutral Distributed Interface INDI
2.2.5
indiserver
LocalDrvInfo.hpp
Go to the documentation of this file.
1
/* INDI Server for protocol version 1.7.
2
* Copyright (C) 2007 Elwood C. Downey <
[email protected]
>
3
2013 Jasem Mutlaq <
[email protected]
>
4
2022 Ludovic Pollet
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Lesser General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
9
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public
16
License along with this library; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
*/
19
#pragma once
20
21
#include "
DvrInfo.hpp
"
22
23
#include <ev++.h>
24
#include <string>
25
26
class
LocalDvrInfo
:
public
DvrInfo
27
{
28
char
errbuff[1024];
/* buffer for stderr pipe. line too long will be clipped */
29
int
errbuffpos = 0;
/* first free pos in buffer */
30
ev::io eio;
/* Event loop io events */
31
ev::child pidwatcher;
32
void
onEfdEvent(ev::io &watcher,
int
revents);
/* callback for data on efd */
33
void
onPidEvent(ev::child &watcher,
int
revents);
34
35
int
pid = 0;
/* process id or 0 for N/A (not started/terminated) */
36
int
efd = -1;
/* stderr from driver, or -1 when N/A */
37
38
void
closeEfd();
39
void
closePid();
40
protected
:
41
LocalDvrInfo
(
const
LocalDvrInfo
&model);
42
43
public
:
44
std::string
envDev
;
45
std::string
envConfig
;
46
std::string
envSkel
;
47
std::string
envPrefix
;
48
49
LocalDvrInfo
();
50
virtual
~LocalDvrInfo
();
51
52
void
start
()
override
;
53
54
LocalDvrInfo
*
clone
()
const override
;
55
56
const
std::string
remoteServerUid
()
const override
57
{
58
return
""
;
59
}
60
};
DvrInfo.hpp
DvrInfo
Definition
DvrInfo.hpp:33
LocalDvrInfo
Definition
LocalDrvInfo.hpp:27
LocalDvrInfo::LocalDvrInfo
LocalDvrInfo()
Definition
LocalDvrInfo.cpp:208
LocalDvrInfo::envPrefix
std::string envPrefix
Definition
LocalDrvInfo.hpp:47
LocalDvrInfo::envConfig
std::string envConfig
Definition
LocalDrvInfo.hpp:45
LocalDvrInfo::envSkel
std::string envSkel
Definition
LocalDrvInfo.hpp:46
LocalDvrInfo::remoteServerUid
const std::string remoteServerUid() const override
Definition
LocalDrvInfo.hpp:56
LocalDvrInfo::start
void start() override
Definition
LocalDvrInfo.cpp:36
LocalDvrInfo::~LocalDvrInfo
virtual ~LocalDvrInfo()
Definition
LocalDvrInfo.cpp:225
LocalDvrInfo::envDev
std::string envDev
Definition
LocalDrvInfo.hpp:44
LocalDvrInfo::clone
LocalDvrInfo * clone() const override
Definition
LocalDvrInfo.cpp:236
Generated on Thu Oct 22 2026 14:46:48 for Instrument Neutral Distributed Interface INDI by
1.9.8