Instrument Neutral Distributed Interface INDI
2.2.5
integs
IndiClientMock.h
Go to the documentation of this file.
1
/*******************************************************************************
2
Copyright(c) 2022 Ludovic Pollet. All rights reserved.
3
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License version 2 as published by the Free Software Foundation.
7
8
This library is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
Library General Public License for more details.
12
13
You should have received a copy of the GNU Library General Public License
14
along with this library; see the file COPYING.LIB. If not, write to
15
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16
Boston, MA 02110-1301, USA.
17
*******************************************************************************/
18
19
#ifndef INDI_CLIENT_MOCK_H_
20
#define INDI_CLIENT_MOCK_H_ 1
21
22
#include <string>
23
24
#include "
ConnectionMock.h
"
25
26
class
IndiServerController
;
27
31
class
IndiClientMock
32
{
33
int
fd;
34
public
:
35
ConnectionMock
cnx
;
36
IndiClientMock
();
37
virtual
~IndiClientMock
();
38
39
void
connect
(
const
IndiServerController
& server);
40
void
connectUnix
(
const
IndiServerController
& server);
41
void
connectTcp
(
const
IndiServerController
& server);
42
43
void
connectUnix
(
const
std::string &path =
"/tmp/indiserver"
);
44
void
connectTcp
(
const
std::string &host =
"127.0.0.1"
,
int
port = 7624);
45
void
associate
(
int
fd);
46
47
// This ensure that previous orders were received
48
void
ping
();
49
50
void
close
();
51
};
52
53
54
#endif
// INDI_CLIENT_MOCK_H_
ConnectionMock.h
ConnectionMock
Definition
ConnectionMock.h:31
IndiClientMock
Definition
IndiClientMock.h:32
IndiClientMock::~IndiClientMock
virtual ~IndiClientMock()
Definition
IndiClientMock.cpp:31
IndiClientMock::connectUnix
void connectUnix(const IndiServerController &server)
Definition
IndiClientMock.cpp:51
IndiClientMock::close
void close()
Definition
IndiClientMock.cpp:36
IndiClientMock::associate
void associate(int fd)
Definition
IndiClientMock.cpp:73
IndiClientMock::IndiClientMock
IndiClientMock()
Definition
IndiClientMock.cpp:26
IndiClientMock::connectTcp
void connectTcp(const IndiServerController &server)
Definition
IndiClientMock.cpp:56
IndiClientMock::ping
void ping()
Definition
IndiClientMock.cpp:79
IndiClientMock::cnx
ConnectionMock cnx
Definition
IndiClientMock.h:35
IndiClientMock::connect
void connect(const IndiServerController &server)
Definition
IndiClientMock.cpp:42
IndiServerController
Definition
IndiServerController.h:33
Generated on Thu Oct 22 2026 14:46:48 for Instrument Neutral Distributed Interface INDI by
1.9.8