initial
This commit is contained in:
parent
86a6d01a69
commit
fa539bc637
15
CMakeLists.txt
Normal file
15
CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(Ranczo-IO)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(Protobuf REQUIRED)
|
||||
include_directories(${Protobuf_INCLUDE_DIRS})
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
find_package(cppzmq)
|
||||
|
||||
|
||||
|
||||
add_subdirectory(floorheat_hub)
|
||||
435
CMakeLists.txt.user
Normal file
435
CMakeLists.txt.user
Normal file
@ -0,0 +1,435 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 14.0.1, 2024-09-26T11:10:15. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{a43cdd5b-7966-46da-935c-9a6c3d6cfb16}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="qlonglong">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">ISO-8859-2</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="int" key="EditorConfiguration.PreferAfterWhitespaceComments">0</value>
|
||||
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">false</value>
|
||||
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md,*.MD,Makefile</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||
</valuemap>
|
||||
<value type="bool" key="AutoTest.ApplyFilter">false</value>
|
||||
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||
<valuelist type="QVariantList" key="AutoTest.PathFilters"/>
|
||||
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||
<value type="QString" key="Axivion.DashboardId"></value>
|
||||
<value type="QString" key="Axivion.ProjectName"></value>
|
||||
<valuemap type="QVariantMap" key="ClangTools">
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">8</value>
|
||||
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="CppcheckManual"/>
|
||||
<value type="QDateTime" key="GitLab.LastRequest"></value>
|
||||
<value type="QString" key="GitLab.LinkedId"></value>
|
||||
<value type="QString" key="GitLab.Project"></value>
|
||||
<value type="QString" key="GitLab.Server"></value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">GCC 12</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">GCC 12</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e1ef4662-de51-4c91-b1d1-e4a1355650a2}</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="CMake.Build.Type">Debug</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_BUILD_TYPE:STRING=Debug
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_C_COMPILER_LAUNCHER:UNINITIALIZED=distcc
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER:UNINITIALIZED=distcc
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/bartoszek/builds/build-ranczo-io-GCC_12-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Zbuduj</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Budowanie</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Budowanie</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Zbuduj</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Wyczyść</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Wyczyść</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debugowa</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="CMake.Build.Type">Release</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_BUILD_TYPE:STRING=Release
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_C_COMPILER_LAUNCHER:UNINITIALIZED=distcc
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER:UNINITIALIZED=distcc
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/bartoszek/builds/build-ranczo-io-GCC_12-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Zbuduj</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Budowanie</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Budowanie</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Zbuduj</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Wyczyść</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Wyczyść</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release'owa</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_C_COMPILER_LAUNCHER:UNINITIALIZED=distcc
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER:UNINITIALIZED=distcc
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/bartoszek/builds/build-ranczo-io-GCC_12-RelWithDebInfo</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Budowanie</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Budowanie</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Wyczyść</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Wyczyść</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Wersja z informacją debugową</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
|
||||
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_C_COMPILER_LAUNCHER:UNINITIALIZED=distcc
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER:UNINITIALIZED=distcc
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/bartoszek/builds/build-ranczo-io-GCC_12-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Budowanie</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Budowanie</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Wyczyść</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Wyczyść</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profil</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.4">
|
||||
<value type="QString" key="CMake.Build.Type">MinSizeRel</value>
|
||||
<value type="int" key="CMake.Configure.BaseEnvironment">2</value>
|
||||
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_BUILD_TYPE:STRING=MinSizeRel
|
||||
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}
|
||||
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx}
|
||||
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable}
|
||||
-DCMAKE_C_COMPILER_LAUNCHER:UNINITIALIZED=distcc
|
||||
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake
|
||||
-DCMAKE_GENERATOR:STRING=Ninja
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER:UNINITIALIZED=distcc
|
||||
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C}</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/bartoszek/builds/build-ranczo-io-GCC_12-MinSizeRel</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">all</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Budowanie</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Budowanie</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
|
||||
<value type="QString">clean</value>
|
||||
</valuelist>
|
||||
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Wyczyść</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Wyczyść</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Wersja o minimalnym rozmiarze (kosztem prędkości)</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">5</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Zainstaluj</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Zainstaluj</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph dwarf,4096 -F 250</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">ranczo-io_floorheating</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.ranczo-io_floorheating</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">ranczo-io_floorheating</value>
|
||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/home/bartoszek/builds/build-ranczo-io-GCC_12-Debug/floorheat_hub</value>
|
||||
</valuemap>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="qlonglong">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
19
floorheat_hub/CMakeLists.txt
Normal file
19
floorheat_hub/CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ../proto/message.proto ../proto/heating.proto ../proto/ACPower.proto ../proto/ACPowerInternal.proto)
|
||||
|
||||
add_executable(ranczo-io_floorheating
|
||||
main.cpp
|
||||
heater.cpp
|
||||
relay.cpp
|
||||
${PROTO_SRCS}
|
||||
)
|
||||
|
||||
target_include_directories(ranczo-io_floorheating
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(ranczo-io_floorheating
|
||||
PUBLIC
|
||||
${Protobuf_LIBRARIES}
|
||||
)
|
||||
0
floorheat_hub/heater.cpp
Normal file
0
floorheat_hub/heater.cpp
Normal file
0
floorheat_hub/heater.hpp
Normal file
0
floorheat_hub/heater.hpp
Normal file
154
floorheat_hub/main.cpp
Normal file
154
floorheat_hub/main.cpp
Normal file
@ -0,0 +1,154 @@
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <google/protobuf/stubs/strutil.h>
|
||||
#include <google/protobuf/wire_format_lite.h>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <vector>
|
||||
#include <format>
|
||||
|
||||
#include <google/protobuf/message_lite.h>
|
||||
#include <google/protobuf/util/json_util.h>
|
||||
|
||||
#include <message.pb.h>
|
||||
#include <heating.pb.h>
|
||||
|
||||
#include <ACPower.pb.h>
|
||||
|
||||
struct CANID {
|
||||
u_int8_t priority : 2; // 4 priority level
|
||||
u_int16_t id : 11; // 2048 id's per device
|
||||
u_int8_t sourceAddress : 8; // 255 devices max 0xff -> broadcast
|
||||
u_int8_t destinationAddress : 8;
|
||||
};
|
||||
static_assert((2 + 11 + 8 + 8) <= 29);
|
||||
|
||||
constexpr std::size_t maxDataAtMessage(std::size_t msgNum, std::size_t maxFrameSize, uint32_t type) {
|
||||
if(msgNum == 1) {
|
||||
return maxFrameSize - 2 - google::protobuf::internal::WireFormatLite::UInt32Size(type) - 1;
|
||||
} else if(msgNum > 1 and msgNum <= 128) {
|
||||
return maxFrameSize - 4;
|
||||
} else if(msgNum > 128 and msgNum <= 16384) {
|
||||
return maxFrameSize - 5;
|
||||
} else {
|
||||
return maxFrameSize - 6;
|
||||
}
|
||||
}
|
||||
|
||||
constexpr std::size_t msgnum(int32_t datasize, std::size_t maxFrameSize, uint32_t type) {
|
||||
std::size_t messages = 0;
|
||||
|
||||
while(datasize > 0) {
|
||||
messages++;
|
||||
datasize -= maxDataAtMessage(messages, maxFrameSize, type);
|
||||
}
|
||||
|
||||
return messages;
|
||||
}
|
||||
|
||||
template < typename T >
|
||||
struct IncrementAtExit {
|
||||
T & value;
|
||||
constexpr ~IncrementAtExit() {
|
||||
value++;
|
||||
}
|
||||
};
|
||||
|
||||
std::vector< Frame > encapsulate(const google::protobuf::MessageLite & message, uint32_t type) {
|
||||
std::vector< Frame > frames;
|
||||
auto data = message.SerializeAsString();
|
||||
frames.resize(msgnum(data.size(), 64, type));
|
||||
|
||||
const char * ptr = reinterpret_cast< const char * >(data.data());
|
||||
const char * end = reinterpret_cast< const char * >(data.data() + data.size());
|
||||
|
||||
int current = 0;
|
||||
for(auto & frame : frames) {
|
||||
IncrementAtExit _{current};
|
||||
frame.set_parts(current);
|
||||
auto bytesToCopy = std::distance(ptr, std::min(ptr + maxDataAtMessage(current + 1, 64, type), end));
|
||||
|
||||
frame.set_data(ptr, bytesToCopy);
|
||||
|
||||
ptr += bytesToCopy;
|
||||
}
|
||||
|
||||
frames[0].set_type(type);
|
||||
return frames;
|
||||
}
|
||||
|
||||
std::vector< uint8_t > genData(std::size_t size) {
|
||||
std::vector< uint8_t > data;
|
||||
data.resize(size);
|
||||
std::fill(data.begin(), data.end(), uint8_t{0xde});
|
||||
return data;
|
||||
}
|
||||
|
||||
template < typename T >
|
||||
void set_arg(PrintfMessage & msg, T && t) {
|
||||
using X = std::remove_cvref_t< T >;
|
||||
auto * arg = msg.add_arguments();
|
||||
|
||||
if constexpr(std::is_integral_v< X >) {
|
||||
arg->set_int_val(t);
|
||||
return;
|
||||
}
|
||||
|
||||
if constexpr(std::is_same_v< float, X >) {
|
||||
arg->set_float_val(t);
|
||||
return;
|
||||
}
|
||||
|
||||
if constexpr(std::is_same_v< double, X >) {
|
||||
arg->set_double_val(t);
|
||||
return;
|
||||
}
|
||||
|
||||
if constexpr(std::is_same_v< const char *, X >) {
|
||||
arg->set_string_val(t);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void canbud_send(std::vector< Frame > && frames) {}
|
||||
|
||||
template < typename... Args >
|
||||
void canbus_log(int severity, std::string fmt, Args... args) {
|
||||
PrintfMessage msg;
|
||||
msg.set_severity(severity);
|
||||
msg.set_format_string(std::move(fmt));
|
||||
|
||||
(set_arg(msg, args), ...);
|
||||
|
||||
canbud_send(encapsulate(msg, 0));
|
||||
}
|
||||
|
||||
int main() {
|
||||
std::ostream_iterator< char > out(std::cout);
|
||||
canbus_log(0, "Debug {}:{}:{}", __FILE_NAME__, __PRETTY_FUNCTION__, __LINE__);
|
||||
|
||||
acpowercontrol::ACPower m;
|
||||
auto & ac = *m.mutable_set_channel_request();
|
||||
ac.set_channel(7);
|
||||
auto &ps = *ac.mutable_swipe();
|
||||
ps.set_start_percentage(0);
|
||||
ps.set_end_percentage(1000);
|
||||
|
||||
ps.set_duration_ms(3200);
|
||||
ps.set_function(acpowercontrol::internal::ACPowerSwipe_Function::ACPowerSwipe_Function_EaseInOut);
|
||||
|
||||
std::string o;
|
||||
|
||||
auto frames = encapsulate(m, SetACPowerChannelControlID);
|
||||
std::cout << frames.at(0).SerializeAsString().size() << '\n';
|
||||
|
||||
return 0;
|
||||
}
|
||||
0
floorheat_hub/relay.cpp
Normal file
0
floorheat_hub/relay.cpp
Normal file
0
floorheat_hub/relay.hpp
Normal file
0
floorheat_hub/relay.hpp
Normal file
88
proto/ACPower.proto
Normal file
88
proto/ACPower.proto
Normal file
@ -0,0 +1,88 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import "ACPowerInternal.proto";
|
||||
|
||||
package acpowercontrol;
|
||||
|
||||
message Error{
|
||||
///todo change to enum
|
||||
string details = 1;
|
||||
}
|
||||
|
||||
message ResetWatchdodRequest {
|
||||
uint32 channel = 1;
|
||||
}
|
||||
|
||||
message ResetWatchdodResponse {
|
||||
uint32 channel = 1;
|
||||
optional Error error = 2;
|
||||
}
|
||||
|
||||
// Main control message that can include one of the above actions
|
||||
message SetChannelRequest {
|
||||
uint32 channel = 1;
|
||||
oneof power {
|
||||
acpowercontrol.internal.ACPowerSwitchBinary switch = 2;
|
||||
acpowercontrol.internal.ACPowerToggle toggle = 3;
|
||||
acpowercontrol.internal.ACPowerModulation modulation = 4;
|
||||
acpowercontrol.internal.ACPowerSwipe swipe = 5;
|
||||
}
|
||||
}
|
||||
|
||||
message SetChannelResponse {
|
||||
uint32 channel = 1;
|
||||
optional Error error = 2;
|
||||
}
|
||||
|
||||
message GetChannelRequest {
|
||||
uint32 channel = 1;
|
||||
}
|
||||
|
||||
message GetChannelResponse{
|
||||
uint32 channel = 1;
|
||||
oneof resp{
|
||||
uint32 current_power = 2;
|
||||
Error error = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message SetChannelConfigRequest {
|
||||
uint32 channel = 1;
|
||||
acpowercontrol.internal.ChannelConfig config = 2;
|
||||
}
|
||||
|
||||
message SetChannelConfigResponse {
|
||||
uint32 channel = 1;
|
||||
optional Error error = 2;
|
||||
}
|
||||
|
||||
message GetChannelConfigRequest {
|
||||
uint32 channel = 1;
|
||||
}
|
||||
|
||||
message GetChannelConfigResponse {
|
||||
uint32 channel = 1;
|
||||
oneof resp {
|
||||
acpowercontrol.internal.ChannelConfig config = 2;
|
||||
Error error = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message ACPower{
|
||||
oneof data{
|
||||
ResetWatchdodRequest reset_wtchdod_request= 1;
|
||||
ResetWatchdodResponse reset_wtchdod_response= 2;
|
||||
|
||||
SetChannelRequest set_channel_request = 3;
|
||||
SetChannelResponse set_channel_response = 4;
|
||||
|
||||
GetChannelRequest get_channel_request = 5;
|
||||
GetChannelResponse get_channel_response = 6;
|
||||
|
||||
SetChannelConfigRequest set_channel_config_request = 7;
|
||||
SetChannelConfigResponse set_channel_config_response= 8;
|
||||
|
||||
GetChannelConfigRequest get_channel_config_request = 9;
|
||||
GetChannelConfigResponse get_channel_config_response = 10;
|
||||
}
|
||||
}
|
||||
49
proto/ACPowerInternal.proto
Normal file
49
proto/ACPowerInternal.proto
Normal file
@ -0,0 +1,49 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package acpowercontrol.internal;
|
||||
|
||||
// channel configuration
|
||||
message ChannelConfig{
|
||||
uint32 faze_nr = 1;
|
||||
uint32 default_watchdog_s = 2;
|
||||
}
|
||||
|
||||
// Message to represent basic on/off control
|
||||
message ACPowerSwitchBinary {
|
||||
bool on = 1;
|
||||
}
|
||||
|
||||
// Message to represent power toggle
|
||||
message ACPowerToggle {
|
||||
}
|
||||
|
||||
// Message to represent AC phase control (e.g., 30% of sine wave)
|
||||
message ACPowerModulation {
|
||||
// Phase percentage in i/10 of percent (value 123 rtanslates to 12.3%, typically 100.0)
|
||||
uint32 phase_percentage = 1;
|
||||
|
||||
// number of sinusoids taken to control (2 is a full sinus cycle, default 1)
|
||||
optional uint32 phaseGroup = 3; // if not present, assumed 1
|
||||
}
|
||||
|
||||
// Message to represent a soft start
|
||||
message ACPowerSwipe {
|
||||
enum Function{
|
||||
Linear = 0;
|
||||
Quadratic = 1; // Power increases exponentially over time, starting slow and speeding up.
|
||||
Logarithmic = 2; // Power increases logarithmically, starting fast and slowing down as it approaches the end.
|
||||
EaseInOut = 3; // This function starts and ends smoothly with a rapid change in the middle.
|
||||
}
|
||||
// Start percentage in i/10 of percent (value 123 rtanslates to 12.3%, typically 100.0)
|
||||
optional uint32 start_percentage = 1;
|
||||
|
||||
// End percentage in i/10 of percent (value 123 rtanslates to 12.3%, typically 100.0)
|
||||
uint32 end_percentage = 3;
|
||||
|
||||
// Duration in milliseconds
|
||||
uint32 duration_ms = 5;
|
||||
|
||||
// function used
|
||||
Function function=6;
|
||||
}
|
||||
|
||||
40
proto/energy.proto
Normal file
40
proto/energy.proto
Normal file
@ -0,0 +1,40 @@
|
||||
syntax = "proto3";
|
||||
|
||||
message FixedPoint {
|
||||
int32 integer_part = 1;
|
||||
uint32 fractional_part = 2;
|
||||
}
|
||||
|
||||
message x {
|
||||
uint32 ch = 1;
|
||||
bool state = 2;
|
||||
}
|
||||
|
||||
message FloatingPoint{
|
||||
float val = 2;
|
||||
}
|
||||
message SingleFazeData {
|
||||
float Voltage = 1;
|
||||
float Current = 2;
|
||||
float ActivePower = 3;
|
||||
float ApparentPower = 4;
|
||||
float PowerFactor = 5;
|
||||
float ReActivePower = 6;
|
||||
}
|
||||
|
||||
message EnergymeterSensorData {
|
||||
int32 sensor_id = 1;
|
||||
SingleFazeData L1 = 2;
|
||||
SingleFazeData L2 = 3;
|
||||
SingleFazeData L3 = 4;
|
||||
float TotalActivePower = 5;
|
||||
float TotalPowerFactor = 6;
|
||||
float TotalApparentePower = 7;
|
||||
float TotalReActivePower = 8;
|
||||
float GridFrequency = 9;
|
||||
}
|
||||
|
||||
message can_frame {
|
||||
uint32 left = 1;
|
||||
bytes data = 2;
|
||||
}
|
||||
98
proto/heating.proto
Normal file
98
proto/heating.proto
Normal file
@ -0,0 +1,98 @@
|
||||
syntax = "proto3";
|
||||
|
||||
|
||||
// internal
|
||||
// channel configuration
|
||||
message ChannelConfig{
|
||||
uint32 faze = 1;
|
||||
uint32 default_watchdog_s = 2;
|
||||
|
||||
}
|
||||
|
||||
// Message to represent basic on/off control
|
||||
message ACPowerBinary {
|
||||
bool on = 1;
|
||||
}
|
||||
|
||||
// Message to represent power toggle
|
||||
message ACPowerToggle {}
|
||||
|
||||
// Message to represent AC phase control (e.g., 30% of sine wave)
|
||||
message ACPowerProcentage {
|
||||
// Phase percentage from 0 to 100
|
||||
uint32 phase_percentage = 1;
|
||||
uint32 phase_percentageFraction = 2;
|
||||
|
||||
// number of sinusoids taken to control (2 is a full sinus cycle, default 1)
|
||||
optional uint32 phaseGroup = 3; // if not present, assumed 1
|
||||
}
|
||||
|
||||
// Message to represent a soft start
|
||||
message ACPowerSwipe {
|
||||
enum Function{
|
||||
Linear = 0;
|
||||
Quadratic = 1; // Power increases exponentially over time, starting slow and speeding up.
|
||||
Logarithmic = 2; // Power increases logarithmically, starting fast and slowing down as it approaches the end.
|
||||
EaseInOut = 3; // This function starts and ends smoothly with a rapid change in the middle.
|
||||
}
|
||||
// Start percentage (typically 0)
|
||||
optional uint32 start_percentage = 1;
|
||||
// Start percentage fraction (as 1/100 part of percentage) (typically 0)
|
||||
uint32 start_percentage_fraction = 2;
|
||||
|
||||
// End percentage (typically 100)
|
||||
uint32 end_percentage = 3;
|
||||
// End percentage fraction (as 1/100 part of percentage) (typically 0)
|
||||
uint32 end_percentage_fraction = 4;
|
||||
|
||||
// Duration in milliseconds
|
||||
uint32 duration_ms = 5;
|
||||
|
||||
// function used
|
||||
Function function=6;
|
||||
}
|
||||
|
||||
message ACPowerControl{
|
||||
oneof control_type {
|
||||
ACPowerBinary binary = 5;
|
||||
ACPowerProcentage procentage = 6;
|
||||
ACPowerSwipe swipe = 7;
|
||||
ACPowerToggle toggle = 8; // revert previous action
|
||||
}
|
||||
}
|
||||
|
||||
message ACPowerResetWatchdod{
|
||||
repeated uint32 channel = 1;
|
||||
}
|
||||
|
||||
// Main control message that can include one of the above actions
|
||||
message SetACPowerChannelControl {
|
||||
uint32 channel = 1;
|
||||
|
||||
ACPowerControl power = 2;
|
||||
|
||||
// seconds after which output will be turned off (in case of lack of control messages) 0 -> uses default
|
||||
uint32 watchdog_s = 3;
|
||||
}
|
||||
|
||||
message GetAcPowerChannelControl {
|
||||
uint32 channel = 1;
|
||||
}
|
||||
|
||||
message SetACPowerChannelConfig {
|
||||
uint32 channel = 1;
|
||||
ChannelConfig config = 2;
|
||||
}
|
||||
|
||||
message GetACPowerChannelConfig {
|
||||
uint32 channel = 1;
|
||||
}
|
||||
|
||||
enum HeatingMessagesId{
|
||||
ACPowerResetWatchdodID = 0;
|
||||
|
||||
SetACPowerChannelControlID = 1;
|
||||
GetAcPowerChannelControlID = 2;
|
||||
SetACPowerChannelConfigID = 3;
|
||||
GetACPowerChannelConfigID = 4;
|
||||
}
|
||||
0
proto/logging.proto
Normal file
0
proto/logging.proto
Normal file
30
proto/message.proto
Normal file
30
proto/message.proto
Normal file
@ -0,0 +1,30 @@
|
||||
syntax = "proto3";
|
||||
|
||||
// single part of message
|
||||
message Frame{
|
||||
// frames left, 0 for End Of Stream
|
||||
uint32 parts = 1; // parts left
|
||||
|
||||
// encapsulated message
|
||||
bytes data = 2;
|
||||
|
||||
// type of message being encapsulated,only one of parts need to contain this information
|
||||
uint32 type = 3;
|
||||
}
|
||||
|
||||
message PrintfArgument {
|
||||
oneof arg_type {
|
||||
int32 int_val = 1;
|
||||
float float_val = 2;
|
||||
double double_val = 3;
|
||||
string string_val = 4;
|
||||
bool bool_val = 5;
|
||||
bytes bytes_val = 6;
|
||||
}
|
||||
}
|
||||
|
||||
message PrintfMessage {
|
||||
string format_string = 1;
|
||||
uint32 severity = 2;
|
||||
repeated PrintfArgument arguments = 3;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user