GCC Code Coverage Report


Directory: ./
File: channeloutput/KiNet.h
Date: 2026-10-29 08:11:58
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 1 1 100.0%
Branches: 0 0 -%

Line Branch Exec Source
1 #pragma once
2 /*
3 * This file is part of the Falcon Player (FPP) and is Copyright (C)
4 * 2013-2022 by the Falcon Player Developers.
5 *
6 * The Falcon Player (FPP) is free software, and is covered under
7 * multiple Open Source licenses. Please see the included 'LICENSES'
8 * file for descriptions of what files are covered by each license.
9 *
10 * This source file is covered under the GPL v2 as described in the
11 * included LICENSE.GPL file.
12 */
13
14 #include "UDPOutput.h"
15 #include "fpp-json-fwd.h"
16 #include <cstdint>
17 #include <list>
18 #include <vector>
19
20 #define KINET_PORT 6038
21
22 class KiNetOutputData : public UDPOutputData {
23 public:
24 explicit KiNetOutputData(const Json::Value& config);
25 virtual ~KiNetOutputData();
26
27 4 virtual bool IsPingable() override { return true; }
28 virtual void PrepareData(unsigned char* channelData, UDPOutputMessages& msgs) override;
29 virtual void FrameSent() override;
30 virtual void DumpConfig() override;
31
32 virtual const std::string& GetOutputTypeString() const override;
33 virtual void GetRequiredChannelRange(int& min, int& max) override;
34
35 int port = 1;
36 int portCount = 1;
37
38 sockaddr_in kinetAddress;
39
40 struct iovec* kinetIovecs = nullptr;
41 unsigned char** kinetBuffers = nullptr;
42
43 // v2 sequence numbers per port: the last one sent, and the one the
44 // prepared packet carries, committed by FrameSent() (see UDPOutputData).
45 std::vector<uint32_t> sentSequence;
46 std::vector<uint32_t> pendingSequence;
47 };
48