OpenSplice ISO C++ 2 FACE API  v6.x
OpenSplice Future Airborne Capability Environment (FACE) ISO C++ 2 API
FaceInstance.hpp
Go to the documentation of this file.
1 /*
2  * Vortex OpenSplice
3  *
4  * This software and documentation are Copyright 2006 to 2021 ADLINK
5  * Technology Limited, its affiliated companies and licensors. All rights
6  * reserved.
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 #ifndef VORTEX_FACE_FACE_INSTANCE_HPP_
22 #define VORTEX_FACE_FACE_INSTANCE_HPP_
23 
24 #include "os_atomics.h"
25 
26 #include "Vortex_FACE.hpp"
27 #include "Vortex/FACE/Mutex.hpp"
28 #include "Vortex/FACE/Config.hpp"
30 
31 namespace Vortex {
32 namespace FACE {
33 
35 public: /* static */
37  typedef std::map< ::FACE::CONNECTION_ID_TYPE, AnyConnection::shared_ptr > FI_MAP_TYPE;
38 
39  FaceInstance();
40 
42  createInstance(const ::FACE::CONFIGURATION_RESOURCE configuration);
43 
45  getInstance();
46 
47 public: /* object */
49  createConnection(const ::FACE::CONNECTION_NAME_TYPE connectionName,
51  ::FACE::CONNECTION_ID_TYPE &connectionId,
52  ::FACE::CONNECTION_DIRECTION_TYPE &connectionDirection,
53  ::FACE::MESSAGE_SIZE_TYPE &maxMessageSize,
55 
57  getConnection(const ::FACE::CONNECTION_ID_TYPE &connectionId);
58 
60  destroyConnection(const ::FACE::CONNECTION_ID_TYPE &connectionId);
61 
62  int32_t
63  getDomainId() const;
64 
65 private: /* object */
67  init(const ::FACE::CONFIGURATION_RESOURCE configuration);
68 
70  findConnection(const std::string &connectionName,
71  ::FACE::CONNECTION_ID_TYPE &connectionId);
72 
73  FI_MAP_TYPE connections;
74  Vortex::FACE::Config *config;
75  pa_uint32_t pa_id;
76  int32_t domainId;
77 
78 private: /* static */
79  static Mutex mutex;
80  static FaceInstance::shared_ptr instance;
81 };
82 
83 
84 }; /* namespace FACE */
85 }; /* namespace Vortex */
86 
87 #endif /* VORTEX_FACE_REPORT_SUPPORT_HPP_ */
Vortex::FACE::smart_ptr_traits< AnyConnection >::shared_ptr shared_ptr
int64_t CONNECTION_ID_TYPE
RETURN_CODE_TYPE
Definition: FACE_common.h:54
std::map< ::FACE::CONNECTION_ID_TYPE, AnyConnection::shared_ptr > FI_MAP_TYPE
int32_t MESSAGE_SIZE_TYPE
SYSTEM_TIME_TYPE TIMEOUT_TYPE
Definition: FACE_common.h:49
OSPL_CXX11_STD_MODULE::shared_ptr< T > shared_ptr
Definition: Macros.hpp:44
Char CONFIGURATION_RESOURCE[256]
Definition: FACE_common.h:52
CONNECTION_DIRECTION_TYPE
Vortex::FACE::smart_ptr_traits< FaceInstance >::shared_ptr shared_ptr
#define VORTEX_FACE_API
Definition: Macros.hpp:34
Char CONNECTION_NAME_TYPE[64]
MESSAGING_PATTERN_TYPE