vdr  2.0.6
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 ()
 
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

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

Detailed Description

Definition at line 230 of file ci.c.

Member Enumeration Documentation

Enumerator
stIDLE 
stCREATION 
stACTIVE 
stDELETION 

Definition at line 232 of file ci.c.

Constructor & Destructor Documentation

cCiTransportConnection::cCiTransportConnection ( cCamSlot CamSlot,
uint8_t  Tcid 
)
cCiTransportConnection::~cCiTransportConnection ( )
virtual

Definition at line 1224 of file ci.c.

References MAX_SESSIONS_PER_TC, and sessions.

Member Function Documentation

cCamSlot* cCiTransportConnection::CamSlot ( void  )
inline
void cCiTransportConnection::CloseSession ( uint16_t  SessionId)
private
void cCiTransportConnection::CreateConnection ( void  )
inline

Definition at line 255 of file ci.c.

References createConnectionRequested.

Referenced by cCamSlot::NewConnection().

void cCiTransportConnection::DeleteConnection ( void  )
inline

Definition at line 256 of file ci.c.

References deleteConnectionRequested.

const char * cCiTransportConnection::GetCamName ( void  )
cCiSession * cCiTransportConnection::GetSessionByResourceId ( uint32_t  ResourceId)

Definition at line 1294 of file ci.c.

References MAX_SESSIONS_PER_TC, and sessions.

Referenced by GetCamName(), cCamSlot::GetSessionByResourceId(), OpenSession(), and Ready().

cCiSession * cCiTransportConnection::GetSessionBySessionId ( uint16_t  SessionId)
private

Definition at line 1289 of file ci.c.

References MAX_SESSIONS_PER_TC, and sessions.

Referenced by CloseSession(), and HandleSessions().

void cCiTransportConnection::HandleSessions ( cTPDU TPDU)
private
bool cCiTransportConnection::HasUserIO ( void  )
inline

Definition at line 259 of file ci.c.

References hasUserIO.

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

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

Definition at line 1274 of file ci.c.

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

Referenced by Process().

bool cCiTransportConnection::Process ( cTPDU TPDU = NULL)
bool cCiTransportConnection::Ready ( void  )
uint32_t cCiTransportConnection::ResourceIdToInt ( const uint8_t *  Data)
private

Definition at line 1284 of file ci.c.

References get_unaligned().

Referenced by OpenSession().

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

Definition at line 1249 of file ci.c.

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

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

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

Definition at line 1256 of file ci.c.

References put_unaligned(), and SendData().

Referenced by CloseSession(), and OpenSession().

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

Definition at line 1242 of file ci.c.

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

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

uint8_t cCiTransportConnection::Tcid ( void  ) const
inline

Definition at line 254 of file ci.c.

References tcid.

Referenced by cCiTransportConnection().

Member Data Documentation

cTimeMs cCiTransportConnection::alive
private

Definition at line 239 of file ci.c.

Referenced by cCiTransportConnection(), and Process().

cCamSlot* cCiTransportConnection::camSlot
private
bool cCiTransportConnection::createConnectionRequested
private

Definition at line 236 of file ci.c.

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

bool cCiTransportConnection::deleteConnectionRequested
private

Definition at line 237 of file ci.c.

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

bool cCiTransportConnection::hasUserIO
private

Definition at line 238 of file ci.c.

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

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

Definition at line 235 of file ci.c.

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

uint8_t cCiTransportConnection::tcid
private
cTimeMs cCiTransportConnection::timer
private

Definition at line 240 of file ci.c.

Referenced by Process(), and SendTPDU().


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