forked from eclipse-iceoryx/iceoryx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iox-eclipse-iceoryx#495 Merge remote-tracking branch 'upstream/master…
…' into iox-eclipse-iceoryx#495-bugfix-gcc-5-compatibility Signed-off-by: Hintz Martin (XC-AD/ESB5) <[email protected]>
- Loading branch information
Showing
83 changed files
with
2,931 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
Checks: '-*, readability-identifier-naming' | ||
Checks: '-*,readability-*,performance-*,hicpp-*,cppcoreguidelines-*,concurrency-*,clang-analyzer-*,cert-*,bugprone-*' | ||
CheckOptions: | ||
- { key: readability-identifier-naming.ClassCase, value: CamelCase } | ||
- { key: readability-identifier-naming.EnumCase, value: CamelCase } | ||
- { key: readability-identifier-naming.StructCase, value: CamelCase } | ||
- { key: readability-identifier-naming.UnionCase, value: CamelCase } | ||
- { key: readability-identifier-naming.MethodCase, value: camelBack } | ||
- { key: readability-identifier-naming.FunctionCase, value: camelBack } | ||
- { key: readability-identifier-naming.NamespaceCase, value: lower_case } | ||
- { key: readability-identifier-naming.MemberPrefix, value: m_ } | ||
- { key: readability-identifier-naming.MemberCase, value: camelBack } | ||
- { key: readability-identifier-naming.ConstexprVariableCase, value: UPPER_CASE } | ||
- { key: readability-identifier-naming.EnumCase, value: UPPER_CASE } | ||
- { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE } | ||
- { key: readability-identifier-naming.TemplateParameterCase, value: CamelCase } | ||
- { key: readability-identifier-naming.TemplateParameterCase, value: CamelCase } | ||
- { key: readability-function-size.LineThreshold, value: 200 } | ||
- { key: readability-function-size.StatementThreshold, value: 200 } | ||
- { key: readability-function-size.BranchThreshold, value: 10 } | ||
- { key: readability-function-size.ParameterThreshold, value: 3 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ clangd/ | |
site/ | ||
doc/website/API-reference/ | ||
*.project | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Intermediate examples | ||
|
||
{! ./../iceoryx_examples/callbacks/README.md !} | ||
{! ./../iceoryx_examples/callbacks_in_c/README.md !} | ||
{! ./../iceoryx_examples/waitset/README.md !} | ||
{! ./../iceoryx_examples/waitset_in_c/README.md !} | ||
{! ./../iceoryx_examples/singleprocess/README.md !} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...yx_binding_c/include/iceoryx_binding_c/internal/cpp2c_service_description_translation.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#ifndef IOX_BINDING_C_CPP2C_SERVICE_DESCRIPTION_TRANSLATION_HPP | ||
#define IOX_BINDING_C_CPP2C_SERVICE_DESCRIPTION_TRANSLATION_HPP | ||
|
||
#include "iceoryx_binding_c/service_description.h" | ||
#include "iceoryx_posh/capro/service_description.hpp" | ||
|
||
iox_service_description_t | ||
TranslateServiceDescription(const iox::capro::ServiceDescription& serviceDescription) noexcept; | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// Copyright (c) 2021 Apex.AI Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#ifndef IOX_BINDING_C_LISTENER_H | ||
#define IOX_BINDING_C_LISTENER_H | ||
|
||
#include "iceoryx_binding_c/enums.h" | ||
#include "iceoryx_binding_c/internal/c2cpp_binding.h" | ||
#include "iceoryx_binding_c/subscriber.h" | ||
#include "iceoryx_binding_c/types.h" | ||
#include "iceoryx_binding_c/user_trigger.h" | ||
|
||
typedef CLASS Listener* iox_listener_t; | ||
|
||
|
||
/// @brief initializes a listener struct from a storage struct pointer | ||
/// @param[in] self pointer to raw memory which can hold a listener | ||
/// @return an initialized iox_listener_t | ||
iox_listener_t iox_listener_init(iox_listener_storage_t* self); | ||
|
||
/// @brief after using an iox_listener_t it must be cleaned up with this function | ||
/// @param[in] self the listener which should be deinitialized | ||
void iox_listener_deinit(iox_listener_t const self); | ||
|
||
/// @brief Attaches a subscriber event to the listener | ||
/// @param[in] self listener to which the event should be attached to | ||
/// @param[in] subscriber subscriber which emits the event | ||
/// @param[in] subscriberEvent the event which should trigger the listener | ||
/// @param[in] callback the callback which is called when an event triggers the listener | ||
/// @return when successful iox_ListenerResult::ListenerResult_SUCCESS otherwise an enum which describes the error | ||
ENUM iox_ListenerResult iox_listener_attach_subscriber_event(iox_listener_t const self, | ||
iox_sub_t const subscriber, | ||
const ENUM iox_SubscriberEvent subscriberEvent, | ||
void (*callback)(iox_sub_t)); | ||
|
||
/// @brief Attaches a user trigger to the listener | ||
/// @param[in] self listener to which the event should be attached to | ||
/// @param[in] userTrigger user trigger which emits the event | ||
/// @param[in] callback the callback which is called when the user trigger triggers the listener | ||
/// @return when successful iox_ListenerResult::ListenerResult_SUCCESS otherwise an enum which describes the error | ||
ENUM iox_ListenerResult iox_listener_attach_user_trigger_event(iox_listener_t const self, | ||
iox_user_trigger_t const userTrigger, | ||
void (*callback)(iox_user_trigger_t)); | ||
|
||
/// @brief Detaches a subscriber event from the listener | ||
/// @param[in] self listener from which the event should be detached | ||
/// @param[in] subscriber the subscriber which emits the event | ||
/// @param[in] subscriberEvent the subscriber event which is registered at the listener | ||
void iox_listener_detach_subscriber_event(iox_listener_t const self, | ||
iox_sub_t const subscriber, | ||
const ENUM iox_SubscriberEvent subscriberEvent); | ||
|
||
/// @brief Detaches a user trigger from the listener | ||
/// @param[in] self listener from which the event should be detached | ||
/// @param[in] userTrigger the user trigger which emits the event | ||
void iox_listener_detach_user_trigger_event(iox_listener_t const self, iox_user_trigger_t const userTrigger); | ||
|
||
|
||
/// @brief Returns the size, the number of attached events of a listener. | ||
/// @param[in] self listener where the size should be acquired | ||
/// @return the size of the listener | ||
uint64_t iox_listener_size(iox_listener_t const self); | ||
|
||
/// @brief Returns the capacity of a listener (how many events can be attached). | ||
/// @param[in] self listener where the capacity should be acquired | ||
/// @return the capacity of the listener | ||
uint64_t iox_listener_capacity(iox_listener_t const self); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
iceoryx_binding_c/include/iceoryx_binding_c/service_description.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#ifndef IOX_BINDING_C_SERVICE_DESCRIPTION_H | ||
#define IOX_BINDING_C_SERVICE_DESCRIPTION_H | ||
|
||
#include <stdint.h> | ||
|
||
typedef struct | ||
{ | ||
uint16_t serviceId; | ||
uint16_t instanceId; | ||
uint16_t eventId; | ||
|
||
char serviceString[100U]; | ||
char instanceString[100U]; | ||
char eventString[100U]; | ||
} iox_service_description_t; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.