From 135c5083201a42b039efb15230d96067d24ebba8 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Wed, 20 Dec 2023 16:46:54 +0100 Subject: [PATCH] Add struct DCDownload for downloading the device controller. --- include/shared_mem_buffer.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/include/shared_mem_buffer.h b/include/shared_mem_buffer.h index 03095ba..6b0130e 100644 --- a/include/shared_mem_buffer.h +++ b/include/shared_mem_buffer.h @@ -300,9 +300,26 @@ struct SharedMem uint8_t p_nextFDcmdsInQueue; - - - + // download of device controller and json files + struct DCDownload { + enum class FILE_INDEX { + DC_BINARY = 0, DC2C_CASH = 1, DC2C_CONF = 2, DC2C_SERIAL=3, + DC2C_PRINT_01, DC2C_PRINT_02, DC2C_PRINT_03, DC2C_PRINT_04, + DC2C_PRINT_05, DC2C_PRINT_06, DC2C_PRINT_07, DC2C_PRINT_08, + DC2C_PRINT_09, DC2C_PRINT_10, DC2C_PRINT_11, DC2C_PRINT_12, + DC2C_PRINT_13, DC2C_PRINT_14, DC2C_PRINT_15, DC2C_PRINT_16, + DC2C_PRINT_17, DC2C_PRINT_18, DC2C_PRINT_19, DC2C_PRINT_20, + DC2C_PRINT_21, DC2C_PRINT_22, DC2C_PRINT_23, DC2C_PRINT_24, + DC2C_PRINT_25, DC2C_PRINT_26, DC2C_PRINT_27, DC2C_PRINT_28, + DC2C_PRINT_29, DC2C_PRINT_30, DC2C_PRINT_31, DC2C_PRINT_32 + }; + char m_filename[(int)FILE_INDEX::DC2C_PRINT_32][512]; + std::atomic_ushort m_totalBlocks; + std::atomic_ushort m_currentblockNumber; + std::atomic_bool m_requested{false}; + std::atomic_bool m_running{false}; + std::atomic_bool m_finished{false}; + } m_downLoadDC; static QSharedMemory *getShm(std::size_t s = 0);