Skip to content

Commit

Permalink
[#555] Fix clang-tidy warnings; add missing enum translation cases
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenpiff committed Dec 20, 2024
1 parent 97d1bf3 commit 29c0179
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/cxx/health_monitoring/src/pubsub_event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
//
// SPDX-License-Identifier: Apache-2.0 OR MIT

#ifndef __EXAMPLE_HEALTH_MONITORING_PUBSUB_EVENT_HPP__
#define __EXAMPLE_HEALTH_MONITORING_PUBSUB_EVENT_HPP__
#ifndef IOX2_EXAMPLE_HEALTH_MONITORING_PUBSUB_EVENT_HPP
#define IOX2_EXAMPLE_HEALTH_MONITORING_PUBSUB_EVENT_HPP

#include "iox/into.hpp"
#include "iox2/event_id.hpp"
Expand All @@ -29,7 +29,7 @@ enum class PubSubEvent : uint8_t {
ReceivedSample = 5,
SentHistory = 6,
ProcessDied = 7,
Unknown,
Unknown = 8,
};

struct ServiceTuple {
Expand Down
7 changes: 6 additions & 1 deletion iceoryx2-ffi/cxx/include/iox2/enum_translation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,12 @@ constexpr auto from<int, iox2::EventOpenOrCreateError>(const int value) noexcept
return iox2::EventOpenOrCreateError::OpenExceedsMaxNumberOfNodes;
case iox2_event_open_or_create_error_e_O_IS_MARKED_FOR_DESTRUCTION:
return iox2::EventOpenOrCreateError::OpenIsMarkedForDestruction;

case iox2_event_open_or_create_error_e_O_INCOMPATIBLE_NOTIFIER_CREATED_EVENT:
return iox2::EventOpenOrCreateError::OpenIncompatibleNotifierCreatedEvent;
case iox2_event_open_or_create_error_e_O_INCOMPATIBLE_NOTIFIER_DROPPED_EVENT:
return iox2::EventOpenOrCreateError::OpenIncompatibleNotifierDroppedEvent;
case iox2_event_open_or_create_error_e_O_INCOMPATIBLE_NOTIFIER_DEAD_EVENT:
return iox2::EventOpenOrCreateError::OpenIncompatibleNotifierDeadEvent;
case iox2_event_open_or_create_error_e_C_SERVICE_IN_CORRUPTED_STATE:
return iox2::EventOpenOrCreateError::CreateServiceInCorruptedState;
case iox2_event_open_or_create_error_e_C_INTERNAL_FAILURE:
Expand Down
9 changes: 9 additions & 0 deletions iceoryx2-ffi/cxx/include/iox2/service_builder_event_error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ enum class EventOpenOrCreateError : uint8_t {
/// The [`AttributeVerifier`] required attributes that the [`Service`] does
/// not satisfy.
OpenIncompatibleAttributes,
/// The event id that is emitted for a newly created [`Notifier`](crate::port::notifier::Notifier)
/// does not fit the required event id.
OpenIncompatibleNotifierCreatedEvent,
/// The event id that is emitted if a [`Notifier`](crate::port::notifier::Notifier) is dropped
/// does not fit the required event id.
OpenIncompatibleNotifierDroppedEvent,
/// The event id that is emitted if a [`Notifier`](crate::port::notifier::Notifier) is
/// identified as dead does not fit the required event id.
OpenIncompatibleNotifierDeadEvent,
/// Errors that indicate either an implementation issue or a wrongly
/// configured system.
OpenInternalFailure,
Expand Down

0 comments on commit 29c0179

Please sign in to comment.