API Documentation
Loading...
Searching...
No Matches
ConnectionForwarding.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Connection.h>
4#include <NDEVR/Translator.h>
5namespace NDEVR
6{
8 {
9 public:
10 ConnectionForwarding(ProgressInfo* log = nullptr);
14 virtual void update() override;
15 virtual bool open(bool start_forward_thread = true);
16 virtual bool isOpen() const;
17 Connection* a() const { return m_a; }
18 Connection* b() const { return m_b; }
19 void close();
20 void setAConnectionInfo(const ConnectionInfo& info);
21 void setBConnectionInfo(const ConnectionInfo& info);
22 void setForwardAToB(bool forward);
23 void setForwardBToA(bool forward);
24 bool forwardAToB() const { return m_forward_a_to_b; }
25 bool forwardBToA() const { return m_forward_b_to_a; }
26 TimeSpan updateInterval() const override;
27 void setUpdateInterval(const TimeSpan& span);
28 protected:
29 virtual void _close();
30 protected:
31 TimeSpan m_update_span = TimeSpan(0.05);
32 Connection* m_a = nullptr;
33 Connection* m_b = nullptr;
34 bool m_forward_a_to_b = true;
35 bool m_forward_b_to_a = true;
36 bool m_is_open = false;
37 bool m_request_close = false;
38 };
39}
#define HARDWARE_API
Definition DLLInfo.h:74
Definition ConnectionForwarding.h:8
bool forwardAToB() const
Definition ConnectionForwarding.h:24
Connection * b() const
Definition ConnectionForwarding.h:18
Connection * a() const
Definition ConnectionForwarding.h:17
bool forwardBToA() const
Definition ConnectionForwarding.h:25
Definition Connection.h:171
Definition Device.h:48
Definition ProgressInfo.hpp:43
Definition TimeSpan.h:40
Definition ACIColor.h:37
Definition Connection.h:87