Skip to content

Commit

Permalink
added doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Pelanek committed Jun 13, 2024
1 parent 6a756e6 commit 455a1b2
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ option(TELEMETRY_BUILD_SHARED "Build shared library" ON)
option(TELEMETRY_PACKAGE_BUILDER "Enable RPM package builder (make rpm)" ON)
option(TELEMETRY_INSTALL_TARGETS "Generate the install target" ON)
option(TELEMETRY_ENABLE_TESTS "Build Unit tests (make test)" OFF)
option(TELEMETRY_BUILD_EXAMPLES "Build included example files (make example)" OFF)
option(TELEMETRY_BUILD_EXAMPLES "Build included example files (make example)" ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
10 changes: 8 additions & 2 deletions examples/basicExample.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* @file
* @author Daniel Pelanek <xpeland00@vutbr.cz>
* @brief Shows the basic usage of telemetry with fuse
*
* SPDX-License-Identifier: BSD-3-Clause
*/

#include <telemetry.hpp>
#include <appFs.hpp>
#include <memory>
Expand Down Expand Up @@ -89,6 +97,4 @@ int main() {
// should print the time elapsed in seconds since the start of the program.
std::signal(SIGINT, signalHandler);
while(!g_gotSIGINT.load()){};

return 0;
}
12 changes: 9 additions & 3 deletions examples/variantsExample.cpp → examples/contentExample.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
/**
* @file
* @author Daniel Pelanek <xpeland00@vutbr.cz>
* @brief Shows how telemetry content data types are used
*
* SPDX-License-Identifier: BSD-3-Clause
*/

#include <telemetry.hpp>
#include <appFs.hpp>
#include <memory>

// example help
#include <iostream>
Expand Down Expand Up @@ -48,4 +54,4 @@ int main() {
std::cout << telemetry::contentToString(scalartWithUnitReturn());
std::cout << telemetry::contentToString(arrayReturn());
std::cout << telemetry::contentToString(dictReturn());
}
}
41 changes: 41 additions & 0 deletions examples/hiolderExample.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* @file
* @author Daniel Pelanek <xpeland00@vutbr.cz>
* @brief
*
* SPDX-License-Identifier: BSD-3-Clause
*/

#include <telemetry.hpp>
#include <appFs.hpp>

class IOwnTelemetryFiles {
public:
void configTelemetry(const std::shared_ptr<telemetry::Directory>& rootDir) {
const telemetry::FileOps fileOps
= {nullptr, nullptr};

auto someFile = rootDir->addFile("stats", fileOps);


}

private:
telemetry::Holder m_telemetryHolder;
}

int main() {
// Same as basic example
std::shared_ptr<telemetry::Directory> telemetryRootNode;
telemetryRootNode = telemetry::Directory::create();

std::string fusePath = "fusedir";

telemetry::appFs::AppFsFuse fuse = telemetry::appFs::AppFsFuse(telemetryRootNode, fusePath);
fuse.start();

const IOwnTelemetryFiles object;

object.configTelemetry(telemetryRootNode);
}

0 comments on commit 455a1b2

Please sign in to comment.