Skip to content

Commit 5f658b3

Browse files
committed
Whitespaces cleanup.
1 parent 58e69b8 commit 5f658b3

File tree

267 files changed

+2523
-2625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+2523
-2625
lines changed

.github/workflows/actions_build.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ jobs:
2424
cpp: [11, 14, 17, 20, 23]
2525
exclude:
2626
- cc_ver: 9
27-
cpp: 23
27+
cpp: 23
2828
- cc_ver: 10
29-
cpp: 23
29+
cpp: 23
3030
- cc_ver: 11
31-
cpp: 23
31+
cpp: 23
3232
- cc_ver: 12
33-
cpp: 23
33+
cpp: 23
3434
- cc_ver: 13
35-
cpp: 23
35+
cpp: 23
3636

3737
steps:
3838
- uses: actions/checkout@v2
3939

4040
- name: Prepare Install
41-
run: sudo apt-get update --fix-missing
42-
41+
run: sudo apt-get update --fix-missing
42+
4343
- name: Install Packages
4444
run: sudo apt install libqt5gui5 libboost-all-dev libxml2-dev gcc-${{matrix.cc_ver}} g++-${{matrix.cc_ver}}
4545

@@ -58,7 +58,7 @@ jobs:
5858
COMMON_BUILD_TYPE: ${{matrix.type}}
5959
COMMON_CXX_STANDARD: ${{matrix.cpp}}
6060
COMMS_TAG: ${{env.COMMS_TAG}}
61-
COMMSDSL_TAG: ${{env.COMMSDSL_TAG}}
61+
COMMSDSL_TAG: ${{env.COMMSDSL_TAG}}
6262

6363
- name: Configure CMake
6464
shell: bash
@@ -75,7 +75,7 @@ jobs:
7575
shell: bash
7676
run: cmake --build . --config ${{matrix.type}} --target install
7777
env:
78-
VERBOSE: 1
78+
VERBOSE: 1
7979

8080
build_clang_ubuntu_22_04:
8181
runs-on: ubuntu-22.04
@@ -90,8 +90,8 @@ jobs:
9090
- uses: actions/checkout@v2
9191

9292
- name: Prepare Install
93-
run: sudo apt-get update --fix-missing
94-
93+
run: sudo apt-get update --fix-missing
94+
9595
- name: Install Packages
9696
run: sudo apt install libqt5gui5 libboost-all-dev libxml2-dev clang-${{matrix.cc_ver}}
9797

@@ -127,7 +127,7 @@ jobs:
127127
shell: bash
128128
run: cmake --build . --config ${{matrix.type}} --target install
129129
env:
130-
VERBOSE: 1
130+
VERBOSE: 1
131131

132132
build_clang_ubuntu_24_04:
133133
runs-on: ubuntu-24.04
@@ -139,24 +139,24 @@ jobs:
139139
cpp: [11, 14, 17, 20, 23]
140140
exclude:
141141
- cc_ver: 14
142-
cpp: 20
142+
cpp: 20
143143
- cc_ver: 14
144-
cpp: 23
144+
cpp: 23
145145
- cc_ver: 15
146-
cpp: 20
146+
cpp: 20
147147
- cc_ver: 15
148-
cpp: 23
148+
cpp: 23
149149
- cc_ver: 16
150150
cpp: 23
151151
- cc_ver: 17
152-
cpp: 23
152+
cpp: 23
153153

154154
steps:
155155
- uses: actions/checkout@v2
156156

157157
- name: Prepare Install
158-
run: sudo apt-get update --fix-missing
159-
158+
run: sudo apt-get update --fix-missing
159+
160160
- name: Install Packages
161161
run: sudo apt install libqt5gui5 libboost-all-dev libxml2-dev clang-${{matrix.cc_ver}}
162162

@@ -192,7 +192,7 @@ jobs:
192192
shell: bash
193193
run: cmake --build . --config ${{matrix.type}} --target install
194194
env:
195-
VERBOSE: 1
195+
VERBOSE: 1
196196

197197
build_msvc_2019:
198198
runs-on: windows-2019
@@ -207,13 +207,13 @@ jobs:
207207
- uses: actions/checkout@v4
208208

209209
- name: Create Build Environment
210-
run: cmake -E make_directory ${{runner.workspace}}/build
210+
run: cmake -E make_directory ${{runner.workspace}}/build
211211

212212
- name: Install Boost
213213
shell: cmd
214214
run: |
215215
choco install boost-msvc-14.2 --version=${{env.WIN_BOOST_VERSION}}
216-
echo BOOST_DIR=${{env.WIN_BOOST_DIR}}/lib64-msvc-14.2/cmake >>%GITHUB_ENV%
216+
echo BOOST_DIR=${{env.WIN_BOOST_DIR}}/lib64-msvc-14.2/cmake >>%GITHUB_ENV%
217217
218218
- name: Prepare externals
219219
shell: cmd
@@ -239,12 +239,12 @@ jobs:
239239
-DCMAKE_POLICY_DEFAULT_CMP0167=NEW ^
240240
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DOPT_FORCE_EXTRA_BOOST_LIBS=ON
241241
242-
- name: Build Target
242+
- name: Build Target
243243
working-directory: ${{runner.workspace}}/build
244244
shell: cmd
245245
run: cmake --build . --config ${{matrix.type}} --target install
246246
env:
247-
VERBOSE: 1
247+
VERBOSE: 1
248248

249249
build_msvc_2022:
250250
runs-on: windows-2022
@@ -259,7 +259,7 @@ jobs:
259259
- uses: actions/checkout@v4
260260

261261
- name: Create Build Environment
262-
run: cmake -E make_directory ${{runner.workspace}}/build
262+
run: cmake -E make_directory ${{runner.workspace}}/build
263263

264264
- name: Install Boost
265265
if: matrix.arch == 'x64'
@@ -290,9 +290,9 @@ jobs:
290290
cmake %GITHUB_WORKSPACE% -A ${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.type}} -DCMAKE_INSTALL_PREFIX=install ^
291291
-DCMAKE_PREFIX_PATH="${{runner.workspace}}/build/install;${{env.BOOST_DIR}}" ^
292292
-DCMAKE_POLICY_DEFAULT_CMP0167=NEW ^
293-
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DOPT_FORCE_EXTRA_BOOST_LIBS=ON
293+
-DCMAKE_CXX_STANDARD=${{matrix.cpp}} -DOPT_FORCE_EXTRA_BOOST_LIBS=ON
294294
295-
- name: Build Target
295+
- name: Build Target
296296
working-directory: ${{runner.workspace}}/build
297297
shell: cmd
298298
run: cmake --build . --config ${{matrix.type}} --target install

cmake/CC_Prefetch.cmake

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file contains contains a function that prefetches comms library project.
1+
# This file contains contains a function that prefetches comms library project.
22

33
# ******************************************************
44
# cc_prefetch(
@@ -24,11 +24,11 @@ function (cc_prefetch)
2424

2525
if (NOT CC_FETCH_SRC_DIR)
2626
message (FATAL_ERROR "The SRC_DIR parameter is not provided")
27-
endif ()
27+
endif ()
2828

2929
if (NOT CC_FETCH_REPO)
3030
set (CC_FETCH_REPO ${CC_FETCH_DEFAULT_REPO})
31-
endif ()
31+
endif ()
3232

3333
if (NOT CC_FETCH_TAG)
3434
set (CC_FETCH_TAG ${CC_FETCH_DEFAULT_TAG})
@@ -40,24 +40,24 @@ function (cc_prefetch)
4040

4141
if (EXISTS "${CC_FETCH_SRC_DIR}/cmake/CC_CommsExternal.cmake")
4242
return ()
43-
endif()
43+
endif()
4444

4545
execute_process (
4646
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CC_FETCH_SRC_DIR}"
4747
)
48-
48+
4949
execute_process (
5050
COMMAND ${CMAKE_COMMAND} -E make_directory "${CC_FETCH_SRC_DIR}"
51-
)
52-
51+
)
52+
5353
execute_process (
54-
COMMAND
54+
COMMAND
5555
${GIT_EXECUTABLE} clone -b ${CC_FETCH_TAG} ${CC_FETCH_REPO} ${CC_FETCH_SRC_DIR}
5656
RESULT_VARIABLE git_result
5757
)
5858

5959
if (NOT "${git_result}" STREQUAL "0")
6060
message (WARNING "git clone/checkout failed")
61-
endif ()
61+
endif ()
6262

6363
endfunction()

howtos/howto1/README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
Custom remaining size framing information preceding `<id>`.
33

44
This howto demonstrates having remaining size information in message framing sharing its 2 bytes with
5-
extra flags which influence the way message payload is read.
5+
extra flags which influence the way message payload is read.
66

7-
Having values (flags) in the message framing which influence how message payload is read and/or how
7+
Having values (flags) in the message framing which influence how message payload is read and/or how
88
message is processed requires definition of common message interface:
99
```xml
1010
<fields>
1111
<set name="InterfaceFlags" length="1">
1212
<bit name="B0" idx="0" />
1313
<bit name="B1" idx="1" />
14-
</set>
15-
14+
</set>
15+
1616
</fields>
1717

1818
<interface name="Interface" description="Common Interface for all the messages.">
1919
<ref field="InterfaceFlags" name="Flags" />
20-
</interface>
20+
</interface>
2121
```
2222

2323
When remaining message length information in the message framing is split into multiple
24-
values, the default `<size>` cannot be used, the `<custom>` one needs to be used
24+
values, the default `<size>` cannot be used, the `<custom>` one needs to be used
2525
instead:
2626
```xml
2727
<frame name="Frame">
@@ -30,26 +30,26 @@ instead:
3030
<int name="Size" type="uint16" bitLength="12"/>
3131
<ref field="InterfaceFlags" name="Flags" bitLength="4" />
3232
</bitfield>
33-
</custom>
33+
</custom>
3434
<id name="Id" field="MsgId" />
3535
<value name="Flags" interfaceFieldName="Flags" pseudo="true" field="InterfaceFlags" />
3636
<payload name="Data" />
3737
</frame>
3838
```
39-
When _size_ layer precedes `<id>` it is not possible to assign flags to message object
40-
(because the latter is not allocated yet) and then forward the `read()` operation to the next
41-
layer. In order to solve the problem the **pseudo** (marked with **pseudo="true"** property)
39+
When _size_ layer precedes `<id>` it is not possible to assign flags to message object
40+
(because the latter is not allocated yet) and then forward the `read()` operation to the next
41+
layer. In order to solve the problem the **pseudo** (marked with **pseudo="true"** property)
4242
`<value>` layer is added right before the `<payload>`.
4343

4444
---
4545

46-
**REMINDER**: The **pseudo** `<value>` layer does not produce any output or consumes any input, it just
47-
contains its field as a private data member (value of which can be assigned externally) and
46+
**REMINDER**: The **pseudo** `<value>` layer does not produce any output or consumes any input, it just
47+
contains its field as a private data member (value of which can be assigned externally) and
4848
pretends to read the value when its `read()` member function is invoked.
4949

5050
---
5151

52-
When the `SizeWithFlags` reads its value it needs to access the `Flags` `<value>` layer and
52+
When the `SizeWithFlags` reads its value it needs to access the `Flags` `<value>` layer and
5353
assign the pseudo field value, see [dsl_src/include/howto1/frame/layer/SizeWithFlags.h](dsl_src/include/howto1/frame/layer/SizeWithFlags.h)
5454
for details:
5555
```cpp
@@ -60,22 +60,22 @@ class SizeWithFlags : public
6060

6161
public:
6262
// Repeat some types from the base class
63-
using Field = typename Base::Field;
63+
using Field = typename Base::Field;
6464

65-
template<typename TMsg>
65+
template<typename TMsg>
6666
void beforeRead(const Field& field, TMsg* msg)
6767
{
6868
static_cast<void>(msg);
6969
COMMS_ASSERT(msg == nullptr); // The message object is not created yet
7070
Base::nextLayer().nextLayer().pseudoField().value() = field.field_flags().value();
71-
}
71+
}
7272

7373
...
7474
};
7575
```
76-
**Note** that `nextLayer()` function is called twice: first time gives an access to the `Id` layer
77-
that follows, and second time gives an access to the `Flags` one. After that the
78-
`<value>` layer will do its job of re-assigning its field to the `<interface>` the
76+
**Note** that `nextLayer()` function is called twice: first time gives an access to the `Id` layer
77+
that follows, and second time gives an access to the `Flags` one. After that the
78+
`<value>` layer will do its job of re-assigning its field to the `<interface>` the
7979
normal way it's designed to do.
8080
8181
Also for more details please read [Defining Custom Message Size Frame Layer](https://commschamp.github.io/comms_doc/page_custom_size_layer.html)

howtos/howto1/dsl/schema.xml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,35 @@
33
<fields>
44
<string name="Msg1Name" defaultValue="Message 1" />
55
<string name="Msg2Name" defaultValue="Message 2" />
6-
6+
77
<enum name="MsgId" type="uint8" semanticType="messageId">
88
<validValue name="M1" val="1" displayName="^Msg1Name" />
99
<validValue name="M2" val="2" displayName="^Msg2Name" />
1010
</enum>
11-
12-
11+
1312
<set name="InterfaceFlags" length="1">
1413
<bit name="B0" idx="0" />
1514
<bit name="B1" idx="1" />
16-
</set>
17-
15+
</set>
16+
1817
</fields>
19-
18+
2019
<interface name="Interface" description="Common Interface for all the messages.">
2120
<ref field="InterfaceFlags" name="Flags" />
22-
</interface>
23-
21+
</interface>
22+
2423
<frame name="Frame">
2524
<custom name="SizeWithFlags">
2625
<bitfield name="Field">
2726
<int name="Size" type="uint16" bitLength="12"/>
2827
<ref field="InterfaceFlags" name="Flags" bitLength="4" />
2928
</bitfield>
30-
</custom>
29+
</custom>
3130
<id name="Id" field="MsgId" />
3231
<value name="Flags" interfaceFieldName="Flags" pseudo="true" field="InterfaceFlags" />
3332
<payload name="Data" />
3433
</frame>
35-
34+
3635
<message name="Msg1" id="MsgId.M1" displayName="^Msg1Name">
3736
<int name="F1" type="uint16" />
3837
<int name="F2" type="uint16" />
@@ -45,22 +44,22 @@
4544
</field>
4645
</optional>
4746
</message>
48-
47+
4948
<message name="Msg2" id="MsgId.M2" displayName="^Msg2Name">
5049
<string name="F1" defaultValue="hello">
5150
<lengthPrefix>
5251
<int name="Length" type="uint8" />
5352
</lengthPrefix>
5453
</string>
55-
54+
5655
<optional name="F2" defaultMode="missing">
5756
<description>
5857
The field exists only when B1 in interface flags is set.
5958
</description>
6059
<field>
6160
<int name="Field" type="uint16" displayName="F2" />
6261
</field>
63-
</optional>
64-
</message>
65-
62+
</optional>
63+
</message>
64+
6665
</schema>

0 commit comments

Comments
 (0)