Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make it build on buildroot #52

Merged
merged 11 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build_and_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ env:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clang_format_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
jobs:

validate_codestyle_clang_format:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
6 changes: 2 additions & 4 deletions wifibroadcast/executables/udp_generator_validator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ static void loopUntilDone(const Options &options) {
std::cout << "PACKET_SIZE: " << options.PACKET_SIZE << "\n";
std::cout << "wanted_packets_per_second: "
<< options.wanted_packets_per_second << "\n";
std::cout << "wanted Bitrate: " << wantedBitRate_MBits << "MBit/s"
<< "\n";
std::cout << "wanted Bitrate: " << wantedBitRate_MBits << "MBit/s" << "\n";
std::cout << "Generator: " << (options.generator ? "yes" : "no") << "\n";
std::cout << "UDP port: " << options.udp_port << "\n";
std::cout << "UDP host: " << options.udp_host << "\n";
Expand Down Expand Up @@ -235,8 +234,7 @@ int main(int argc, char *const *argv) {
<< options.udp_port
<< "] [-h udp host default:" << options.udp_host << "]"
<< "[-p wanted packets per second, default:"
<< options.wanted_packets_per_second << "]"
<< "\n";
<< options.wanted_packets_per_second << "]" << "\n";
return 1;
}
}
Expand Down
2 changes: 2 additions & 0 deletions wifibroadcast/lib/fec/fec_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>

/**
* Include our optimized GF256 math functions - since FEC mostly boils down to
* "Galois field" mul / madd on big memory blocks this is the most straight
Expand Down
6 changes: 2 additions & 4 deletions wifibroadcast/src/HelperSources/Benchmark.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ class PacketizedBenchmark {
double totalBitRate_MBits =
totalBytesDelta * 8.0 / 1024.0 / 1024.0 / (double)testDurationSeconds;
std::cout << "Testing " << name << " took " << testDurationSeconds
<< " seconds"
<< "\n";
<< " seconds" << "\n";
std::cout << "TOTAL Packets per second:" << totalPacketsPerSecond
<< " before " << name << ": " << totalBitRate_MBits << "Mbit/s";
if (factor != 1.0f) {
Expand Down Expand Up @@ -121,8 +120,7 @@ class DurationBenchmark {
float avgDeltaMs = avgDeltaUs / 1000.0f;
std::cout << "Performing " << name << " on "
<< StringHelper::memorySizeReadable(dataSizeBytes) << " took "
<< avgDeltaMs << " ms on average"
<< "\n";
<< avgDeltaMs << " ms on average" << "\n";
//
double emulatedThroughputMBits =
1000.0 / avgDeltaMs * dataSizeBytes * 8 / 1024 / 1024;
Expand Down
2 changes: 1 addition & 1 deletion wifibroadcast/src/HelperSources/EmulatedPacketDrop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PacketDropEmulator {
}
void log() {
const double perc_dropped =
(double)n_dropped_packets / (n_totoal_packets)*100.0;
(double)n_dropped_packets / (n_totoal_packets) * 100.0;
// std::cout<<"N
// dropped:"<<n_dropped_packets<<",forwarded:"<<n_forwarded_packets<<"Perc:"<<perc_dropped<<"\n";
}
Expand Down
2 changes: 2 additions & 0 deletions wifibroadcast/src/HelperSources/Helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef WIFIBROADCAST_HELPER_H
#define WIFIBROADCAST_HELPER_H

#include <sys/time.h>

#include <algorithm>
#include <cassert>
#include <chrono>
Expand Down
8 changes: 5 additions & 3 deletions wifibroadcast/src/HelperSources/SocketHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
#include <spdlog/spdlog.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <termio.h>
#include <sys/time.h>

// #include <termio.h>
#include <unistd.h>

#include <list>
Expand Down Expand Up @@ -283,8 +285,8 @@ class UDPMultiForwarder {
udpForwarder->forwardPacketViaUDP(packet, packetSize);
}
}
[[nodiscard]] const std::list<std::unique_ptr<SocketHelper::UDPForwarder>>
&getForwarders() const {
[[nodiscard]] const std::list<std::unique_ptr<SocketHelper::UDPForwarder>> &
getForwarders() const {
return udpForwarders;
}

Expand Down
2 changes: 2 additions & 0 deletions wifibroadcast/src/HelperSources/TimeHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef LIVEVIDEO10MS_TIMEHELPER_HPP
#define LIVEVIDEO10MS_TIMEHELPER_HPP

#include <sys/time.h>

#include <algorithm>
#include <chrono>
#include <deque>
Expand Down
4 changes: 2 additions & 2 deletions wifibroadcast/src/Ieee80211Header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ struct SequenceControl {
uint16_t sequence_nr : 12;
std::string as_debug_string() const {
std::stringstream ss;
ss << "SequenceControl["
<< "" << (int)subfield << ":" << (int)sequence_nr << "]";
ss << "SequenceControl[" << "" << (int)subfield << ":" << (int)sequence_nr
<< "]";
return ss.str();
}
} __attribute__((packed));
Expand Down
2 changes: 2 additions & 0 deletions wifibroadcast/src/fec/FECDecoder.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "FECDecoder.h"

#include <sys/time.h>

#include "../wifibroadcast_spdlog.h"

bool FECDecoder::validate_packet_size(const int data_len) {
Expand Down
1 change: 0 additions & 1 deletion wifibroadcast/src/raw_socket_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef WIFIBROADCAST_RAW_SOCKET_HELPER_HPP
#define WIFIBROADCAST_RAW_SOCKET_HELPER_HPP

#include <linux/if_ether.h>
#include <net/if.h>
#include <netpacket/packet.h>
#include <sys/ioctl.h>
Expand Down