Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix singleton in StatisticsBackendData [15841] #172

Merged
merged 13 commits into from
Oct 24, 2022
Merged
10 changes: 0 additions & 10 deletions .github/actions/fetch-fastdds-repos/action.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/actions/install-gtest/action.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/ci.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
repositories:

foonathan_memory_vendor:
type: git
url: https://github.com/eProsima/foonathan_memory_vendor.git
version: master

fastcdr:
type: git
url: https://github.com/eProsima/Fast-CDR.git
version: master

fastdds:
type: git
url: https://github.com/eProsima/Fast-DDS.git
version: master

googletest-distribution:
type: git
url: https://github.com/google/googletest.git
version: release-1.12.1
31 changes: 15 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,12 @@ jobs:
- name: Install apt packages
uses: ./src/Fast-DDS-statistics-backend/.github/actions/install-apt-packages

- name: Install GTest
uses: ./src/Fast-DDS-statistics-backend/.github/actions/install-gtest

- name: Install Python packages
uses: ./src/Fast-DDS-statistics-backend/.github/actions/install-python-packages

- name: Fetch eProsima dependencies
uses: ./src/Fast-DDS-statistics-backend/.github/actions/fetch-fastdds-repos
run: |
vcs import src < ./src/Fast-DDS-statistics-backend/.github/workflows/ci.repos

- name: Update colcon mixin
run: |
Expand All @@ -111,10 +109,17 @@ jobs:
colcon mixin update default
continue-on-error: true

- name: Build gtest
run: |
colcon build \
--event-handlers=console_direct+ \
--packages-select googletest-distribution

- name: Build workspace
run: |
cat src/Fast-DDS-statistics-backend/.github/workflows/test.meta
colcon build \
--packages-skip googletest-distribution \
--event-handlers=console_direct+ \
--metas src/Fast-DDS-statistics-backend/.github/workflows/test.meta

Expand Down Expand Up @@ -187,14 +192,12 @@ jobs:
- name: Install apt packages
uses: ./src/Fast-DDS-statistics-backend/.github/actions/install-apt-packages

- name: Install GTest
uses: ./src/Fast-DDS-statistics-backend/.github/actions/install-gtest

- name: Install Python packages
uses: ./src/Fast-DDS-statistics-backend/.github/actions/install-python-packages

- name: Fetch eProsima dependencies
uses: ./src/Fast-DDS-statistics-backend/.github/actions/fetch-fastdds-repos
run: |
vcs import src < ./src/Fast-DDS-statistics-backend/.github/workflows/ci.repos

- name: Update colcon mixin
run: |
Expand Down Expand Up @@ -247,14 +250,12 @@ jobs:
- name: Install apt packages
uses: ./src/Fast-DDS-statistics-backend/.github/actions/install-apt-packages

- name: Install GTest
uses: ./src/Fast-DDS-statistics-backend/.github/actions/install-gtest

- name: Install Python packages
uses: ./src/Fast-DDS-statistics-backend/.github/actions/install-python-packages

- name: Fetch eProsima dependencies
uses: ./src/Fast-DDS-statistics-backend/.github/actions/fetch-fastdds-repos
run: |
vcs import src < ./src/Fast-DDS-statistics-backend/.github/workflows/ci.repos

- name: Update colcon mixin
run: |
Expand Down Expand Up @@ -299,14 +300,12 @@ jobs:
- name: Install apt packages
uses: ./src/Fast-DDS-statistics-backend/.github/actions/install-apt-packages

- name: Install GTest
uses: ./src/Fast-DDS-statistics-backend/.github/actions/install-gtest

- name: Install Python packages
uses: ./src/Fast-DDS-statistics-backend/.github/actions/install-python-packages

- name: Fetch eProsima dependencies
uses: ./src/Fast-DDS-statistics-backend/.github/actions/fetch-fastdds-repos
run: |
vcs import src < ./src/Fast-DDS-statistics-backend/.github/workflows/ci.repos
MiguelCompany marked this conversation as resolved.
Show resolved Hide resolved

- name: Build workspace
run: |
Expand Down
29 changes: 14 additions & 15 deletions src/cpp/Monitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,50 +51,49 @@ namespace details {
struct Monitor
{
//! The EntityId of the monitored domain
EntityId id;
EntityId id{};

//! The user listener for this monitor
DomainListener* domain_listener;
DomainListener* domain_listener = nullptr;

//! The callback mask applied to the \c domain_listener
CallbackMask domain_callback_mask;
CallbackMask domain_callback_mask{};

//! The data mask applied to the \c domain_listener->on_data_available
DataKindMask data_mask;
DataKindMask data_mask{};

//! The participant created to communicate with the statistics reporting endpoints in this monitor
fastdds::dds::DomainParticipant* participant;
fastdds::dds::DomainParticipant* participant = nullptr;

//! The listener linked to the \c participant
//! It will process the entity discoveries
fastdds::dds::DomainParticipantListener* participant_listener;

fastdds::dds::DomainParticipantListener* participant_listener = nullptr;

//! The participant created to communicate with the statistics reporting publishers in this monitor
fastdds::dds::Subscriber* subscriber;
fastdds::dds::Subscriber* subscriber = nullptr;

//! Holds the topic object created for each of the statistics topics
std::map<std::string, fastdds::dds::Topic*> topics;
std::map<std::string, fastdds::dds::Topic*> topics{};

//! Holds the datareader object created for each of the statistics topics
std::map<std::string, fastdds::dds::DataReader*> readers;
std::map<std::string, fastdds::dds::DataReader*> readers{};

//! The listener linked to the \c readers
//! All readers will use the same listener
//! The listener will decide how to process the data according to the topic of the reader
fastdds::dds::DataReaderListener* reader_listener;
fastdds::dds::DataReaderListener* reader_listener = nullptr;

//! Participant discovery status. Used in the participant discovery user callback
DomainListener::Status participant_status_;
DomainListener::Status participant_status_{};

//! Topic discovery status. Used in the topic discovery user callback
DomainListener::Status topic_status_;
DomainListener::Status topic_status_{};

//! Datareader discovery status. Used in the datareader discovery user callback
DomainListener::Status datareader_status_;
DomainListener::Status datareader_status_{};

//! DataWriter discovery status. Used in the datawriter discovery user callback
DomainListener::Status datawriter_status_;
DomainListener::Status datawriter_status_{};
};

} // namespace details
Expand Down
Loading