MythTV  master
Classes | Macros | Enumerations | Functions | Variables
dvbci.cpp File Reference
#include "dvbci.h"
#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 "mythlogging.h"
Include dependency graph for dvbci.cpp:

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
 

Macros

#define MALLOC(type, size)   (type *)malloc(sizeof(type) * (size))
 
#define esyslog(a...)   LOG(VB_GENERAL, LOG_ERR, QString().sprintf(a))
 
#define isyslog(a...)   LOG(VB_DVBCAM, LOG_INFO, QString().sprintf(a))
 
#define dsyslog(a...)   LOG(VB_DVBCAM, LOG_DEBUG, QString().sprintf(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 (DebugProtocol) LOG(VB_DVBCAM, LOG_DEBUG, QString().sprintf(a))
 
#define OK   0
 
#define TIMEOUT   (-1)
 
#define ERROR   (-2)
 
#define WRKRND_TIME_BEFORE_ENTER_MENU   15
 
#define SIZE_INDICATOR   0x80
 
#define MAX_TPDU_SIZE   2048
 
#define MAX_TPDU_DATA   (MAX_TPDU_SIZE - 4)
 
#define DATA_INDICATOR   0x80
 
#define T_SB   0x80
 
#define T_RCV   0x81
 
#define T_CREATE_TC   0x82
 
#define T_CTC_REPLY   0x83
 
#define T_DELETE_TC   0x84
 
#define T_DTC_REPLY   0x85
 
#define T_REQUEST_TC   0x86
 
#define T_NEW_TC   0x87
 
#define T_TC_ERROR   0x88
 
#define T_DATA_LAST   0xA0
 
#define T_DATA_MORE   0xA1
 
#define MAX_DUMP   256
 
#define CAM_READ_TIMEOUT   5000
 
#define MAX_CONNECT_RETRIES   25
 
#define POLL_INTERVAL   100
 
#define MAX_CI_CONNECT   16
 
#define ST_SESSION_NUMBER   0x90
 
#define ST_OPEN_SESSION_REQUEST   0x91
 
#define ST_OPEN_SESSION_RESPONSE   0x92
 
#define ST_CREATE_SESSION   0x93
 
#define ST_CREATE_SESSION_RESPONSE   0x94
 
#define ST_CLOSE_SESSION_REQUEST   0x95
 
#define ST_CLOSE_SESSION_RESPONSE   0x96
 
#define SS_OK   0x00
 
#define SS_NOT_ALLOCATED   0xF0
 
#define RI_RESOURCE_MANAGER   0x00010041
 
#define RI_APPLICATION_INFORMATION   0x00020041
 
#define RI_CONDITIONAL_ACCESS_SUPPORT   0x00030041
 
#define RI_HOST_CONTROL   0x00200041
 
#define RI_DATE_TIME   0x00240041
 
#define RI_MMI   0x00400041
 
#define AOT_NONE   0x000000
 
#define AOT_PROFILE_ENQ   0x9F8010
 
#define AOT_PROFILE   0x9F8011
 
#define AOT_PROFILE_CHANGE   0x9F8012
 
#define AOT_APPLICATION_INFO_ENQ   0x9F8020
 
#define AOT_APPLICATION_INFO   0x9F8021
 
#define AOT_ENTER_MENU   0x9F8022
 
#define AOT_CA_INFO_ENQ   0x9F8030
 
#define AOT_CA_INFO   0x9F8031
 
#define AOT_CA_PMT   0x9F8032
 
#define AOT_CA_PMT_REPLY   0x9F8033
 
#define AOT_TUNE   0x9F8400
 
#define AOT_REPLACE   0x9F8401
 
#define AOT_CLEAR_REPLACE   0x9F8402
 
#define AOT_ASK_RELEASE   0x9F8403
 
#define AOT_DATE_TIME_ENQ   0x9F8440
 
#define AOT_DATE_TIME   0x9F8441
 
#define AOT_CLOSE_MMI   0x9F8800
 
#define AOT_DISPLAY_CONTROL   0x9F8801
 
#define AOT_DISPLAY_REPLY   0x9F8802
 
#define AOT_TEXT_LAST   0x9F8803
 
#define AOT_TEXT_MORE   0x9F8804
 
#define AOT_KEYPAD_CONTROL   0x9F8805
 
#define AOT_KEYPRESS   0x9F8806
 
#define AOT_ENQ   0x9F8807
 
#define AOT_ANSW   0x9F8808
 
#define AOT_MENU_LAST   0x9F8809
 
#define AOT_MENU_MORE   0x9F880A
 
#define AOT_MENU_ANSW   0x9F880B
 
#define AOT_LIST_LAST   0x9F880C
 
#define AOT_LIST_MORE   0x9F880D
 
#define AOT_SUBTITLE_SEGMENT_LAST   0x9F880E
 
#define AOT_SUBTITLE_SEGMENT_MORE   0x9F880F
 
#define AOT_DISPLAY_MESSAGE   0x9F8810
 
#define AOT_SCENE_END_MARK   0x9F8811
 
#define AOT_SCENE_DONE   0x9F8812
 
#define AOT_SCENE_CONTROL   0x9F8813
 
#define AOT_SUBTITLE_DOWNLOAD_LAST   0x9F8814
 
#define AOT_SUBTITLE_DOWNLOAD_MORE   0x9F8815
 
#define AOT_FLUSH_DOWNLOAD   0x9F8816
 
#define AOT_DOWNLOAD_REPLY   0x9F8817
 
#define AOT_COMMS_CMD   0x9F8C00
 
#define AOT_CONNECTION_DESCRIPTOR   0x9F8C01
 
#define AOT_COMMS_REPLY   0x9F8C02
 
#define AOT_COMMS_SEND_LAST   0x9F8C03
 
#define AOT_COMMS_SEND_MORE   0x9F8C04
 
#define AOT_COMMS_RCV_LAST   0x9F8C05
 
#define AOT_COMMS_RCV_MORE   0x9F8C06
 
#define DEC2BCD(d)   (uint8_t((((d) / 10) << 4) + ((d) % 10)))
 
#define BYTE0(a)   ((a) & 0xFF)
 
#define BYTE1(a)   (((a) >> 8) & 0xFF)
 
#define CLOSE_MMI_IMMEDIATE   0x00
 
#define CLOSE_MMI_DELAY   0x01
 
#define DCC_SET_MMI_MODE   0x01
 
#define DCC_DISPLAY_CHARACTER_TABLE_LIST   0x02
 
#define DCC_INPUT_CHARACTER_TABLE_LIST   0x03
 
#define DCC_OVERLAY_GRAPHICS_CHARACTERISTICS   0x04
 
#define DCC_FULL_SCREEN_GRAPHICS_CHARACTERISTICS   0x05
 
#define MM_HIGH_LEVEL   0x01
 
#define MM_LOW_LEVEL_OVERLAY_GRAPHICS   0x02
 
#define MM_LOW_LEVEL_FULL_SCREEN_GRAPHICS   0x03
 
#define DRI_MMI_MODE_ACK   0x01
 
#define DRI_LIST_DISPLAY_CHARACTER_TABLES   0x02
 
#define DRI_LIST_INPUT_CHARACTER_TABLES   0x03
 
#define DRI_LIST_GRAPHIC_OVERLAY_CHARACTERISTICS   0x04
 
#define DRI_LIST_FULL_SCREEN_GRAPHIC_CHARACTERISTICS   0x05
 
#define DRI_UNKNOWN_DISPLAY_CONTROL_CMD   0xF0
 
#define DRI_UNKNOWN_MMI_MODE   0xF1
 
#define DRI_UNKNOWN_CHARACTER_TABLE   0xF2
 
#define EF_BLIND   0x01
 
#define AI_CANCEL   0x00
 
#define AI_ANSWER   0x01
 
#define CPCI_OK_DESCRAMBLING   0x01
 
#define CPCI_OK_MMI   0x02
 
#define CPCI_QUERY   0x03
 
#define CPCI_NOT_SELECTED   0x04
 

Enumerations

enum  eState { stIDLE, stCREATION, stACTIVE, stDELETION }
 

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 char * CopyString (int Length, const uint8_t *Data)
 
static char * GetString (int &Length, const uint8_t **Data)
 

Variables

static bool DumpTPDUDataTransfer = false
 
static bool DebugProtocol = false
 
static bool _connected = false
 

Macro Definition Documentation

◆ MALLOC

#define MALLOC (   type,
  size 
)    (type *)malloc(sizeof(type) * (size))

Definition at line 51 of file dvbci.cpp.

◆ esyslog

#define esyslog (   a...)    LOG(VB_GENERAL, LOG_ERR, QString().sprintf(a))

Definition at line 54 of file dvbci.cpp.

◆ isyslog

#define isyslog (   a...)    LOG(VB_DVBCAM, LOG_INFO, QString().sprintf(a))

Definition at line 55 of file dvbci.cpp.

◆ dsyslog

#define dsyslog (   a...)    LOG(VB_DVBCAM, LOG_DEBUG, QString().sprintf(a))

Definition at line 56 of file dvbci.cpp.

◆ LOG_ERROR

#define LOG_ERROR   esyslog("ERROR (%s,%d): %m", __FILE__, __LINE__)

Definition at line 58 of file dvbci.cpp.

◆ LOG_ERROR_STR

#define LOG_ERROR_STR (   s)    esyslog("ERROR: %s: %m", s)

Definition at line 59 of file dvbci.cpp.

◆ dbgprotocol

#define dbgprotocol (   a...)    if (DebugProtocol) LOG(VB_DVBCAM, LOG_DEBUG, QString().sprintf(a))

Definition at line 67 of file dvbci.cpp.

◆ OK

#define OK   0

Definition at line 69 of file dvbci.cpp.

◆ TIMEOUT

#define TIMEOUT   (-1)

Definition at line 70 of file dvbci.cpp.

◆ ERROR

#define ERROR   (-2)

Definition at line 71 of file dvbci.cpp.

◆ WRKRND_TIME_BEFORE_ENTER_MENU

#define WRKRND_TIME_BEFORE_ENTER_MENU   15

Definition at line 77 of file dvbci.cpp.

◆ SIZE_INDICATOR

#define SIZE_INDICATOR   0x80

Definition at line 81 of file dvbci.cpp.

◆ MAX_TPDU_SIZE

#define MAX_TPDU_SIZE   2048

Definition at line 223 of file dvbci.cpp.

◆ MAX_TPDU_DATA

#define MAX_TPDU_DATA   (MAX_TPDU_SIZE - 4)

Definition at line 224 of file dvbci.cpp.

◆ DATA_INDICATOR

#define DATA_INDICATOR   0x80

Definition at line 226 of file dvbci.cpp.

◆ T_SB

#define T_SB   0x80

Definition at line 228 of file dvbci.cpp.

◆ T_RCV

#define T_RCV   0x81

Definition at line 229 of file dvbci.cpp.

◆ T_CREATE_TC

#define T_CREATE_TC   0x82

Definition at line 230 of file dvbci.cpp.

◆ T_CTC_REPLY

#define T_CTC_REPLY   0x83

Definition at line 231 of file dvbci.cpp.

◆ T_DELETE_TC

#define T_DELETE_TC   0x84

Definition at line 232 of file dvbci.cpp.

◆ T_DTC_REPLY

#define T_DTC_REPLY   0x85

Definition at line 233 of file dvbci.cpp.

◆ T_REQUEST_TC

#define T_REQUEST_TC   0x86

Definition at line 234 of file dvbci.cpp.

◆ T_NEW_TC

#define T_NEW_TC   0x87

Definition at line 235 of file dvbci.cpp.

◆ T_TC_ERROR

#define T_TC_ERROR   0x88

Definition at line 236 of file dvbci.cpp.

◆ T_DATA_LAST

#define T_DATA_LAST   0xA0

Definition at line 237 of file dvbci.cpp.

◆ T_DATA_MORE

#define T_DATA_MORE   0xA1

Definition at line 238 of file dvbci.cpp.

◆ MAX_DUMP

#define MAX_DUMP   256

◆ CAM_READ_TIMEOUT

#define CAM_READ_TIMEOUT   5000

Definition at line 430 of file dvbci.cpp.

◆ MAX_CONNECT_RETRIES

#define MAX_CONNECT_RETRIES   25

Definition at line 518 of file dvbci.cpp.

◆ POLL_INTERVAL

#define POLL_INTERVAL   100

Definition at line 546 of file dvbci.cpp.

◆ MAX_CI_CONNECT

#define MAX_CI_CONNECT   16

Definition at line 573 of file dvbci.cpp.

◆ ST_SESSION_NUMBER

#define ST_SESSION_NUMBER   0x90

Definition at line 675 of file dvbci.cpp.

◆ ST_OPEN_SESSION_REQUEST

#define ST_OPEN_SESSION_REQUEST   0x91

Definition at line 676 of file dvbci.cpp.

◆ ST_OPEN_SESSION_RESPONSE

#define ST_OPEN_SESSION_RESPONSE   0x92

Definition at line 677 of file dvbci.cpp.

◆ ST_CREATE_SESSION

#define ST_CREATE_SESSION   0x93

Definition at line 678 of file dvbci.cpp.

◆ ST_CREATE_SESSION_RESPONSE

#define ST_CREATE_SESSION_RESPONSE   0x94

Definition at line 679 of file dvbci.cpp.

◆ ST_CLOSE_SESSION_REQUEST

#define ST_CLOSE_SESSION_REQUEST   0x95

Definition at line 680 of file dvbci.cpp.

◆ ST_CLOSE_SESSION_RESPONSE

#define ST_CLOSE_SESSION_RESPONSE   0x96

Definition at line 681 of file dvbci.cpp.

◆ SS_OK

#define SS_OK   0x00

Definition at line 685 of file dvbci.cpp.

◆ SS_NOT_ALLOCATED

#define SS_NOT_ALLOCATED   0xF0

Definition at line 686 of file dvbci.cpp.

◆ RI_RESOURCE_MANAGER

#define RI_RESOURCE_MANAGER   0x00010041

Definition at line 690 of file dvbci.cpp.

◆ RI_APPLICATION_INFORMATION

#define RI_APPLICATION_INFORMATION   0x00020041

Definition at line 691 of file dvbci.cpp.

◆ RI_CONDITIONAL_ACCESS_SUPPORT

#define RI_CONDITIONAL_ACCESS_SUPPORT   0x00030041

Definition at line 692 of file dvbci.cpp.

◆ RI_HOST_CONTROL

#define RI_HOST_CONTROL   0x00200041

Definition at line 693 of file dvbci.cpp.

◆ RI_DATE_TIME

#define RI_DATE_TIME   0x00240041

Definition at line 694 of file dvbci.cpp.

◆ RI_MMI

#define RI_MMI   0x00400041

Definition at line 695 of file dvbci.cpp.

◆ AOT_NONE

#define AOT_NONE   0x000000

Definition at line 699 of file dvbci.cpp.

◆ AOT_PROFILE_ENQ

#define AOT_PROFILE_ENQ   0x9F8010

Definition at line 700 of file dvbci.cpp.

◆ AOT_PROFILE

#define AOT_PROFILE   0x9F8011

Definition at line 701 of file dvbci.cpp.

◆ AOT_PROFILE_CHANGE

#define AOT_PROFILE_CHANGE   0x9F8012

Definition at line 702 of file dvbci.cpp.

◆ AOT_APPLICATION_INFO_ENQ

#define AOT_APPLICATION_INFO_ENQ   0x9F8020

Definition at line 703 of file dvbci.cpp.

◆ AOT_APPLICATION_INFO

#define AOT_APPLICATION_INFO   0x9F8021

Definition at line 704 of file dvbci.cpp.

◆ AOT_ENTER_MENU

#define AOT_ENTER_MENU   0x9F8022

Definition at line 705 of file dvbci.cpp.

◆ AOT_CA_INFO_ENQ

#define AOT_CA_INFO_ENQ   0x9F8030

Definition at line 706 of file dvbci.cpp.

◆ AOT_CA_INFO

#define AOT_CA_INFO   0x9F8031

Definition at line 707 of file dvbci.cpp.

◆ AOT_CA_PMT

#define AOT_CA_PMT   0x9F8032

Definition at line 708 of file dvbci.cpp.

◆ AOT_CA_PMT_REPLY

#define AOT_CA_PMT_REPLY   0x9F8033

Definition at line 709 of file dvbci.cpp.

◆ AOT_TUNE

#define AOT_TUNE   0x9F8400

Definition at line 710 of file dvbci.cpp.

◆ AOT_REPLACE

#define AOT_REPLACE   0x9F8401

Definition at line 711 of file dvbci.cpp.

◆ AOT_CLEAR_REPLACE

#define AOT_CLEAR_REPLACE   0x9F8402

Definition at line 712 of file dvbci.cpp.

◆ AOT_ASK_RELEASE

#define AOT_ASK_RELEASE   0x9F8403

Definition at line 713 of file dvbci.cpp.

◆ AOT_DATE_TIME_ENQ

#define AOT_DATE_TIME_ENQ   0x9F8440

Definition at line 714 of file dvbci.cpp.

◆ AOT_DATE_TIME

#define AOT_DATE_TIME   0x9F8441

Definition at line 715 of file dvbci.cpp.

◆ AOT_CLOSE_MMI

#define AOT_CLOSE_MMI   0x9F8800

Definition at line 716 of file dvbci.cpp.

◆ AOT_DISPLAY_CONTROL

#define AOT_DISPLAY_CONTROL   0x9F8801

Definition at line 717 of file dvbci.cpp.

◆ AOT_DISPLAY_REPLY

#define AOT_DISPLAY_REPLY   0x9F8802

Definition at line 718 of file dvbci.cpp.

◆ AOT_TEXT_LAST

#define AOT_TEXT_LAST   0x9F8803

Definition at line 719 of file dvbci.cpp.

◆ AOT_TEXT_MORE

#define AOT_TEXT_MORE   0x9F8804

Definition at line 720 of file dvbci.cpp.

◆ AOT_KEYPAD_CONTROL

#define AOT_KEYPAD_CONTROL   0x9F8805

Definition at line 721 of file dvbci.cpp.

◆ AOT_KEYPRESS

#define AOT_KEYPRESS   0x9F8806

Definition at line 722 of file dvbci.cpp.

◆ AOT_ENQ

#define AOT_ENQ   0x9F8807

Definition at line 723 of file dvbci.cpp.

◆ AOT_ANSW

#define AOT_ANSW   0x9F8808

Definition at line 724 of file dvbci.cpp.

◆ AOT_MENU_LAST

#define AOT_MENU_LAST   0x9F8809

Definition at line 725 of file dvbci.cpp.

◆ AOT_MENU_MORE

#define AOT_MENU_MORE   0x9F880A

Definition at line 726 of file dvbci.cpp.

◆ AOT_MENU_ANSW

#define AOT_MENU_ANSW   0x9F880B

Definition at line 727 of file dvbci.cpp.

◆ AOT_LIST_LAST

#define AOT_LIST_LAST   0x9F880C

Definition at line 728 of file dvbci.cpp.

◆ AOT_LIST_MORE

#define AOT_LIST_MORE   0x9F880D

Definition at line 729 of file dvbci.cpp.

◆ AOT_SUBTITLE_SEGMENT_LAST

#define AOT_SUBTITLE_SEGMENT_LAST   0x9F880E

Definition at line 730 of file dvbci.cpp.

◆ AOT_SUBTITLE_SEGMENT_MORE

#define AOT_SUBTITLE_SEGMENT_MORE   0x9F880F

Definition at line 731 of file dvbci.cpp.

◆ AOT_DISPLAY_MESSAGE

#define AOT_DISPLAY_MESSAGE   0x9F8810

Definition at line 732 of file dvbci.cpp.

◆ AOT_SCENE_END_MARK

#define AOT_SCENE_END_MARK   0x9F8811

Definition at line 733 of file dvbci.cpp.

◆ AOT_SCENE_DONE

#define AOT_SCENE_DONE   0x9F8812

Definition at line 734 of file dvbci.cpp.

◆ AOT_SCENE_CONTROL

#define AOT_SCENE_CONTROL   0x9F8813

Definition at line 735 of file dvbci.cpp.

◆ AOT_SUBTITLE_DOWNLOAD_LAST

#define AOT_SUBTITLE_DOWNLOAD_LAST   0x9F8814

Definition at line 736 of file dvbci.cpp.

◆ AOT_SUBTITLE_DOWNLOAD_MORE

#define AOT_SUBTITLE_DOWNLOAD_MORE   0x9F8815

Definition at line 737 of file dvbci.cpp.

◆ AOT_FLUSH_DOWNLOAD

#define AOT_FLUSH_DOWNLOAD   0x9F8816

Definition at line 738 of file dvbci.cpp.

◆ AOT_DOWNLOAD_REPLY

#define AOT_DOWNLOAD_REPLY   0x9F8817

Definition at line 739 of file dvbci.cpp.

◆ AOT_COMMS_CMD

#define AOT_COMMS_CMD   0x9F8C00

Definition at line 740 of file dvbci.cpp.

◆ AOT_CONNECTION_DESCRIPTOR

#define AOT_CONNECTION_DESCRIPTOR   0x9F8C01

Definition at line 741 of file dvbci.cpp.

◆ AOT_COMMS_REPLY

#define AOT_COMMS_REPLY   0x9F8C02

Definition at line 742 of file dvbci.cpp.

◆ AOT_COMMS_SEND_LAST

#define AOT_COMMS_SEND_LAST   0x9F8C03

Definition at line 743 of file dvbci.cpp.

◆ AOT_COMMS_SEND_MORE

#define AOT_COMMS_SEND_MORE   0x9F8C04

Definition at line 744 of file dvbci.cpp.

◆ AOT_COMMS_RCV_LAST

#define AOT_COMMS_RCV_LAST   0x9F8C05

Definition at line 745 of file dvbci.cpp.

◆ AOT_COMMS_RCV_MORE

#define AOT_COMMS_RCV_MORE   0x9F8C06

Definition at line 746 of file dvbci.cpp.

◆ DEC2BCD

#define DEC2BCD (   d)    (uint8_t((((d) / 10) << 4) + ((d) % 10)))

◆ BYTE0

#define BYTE0 (   a)    ((a) & 0xFF)

◆ BYTE1

#define BYTE1 (   a)    (((a) >> 8) & 0xFF)

◆ CLOSE_MMI_IMMEDIATE

#define CLOSE_MMI_IMMEDIATE   0x00

Definition at line 1170 of file dvbci.cpp.

◆ CLOSE_MMI_DELAY

#define CLOSE_MMI_DELAY   0x01

Definition at line 1171 of file dvbci.cpp.

◆ DCC_SET_MMI_MODE

#define DCC_SET_MMI_MODE   0x01

Definition at line 1175 of file dvbci.cpp.

◆ DCC_DISPLAY_CHARACTER_TABLE_LIST

#define DCC_DISPLAY_CHARACTER_TABLE_LIST   0x02

Definition at line 1176 of file dvbci.cpp.

◆ DCC_INPUT_CHARACTER_TABLE_LIST

#define DCC_INPUT_CHARACTER_TABLE_LIST   0x03

Definition at line 1177 of file dvbci.cpp.

◆ DCC_OVERLAY_GRAPHICS_CHARACTERISTICS

#define DCC_OVERLAY_GRAPHICS_CHARACTERISTICS   0x04

Definition at line 1178 of file dvbci.cpp.

◆ DCC_FULL_SCREEN_GRAPHICS_CHARACTERISTICS

#define DCC_FULL_SCREEN_GRAPHICS_CHARACTERISTICS   0x05

Definition at line 1179 of file dvbci.cpp.

◆ MM_HIGH_LEVEL

#define MM_HIGH_LEVEL   0x01

Definition at line 1183 of file dvbci.cpp.

◆ MM_LOW_LEVEL_OVERLAY_GRAPHICS

#define MM_LOW_LEVEL_OVERLAY_GRAPHICS   0x02

Definition at line 1184 of file dvbci.cpp.

◆ MM_LOW_LEVEL_FULL_SCREEN_GRAPHICS

#define MM_LOW_LEVEL_FULL_SCREEN_GRAPHICS   0x03

Definition at line 1185 of file dvbci.cpp.

◆ DRI_MMI_MODE_ACK

#define DRI_MMI_MODE_ACK   0x01

Definition at line 1189 of file dvbci.cpp.

◆ DRI_LIST_DISPLAY_CHARACTER_TABLES

#define DRI_LIST_DISPLAY_CHARACTER_TABLES   0x02

Definition at line 1190 of file dvbci.cpp.

◆ DRI_LIST_INPUT_CHARACTER_TABLES

#define DRI_LIST_INPUT_CHARACTER_TABLES   0x03

Definition at line 1191 of file dvbci.cpp.

◆ DRI_LIST_GRAPHIC_OVERLAY_CHARACTERISTICS

#define DRI_LIST_GRAPHIC_OVERLAY_CHARACTERISTICS   0x04

Definition at line 1192 of file dvbci.cpp.

◆ DRI_LIST_FULL_SCREEN_GRAPHIC_CHARACTERISTICS

#define DRI_LIST_FULL_SCREEN_GRAPHIC_CHARACTERISTICS   0x05

Definition at line 1193 of file dvbci.cpp.

◆ DRI_UNKNOWN_DISPLAY_CONTROL_CMD

#define DRI_UNKNOWN_DISPLAY_CONTROL_CMD   0xF0

Definition at line 1194 of file dvbci.cpp.

◆ DRI_UNKNOWN_MMI_MODE

#define DRI_UNKNOWN_MMI_MODE   0xF1

Definition at line 1195 of file dvbci.cpp.

◆ DRI_UNKNOWN_CHARACTER_TABLE

#define DRI_UNKNOWN_CHARACTER_TABLE   0xF2

Definition at line 1196 of file dvbci.cpp.

◆ EF_BLIND

#define EF_BLIND   0x01

Definition at line 1200 of file dvbci.cpp.

◆ AI_CANCEL

#define AI_CANCEL   0x00

Definition at line 1204 of file dvbci.cpp.

◆ AI_ANSWER

#define AI_ANSWER   0x01

Definition at line 1205 of file dvbci.cpp.

◆ CPCI_OK_DESCRAMBLING

#define CPCI_OK_DESCRAMBLING   0x01

Definition at line 1451 of file dvbci.cpp.

◆ CPCI_OK_MMI

#define CPCI_OK_MMI   0x02

Definition at line 1452 of file dvbci.cpp.

◆ CPCI_QUERY

#define CPCI_QUERY   0x03

Definition at line 1453 of file dvbci.cpp.

◆ CPCI_NOT_SELECTED

#define CPCI_NOT_SELECTED   0x04

Definition at line 1454 of file dvbci.cpp.

Enumeration Type Documentation

◆ eState

enum eState
Enumerator
stIDLE 
stCREATION 
stACTIVE 
stDELETION 

Definition at line 368 of file dvbci.cpp.

Function Documentation

◆ safe_read()

static ssize_t safe_read ( int  filedes,
void *  buffer,
size_t  size 
)
static

Definition at line 83 of file dvbci.cpp.

Referenced by cTPDU::Read().

◆ GetLength()

static const uint8_t* GetLength ( const uint8_t *  Data,
int &  Length 
)
static
Parameters
LengthGets 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.
DataA pointer to current location for reading data.
LengthUsed to store the length from the data stream.
Returns
Returns a pointer to the first byte after the length and stores the length value in Length.

Definition at line 95 of file dvbci.cpp.

Referenced by cTPDU::GetData(), cCiSession::GetData(), and GetString().

◆ SetLength()

static uint8_t* SetLength ( uint8_t *  Data,
int  Length 
)
static
Parameters
LengthSets 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.
DataA pointer to current location for writing data.
LengthA number to encode into the data stream.
Returns
Returns a pointer to the first byte after the length.

Definition at line 117 of file dvbci.cpp.

Referenced by cTPDU::cTPDU(), cCiSession::SendData(), and PESPacket::SetTotalLength().

◆ CopyString()

static char* CopyString ( int  Length,
const uint8_t *  Data 
)
static
Parameters
DataCopies the string at Data.
LengthThe number of bytes to copy from Data.
DataA pointer to current location for reading data.
Returns
Returns a pointer to a newly allocated string.

Definition at line 144 of file dvbci.cpp.

Referenced by GetString(), and cCiMMI::Process().

◆ GetString()

static char* GetString ( int &  Length,
const uint8_t **  Data 
)
static
Parameters
DataGets the string at Data. Upon return Length and Data represent the remaining data after the string has been copied off.
[in,out]LengthThe number of bytes to copy from Data. Updated for the size of the string read.
[in,out]DataA pointer to current location for reading data. Updated for the size of the string read.
Returns
Returns a pointer to a newly allocated string, or nullptr in case of error.

Definition at line 156 of file dvbci.cpp.

Referenced by cCiMMI::GetText(), and cCiApplicationInformation::Process().

Variable Documentation

◆ DumpTPDUDataTransfer

bool DumpTPDUDataTransfer = false
static

Definition at line 63 of file dvbci.cpp.

Referenced by cTPDU::Dump().

◆ DebugProtocol

bool DebugProtocol = false
static

Definition at line 64 of file dvbci.cpp.

◆ _connected

bool _connected = false
static

Definition at line 65 of file dvbci.cpp.

Referenced by cLlCiHandler::connected(), and cCiTransportConnection::CreateConnection().