-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from svlad-90/feature/ISSUE_111
[ISSUE #111][COMPONENTS] Introduce components architecture in the project
- Loading branch information
Showing
58 changed files
with
919 additions
and
462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DMA_add_subdirectory_with_clang_tidy(analyzer) | ||
DMA_add_subdirectory_with_clang_tidy(analyzer) | ||
DMA_add_subdirectory_with_clang_tidy(log) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DMA_add_subdirectory_with_clang_tidy(src) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
dltmessageanalyzerplugin/src/components/log/api/CLogComponent.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#pragma once | ||
|
||
#include "QLineEdit" | ||
#include "QTabWidget" | ||
#include "QPlainTextEdit" | ||
|
||
#include "memory" | ||
#include "dma/component/IComponent.hpp" | ||
|
||
class CConsoleInputProcessor; | ||
|
||
class CLogComponent : public DMA::IComponent | ||
{ | ||
public: | ||
|
||
CLogComponent(QLineEdit* pConsoleViewInput, | ||
QTabWidget* pMainTabWidget, | ||
QWidget* pConsoleViewTab, | ||
QPlainTextEdit* pConsoleView | ||
); | ||
~CLogComponent(); | ||
|
||
virtual const char* getName() const override; | ||
|
||
protected: | ||
virtual DMA::tSyncInitOperationResult init() override; | ||
virtual DMA::tSyncInitOperationResult shutdown() override; | ||
|
||
private: | ||
QLineEdit* mpConsoleViewInput; | ||
std::shared_ptr<CConsoleInputProcessor> mpConsoleInputProcessor; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[**Go to the previous page**](../../../../../md/dev_docs/dev_docs.md) | ||
|
||
---- | ||
|
||
# DMA_Log | ||
|
||
## Standalone package API diagram | ||
|
||
 | ||
|
||
## Package API diagram with the first-level dependencies | ||
|
||
 | ||
|
||
## Standalone package diagram | ||
|
||
 | ||
|
||
## Package diagram with the first-level dependencies | ||
|
||
 | ||
|
||
---- | ||
|
||
[**Go to the previous page**](../../../../../md/dev_docs/dev_docs.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
dltmessageanalyzerplugin/src/log/CLog.cpp → ...zerplugin/src/components/log/src/CLog.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "CLog.hpp" | ||
#include "../api/CLog.hpp" | ||
|
||
#include "CConsoleCtrl.hpp" | ||
|
||
|
67 changes: 67 additions & 0 deletions
67
dltmessageanalyzerplugin/src/components/log/src/CLogComponent.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#include "../api/CLogComponent.hpp" | ||
#include "CConsoleInputProcessor.hpp" | ||
#include "CConsoleCtrl.hpp" | ||
|
||
#include "DMA_Plantuml.hpp" | ||
|
||
CLogComponent::CLogComponent(QLineEdit* pConsoleViewInput, | ||
QTabWidget* pMainTabWidget, | ||
QWidget* pConsoleViewTab, | ||
QPlainTextEdit* pConsoleView): | ||
mpConsoleViewInput(pConsoleViewInput), | ||
mpConsoleInputProcessor(nullptr) | ||
{ | ||
NDLTMessageAnalyzer::NConsole::tConsoleConfig consoleConfig; | ||
consoleConfig.maxMsgSize = 10240; | ||
consoleConfig.logSize = 1000; | ||
consoleConfig.pTabWidget = pMainTabWidget; | ||
consoleConfig.pConsoleTab = pConsoleViewTab; | ||
consoleConfig.pConsoleTextEdit = pConsoleView; | ||
NDLTMessageAnalyzer::NConsole::CConsoleCtrl::createInstance(consoleConfig); | ||
} | ||
|
||
CLogComponent::~CLogComponent() | ||
{ | ||
NDLTMessageAnalyzer::NConsole::CConsoleCtrl::destroyInstance(); | ||
} | ||
|
||
const char* CLogComponent::getName() const | ||
{ | ||
return "CLogComponent"; | ||
} | ||
|
||
DMA::tSyncInitOperationResult CLogComponent::init() | ||
{ | ||
DMA::tSyncInitOperationResult result; | ||
|
||
try | ||
{ | ||
mpConsoleInputProcessor = std::make_shared<CConsoleInputProcessor>(mpConsoleViewInput); | ||
result.bIsOperationSuccessful = true; | ||
result.returnCode = 0; | ||
} | ||
catch (...) | ||
{} | ||
|
||
return result; | ||
} | ||
|
||
DMA::tSyncInitOperationResult CLogComponent::shutdown() | ||
{ | ||
if(nullptr != mpConsoleInputProcessor) | ||
{ | ||
mpConsoleInputProcessor.reset(); | ||
} | ||
|
||
DMA::tSyncInitOperationResult result; | ||
result.bIsOperationSuccessful = true; | ||
result.returnCode = 0; | ||
return result; | ||
} | ||
|
||
PUML_PACKAGE_BEGIN(DMA_Log_API) | ||
PUML_CLASS_BEGIN(CLogComponent) | ||
PUML_INHERITANCE_CHECKED(DMA::IComponent, implements) | ||
PUML_COMPOSITION_DEPENDENCY_CHECKED(CConsoleInputProcessor, 1, 1, contains) | ||
PUML_CLASS_END() | ||
PUML_PACKAGE_END() |
7 changes: 6 additions & 1 deletion
7
...sageanalyzerplugin/src/log/CMakeLists.txt → ...gin/src/components/log/src/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.