Skip to content

Commit

Permalink
iox-eclipse-iceoryx#590 Add script for printing namespaces and rework…
Browse files Browse the repository at this point in the history
… component diagram

Signed-off-by: Simon Hoinkis <simon.hoinkis@apex.ai>
  • Loading branch information
mossmaurice committed May 11, 2021
1 parent 3a1815d commit 130ebe2
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 68 deletions.
118 changes: 118 additions & 0 deletions doc/design/diagrams/iceoryx_components_diagram_nextgen_release.puml
@@ -0,0 +1,118 @@
@startuml Eclipse iceoryx Component Overview
skinparam BackgroundColor transparent
skinparam componentStyle uml2

skinparam component {
backgroundColor<<namespace>> yellow
}

skinparam package {
backgroundColor green
}

skinparam frame {
backgroundColor chocolate
}

' PlantUML package: CMake package
' PlantUML frame: CMake library

' @todo
' RouDi split, separate files and namespaces for static/dynamic discovery
' Rework exported libraries (add_library in CMakeLists.txt)
' RouDiEnvironment shall not be in roudi namespace

header Eclipse iceoryx component overview

' POSH: POSIX SHared memory
' Publsh/subscribe IPC communication infrastructure
package iceoryx_posh {
frame "core library" {
component popo <<namespace>>
component capro <<namespace>>
component mepoo <<namespace>>
component version <<namespace>>
}

frame "runtime library" {
component runtime <<namespace>>
}

frame "gateway library" {
component gw <<namespace>>
}

frame "RouDi library" {
component roudi <<namespace>>
component build <<namespace>>
}

frame "config library" {
component config <<namespace>>
component helper <<namespace>>
}
}

' HOOFS: Helpful Objects Optimised For Safety
' Library containing modern C++ STL constructs
package iceoryx_hoofs {
frame "hoofs library" {
component concurrent <<namespace>>
component cxx <<namespace>> {
component newtype <<namespace>>
component set <<namespace>>
component algorithm <<namespace>>
}
component DesignPattern <<namespace>>
component error_handling <<namespace>>
component log <<namespace>> {
component ffbb <<namespace>>
}
component units <<namespace>> {
component duration_literals <<namespace>>

}
component posix <<namespace>>
component threading <<namespace>>
}
}

' DDS: Data Distribution Service
'
package iceoryx_dds {
component dds <<namespace>>
component gw <<namespace>> as gateway_dds
}

' C-Binding
package iceoryx_binding_c {
component enums.h <<file>>
component event_info.h <<file>>
component publisher.h <<file>>
component subscriber.h <<file>>
component node.h <<file>>
component types.h <<file>>
component wait_set.h <<file>>
component user_trigger.h <<file>>
component cpp2c <<namespace>>
}

' CALF: Can Also Left (un) Finished
' New C++ building blocks which only meet quality level 5
package iceoryx_calf {
component calf <<namespace>>
}

' Introspection
package iceoryx_introspection {
component client <<namespace>> {
component introspection <<namespace>>
}
}

iceoryx_posh ..> iceoryx_hoofs : use
iceoryx_dds ..> iceoryx_posh : use
iceoryx_binding_c ..> iceoryx_posh : use
iceoryx_calf ..> iceoryx_hoofs : use
introspection ..> iceoryx_posh : use
@enduml
68 changes: 0 additions & 68 deletions doc/design/iceoryx_components_diagram_nextgen_release.puml

This file was deleted.

32 changes: 32 additions & 0 deletions tools/print_all_namespace.sh
@@ -0,0 +1,32 @@
#!/bin/bash

# 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


# Print all namespaces used in iceoryx

COMPONENTS=(iceoryx_posh iceoryx_utils iceoryx_binding_c iceoryx_dds)
SOURCE_DIR=(source include)
WORKSPACE=$(git rev-parse --show-toplevel)

for COMPONENT in ${COMPONENTS[@]}; do
for DIR in ${SOURCE_DIR[@]}; do
GREP_PATH="${GREP_PATH} ${WORKSPACE}/${COMPONENT}/$DIR"
done
done

grep -RIn -P '(^|\W{2})namespace\s+(\w+)\s*|$\{' $GREP_PATH | sed -n s/.*\namespace*//p | sort | uniq

0 comments on commit 130ebe2

Please sign in to comment.