| 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 LGPL v2.1 as described in the | ||
| 11 | * included LICENSE.LGPL file. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <cstdint> | ||
| 15 | #include <memory> | ||
| 16 | #include <string> | ||
| 17 | #include "fpp-json-fwd.h" | ||
| 18 | #include <utility> | ||
| 19 | #include <vector> | ||
| 20 | |||
| 21 | #include "../Sequence.h" | ||
| 22 | |||
| 23 | class TestPatternBase { | ||
| 24 | public: | ||
| 25 | TestPatternBase(); | ||
| 26 | virtual ~TestPatternBase(); | ||
| 27 | |||
| 28 | 4 | std::string Name(void) { return m_testPatternName; } | |
| 29 | int Init(std::string configStr); | ||
| 30 | virtual int Init(Json::Value config); | ||
| 31 | virtual int SetupTest(void); | ||
| 32 | |||
| 33 | int SetChannelSet(std::string channelSetStr); | ||
| 34 | virtual int OverlayTestData(char* channelData); | ||
| 35 | 120 | void DisableTest(void) { m_testEnabled = 0; } | |
| 36 | |||
| 37 | virtual void DumpConfig(void); | ||
| 38 | |||
| 39 | protected: | ||
| 40 | 500 | virtual void CycleData(void) {} | |
| 41 | |||
| 42 | volatile int m_testEnabled; | ||
| 43 | std::string m_testPatternName; | ||
| 44 | int m_minChannels; | ||
| 45 | char* m_testData; | ||
| 46 | long long m_nextCycleTime; | ||
| 47 | int m_cycleMS; | ||
| 48 | |||
| 49 | std::string m_channelSetStr; | ||
| 50 | int m_channelCount; | ||
| 51 | int m_configChanged; | ||
| 52 | |||
| 53 | std::vector<std::pair<int, int>> m_channelSet; | ||
| 54 | // The output ranges m_channelSet was resolved against (SetChannelSet() | ||
| 55 | // clips a range to the outputs' last channel). | ||
| 56 | std::shared_ptr<const std::vector<std::pair<uint32_t, uint32_t>>> m_channelSetRanges; | ||
| 57 | }; | ||
| 58 |