// SPDX-License-Identifier: GPL-2.0-only /** * Digital Voice Modem - Common Library * GPLv2 Open Source. Use is subject to license terms. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * @package DVM / Common Library * @derivedfrom MMDVMHost (https://github.com/g4klx/MMDVMHost) * @license GPLv2 License (https://opensource.org/licenses/GPL-2.0) * * Copyright (C) 2015,2016 Jonathan Naylor, G4KLX * */ #if !defined(__DMR_DATA__DATA_H__) #define __DMR_DATA__DATA_H__ #include "common/Defines.h" namespace dmr { namespace data { // --------------------------------------------------------------------------- // Class Declaration // Represents general DMR data. // --------------------------------------------------------------------------- class HOST_SW_API Data { public: /// Initializes a new instance of the Data class. Data(const Data& data); /// Initializes a new instance of the Data class. Data(); /// Finalizes a instance of the Data class. ~Data(); /// Equals operator. Data& operator=(const Data& data); /// Sets raw data. void setData(const uint8_t* buffer); /// Gets raw data. uint32_t getData(uint8_t* buffer) const; public: /// DMR slot number. __PROPERTY(uint32_t, slotNo, SlotNo); /// Source ID. __PROPERTY(uint32_t, srcId, SrcId); /// Destination ID. __PROPERTY(uint32_t, dstId, DstId); /// Sets the full-link control opcode. __PROPERTY(uint8_t, flco, FLCO); /// __PROPERTY(uint8_t, n, N); /// Sequence number. __PROPERTY(uint8_t, seqNo, SeqNo); /// Embedded data type. __PROPERTY(uint8_t, dataType, DataType); /// Bit Error Rate. __PROPERTY(uint8_t, ber, BER); /// Received Signal Strength Indicator. __PROPERTY(uint8_t, rssi, RSSI); private: uint8_t* m_data; }; } // namespace data } // namespace dmr #endif // __DMR_DATA__DATA_H__