Vector BLF

Loading...
Searching...
No Matches
WlanFrame.h
1// SPDX-FileCopyrightText: 2013-2021 Tobias Lorenz <tobias.lorenz@gmx.net>
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6
7#include <Vector/BLF/platform.h>
8
9#include <vector>
10
11#include <Vector/BLF/AbstractFile.h>
12#include <Vector/BLF/ObjectHeader.h>
13
14#include <Vector/BLF/vector_blf_export.h>
15
16 namespace Vector {
17 namespace BLF {
18
24 struct VECTOR_BLF_EXPORT WlanFrame final : ObjectHeader {
25 WlanFrame();
26
27 void read(AbstractFile & is) override;
28 void write(AbstractFile & os) override;
29 uint32_t calculateObjectSize() const override;
30
36 uint16_t channel {};
37
39 enum Flags : uint16_t {
41 GenuineMacHeader = 0x0001,
42
44 CorrectFrameControlFormat = 0x0002,
45 };
46
48 uint16_t flags {};
49
51 enum Dir : uint8_t {
53 Rx = 0,
54
56 Tx = 1,
57
59 TxRq = 2
60 };
61
67 uint8_t dir {};
68
75 uint8_t radioChannel {};
76
82 int16_t signalStrength {};
83
89 uint16_t signalQuality {};
90
97 uint16_t frameLength {};
98
100 uint32_t reservedWlanFrame {};
101
109 std::vector<uint8_t> frameData {};
110};
111
112}
113}
Vector::BLF::AbstractFile
Definition AbstractFile.h:19
Vector::BLF::WlanFrame::signalStrength
int16_t signalStrength
signal strength in [dbm]
Definition WlanFrame.h:82
Vector::BLF::WlanFrame::reservedWlanFrame
uint32_t reservedWlanFrame
Definition WlanFrame.h:100
Vector::BLF::WlanFrame::calculateObjectSize
uint32_t calculateObjectSize() const override
Definition WlanFrame.cpp:50
Vector::BLF::WlanFrame::write
void write(AbstractFile &os) override
Definition WlanFrame.cpp:31
Vector::BLF::WlanFrame::signalQuality
uint16_t signalQuality
signal quality in [dbm]
Definition WlanFrame.h:89
Vector::BLF::WlanFrame::frameLength
uint16_t frameLength
Number of bytes (header + payload).
Definition WlanFrame.h:97
Vector::BLF::WlanFrame::dir
uint8_t dir
Direction flag.
Definition WlanFrame.h:67
Vector::BLF::WlanFrame::flags
uint16_t flags
Definition WlanFrame.h:48
Vector::BLF::WlanFrame::channel
uint16_t channel
application channel 1..n
Definition WlanFrame.h:36
Vector::BLF::WlanFrame::Dir
Dir
Definition WlanFrame.h:51
Vector::BLF::WlanFrame::Rx
@ Rx
Definition WlanFrame.h:53
Vector::BLF::WlanFrame::TxRq
@ TxRq
Definition WlanFrame.h:59
Vector::BLF::WlanFrame::Tx
@ Tx
Definition WlanFrame.h:56
Vector::BLF::WlanFrame::radioChannel
uint8_t radioChannel
channel number of the radio frequency
Definition WlanFrame.h:75
Vector::BLF::WlanFrame::read
void read(AbstractFile &is) override
Definition WlanFrame.cpp:14
Vector::BLF::WlanFrame::frameData
std::vector< uint8_t > frameData
WLAN frame data.
Definition WlanFrame.h:109
Vector::BLF::WlanFrame::Flags
Flags
Definition WlanFrame.h:39
Vector::BLF::WlanFrame::CorrectFrameControlFormat
@ CorrectFrameControlFormat
Definition WlanFrame.h:44
Vector::BLF::WlanFrame::GenuineMacHeader
@ GenuineMacHeader
Definition WlanFrame.h:41