cc_tools_qt
Common Environment for Protocol Analysis.
Loading...
Searching...
No Matches
ToolsDataInfo.h
1//
2// Copyright 2014 - 2026 (C). Alex Robenko. All rights reserved.
3//
4// SPDX-License-Identifier: GPL-3.0-or-later
5//
6
7// This file is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20#pragma once
21
22#include "cc_tools_qt/ToolsApi.h"
23#include "cc_tools_qt/version.h"
24
25#include <QtCore/QVariant>
26#include <QtCore/QVariantMap>
27
28#include <chrono>
29#include <memory>
30#include <string>
31#include <vector>
32
33namespace cc_tools_qt
34{
35
38struct CC_TOOLS_API ToolsDataInfo
39{
41 using TimestampClock = std::chrono::high_resolution_clock;
42
44 using Timestamp = std::chrono::time_point<TimestampClock>;
45
47 using DataSeq = std::vector<std::uint8_t>;
48
50 using PropertiesMap = QVariantMap;
51
56};
57
59using ToolsDataInfoPtr = std::shared_ptr<ToolsDataInfo>;
60
62CC_TOOLS_API ToolsDataInfoPtr makeDataInfo();
63
67
68} // namespace cc_tools_qt
69
70Q_DECLARE_METATYPE(cc_tools_qt::ToolsDataInfoPtr);
71
Main namespace for all classes / functions of the shared library.
CC_TOOLS_API ToolsDataInfoPtr makeDataInfoTimed()
Dynamically allocate ToolsDataInfo and return in in ToolsDataInfoPtr;.
Definition ToolsDataInfo.cpp:53
std::shared_ptr< ToolsDataInfo > ToolsDataInfoPtr
Pointer to ToolsDataInfo.
Definition ToolsDataInfo.h:59
CC_TOOLS_API ToolsDataInfoPtr makeDataInfo()
Dynamically allocate ToolsDataInfo and return in in ToolsDataInfoPtr;.
Definition ToolsDataInfo.cpp:48
Information about incomming or outdoing data.
Definition ToolsDataInfo.h:39
PropertiesMap m_extraProperties
Extra properties that can be used by other componets.
Definition ToolsDataInfo.h:55
QVariantMap PropertiesMap
Type of extra properties storage.
Definition ToolsDataInfo.h:50
DataSeq m_data
Actual raw data.
Definition ToolsDataInfo.h:54
Timestamp m_timestamp
Timestamp when data has been received / sent.
Definition ToolsDataInfo.h:53
std::chrono::high_resolution_clock TimestampClock
Type of clock used for timestamping.
Definition ToolsDataInfo.h:41
std::chrono::time_point< TimestampClock > Timestamp
Type of timestamps.
Definition ToolsDataInfo.h:44
std::vector< std::uint8_t > DataSeq
Type of raw data sequence.
Definition ToolsDataInfo.h:47