MythTV
master
|
#include "dvbci.h"
#include <array>
#include <cctype>
#include <cerrno>
#include <cstring>
#include <ctime>
#include <fcntl.h>
#include <linux/dvb/ca.h>
#include <netinet/in.h>
#include <poll.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <unistd.h>
#include <malloc.h>
#include <QString>
#include "libmythbase/mythlogging.h"
Go to the source code of this file.
Classes | |
class | cTPDU |
class | cCiTransportConnection |
class | cCiTransportLayer |
class | cCiSession |
class | cCiResourceManager |
class | cCiApplicationInformation |
class | cCiConditionalAccessSupport |
class | cCiDateTime |
class | cCiMMI |
struct | tAnswer |
Macros | |
#define | esyslog(a...) LOG(VB_GENERAL, LOG_ERR, QString::asprintf(a)) |
#define | isyslog(a...) LOG(VB_DVBCAM, LOG_INFO, QString::asprintf(a)) |
#define | dsyslog(a...) LOG(VB_DVBCAM, LOG_DEBUG, QString::asprintf(a)) |
#define | LOG_ERROR esyslog("ERROR (%s,%d): %m", __FILE__, __LINE__) |
#define | LOG_ERROR_STR(s) esyslog("ERROR: %s: %m", s) |
#define | dbgprotocol(a...) if (sDebugProtocol) LOG(VB_DVBCAM, LOG_DEBUG, QString::asprintf(a)) |
Functions | |
static ssize_t | safe_read (int filedes, void *buffer, size_t size) |
static const uint8_t * | GetLength (const uint8_t *Data, int &Length) |
static uint8_t * | SetLength (uint8_t *Data, int Length) |
static void | SetLength (std::vector< uint8_t > &Data, int Length) |
static char * | CopyString (int Length, const uint8_t *Data) |
static char * | GetString (int &Length, const uint8_t **Data) |
static constexpr uint8_t | DEC2BCD (uint8_t d) |
static constexpr uint8_t | BYTE0 (uint16_t a) |
static constexpr uint8_t | BYTE1 (uint16_t a) |
Variables | |
static bool | sDumpTPDUDataTransfer = false |
static bool | sDebugProtocol = false |
static bool | sConnected = false |
static constexpr int | OK { 0 } |
static constexpr int | TIMEOUT { -1 } |
static constexpr int | ERROR { -2 } |
static constexpr time_t | WRKRND_TIME_BEFORE_ENTER_MENU { 15 } |
static constexpr int | SIZE_INDICATOR { 0x80 } |
static constexpr size_t | MAX_TPDU_SIZE { 2048 } |
static constexpr int | MAX_TPDU_DATA { MAX_TPDU_SIZE - 4 } |
static constexpr uint8_t | DATA_INDICATOR { 0x80 } |
static constexpr int | CAM_READ_TIMEOUT { 5000 } |
static constexpr int8_t | MAX_CONNECT_RETRIES { 25 } |
static constexpr std::chrono::milliseconds | POLL_INTERVAL { 100ms } |
static constexpr size_t | MAX_CI_CONNECT { 16 } |
static constexpr uint8_t | EF_BLIND { 0x01 } |
#define esyslog | ( | a... | ) | LOG(VB_GENERAL, LOG_ERR, QString::asprintf(a)) |
#define isyslog | ( | a... | ) | LOG(VB_DVBCAM, LOG_INFO, QString::asprintf(a)) |
#define dsyslog | ( | a... | ) | LOG(VB_DVBCAM, LOG_DEBUG, QString::asprintf(a)) |
#define dbgprotocol | ( | a... | ) | if (sDebugProtocol) LOG(VB_DVBCAM, LOG_DEBUG, QString::asprintf(a)) |
enum T_VALUES : std::uint8_t |
enum eState : std::uint8_t |
enum SESSION_TAGS : std::uint8_t |
enum SESSION_STATUS : std::uint8_t |
enum IDENTIFIERS |
enum OBJECT_TAG |
enum CLOSE_MMI : std::uint8_t |
enum DISPLAY_CONTROL : std::uint8_t |
enum MMI_MODES : std::uint8_t |
enum DISPLAY_REPLY_IDS : std::uint8_t |
enum ANSWER_IDS : std::uint8_t |
enum CPCI_IDS : std::uint8_t |
|
static |
Definition at line 83 of file dvbci.cpp.
Referenced by cTPDU::Read().
|
static |
Length | Gets the length field from the beginning of Data. This number is encoded into the output buffer. If the high order bit of the first byte is zero, then the remaining seven bits hold the actual length. If the high order bit is set then the remaining bits of that byte indicate how many bytes are used to hold the length. The subsequent bytes hold the actual length value. |
Data | A pointer to current location for reading data. |
Length | Used to store the length from the data stream. |
Definition at line 95 of file dvbci.cpp.
Referenced by cTPDU::GetData(), cCiSession::GetData(), and GetString().
|
static |
Length | Sets the length field at the beginning of Data. This number is encoded into the output buffer. If the length is less than 128, it is written directly into the first byte. If 128 or more, the high order bit of the first byte is set and the remaining bits indicate how many bytes are needed to hold the length. The subsequent bytes hold the actual length. |
Data | A pointer to current location for writing data. |
Length | A number to encode into the data stream. |
Definition at line 117 of file dvbci.cpp.
Referenced by cTPDU::cTPDU(), cCiSession::SendData(), and PESPacket::SetTotalLength().
|
static |
|
static |
Data | Copies the string at Data. |
Length | The number of bytes to copy from Data. |
Data | A pointer to current location for reading data. |
Definition at line 166 of file dvbci.cpp.
Referenced by GetString(), and cCiMMI::Process().
|
static |
Data | Gets the string at Data. Upon return Length and Data represent the remaining data after the string has been copied off. | |
[in,out] | Length | The number of bytes to copy from Data. Updated for the size of the string read. |
[in,out] | Data | A pointer to current location for reading data. Updated for the size of the string read. |
Definition at line 178 of file dvbci.cpp.
Referenced by cCiMMI::GetText(), and cCiApplicationInformation::Process().
|
staticconstexpr |
Definition at line 1126 of file dvbci.cpp.
Referenced by cCiDateTime::SendDateTime().
|
staticconstexpr |
Definition at line 1128 of file dvbci.cpp.
Referenced by cCiDateTime::SendDateTime().
|
staticconstexpr |
Definition at line 1130 of file dvbci.cpp.
Referenced by cCiDateTime::SendDateTime().
Definition at line 62 of file dvbci.cpp.
Referenced by cTPDU::Dump().
Definition at line 64 of file dvbci.cpp.
Referenced by cLlCiHandler::connected(), and cCiTransportConnection::CreateConnection().
|
staticconstexpr |
Definition at line 69 of file dvbci.cpp.
Referenced by cCiTransportConnection::CreateConnection(), TV::GetQueuedInputAsInt(), cCiTransportLayer::NewConnection(), cCiTransportConnection::Poll(), cTPDU::Read(), cCiTransportConnection::RecvData(), cCiTransportConnection::RecvTPDU(), cLlCiHandler::Send(), cCiTransportConnection::SendData(), WebPage::slotLoadFinished(), and cTPDU::Write().
|
staticconstexpr |
Definition at line 70 of file dvbci.cpp.
Referenced by cCiTransportLayer::Process().
|
staticconstexpr |
Definition at line 71 of file dvbci.cpp.
Referenced by cCiTransportConnection::CreateConnection(), cCiTransportConnection::Init(), cCiTransportConnection::Poll(), cCiTransportLayer::Process(), cTPDU::Read(), cCiTransportConnection::RecvData(), cCiTransportConnection::RecvTPDU(), cCiTransportConnection::SendData(), cCiSession::SendData(), and cTPDU::Write().
|
staticconstexpr |
Definition at line 77 of file dvbci.cpp.
Referenced by cCiApplicationInformation::EnterMenu().
|
staticconstexpr |
Definition at line 81 of file dvbci.cpp.
Referenced by GetLength(), and SetLength().
|
staticconstexpr |
Definition at line 246 of file dvbci.cpp.
Referenced by cTPDU::cTPDU(), and cCiTransportConnection::SendData().
|
staticconstexpr |
Definition at line 248 of file dvbci.cpp.
Referenced by cCiTransportConnection::RecvTPDU().
|
staticconstexpr |
Definition at line 456 of file dvbci.cpp.
Referenced by cCiTransportConnection::RecvTPDU().
|
staticconstexpr |
Definition at line 545 of file dvbci.cpp.
Referenced by cCiTransportConnection::CreateConnection().
|
staticconstexpr |
Definition at line 573 of file dvbci.cpp.
Referenced by cCiTransportConnection::Poll().
|
staticconstexpr |
Definition at line 596 of file dvbci.cpp.
Referenced by cCiTransportLayer::NewConnection().
|
staticconstexpr |
Definition at line 1240 of file dvbci.cpp.
Referenced by cCiMMI::Process().