Safir SDK Core
Loading...
Searching...
No Matches
Connection.h
Go to the documentation of this file.
1/******************************************************************************
2*
3* Copyright Saab AB, 2007-2013 (http://safirsdkcore.com)
4*
5* Created by: Joel Ottosson / stjoot
6*
7*******************************************************************************
8*
9* This file is part of Safir SDK Core.
10*
11* Safir SDK Core is free software: you can redistribute it and/or modify
12* it under the terms of version 3 of the GNU General Public License as
13* published by the Free Software Foundation.
14*
15* Safir SDK Core is distributed in the hope that it will be useful,
16* but WITHOUT ANY WARRANTY; without even the implied warranty of
17* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18* GNU General Public License for more details.
19*
20* You should have received a copy of the GNU General Public License
21* along with Safir SDK Core. If not, see <http://www.gnu.org/licenses/>.
22*
23******************************************************************************/
24
25#ifndef _SAFIR_DOB_CONNECTION_H
26#define _SAFIR_DOB_CONNECTION_H
27
31
32// Somewhat dirty but convenient for the Dob-user
34
35namespace Safir
36{
37namespace Dob
38{
46 {
47 public:
48
52
55 virtual ~Connection();
56
90 void Open(const std::wstring& connectionNameCommonPart,
91 const std::wstring& connectionNameInstancePart,
92 const Dob::Typesystem::Int32 context,
93 StopHandler * const stopHandler,
94 Dispatcher * const dispatcher);
95
107 void Close();
108
114 bool IsOpen() const override;
115
123 void Dispatch() const;
124
125 private:
126
127 //implementation of pure virtual
128 DotsC_Int32 GetControllerId() const override {return m_ctrl;}
129
130 DotsC_Int32 m_ctrl;
131
132 //Disable copying and assignment
133 Connection(const Connection&);
134 Connection& operator=(const Connection&);
135 };
136}
137}
138
139#endif
#define DOSE_CPP_API
Definition DoseCppExportDefs.h:33
This namespace contains all the functionality and definitions of the SAFIR SDK.
Definition Backdoor.h:31
DotsC_Int32 Int32
32 bit integer type.
Definition Defs.h:66
A connection to the DOB.
Definition Connection.h:46
bool IsOpen() const override
Check if this Connection instance is open.
Connection()
Constructor.
void Close()
Close the connection to the DOB.
void Open(const std::wstring &connectionNameCommonPart, const std::wstring &connectionNameInstancePart, const Dob::Typesystem::Int32 context, StopHandler *const stopHandler, Dispatcher *const dispatcher)
Open a connection to the DOB.
void Dispatch() const
When the dispatch event or callback is signalled, the application MUST call this method.
virtual ~Connection()
Destructor.
Common base class for connections to the DOB.
Definition ConnectionBase.h:59
Interface for reception of a stop order.
Definition Consumer.h:55
Interface for reception of a dispatch order.
Definition Consumer.h:74