iceoryx_posh 2.0.3
introspection_types.hpp
1// Copyright (c) 2019 - 2020 by Robert Bosch GmbH. All rights reserved.
2// Copyright (c) 2020 - 2021 by Apex.AI Inc. All rights reserved.
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16// SPDX-License-Identifier: Apache-2.0
17#ifndef IOX_POSH_ROUDI_INTROSPECTION_TYPES_HPP
18#define IOX_POSH_ROUDI_INTROSPECTION_TYPES_HPP
19
20#include "iceoryx_hoofs/cxx/vector.hpp"
21#include "iceoryx_posh/capro/service_description.hpp"
22#include "iceoryx_posh/iceoryx_posh_types.hpp"
23#include "iceoryx_posh/mepoo/mepoo_config.hpp"
24
25namespace iox
26{
27namespace roudi
28{
29constexpr const char INTROSPECTION_SERVICE_ID[] = "Introspection";
30constexpr const char INTROSPECTION_APP_NAME[] = "introspection";
31constexpr const char INTROSPECTION_NODE_NAME[] = "introspection";
32const capro::ServiceDescription IntrospectionMempoolService(INTROSPECTION_SERVICE_ID, "RouDi_ID", "MemPool");
33constexpr int MAX_GROUP_NAME_LENGTH = 32;
34
39{
40 uint32_t m_usedChunks{0};
41 uint32_t m_minFreeChunks{0};
42 uint32_t m_numChunks{0};
43 uint32_t m_chunkSize{0};
44 uint32_t m_chunkPayloadSize{0};
45};
46
48using MemPoolInfoContainer = cxx::vector<MemPoolInfo, MAX_NUMBER_OF_MEMPOOLS>;
49
52{
53 uint32_t m_id;
54 cxx::string<MAX_GROUP_NAME_LENGTH> m_writerGroupName;
55 cxx::string<MAX_GROUP_NAME_LENGTH> m_readerGroupName;
56 MemPoolInfoContainer m_mempoolInfo;
57};
58
60using MemPoolIntrospectionInfoContainer = cxx::vector<MemPoolIntrospectionInfo, MAX_SHM_SEGMENTS + 1>;
61
64const capro::ServiceDescription IntrospectionPortService(INTROSPECTION_SERVICE_ID, "RouDi_ID", "Port");
65
68{
69 RuntimeName_t m_name;
70 capro::IdString_t m_caproInstanceID;
71 capro::IdString_t m_caproServiceID;
72 capro::IdString_t m_caproEventMethodID;
73 NodeName_t m_node;
74};
75
77
80{
81 uint64_t m_publisherPortID{0};
82 iox::capro::Interfaces m_sourceInterface{iox::capro::Interfaces::INTERFACE_END};
83};
84
87{
88 cxx::vector<SubscriberPortData, MAX_SUBSCRIBERS> m_subscriberList;
89 cxx::vector<PublisherPortData, MAX_PUBLISHERS> m_publisherList;
90};
91
93 IntrospectionPortThroughputService(INTROSPECTION_SERVICE_ID, "RouDi_ID", "PortThroughput");
94
96{
97 uint64_t m_publisherPortID{0};
98 uint32_t m_sampleSize{0};
99 uint32_t m_chunkSize{0};
100 double m_chunksPerMinute{0};
101 uint64_t m_lastSendIntervalInNanoseconds{0};
102 bool m_isField{false};
103};
104
107{
108 cxx::vector<PortThroughputData, MAX_PUBLISHERS> m_throughputList;
109};
110
112 IntrospectionSubscriberPortChangingDataService(INTROSPECTION_SERVICE_ID, "RouDi_ID", "SubscriberPortsData");
113
115{
116 // index used to identify subscriber is same as in PortIntrospectionFieldTopic->subscriberList
117 uint64_t fifoSize{0};
118 uint64_t fifoCapacity{0};
119 iox::SubscribeState subscriptionState{iox::SubscribeState::NOT_SUBSCRIBED};
120 capro::Scope propagationScope{capro::Scope::INVALID};
121};
122
124{
125 cxx::vector<SubscriberPortChangingData, MAX_SUBSCRIBERS> subscriberPortChangingDataList;
126};
127
128const capro::ServiceDescription IntrospectionProcessService(INTROSPECTION_SERVICE_ID, "RouDi_ID", "Process");
129
131{
132 int m_pid{0};
133 RuntimeName_t m_name;
134 cxx::vector<NodeName_t, MAX_NODE_PER_PROCESS> m_nodes;
135};
136
139{
140 cxx::vector<ProcessIntrospectionData, MAX_PROCESS_NUMBER> m_processList;
141};
142
143} // namespace roudi
144} // namespace iox
145
146#endif // IOX_POSH_ROUDI_INTROSPECTION_TYPES_HPP
class for the identification of a communication event including information on the service,...
Definition: service_description.hpp:81
cxx::vector< MemPoolIntrospectionInfo, MAX_SHM_SEGMENTS+1 > MemPoolIntrospectionInfoContainer
container for MemPoolInfo structs of all available mempools.
Definition: introspection_types.hpp:60
const capro::ServiceDescription IntrospectionPortService(INTROSPECTION_SERVICE_ID, "RouDi_ID", "Port")
publisher/subscriber port information consisting of a process name,a capro service description string...
cxx::vector< MemPoolInfo, MAX_NUMBER_OF_MEMPOOLS > MemPoolInfoContainer
container for MemPoolInfo structs of all available mempools.
Definition: introspection_types.hpp:48
struct for the storage of mempool usage information. This data container is used by the introstpectio...
Definition: introspection_types.hpp:39
the topic for the mempool introspection that a user can subscribe to
Definition: introspection_types.hpp:52
container for common port data which is related to the subscriber port as well as the publisher port
Definition: introspection_types.hpp:68
the topic for the port introspection that a user can subscribe to
Definition: introspection_types.hpp:87
Definition: introspection_types.hpp:96
the topic for the port throughput that a user can subscribe to
Definition: introspection_types.hpp:107
Definition: introspection_types.hpp:131
the topic for the process introspection that a user can subscribe to
Definition: introspection_types.hpp:139
container for publisher port introspection data.
Definition: introspection_types.hpp:80
Definition: introspection_types.hpp:115
Definition: introspection_types.hpp:124