Skip to content

Commit

Permalink
Preparing for doxygen docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ihedvall committed May 22, 2023
1 parent 38393e1 commit 050fa94
Show file tree
Hide file tree
Showing 10 changed files with 110 additions and 13 deletions.
17 changes: 9 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,16 @@ endif()

set(DBCL_HEADERS
include/dbc/attribute.h
include/dbc/network.h
include/dbc/dbcfile.h
include/dbc/dbcmessage.h
include/dbc/envvar.h
include/dbc/node.h
include/dbc/isampleobserver.h
include/dbc/message.h
include/dbc/network.h
include/dbc/node.h
include/dbc/signal.h
include/dbc/signalgroup.h
include/dbc/dbcfile.h
include/dbc/signalobserver.h
)

add_library(dbc STATIC
Expand All @@ -91,8 +94,6 @@ target_include_directories(dbc PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
${FLEX_INCLUDE_DIRS} )
target_include_directories(dbc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
# target_include_directories(dbc PRIVATE ${Boost_INCLUDE_DIRS})
#target_include_directories(dbc PRIVATE ${FLEX_INCLUDE_DIRS})

cmake_print_properties(TARGETS dbc PROPERTIES INCLUDE_DIRECTORIES)

Expand All @@ -119,9 +120,9 @@ if (DOXYGEN_FOUND AND (CMAKE_BUILD_TYPE MATCHES "^[Rr]elease") AND DBC_DOC)
set(DOXYGEN_PROJECT_NAME "DbcLib")
set(DOXYGEN_HTML_EXTRA_STYLESHEET doxygen/dbclib.css)
set(DOXYGEN_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs/manual)
# doxygen_add_docs(doc_libdbc ALL
# include/dbc doxygen
# COMMENT "DBC Library generating API documentation with Doxygen")
doxygen_add_docs(doc_libdbc ALL
include/dbc doxygen
COMMENT "DBC Library generating API documentation with Doxygen")
endif ()


Expand Down
10 changes: 5 additions & 5 deletions dbcviewer/src/dbcviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ bool DbcViewer::OnInit() {
std::locale::global(gen(""));

// Setup system basic configuration
SetVendorDisplayName("Measurement Data Reporting Server");
SetVendorName("ReportServer");
SetVendorDisplayName("DbcLib");
SetVendorName("DbcLib");
SetAppName("DbcViewer");
SetAppDisplayName("DBC File Viewer");

// Set up the log file.
// The log file will be in %TEMP%/report_server/mdf_viewer.log
auto& log_config = LogConfig::Instance();
log_config.Type(LogType::LogToFile);
log_config.SubDir("report_server");
log_config.BaseName("dbc_viewer");
log_config.SubDir("dbclib/log");
log_config.BaseName("dbcviewer");
log_config.CreateDefaultLogger();
LOG_INFO() << "Log File created. Path: " << log_config.GetLogFile();

Expand Down Expand Up @@ -126,7 +126,7 @@ int DbcViewer::OnExit() {
return wxApp::OnExit();
}

void DbcViewer::OnOpenLogFile(wxCommandEvent& event) {
void DbcViewer::OnOpenLogFile(wxCommandEvent& ) {
auto& log_config = LogConfig::Instance();
std::string logfile = log_config.GetLogFile();
OpenFile(logfile);
Expand Down
23 changes: 23 additions & 0 deletions docs/_includes/head-custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

<!-- start custom head snippets, customize with your own _includes/head-custom.html file -->
<div class="wrapper">
<section>
<nav>
<a href="index.html">Home</a> |
<a href="mdfreader.html">MDF Reader</a> |
<a href="mdfwriter.html">MDF Writer</a> |
<a href="mdffile.html">MDF File</a> |
<a href="mdfviewer.html">MDF Viewer</a> |
<a href="manual/html/index.html">API Manual</a> |

</nav>
</section>
</div>

<!-- Setup Google Analytics -->
<!-- {% include head-custom-google-analytics.html %} -->

<!-- You can set your favicon here -->
<!-- link rel="shortcut icon" href="/favicon.ico" -->

<!-- end custom head snippets -->
Binary file added docs/assets/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/img/mdfviewer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
52 changes: 52 additions & 0 deletions doxygen/mainpage.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright 2022 Ingemar Hedvall
* SPDX-License-Identifier: MIT
*/
/**
\mainpage MDF Library

##Summary
The MDF Library is a C++ interface against ASAM MDF files. It supports version 3 and 4 of the files.
MDF files are de-facto standard for measurement data files within the automotive industry. It is well
suited for long-term storage of data.

The project consist of the following main components.

- C++ Library with all main functionality.
- MDF Viewer GUI application that simply display the content of MDF files.

## Measurement Data File
The MDF file consist of several linked file block.
For an overview of MDF files see [ASAM MDF wiki](https://www.asam.net/standards/detail/mdf/wiki/).

The first block is an ID block of 64 bytes. The identification block,
just defines that this is a MDF file and its version.

The next block is the important HD block. The header block is the main block of the file and holds
the links to all other blocks. It have links the following blocks.

- Meta Data Blocks. In version 4, the meta data about the measurement can embedded into the file.
- History Blocks. Describes who and what created or modified the file.
- Measurement Data Blocks. Called DG blocks and holds data and channel information.
- Attachment Blocks. Can be referenced or embedded into the file.
- Event Blocks. Events and general messages that happened during the measurement.
- Channel Hierarchy Block. Describe the logical structure for a channel.

##Building the project

The project uses CMAKE for building. The following third-party libraries are used and
needs to be downloaded and built.

- Util Library. Automatically fetched from GitHub.
- Boost Library. Set the 'Boost_ROOT' variable to the Boost root path.
- Expat Library. Set the 'EXPAT_ROOT' variable to the expat root path.
- OpenSSL Library. Set the 'OPENSSL_ROOT' variable to the OpenSSL root path.
- ZLIB Library. Set the 'ZLIB_ROOT' variable to the ZLIB root path.
- WxWidgets Library. Is required if the GUI application should be built.
- Doxygen's application. Is required if the documentation should be built.
- Google Test Library. Is required for running and build the unit

*/



13 changes: 13 additions & 0 deletions doxygen/namespaces.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright 2022 Ingemar Hedvall
* SPDX-License-Identifier: MIT
*/

/** \brief Main namespace for the MDF library.
*
* Main namespace for all MDF library classes and functions.
*/
namespace mdf {
}


8 changes: 8 additions & 0 deletions doxygen/utillib.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

hr.footer {
display: none;
}

.footer {
display: none;
}

0 comments on commit 050fa94

Please sign in to comment.