Safir SDK Core
Loading...
Searching...
No Matches
ConnectionAspectMisc.h
Go to the documentation of this file.
1/******************************************************************************
2*
3* Copyright Saab AB, 2007-2013, 2022 (http://safirsdkcore.com)
4*
5* Created by: Anders Widén / stawi
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#pragma once
26
32#include <Safir/Dob/Entity.h>
36
37#include <string>
38
39namespace Safir
40{
41namespace Dob
42{
48 {
49 public:
55 explicit ConnectionAspectMisc(const ConnectionBase& connection) : ConnectionAspectBase(connection) {}
56
63
77 const std::wstring GetConnectionName() const;
78
79
85 const std::wstring GetConnectionNameCommonPart() const;
86
92 const std::wstring GetConnectionNameInstancePart() const;
93
100
109
117 bool IsLightNode() const;
118
135
136
148
171 void SimulateOverflows(const bool inQueues, const bool outQueues) const;
172
191
203
206 };
207
208}
209}
210
#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
DotsC_Int64 Int64
64 bit integer type.
Definition Defs.h:69
Base class for all aspects.
Definition ConnectionAspectBase.h:38
Class that provides miscellaneous methods that are used less frequently.
Definition ConnectionAspectMisc.h:48
const std::wstring GetConnectionName() const
Get the name for this connection used in the system.
Dob::Typesystem::Int32 GetContext() const
Get the context that the connection is opened in.
ConnectionAspectMisc(const ConnectionBase &connection)
Constructor.
Definition ConnectionAspectMisc.h:55
bool IsLightNode() const
Check whether the current node is a light node.
Dob::CallbackId::Enumeration GetCurrentCallbackId() const
Get info about which callback you are currently executing in.
const std::wstring GetConnectionNameCommonPart() const
Get the common part of the connection name.
Typesystem::Int64 GetSharedMemoryUsage() const
Get the number of currently used bytes in the shared memory.
void SimulateOverflows(const bool inQueues, const bool outQueues) const
Turn simulation of overflow on/off.
Dob::Typesystem::Int32 GetQueueCapacity(const Dob::ConnectionQueueId::Enumeration queue) const
Get the capacity of the specified queue.
Dob::Typesystem::Int32 GetQueueSize(const Dob::ConnectionQueueId::Enumeration queue) const
Get the number of items currently in the queue.
Dob::MemoryLevel::Enumeration GetSharedMemoryLevel() const
Get the usage level of the shared memory.
const std::wstring GetConnectionNameInstancePart() const
Get the instance part of the connection name.
Dob::Typesystem::Int64 GetNodeId() const
Get the Node Identifier of the current node.
Common base class for connections to the DOB.
Definition ConnectionBase.h:59
Enumeration
Definition CallbackId.h:37
Enumeration
Definition ConnectionQueueId.h:37
Enumeration
Definition MemoryLevel.h:37