vdr 2.6.3
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
cCiTransportConnection Class Reference

Public Member Functions

 cCiTransportConnection (cCamSlot *CamSlot, uint8_t Tcid)
 
virtual ~cCiTransportConnection ()
 
void SetTsPostProcessor (cCiSession *CiSession)
 
bool TsPostProcess (uint8_t *TsPacket)
 
cCamSlotCamSlot (void)
 
uint8_t Tcid (void) const
 
void CreateConnection (void)
 
void DeleteConnection (void)
 
const char * GetCamName (void)
 
bool Ready (void)
 
bool HasUserIO (void)
 
void SendData (int Length, const uint8_t *Data)
 
bool Process (cTPDU *TPDU=NULL)
 
cCiSessionGetSessionByResourceId (uint32_t ResourceId)
 

Private Types

enum  eState { stIDLE , stCREATION , stACTIVE , stDELETION }
 

Private Member Functions

void SendTPDU (uint8_t Tag, int Length=0, const uint8_t *Data=NULL)
 
void SendTag (uint8_t Tag, uint16_t SessionId, uint32_t ResourceId=0, int Status=-1)
 
void Poll (void)
 
uint32_t ResourceIdToInt (const uint8_t *Data)
 
cCiSessionGetSessionBySessionId (uint16_t SessionId)
 
void OpenSession (int Length, const uint8_t *Data)
 
void CloseSession (uint16_t SessionId)
 
void HandleSessions (cTPDU *TPDU)
 

Private Attributes

cMutex mutex
 
cCamSlotcamSlot
 
uint8_t tcid
 
eState state
 
bool createConnectionRequested
 
bool deleteConnectionRequested
 
bool hasUserIO
 
cTimeMs alive
 
cTimeMs timer
 
cCiSessionsessions [MAX_SESSIONS_PER_TC+1]
 
cCiSessiontsPostProcessor
 

Detailed Description

Definition at line 611 of file ci.c.

Member Enumeration Documentation

◆ eState

Enumerator
stIDLE 
stCREATION 
stACTIVE 
stDELETION 

Definition at line 613 of file ci.c.

Constructor & Destructor Documentation

◆ cCiTransportConnection()

cCiTransportConnection::cCiTransportConnection ( cCamSlot CamSlot,
uint8_t  Tcid 
)

◆ ~cCiTransportConnection()

cCiTransportConnection::~cCiTransportConnection ( )
virtual

Definition at line 1826 of file ci.c.

References MAX_SESSIONS_PER_TC, and sessions.

Member Function Documentation

◆ CamSlot()

cCamSlot * cCiTransportConnection::CamSlot ( void  )
inline

Definition at line 638 of file ci.c.

References camSlot.

Referenced by cCiSession::CamSlot(), and cCiTransportConnection().

◆ CloseSession()

void cCiTransportConnection::CloseSession ( uint16_t  SessionId)
private

◆ CreateConnection()

void cCiTransportConnection::CreateConnection ( void  )
inline

Definition at line 640 of file ci.c.

References createConnectionRequested.

Referenced by cCamSlot::NewConnection().

◆ DeleteConnection()

void cCiTransportConnection::DeleteConnection ( void  )
inline

Definition at line 641 of file ci.c.

References deleteConnectionRequested.

◆ GetCamName()

const char * cCiTransportConnection::GetCamName ( void  )

◆ GetSessionByResourceId()

cCiSession * cCiTransportConnection::GetSessionByResourceId ( uint32_t  ResourceId)

◆ GetSessionBySessionId()

cCiSession * cCiTransportConnection::GetSessionBySessionId ( uint16_t  SessionId)
private

Definition at line 1904 of file ci.c.

References MAX_SESSIONS_PER_TC, and sessions.

Referenced by CloseSession(), and HandleSessions().

◆ HandleSessions()

void cCiTransportConnection::HandleSessions ( cTPDU TPDU)
private

◆ HasUserIO()

bool cCiTransportConnection::HasUserIO ( void  )
inline

Definition at line 644 of file ci.c.

References hasUserIO.

Referenced by cCamSlot::HasUserIO(), and Process().

◆ OpenSession()

void cCiTransportConnection::OpenSession ( int  Length,
const uint8_t *  Data 
)
private

◆ Poll()

void cCiTransportConnection::Poll ( void  )
private

Definition at line 1889 of file ci.c.

References camSlot, dbgprotocol, DumpPolls, DumpTPDUDataTransfer, SendTPDU(), cCamSlot::SlotNumber(), and T_DATA_LAST.

Referenced by Process().

◆ Process()

bool cCiTransportConnection::Process ( cTPDU TPDU = NULL)

◆ Ready()

bool cCiTransportConnection::Ready ( void  )

◆ ResourceIdToInt()

uint32_t cCiTransportConnection::ResourceIdToInt ( const uint8_t *  Data)
private

Definition at line 1899 of file ci.c.

References get_unaligned().

Referenced by OpenSession().

◆ SendData()

void cCiTransportConnection::SendData ( int  Length,
const uint8_t *  Data 
)

Definition at line 1864 of file ci.c.

References SendTPDU(), stACTIVE, state, and T_DATA_LAST.

Referenced by cCiSession::SendData(), and SendTag().

◆ SendTag()

void cCiTransportConnection::SendTag ( uint8_t  Tag,
uint16_t  SessionId,
uint32_t  ResourceId = 0,
int  Status = -1 
)
private

Definition at line 1871 of file ci.c.

References put_unaligned(), and SendData().

Referenced by CloseSession(), and OpenSession().

◆ SendTPDU()

void cCiTransportConnection::SendTPDU ( uint8_t  Tag,
int  Length = 0,
const uint8_t *  Data = NULL 
)
private

Definition at line 1857 of file ci.c.

References camSlot, cTimeMs::Set(), cCamSlot::SlotIndex(), TC_POLL_TIMEOUT, tcid, timer, and cCamSlot::Write().

Referenced by Poll(), Process(), and SendData().

◆ SetTsPostProcessor()

void cCiTransportConnection::SetTsPostProcessor ( cCiSession CiSession)

Definition at line 1832 of file ci.c.

References tsPostProcessor.

Referenced by cCiSession::SetTsPostProcessor().

◆ Tcid()

uint8_t cCiTransportConnection::Tcid ( void  ) const
inline

Definition at line 639 of file ci.c.

References tcid.

Referenced by cCiTransportConnection().

◆ TsPostProcess()

bool cCiTransportConnection::TsPostProcess ( uint8_t *  TsPacket)

Definition at line 1837 of file ci.c.

References mutex, cCiSession::TsPostProcess(), and tsPostProcessor.

Referenced by cCamSlot::TsPostProcess().

Member Data Documentation

◆ alive

cTimeMs cCiTransportConnection::alive
private

Definition at line 621 of file ci.c.

Referenced by cCiTransportConnection(), and Process().

◆ camSlot

cCamSlot* cCiTransportConnection::camSlot
private

◆ createConnectionRequested

bool cCiTransportConnection::createConnectionRequested
private

Definition at line 618 of file ci.c.

Referenced by cCiTransportConnection(), CreateConnection(), and Process().

◆ deleteConnectionRequested

bool cCiTransportConnection::deleteConnectionRequested
private

Definition at line 619 of file ci.c.

Referenced by cCiTransportConnection(), DeleteConnection(), and Process().

◆ hasUserIO

bool cCiTransportConnection::hasUserIO
private

Definition at line 620 of file ci.c.

Referenced by cCiTransportConnection(), HasUserIO(), and Process().

◆ mutex

cMutex cCiTransportConnection::mutex
private

Definition at line 614 of file ci.c.

Referenced by TsPostProcess().

◆ sessions

cCiSession* cCiTransportConnection::sessions[MAX_SESSIONS_PER_TC+1]
private

◆ state

eState cCiTransportConnection::state
private

Definition at line 617 of file ci.c.

Referenced by cCiTransportConnection(), Process(), and SendData().

◆ tcid

uint8_t cCiTransportConnection::tcid
private

◆ timer

cTimeMs cCiTransportConnection::timer
private

Definition at line 622 of file ci.c.

Referenced by Process(), and SendTPDU().

◆ tsPostProcessor

cCiSession* cCiTransportConnection::tsPostProcessor
private

Definition at line 624 of file ci.c.

Referenced by cCiTransportConnection(), SetTsPostProcessor(), and TsPostProcess().


The documentation for this class was generated from the following file: