Skip to content

Commit

Permalink
Merge branch 'iox-eclipse-iceoryx#391-static-memory-alternative-for-s…
Browse files Browse the repository at this point in the history
…td-function' of github.com:ApexAI/iceoryx into iox-eclipse-iceoryx#391-static-memory-alternative-for-std-function
  • Loading branch information
MatthiasKillat committed Jun 2, 2021
2 parents 25656db + 1b5bdeb commit df8dff6
Show file tree
Hide file tree
Showing 66 changed files with 2,738 additions and 878 deletions.
13 changes: 5 additions & 8 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# for complete code formatting of codebase please type:
# "find . -type f -regex '.*\.\(inl\|cpp\|h\|hpp\|cc\|cxx\)' -exec clang-format-9 -style=file -i {} \;"
# "find . -type f -regex '.*\.\(inl\|cpp\|h\|hpp\|cc\|c\|cxx\)' -exec clang-format-10 -style=file -i {} \;"
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
Expand Down Expand Up @@ -40,17 +40,15 @@ BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 120
# The line below is commented because this feature is not supported in clang-format-4.0
#CompactNamespaces: true
CompactNamespaces: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
# The line below is commented because this feature is not supported in clang-format-4.0
#FixNamespaceComments: true
FixNamespaceComments: true
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
Expand All @@ -65,7 +63,7 @@ PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
Expand All @@ -78,8 +76,7 @@ SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
Standard: c++14
TabWidth: 4
UseTab: Never
...

2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
# we have to exclude the tests explicitly until everyone is running
- name: Run tests, excluding timing_tests
run: |
build\hoofs\test\Debug\hoofs_moduletests.exe --gtest_filter="-SignalHandler*:relativeptr*:Timer*:base_relative*:DeadlineTimer*:Thread*:Duration*:*TimingTest*"
build\hoofs\test\Debug\hoofs_moduletests.exe --gtest_filter="-*TimingTest*"
build\hoofs\test\Debug\hoofs_integrationtests.exe
build\binding_c\test\Debug\binding_c_moduletests.exe --gtest_filter="-Chunk*:iox_listener*:iox_node*:iox_pub*:BindingC_Runtime*:iox_sub*:iox_ws*:iox_types*:*TimingTest*"
build\posh\test\Debug\posh_moduletests.exe --gtest_filter="-PoshRuntime*:IceoryxRoudiApp*:IceoryxRoudiMemoryManager*:PortManager*:ProcessIntrospection*:ProcessManager*:PosixShmMemoryProvider*:Process_test*:ParseAllMalformedInput*:*TimingTest*"
2 changes: 1 addition & 1 deletion .github/workflows/integrationtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo $(clang --version)
- name: Setup ROS
uses: ros-tooling/setup-ros@0.1.2
uses: ros-tooling/setup-ros@0.2.1
with:
required-ros-distributions: foxy

Expand Down
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Please make sure you have:
6. You open your pull request towards the base branch `master`
7. Link the pull request to the according Github issue and set the label accordingly

**NOTE:** For support while developing you can use little helper scripts, see [git-hooks](https://github.com/eclipse-iceoryx/iceoryx/blob/master/tools/git-hooks/Readme.md).

## Branching strategy

`master`
Expand Down Expand Up @@ -107,10 +109,10 @@ codebase follows these rules, things are work in progress.
our code may contain additions which are not compatible with the STL (e.g. `iox::cxx::vector::emplace_back()`
does return a bool)
7) **Always use `iox::log::Logger`**, instead of `printf()`
8) **Always use `iox::ErrorHandler()`**, when an error occurs that cannot or shall not be propagated via an
8) **Always use `iox::ErrorHandler()`**, when an error occurs that cannot or shall not be propagated via an
`iox::cxx::expected`, the `iox::ErrorHandler()` shall be used; exceptions are not allowed

See [error-handling.md](https://github.com/eclipse-iceoryx/iceoryx/blob/master/doc/design/error-handling.md) for additional
See [error-handling.md](https://github.com/eclipse-iceoryx/iceoryx/blob/master/doc/design/error-handling.md) for additional
information about logging and error handling.

### Naming conventions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ExampleBaseClass
/// @brief Short description
uint32_t simplerMethod() const noexcept;

private:
private:
/// @brief Short description
uint32_t m_memberVariable{0U};
};
Expand Down
38 changes: 38 additions & 0 deletions doc/design/diagrams/service-discovery/overview-alternative-b.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@startuml
title Alternative B: iceoryx-based ECU forwarding CaPro messages to Gateway and User App

package "iceoryx instance e.g. electronic control unit" {
component RouDi {
artifact discoveryLoop [
PortManager::sendToAllMatchingInterfacePorts()
]
artifact server [
m_server : Server
]
}
component "User App" {
component ServiceDiscoveryListener {
artifact serviceDiscoveryThread [
m_thread : Thread
m_interfacePort : InterfacePort
]
artifact callback [
m_callback : std::function<void()>
]
}
artifact client [
m_client : Client
]
}
}

package "DDS instance e.g. electronic control unit" {
component DCPSTopic
}

[discoveryLoop] ..> [DCPSTopic] : dispatchCaProMessage()
[discoveryLoop] ..> [serviceDiscoveryThread] : dispatchCaProMessage()
[server] <..> [client] : findService()
[DCPSTopic] ..> [discoveryLoop] : Not yet implemented
[serviceDiscoveryThread] ..> [callback] : calls
@enduml
17 changes: 17 additions & 0 deletions doc/design/diagrams/service-discovery/overview-alternative-b.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions doc/design/diagrams/service-discovery/overview-alternative-d.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
@startuml
title Alternative D: iceoryx-based ECU forwarding CaPro messages to Gateway and User App

package "iceoryx instance e.g. electronic control unit" {
component RouDi {
artifact discoveryLoop [
PortManager::sendToAllMatchingInterfacePorts()
]
}
component "User App" {
component DiscoveryInfoA <<object>> {
artifact DiscoveryInfoNoteA [
+findService() : cxx::expected<InstanceContainer, FindServiceError>
-m_subscriber : Subscriber<ServiceRegistryTopic>
-m_lastServiceRegistry : ServiceRegistryTopic
]

}

component UserAppListener <<object>>

component UserDefinedCallback <<object>>
}
component "DDS Gateway" {
component DiscoveryInfoB <<object>> {
artifact DiscoveryInfoNoteB [
+findService() : cxx::expected<InstanceContainer, FindServiceError>
-m_subscriber : Subscriber<ServiceRegistryTopic>
-m_lastServiceRegistry : ServiceRegistryTopic
]
}
component GatewayListener <<object>>

component GatewayUserDefinedCallback <<object>>
}
}

package "DDS instance e.g. electronic control unit" {
component DCPSTopic
}

[DiscoveryInfoNoteB] ..> [DCPSTopic] : Implemented
[discoveryLoop] ..> [DiscoveryInfoNoteA] : publish(ServiceRegistryTopic)
[discoveryLoop] ..> [DiscoveryInfoNoteB] : publish(ServiceRegistryTopic)
[DCPSTopic] ..> [DiscoveryInfoNoteB] : Not yet implemented
[GatewayListener] ..> [GatewayUserDefinedCallback] : calls
[UserAppListener] ..> [UserDefinedCallback] : calls
[DiscoveryInfoNoteA] ..> [UserAppListener] : attached to
[DiscoveryInfoNoteB] ..> [GatewayListener] : attached to
@enduml
Loading

0 comments on commit df8dff6

Please sign in to comment.