diff --git a/.github/workflows/Linux build template.yml b/.github/workflows/Linux build template.yml index 98ec440b..9018608d 100644 --- a/.github/workflows/Linux build template.yml +++ b/.github/workflows/Linux build template.yml @@ -11,8 +11,9 @@ jobs: strategy: matrix: build_type: [Debug, Release, MinSizeRel] + architecture: [32, 64] - name: Build type - ${{matrix.build_type}} + name: Build type - ${{matrix.build_type}}${{matrix.architecture == '32' && ' x86' || ''}} steps: # --------- Packages & artifacts --------- - name: Install necessary packages @@ -23,21 +24,23 @@ jobs: command: | sudo gem install apt-spy2 sudo apt-spy2 fix --commit --launchpad --country=US + echo "deb http://archive.ubuntu.com/ubuntu/ jammy main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list + echo "deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe restricted multiverse" | sudo tee -a /etc/apt/sources.list + sudo dpkg --add-architecture i386 sudo apt-get update - sudo apt install python3-pip - pip install jsonref - sudo apt install build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev libssl-dev + sudo apt install python3-pip build-essential cmake ninja-build libusb-1.0-0-dev zlib1g-dev zlib1g-dev:i386 libssl-dev gcc-11-multilib g++-11-multilib + sudo pip install jsonref - name: Download artifacts uses: actions/download-artifact@v4 with: - name: ThunderInterfaces-${{matrix.build_type}}-artifact + name: ThunderInterfaces-${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}-artifact path: ${{matrix.build_type}} - name: Unpack files run: | - tar -xvzf ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz - rm ${{matrix.build_type}}/${{matrix.build_type}}.tar.gz + tar -xvzf ${{matrix.build_type}}/${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz + rm ${{matrix.build_type}}/${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz # ----- Regex & checkout ----- - name: Checkout ThunderNanoServices @@ -59,7 +62,8 @@ jobs: - name: Build ThunderNanoServices run: | cmake -G Ninja -S ThunderNanoServices -B ${{matrix.build_type}}/build/ThunderNanoServices \ - -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror" \ + -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ + -DCMAKE_C_FLAGS="-Wall -Wextra -Wpedantic -Werror -m${{matrix.architecture}}" \ -DCMAKE_INSTALL_PREFIX="${{matrix.build_type}}/install/usr" \ -DCMAKE_MODULE_PATH="${PWD}/${{matrix.build_type}}/install/usr/include/WPEFramework/Modules" \ -DEXAMPLE_COMRPCCLIENT=ON \ @@ -92,10 +96,10 @@ jobs: cmake --build ${{matrix.build_type}}/build/ThunderNanoServices --target install - name: Tar files - run: tar -czvf ${{matrix.build_type}}.tar.gz ${{matrix.build_type}} + run: tar -czvf ${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz ${{matrix.build_type}} - name: Upload uses: actions/upload-artifact@v4 with: - name: ThunderNanoServices-${{matrix.build_type}}-artifact - path: ${{matrix.build_type}}.tar.gz + name: ThunderNanoServices-${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}-artifact + path: ${{matrix.build_type}}${{matrix.architecture == '32' && '_x86' || ''}}.tar.gz diff --git a/Compositor/lib/RPI/RPI.cpp b/Compositor/lib/RPI/RPI.cpp index 10e663d2..4791e404 100644 --- a/Compositor/lib/RPI/RPI.cpp +++ b/Compositor/lib/RPI/RPI.cpp @@ -141,6 +141,13 @@ namespace Plugin { _handler.Revoke(element); } + virtual void Dangling(const Core::IUnknown* element, const uint32_t interfaceID) + { + if (interfaceID == Exchange::IComposition::IClient::ID) { + _handler.Revoke(element); + } + } + private: CompositorImplementation::ClientHandler _handler; }; @@ -374,6 +381,7 @@ namespace Plugin { client->Release(); } else { + client->Release(); _adminLock.Unlock(); } diff --git a/Doggo/Doggo.cpp b/Doggo/Doggo.cpp index 00b913e0..fe055f2f 100644 --- a/Doggo/Doggo.cpp +++ b/Doggo/Doggo.cpp @@ -22,7 +22,19 @@ namespace Thunder { namespace Plugin { - SERVICE_REGISTRATION(Doggo, 1, 0) + namespace { + + static Metadata metadata( + // Version + 1, 0, 0, + // Preconditions + {}, + // Terminations + {}, + // Controls + {} + ); + } const string Doggo::Initialize(PluginHost::IShell* service) { diff --git a/examples/COMRPCClient/CMakeLists.txt b/examples/COMRPCClient/CMakeLists.txt index 93bd78fc..a2a431c6 100644 --- a/examples/COMRPCClient/CMakeLists.txt +++ b/examples/COMRPCClient/CMakeLists.txt @@ -15,23 +15,34 @@ # See the License for the specific language governing permissions and # limitations under the License. +project(COMRPCClient) + +cmake_minimum_required(VERSION 3.15) + find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + find_package(${NAMESPACE}COM REQUIRED) find_package(${NAMESPACE}Core REQUIRED) find_package(CompileSettingsDebug CONFIG REQUIRED) -add_executable(COMRPCClient COMRPCClient.cpp) +add_executable(${MODULE_NAME} COMRPCClient.cpp) -set_target_properties(COMRPCClient PROPERTIES +set_target_properties(${MODULE_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES ) -target_link_libraries(COMRPCClient +target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM ${NAMESPACE}Core::${NAMESPACE}Core CompileSettingsDebug::CompileSettingsDebug ) -install(TARGETS COMRPCClient DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime) +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime) diff --git a/examples/ConfigUpdateExample/CMakeLists.txt b/examples/ConfigUpdateExample/CMakeLists.txt index 0c8de17c..5536a753 100644 --- a/examples/ConfigUpdateExample/CMakeLists.txt +++ b/examples/ConfigUpdateExample/CMakeLists.txt @@ -15,8 +15,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(PLUGIN_NAME ConfigUpdateExample) -set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME}) +project(ConfigUpdateExample) + +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") find_package(${NAMESPACE}Plugins REQUIRED) find_package(${NAMESPACE}Definitions REQUIRED) diff --git a/examples/DynamicLoading/Yang/CMakeLists.txt b/examples/DynamicLoading/Yang/CMakeLists.txt index e529e865..4d39c582 100644 --- a/examples/DynamicLoading/Yang/CMakeLists.txt +++ b/examples/DynamicLoading/Yang/CMakeLists.txt @@ -15,19 +15,24 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.15) - project(Yang) +cmake_minimum_required(VERSION 3.15) + find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + find_package(${NAMESPACE}Core REQUIRED) find_package(${NAMESPACE}Plugins REQUIRED) find_package(${NAMESPACE}Definitions REQUIRED) find_package(${NAMESPACE}Messaging REQUIRED) find_package(CompileSettingsDebug REQUIRED) -set(PLUGIN_NAME Yang) -set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME}) set(PLUGIN_YANG_IMPLEMENTATION "${MODULE_NAME}Impl" CACHE STRING "Library with implementation of yang") set(PLUGIN_YANG_STARTMODE "Deactivated" CACHE STRING "Controls automatic start of the Yang plugin") diff --git a/examples/DynamicLoading/Yin/CMakeLists.txt b/examples/DynamicLoading/Yin/CMakeLists.txt index e6abee22..eb162695 100644 --- a/examples/DynamicLoading/Yin/CMakeLists.txt +++ b/examples/DynamicLoading/Yin/CMakeLists.txt @@ -15,20 +15,24 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.15) - project(Yin) +cmake_minimum_required(VERSION 3.15) + find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + find_package(${NAMESPACE}Core REQUIRED) find_package(${NAMESPACE}Plugins REQUIRED) find_package(${NAMESPACE}Definitions REQUIRED) find_package(${NAMESPACE}Messaging REQUIRED) find_package(CompileSettingsDebug REQUIRED) -set(PLUGIN_NAME Yin) - -set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME}) set(PLUGIN_YIN_IMPLEMENTATION "${MODULE_NAME}Impl" CACHE STRING "Library with the implementation of yin") set(PLUGIN_YIN_STARTMODE "Deactivated" CACHE STRING "Controls automatic start of the Yin plugin") diff --git a/examples/FileTransferClient/CMakeLists.txt b/examples/FileTransferClient/CMakeLists.txt index 10adc92c..38fce672 100644 --- a/examples/FileTransferClient/CMakeLists.txt +++ b/examples/FileTransferClient/CMakeLists.txt @@ -15,23 +15,33 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(PLUGIN_NAME FileTransferClient) +project(FileTransferClient) + +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") find_package(${NAMESPACE}Core REQUIRED) -add_executable(${PLUGIN_NAME} FileTransferClient.cpp) +add_executable(${MODULE_NAME} FileTransferClient.cpp) -set_target_properties(${PLUGIN_NAME} PROPERTIES +set_target_properties(${MODULE_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES ) -target_link_libraries(${PLUGIN_NAME} +target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}Core::${NAMESPACE}Core) -target_include_directories(${PLUGIN_NAME} +target_include_directories(${MODULE_NAME} PRIVATE ${NAMESPACE}Core::${NAMESPACE}Core) -install(TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime) +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime) diff --git a/examples/IOConnectorTest/CMakeLists.txt b/examples/IOConnectorTest/CMakeLists.txt index 836df8f9..de8e33ee 100644 --- a/examples/IOConnectorTest/CMakeLists.txt +++ b/examples/IOConnectorTest/CMakeLists.txt @@ -15,27 +15,43 @@ # See the License for the specific language governing permissions and # limitations under the License. +project(IOConnectorTest) + +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + find_package(${NAMESPACE}COM REQUIRED) +find_package(${NAMESPACE}Core REQUIRED) +find_package(${NAMESPACE}Messaging REQUIRED) find_package(${NAMESPACE}WebSocket REQUIRED) find_package(CompileSettingsDebug CONFIG REQUIRED) -add_executable(IOConnectorTest IOConnectorTest.cpp) +add_executable(${MODULE_NAME} IOConnectorTest.cpp) -set_target_properties(IOConnectorTest PROPERTIES +set_target_properties(${MODULE_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES ) -target_link_libraries(IOConnectorTest +target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM + ${NAMESPACE}Core::${NAMESPACE}Core ${NAMESPACE}WebSocket::${NAMESPACE}WebSocket + ${NAMESPACE}Messaging::${NAMESPACE}Messaging CompileSettingsDebug::CompileSettingsDebug ) -target_include_directories(IOConnectorTest +target_include_directories(${MODULE_NAME} PRIVATE "${PROJECT_SOURCE_DIR}/tests" ) -install(TARGETS IOConnectorTest DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Test) +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Test) diff --git a/examples/IOConnectorTest/IOConnectorTest.cpp b/examples/IOConnectorTest/IOConnectorTest.cpp index 6b5192e9..1f63e202 100644 --- a/examples/IOConnectorTest/IOConnectorTest.cpp +++ b/examples/IOConnectorTest/IOConnectorTest.cpp @@ -133,7 +133,6 @@ int main(int argc, char** argv) Core::ProxyType::Create( comChannel, Core::ProxyType(engine))); - engine->Announcements(client->Announcement()); ASSERT(client.IsValid() == true); diff --git a/examples/JSONRPCClient/CMakeLists.txt b/examples/JSONRPCClient/CMakeLists.txt index 714b4ed4..a4422b4c 100644 --- a/examples/JSONRPCClient/CMakeLists.txt +++ b/examples/JSONRPCClient/CMakeLists.txt @@ -15,6 +15,18 @@ # See the License for the specific language governing permissions and # limitations under the License. +project(JSONRPCClient) + +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + find_package(Thunder) find_package(${NAMESPACE}COM REQUIRED) find_package(${NAMESPACE}WebSocket REQUIRED) @@ -23,14 +35,14 @@ find_package(${NAMESPACE}Core REQUIRED) find_package(securityagent QUIET) find_package(CompileSettingsDebug CONFIG REQUIRED) -add_executable(JSONRPCClient Module.cpp JSONRPCClient.cpp) +add_executable(${MODULE_NAME} Module.cpp JSONRPCClient.cpp) -set_target_properties(JSONRPCClient PROPERTIES +set_target_properties(${MODULE_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES ) -target_link_libraries(JSONRPCClient +target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM ${NAMESPACE}WebSocket::${NAMESPACE}WebSocket @@ -40,18 +52,18 @@ target_link_libraries(JSONRPCClient ) if (securityagent_FOUND) - target_link_libraries(JSONRPCClient + target_link_libraries(${MODULE_NAME} PRIVATE securityagent::securityagent ) - target_compile_definitions(JSONRPCClient + target_compile_definitions(${MODULE_NAME} PRIVATE ENABLE_SECURITY_AGENT=1) endif() -target_include_directories(JSONRPCClient +target_include_directories(${MODULE_NAME} PRIVATE "${PROJECT_SOURCE_DIR}/tests" ) -install(TARGETS JSONRPCClient DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime) +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime) diff --git a/examples/JSONRPCClient/JSONRPCClient.cpp b/examples/JSONRPCClient/JSONRPCClient.cpp index ac4a36df..5c83f4bc 100644 --- a/examples/JSONRPCClient/JSONRPCClient.cpp +++ b/examples/JSONRPCClient/JSONRPCClient.cpp @@ -322,7 +322,7 @@ static void Measure(const TCHAR info[], const uint8_t patternLength, const uint8 subject(length, dataFrame); } time = measurement.Elapsed(); - printf("Data outbound: [0], inbound: [4]. Total: %lu. Average: %lu\n", time, time / MeasurementLoops); + printf("Data outbound: [0], inbound: [4]. Total: %" PRIu64 ". Average: %" PRIu64 "\n", time, time / MeasurementLoops); measurement.Reset(); length = 16; @@ -331,7 +331,7 @@ static void Measure(const TCHAR info[], const uint8_t patternLength, const uint8 subject(length, dataFrame); } time = measurement.Elapsed(); - printf("Data outbound: [16], inbound: [4]. Total: %lu. Average: %lu\n", time, time / MeasurementLoops); + printf("Data outbound: [16], inbound: [4]. Total: %" PRIu64 ". Average: %" PRIu64 "\n", time, time / MeasurementLoops); measurement.Reset(); length = 128; @@ -340,7 +340,7 @@ static void Measure(const TCHAR info[], const uint8_t patternLength, const uint8 subject(length, dataFrame); } time = measurement.Elapsed(); - printf("Data outbound: [128], inbound: [4]. Total: %lu. Average: %lu\n", time, time / MeasurementLoops); + printf("Data outbound: [128], inbound: [4]. Total: %" PRIu64 ". Average: %" PRIu64 "\n", time, time / MeasurementLoops); measurement.Reset(); length = 256; @@ -348,7 +348,7 @@ static void Measure(const TCHAR info[], const uint8_t patternLength, const uint8 subject(length, dataFrame); } time = measurement.Elapsed(); - printf("Data outbound: [256], inbound: [4]. Total: %lu. Average: %lu\n", time, time / MeasurementLoops); + printf("Data outbound: [256], inbound: [4]. Total: %" PRIu64 ". Average: %" PRIu64 "\n", time, time / MeasurementLoops); measurement.Reset(); length = 512; @@ -356,7 +356,7 @@ static void Measure(const TCHAR info[], const uint8_t patternLength, const uint8 subject(length, dataFrame); } time = measurement.Elapsed(); - printf("Data outbound: [512], inbound: [4]. Total: %lu. Average: %lu\n", time, time / MeasurementLoops); + printf("Data outbound: [512], inbound: [4]. Total: %" PRIu64 ". Average: %" PRIu64 "\n", time, time / MeasurementLoops); measurement.Reset(); length = 1024; @@ -364,7 +364,7 @@ static void Measure(const TCHAR info[], const uint8_t patternLength, const uint8 subject(length, dataFrame); } time = measurement.Elapsed();; - printf("Data outbound: [1024], inbound: [4]. Total: %lu. Average: %lu\n", time, time / MeasurementLoops); + printf("Data outbound: [1024], inbound: [4]. Total: %" PRIu64 ". Average: %" PRIu64 "\n", time, time / MeasurementLoops); measurement.Reset(); length = 2048; @@ -372,7 +372,7 @@ static void Measure(const TCHAR info[], const uint8_t patternLength, const uint8 subject(length, dataFrame); } time = measurement.Elapsed(); - printf("Data outbound: [2048], inbound: [4]. Total: %lu. Average: %lu\n", time, time / MeasurementLoops); + printf("Data outbound: [2048], inbound: [4]. Total: %" PRIu64 ". Average: %" PRIu64 "\n", time, time / MeasurementLoops); measurement.Reset(); length = 1024 * 32; @@ -380,7 +380,7 @@ static void Measure(const TCHAR info[], const uint8_t patternLength, const uint8 subject(length, dataFrame); } time = measurement.Elapsed(); - printf("Data outbound: [32KB], inbound: [4]. Total: %lu. Average: %lu\n", time, time / MeasurementLoops); + printf("Data outbound: [32KB], inbound: [4]. Total: %" PRIu64 ". Average: %" PRIu64 "\n", time, time / MeasurementLoops); } @@ -403,9 +403,9 @@ void MeasureCOMRPC(Core::ProxyType& client) Core::StopWatch measurement; Exchange::IPerformance* perf = client->Acquire(2000, _T("JSONRPCPlugin"), ~0); if (perf == nullptr) { - printf("Instantiation failed. An performance interface was not returned. It took: %ld ticks\n", measurement.Elapsed()); + printf("Instantiation failed. An performance interface was not returned. It took: %" PRIu64 " ticks\n", measurement.Elapsed()); } else { - printf("Instantiating and retrieving the interface took: %ld ticks\n", measurement.Elapsed()); + printf("Instantiating and retrieving the interface took: %" PRIu64 " ticks\n", measurement.Elapsed()); int measure; do { ShowPerformanceMenu(); diff --git a/examples/JSONRPCPlugin/CMakeLists.txt b/examples/JSONRPCPlugin/CMakeLists.txt index 57b845ab..cf79d34d 100644 --- a/examples/JSONRPCPlugin/CMakeLists.txt +++ b/examples/JSONRPCPlugin/CMakeLists.txt @@ -15,8 +15,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(PLUGIN_NAME JSONRPCPlugin) -set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME}) +project(JSONRPCPlugin) + +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") find_package(${NAMESPACE}Plugins REQUIRED) find_package(${NAMESPACE}Definitions REQUIRED) diff --git a/examples/MessageControlUDPClient/CMakeLists.txt b/examples/MessageControlUDPClient/CMakeLists.txt index 82cae3e0..748144a8 100644 --- a/examples/MessageControlUDPClient/CMakeLists.txt +++ b/examples/MessageControlUDPClient/CMakeLists.txt @@ -14,22 +14,35 @@ # 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. + +project(UDPMessageOutput) + cmake_minimum_required(VERSION 3.15) -set(PLUGIN_NAME UDPMessageOutput) +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + +find_package(Thunder) +find_package(${NAMESPACE}Core REQUIRED) find_package(${NAMESPACE}Messaging REQUIRED) -add_executable(${PLUGIN_NAME} +add_executable(${MODULE_NAME} UDPMessageOutput.cpp Module.cpp ) -set_target_properties(${PLUGIN_NAME} PROPERTIES +set_target_properties(${MODULE_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES) -target_link_libraries(${PLUGIN_NAME} +target_link_libraries(${MODULE_NAME} PRIVATE + ${NAMESPACE}Core::${NAMESPACE}Core ${NAMESPACE}Messaging::${NAMESPACE}Messaging) -install(TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime) \ No newline at end of file +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime) diff --git a/examples/MessageControlUDPClient/UDPMessageOutput.cpp b/examples/MessageControlUDPClient/UDPMessageOutput.cpp index 6eda76fd..e5cf8b99 100644 --- a/examples/MessageControlUDPClient/UDPMessageOutput.cpp +++ b/examples/MessageControlUDPClient/UDPMessageOutput.cpp @@ -4,12 +4,12 @@ using namespace Thunder; -class UDPMessageOutput : public Core::Messaging::IOutput { +class UDPMessageOutput : public Messaging::DirectOutput { private: class Channel : public Core::SocketDatagram { public: Channel(UDPMessageOutput& output, const string& binding, const uint16_t port) - : Core::SocketDatagram(false, Core::NodeId(binding.c_str(), port), Core::NodeId(), 0, Core::Messaging::MessageUnit::DataSize) + : Core::SocketDatagram(false, Core::NodeId(binding.c_str(), port), Core::NodeId(), 0, Messaging::MessageUnit::Instance().DataSize()) , _output(output) { Open(0); @@ -26,14 +26,14 @@ class UDPMessageOutput : public Core::Messaging::IOutput { uint16_t ReceiveData(uint8_t* dataFrame, const uint16_t receivedSize) override { uint16_t length = 0; - Core::Messaging::Information information; - Core::ProxyType message; + Core::Messaging::MessageInfo information; + Core::ProxyType message; length = information.Deserialize(dataFrame, receivedSize); if (length != 0 && length <= receivedSize) { - if (information.MessageMetaData().Type() == Core::Messaging::MessageType::TRACING || information.MessageMetaData().Type() == Core::Messaging::MessageType::LOGGING) { - message = _factory.Create(); + if (information.Type() == Messaging::MessageType::TRACING || information.Type() == Messaging::MessageType::LOGGING) { + message = Core::ProxyType::Create(); length += message->Deserialize(dataFrame + length, receivedSize - length); _output.Output(information, message.Origin()); @@ -59,7 +59,6 @@ class UDPMessageOutput : public Core::Messaging::IOutput { } private: - Messaging::TraceFactory _factory; UDPMessageOutput& _output; }; @@ -104,7 +103,7 @@ class UDPMessageOutput : public Core::Messaging::IOutput { { } - void Output(const Core::Messaging::Information& info, const Core::Messaging::IEvent* message) + void Output(const Core::Messaging::MessageInfo& info, const Core::Messaging::IEvent* message) const { std::ostringstream output; @@ -112,16 +111,22 @@ class UDPMessageOutput : public Core::Messaging::IOutput { if (_abbreviated == true) { string time(now.ToTimeOnly(true)); - output << '[' << time << "]:[" << info.MessageMetaData().Module() << "]:[" << info.MessageMetaData().Category() + output << '[' << time << "]:[" << info.Module() << "]:[" << info.Category() << "]: " << message->Data() << std::endl; } else { string time(now.ToRFC1123(true)); - output << '[' << time << "]:[" << Core::FileNameOnly(info.FileName().c_str()) << ':' << info.LineNumber() - << "]:[" << info.ClassName() << "]:[" << info.MessageMetaData().Category() << "]: " - << message->Data() << std::endl; + output << '[' << time; + + if (info.Type() == Messaging::MessageType::TRACING) { + const Core::Messaging::IStore::Tracing& trace = static_cast(info); + output << Core::FileNameOnly(trace.FileName().c_str()) << ':' << trace.LineNumber() + << "]:[" << trace.ClassName() << "]:[" << trace.Category(); + } + + output << "]: " << message->Data() << std::endl; } - _newLineQueue.Post(output.str()); + const_cast(this)->_newLineQueue.Post(output.str()); } private: diff --git a/examples/PluginSmartInterfaceType/Castor/CMakeLists.txt b/examples/PluginSmartInterfaceType/Castor/CMakeLists.txt index d5bdd468..eb59102b 100644 --- a/examples/PluginSmartInterfaceType/Castor/CMakeLists.txt +++ b/examples/PluginSmartInterfaceType/Castor/CMakeLists.txt @@ -15,21 +15,24 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.15) - project(Castor) +cmake_minimum_required(VERSION 3.15) + find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + find_package(${NAMESPACE}Core REQUIRED) find_package(${NAMESPACE}Plugins REQUIRED) find_package(${NAMESPACE}Definitions REQUIRED) find_package(${NAMESPACE}Messaging REQUIRED) find_package(CompileSettingsDebug REQUIRED) -set(PLUGIN_NAME Castor) - -set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME}) - set(PLUGIN_CASTOR_STARTMODE "Activated" CACHE STRING "Controls automatic start of the Castor plugin") set(PLUGIN_CASTOR_MODE "Local" CACHE STRING "Controls if the plugin should run in its own process, in process or remote") set(PLUGIN_CASTOR_POLLUXCALLSIGN "Pollux" CACHE STRING "Callsign of the Pollux plugin") @@ -56,4 +59,3 @@ install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/${STORAGE_DIRECTORY}/plugins COMPONENT ${NAMESPACE}_Runtime) write_config() - \ No newline at end of file diff --git a/examples/PluginSmartInterfaceType/Pollux/CMakeLists.txt b/examples/PluginSmartInterfaceType/Pollux/CMakeLists.txt index 7faa69dd..306ab803 100644 --- a/examples/PluginSmartInterfaceType/Pollux/CMakeLists.txt +++ b/examples/PluginSmartInterfaceType/Pollux/CMakeLists.txt @@ -15,20 +15,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.15) - project(Pollux) +cmake_minimum_required(VERSION 3.15) + find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + find_package(${NAMESPACE}Core REQUIRED) find_package(${NAMESPACE}Plugins REQUIRED) find_package(${NAMESPACE}Messaging REQUIRED) find_package(CompileSettingsDebug REQUIRED) -set(PLUGIN_NAME Pollux) - -set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME}) - set(PLUGIN_POLLUX_STARTMODE "Activated" CACHE STRING "Controls automatic start of the Pollux plugin") set(PLUGIN_POLLUX_MODE "Local" CACHE STRING "Controls if the plugin should run in its own process, in process or remote") @@ -52,5 +55,4 @@ target_link_libraries(${MODULE_NAME} install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/${STORAGE_DIRECTORY}/plugins COMPONENT ${NAMESPACE}_Runtime) -write_config() - \ No newline at end of file +write_config() diff --git a/examples/RemoteHostExample/CMakeLists.txt b/examples/RemoteHostExample/CMakeLists.txt index 7baa53d6..d393105d 100644 --- a/examples/RemoteHostExample/CMakeLists.txt +++ b/examples/RemoteHostExample/CMakeLists.txt @@ -15,8 +15,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(PLUGIN_NAME RemoteHostExample) -set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME}) +project(RemoteHostExample) + +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") set(PLUGIN_REMOTEHOSTEXAMPLE_MODE "Distributed" CACHE STRING "Set process running mode") diff --git a/examples/RemoteHostExample/RemoteHostExample.cpp b/examples/RemoteHostExample/RemoteHostExample.cpp index b3729bd3..290df3b5 100644 --- a/examples/RemoteHostExample/RemoteHostExample.cpp +++ b/examples/RemoteHostExample/RemoteHostExample.cpp @@ -23,7 +23,19 @@ namespace Thunder { namespace Plugin { - SERVICE_REGISTRATION(RemoteHostExample, 1, 0) + namespace { + + static Metadata metadata( + // Version + 1, 0, 0, + // Preconditions + {}, + // Terminations + {}, + // Controls + {} + ); + } const string RemoteHostExample::Initialize(PluginHost::IShell* service) { diff --git a/examples/SimpleCOMRPCClient/CMakeLists.txt b/examples/SimpleCOMRPCClient/CMakeLists.txt index c1ba6204..b8b22f14 100644 --- a/examples/SimpleCOMRPCClient/CMakeLists.txt +++ b/examples/SimpleCOMRPCClient/CMakeLists.txt @@ -15,22 +15,34 @@ # See the License for the specific language governing permissions and # limitations under the License. +project(SimpleCOMRPCClient) + +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + find_package(${NAMESPACE}Core) find_package(${NAMESPACE}COM REQUIRED) find_package(CompileSettingsDebug CONFIG REQUIRED) -add_executable(SimpleCOMRPCClient SimpleCOMRPCClient.cpp) +add_executable(${MODULE_NAME} SimpleCOMRPCClient.cpp) -set_target_properties(SimpleCOMRPCClient PROPERTIES +set_target_properties(${MODULE_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES ) -target_link_libraries(SimpleCOMRPCClient +target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}Core::${NAMESPACE}Core ${NAMESPACE}COM::${NAMESPACE}COM CompileSettingsDebug::CompileSettingsDebug ) -install(TARGETS SimpleCOMRPCClient DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime) +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime) diff --git a/examples/SimpleCOMRPCClient/SimpleCOMRPCClient.cpp b/examples/SimpleCOMRPCClient/SimpleCOMRPCClient.cpp index 1f5c155b..b0fe1ed1 100644 --- a/examples/SimpleCOMRPCClient/SimpleCOMRPCClient.cpp +++ b/examples/SimpleCOMRPCClient/SimpleCOMRPCClient.cpp @@ -24,7 +24,7 @@ #include #include "../SimpleCOMRPCInterface/ISimpleCOMRPCInterface.h" -MODULE_NAME_DECLARATION(BUILD_REFERENCE); +MODULE_NAME_DECLARATION(BUILD_REFERENCE) using namespace Thunder; diff --git a/examples/SimpleCOMRPCInterface/CMakeLists.txt b/examples/SimpleCOMRPCInterface/CMakeLists.txt index 6bc11726..d9333dbd 100644 --- a/examples/SimpleCOMRPCInterface/CMakeLists.txt +++ b/examples/SimpleCOMRPCInterface/CMakeLists.txt @@ -14,6 +14,19 @@ # 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. + +project(SimpleCOMRPCInterface) + +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + find_package(${NAMESPACE}Core) find_package(${NAMESPACE}COM) find_package(CompileSettingsDebug CONFIG REQUIRED) @@ -31,19 +44,17 @@ list(APPEND INTERFACES_HEADERS Module.h) file(GLOB PROXY_STUB_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/generated/ProxyStubs*.cpp") -set(TARGET ${NAMESPACE}SimpleCOMRPCInterface) - -add_library(${TARGET} SHARED +add_library(${MODULE_NAME} SHARED ${PROXY_STUB_SOURCES} Module.cpp ) -target_link_libraries(${TARGET} +target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM ) -target_link_libraries(${TARGET} +target_link_libraries(${MODULE_NAME} PRIVATE CompileSettingsDebug::CompileSettingsDebug ) @@ -57,7 +68,7 @@ set_target_properties(${TargetMarshalling} PROPERTIES ) install( - TARGETS ${TARGET} EXPORT ${TARGET}Targets + MODULE_NAMES ${MODULE_NAME} EXPORT ${MODULE_NAME}Targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/${NAMESPACE_LIB}/proxystubs COMPONENT ${NAMESPACE}_Development LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${NAMESPACE_LIB}/proxystubs COMPONENT ${NAMESPACE}_Runtime RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime @@ -66,4 +77,4 @@ install( INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/proxystubs ) -InstallCMakeConfig(TARGETS ${TARGET}) +InstallCMakeConfig(MODULE_NAMES ${MODULE_NAME}) diff --git a/examples/SimpleCOMRPCPluginServer/CMakeLists.txt b/examples/SimpleCOMRPCPluginServer/CMakeLists.txt index 4d5fcb58..b98957d1 100644 --- a/examples/SimpleCOMRPCPluginServer/CMakeLists.txt +++ b/examples/SimpleCOMRPCPluginServer/CMakeLists.txt @@ -15,10 +15,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(PLUGIN_NAME SimpleCOMRPCPluginServer) -set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME}) +project(SimpleCOMRPCPluginServer) -message("Setting up ${PLUGIN_NAME}") +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") find_package(${NAMESPACE}Plugins REQUIRED) find_package(${NAMESPACE}Definitions REQUIRED) @@ -29,9 +36,6 @@ add_library(${MODULE_NAME} SHARED SimpleCOMRPCPluginServer.cpp ) -#set_source_files_properties( SimpleCOMRPCPluginServer.cpp PROPERTIES COMPILE_FLAGS "-fexceptions" ) -#set_source_files_properties( OutOfProcessImplementation.cpp PROPERTIES COMPILE_FLAGS "-fexceptions" ) - set_target_properties(${MODULE_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES) @@ -45,4 +49,4 @@ target_link_libraries(${MODULE_NAME} install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/${STORAGE_DIRECTORY}/plugins COMPONENT ${NAMESPACE}_Runtime) -write_config(PLUGINS ${PLUGIN_NAME} CLASSNAME ${PLUGIN_NAME}) +write_config() diff --git a/examples/SimpleCOMRPCPluginServer/SimpleCOMRPCPluginServer.conf.in b/examples/SimpleCOMRPCPluginServer/SimpleCOMRPCPluginServer.conf.in new file mode 100644 index 00000000..24808093 --- /dev/null +++ b/examples/SimpleCOMRPCPluginServer/SimpleCOMRPCPluginServer.conf.in @@ -0,0 +1,2 @@ +startmode = "Deactivated" + diff --git a/examples/SimpleCOMRPCServer/CMakeLists.txt b/examples/SimpleCOMRPCServer/CMakeLists.txt index e67f63a7..b8fb507a 100644 --- a/examples/SimpleCOMRPCServer/CMakeLists.txt +++ b/examples/SimpleCOMRPCServer/CMakeLists.txt @@ -15,20 +15,32 @@ # See the License for the specific language governing permissions and # limitations under the License. +project(SimpleCOMRPCServer) + +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + find_package(${NAMESPACE}COM REQUIRED) find_package(CompileSettingsDebug CONFIG REQUIRED) -add_executable(SimpleCOMRPCServer SimpleCOMRPCServer.cpp) +add_executable(${MODULE_NAME} SimpleCOMRPCServer.cpp) set_target_properties(COMRPCClient PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES ) -target_link_libraries(SimpleCOMRPCServer +target_link_libraries(${MODULE_NAME} PRIVATE ${NAMESPACE}COM::${NAMESPACE}COM CompileSettingsDebug::CompileSettingsDebug ) -install(TARGETS SimpleCOMRPCServer DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime) +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Runtime) diff --git a/examples/StateController/CMakeLists.txt b/examples/StateController/CMakeLists.txt index 5c5abc2e..ad2bee6b 100644 --- a/examples/StateController/CMakeLists.txt +++ b/examples/StateController/CMakeLists.txt @@ -15,8 +15,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(PLUGIN_NAME StateController) -set(MODULE_NAME ${NAMESPACE}${PLUGIN_NAME}) +project(StateController) + +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") find_package(${NAMESPACE}Plugins REQUIRED) find_package(${NAMESPACE}Definitions REQUIRED) diff --git a/examples/StateController/StateController.cpp b/examples/StateController/StateController.cpp index d29d44ee..268ca829 100644 --- a/examples/StateController/StateController.cpp +++ b/examples/StateController/StateController.cpp @@ -22,7 +22,19 @@ namespace Thunder { namespace Plugin { - SERVICE_REGISTRATION(StateController, 1, 0) + namespace { + + static Metadata metadata( + // Version + 1, 0, 0, + // Preconditions + {}, + // Terminations + {}, + // Controls + {} + ); + } /* virtual */ const string StateController::Initialize(PluginHost::IShell* service) { diff --git a/examples/testconsole/CMakeLists.txt b/examples/testconsole/CMakeLists.txt index 5a7fa560..fcbfcf0b 100644 --- a/examples/testconsole/CMakeLists.txt +++ b/examples/testconsole/CMakeLists.txt @@ -1,3 +1,15 @@ +project(testconsole) + +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${NAMESPACE}${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + find_package(${NAMESPACE}Core REQUIRED) find_package(${NAMESPACE}Cryptalgo REQUIRED) find_package(${NAMESPACE}WebSocket REQUIRED) @@ -9,13 +21,13 @@ set (PLUGIN_TEST_TESTCONSOLE_SOURCES ../testserver/DataContainer.cpp ) -add_executable(testconsole ${PLUGIN_TEST_TESTCONSOLE_SOURCES}) +add_executable(${MODULE_NAME} ${PLUGIN_TEST_TESTCONSOLE_SOURCES}) set_target_properties(${MODULE_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES) -target_link_libraries(testconsole +target_link_libraries(${MODULE_NAME} PRIVATE CompileSettingsDebug::CompileSettingsDebug ${NAMESPACE}Core::${NAMESPACE}Core @@ -23,4 +35,4 @@ target_link_libraries(testconsole ${NAMESPACE}WebSocket::${NAMESPACE}WebSocket ${NAMESPACE}Definitions::${NAMESPACE}Definitions) -install(TARGETS testconsole DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Test) +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Test) diff --git a/examples/testserver/CMakeLists.txt b/examples/testserver/CMakeLists.txt index 5db73d40..59802685 100644 --- a/examples/testserver/CMakeLists.txt +++ b/examples/testserver/CMakeLists.txt @@ -1,3 +1,15 @@ +project(testserver) + +cmake_minimum_required(VERSION 3.15) + +find_package(Thunder) + +project_version(1.0.0) + +set(MODULE_NAME ${PROJECT_NAME}) + +message("Setup ${MODULE_NAME} v${PROJECT_VERSION}") + find_package(${NAMESPACE}Core REQUIRED) find_package(${NAMESPACE}Cryptalgo REQUIRED) find_package(${NAMESPACE}WebSocket REQUIRED) @@ -9,13 +21,13 @@ set (PLUGIN_TEST_TESTSERVER_SOURCES DataContainer.cpp ) -add_executable(testserver ${PLUGIN_TEST_TESTSERVER_SOURCES}) +add_executable(${MODULE_NAME} ${PLUGIN_TEST_TESTSERVER_SOURCES}) set_target_properties(${MODULE_NAME} PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES) -target_link_libraries(testserver +target_link_libraries(${MODULE_NAME} PRIVATE CompileSettingsDebug::CompileSettingsDebug ${NAMESPACE}Core::${NAMESPACE}Core @@ -23,4 +35,4 @@ target_link_libraries(testserver ${NAMESPACE}WebSocket::${NAMESPACE}WebSocket ${NAMESPACE}Definitions::${NAMESPACE}Definitions) -install(TARGETS testserver DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Test) +install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${NAMESPACE}_Test) diff --git a/tests/StoreTest/StoreTest.cpp b/tests/StoreTest/StoreTest.cpp index da792292..3fd66d60 100644 --- a/tests/StoreTest/StoreTest.cpp +++ b/tests/StoreTest/StoreTest.cpp @@ -44,8 +44,8 @@ static void Measure(const string& interface, const string& callSign, Performance uint64_t freeRamBefore = systemInfo.GetFreeRam(); Core::StopWatch measurement; - printf("CPU Load: Before Test: %lu\n", loadBefore); - printf("Free Memory: Before Test: %lu\n", freeRamBefore); + printf("CPU Load: Before Test: %" PRIu64 "\n", loadBefore); + printf("Free Memory: Before Test: %" PRIu64 "\n", freeRamBefore); uint64_t loadInBetween, loadPeak = loadBefore; uint64_t freeRamBetween, freeRamPeak = freeRamBefore; for (uint32_t run = 0; run < MaxLoad; run++) { @@ -69,9 +69,9 @@ static void Measure(const string& interface, const string& callSign, Performance if (loadPeak > loadBefore) { loadDiff = static_cast(loadPeak - loadBefore); } - printf("Performance: Total: %lu. Average: %lu\n", time, time / MaxLoad); - printf("Free Memory: After = %lu, Diff = %lu\n", freeRamPeak, memDiff); - printf("CPU Load: After = %lu, Diff = %lu\n", loadPeak, loadDiff); + printf("Performance: Total: %" PRIu64 ". Average: %" PRIu64 "\n", time, time / MaxLoad); + printf("Free Memory: After = %" PRIu64 ", Diff = %" PRIu64 "\n", freeRamPeak, memDiff); + printf("CPU Load: After = %" PRIu64 ", Diff = %" PRIu64 "\n", loadPeak, loadDiff); } class Dictionary : public RPC::SmartInterfaceType {