DSMCC  17.9.0
 All Data Structures Files Functions Typedefs
Data Structures | Macros | Typedefs | Enumerations | Functions
dsiq.h File Reference

Dsmcc's Service Information Query API. More...

#include "cldsmtypes.h"
#include "dmxtypes.h"
#include "stdfuncs.h"
#include "siqfuncs.h"
#include "dsm_debug.h"

Go to the source code of this file.

Data Structures

struct  S_SiqSetup
 

Macros

#define UNKNOWN_AIT_TYPE   0x7FFF
 
#define UNKNOWN_AIT_VERS   0x7F
 

Typedefs

typedef U32BIT(* F_DvpRequestTable )(void *ref, U16BIT pid, U16BIT xid, U8BIT tid)
 SIQ requests table data - normally PMT, but could be UNT. Table data should be given to appropriate function e.g. SIQ_ProcessPMT. It should always supply it after this function is called, and then, whenever the version changes. This state should continue until F_DvpCancelTable is called. More...
 
typedef void(* F_DvpCancelTable )(void *ref, U32BIT rid)
 Cancel request for Table data made by F_DvpRequestTable() More...
 
typedef struct s_SiqCachePat * H_SiqCachePat
 
typedef struct s_SiqCachePmt * H_SiqCachePmt
 
typedef struct s_SiqPmtTable * H_SiqPmtTable
 

Enumerations

enum  E_SIQ_STATUS { SIQ_ERROR, SIQ_IGNORE, SIQ_UPDATE }
 

Functions

H_SiqInstance SIQ_CreateInstance (S_SiqSetup *pSetup)
 Create SIQ instance. More...
 
void SIQ_DestroyInstance (H_SiqInstance siq)
 Destroy instance created by SIQ_CreateInstance. More...
 
void SIQ_SetDebugConfig (H_SiqInstance siq, F_Printf errPrintf, F_Printf dbgPrintf, U32BIT dbgState)
 Set Debug config for SIQ. More...
 
void SIQ_SetDebugState (H_SiqInstance siq, U32BIT dbgState)
 Set Debug state for SIQ. More...
 
void SIQ_SetDsmInstance (H_SiqInstance siq, H_DsmCoreInst dsm)
 Set instance handle for DSM-CC that SIQ is supporting. More...
 
void SIQ_UpdatePat (H_SiqInstance siq, U8BIT *dptr)
 Provide SIQ with latest PAT data. Calling this function is optional. However, if not used, then the platform must use SIQ_ServiceRemoved and SIQ_TransportChanged. More...
 
void SIQ_TransportChanged (H_SiqInstance siq, U16BIT origNetworkId, U16BIT transportId)
 Inform SIQ when tuning to another transport stream. Not required if PAT is supplied to SIQ. More...
 
E_SIQ_STATUS SIQ_RequirePmt (H_SiqInstance siq, U8BIT *pmt, U16BIT *pSid, U8BIT *pVer)
 Ask SIQ whether PMT section data is required. It assumes CRC has been checked and is passing valid PMT sections So the first byte of data must be PMT table id (i.e. 0x02). If SIQ does not receive PAT then this function adds SIQ knowledge of the service. More...
 
void SIQ_ServiceRemoved (H_SiqInstance siq, U16BIT serviceId)
 Inform SIQ when a service has been removed from PAT. Not required if PAT is supplied to SIQ. This may initiate calls to DSM-CC callback functions for Load Carousel or Load Object, where states are 'aborted'. More...
 
H_SiqPmtTable SIQ_ParsePmt (H_SiqInstance siq, U8BIT *pmt)
 Provide PMT section data to SIQ. It assumes CRC has been checked and is passing valid PMT sections So the first byte of data must be PMT table id (i.e. 0x02). If SIQ does not receive PAT then this function adds SIQ knowledge of the service. More...
 
void SIQ_ProcessPmt (H_SiqInstance siq, H_SiqPmtTable hNewTable, U16BIT serviceId, U8BIT version)
 Provide PMT section data to SIQ. It assumes CRC has been checked and is passing valid PMT sections So the first byte of data must be PMT table id (i.e. 0x02). If SIQ does not receive PAT then this function adds SIQ knowledge of the service. This may initiate calls to F_ParseDataBcastId(), and may be followed by DSM-CC callback functions for Load Carousel or Load Object, where states can be any (including 'aborted'). More...
 
void SIQ_CacheClearPmt (H_SiqInstance siq, U16BIT serviceId)
 Clear cached PMT information. More...
 
E_DscError SIQ_RequestQueryStart (H_SiqInstance siq, P_SIQueryRequest pQuery, H_SIQueryRef clDsmSIQueryRef, void *clDsmSIUserData, P_SIQueryResult pResult)
 Start DSM-CC query request. Called by DSM-CC component, and given in clDsmSysCreate setup. More...
 
void SIQ_RequestQueryStop (H_SiqInstance siq, void *queryHandle, H_SIQueryRef clDsmSIQueryRef)
 Stop DSM-CC query request. Called by DSM-CC component, and given in clDsmSysCreate setup. More...
 
E_DscError SIQ_ServiceInfoChangeSubscribe (H_SiqInstance siq, U16BIT serviceId)
 Subscribe a component to receive notification of any changes or alterations to the service information of a specified service. Called by DSM-CC component, and given in clDsmSysCreate setup. More...
 
void SIQ_ServiceInfoChangeUnsubscribe (H_SiqInstance siq, U16BIT serviceId)
 Unsubscribe component to previously subscribed service change or alteration updates. Called by DSM-CC component, and given in clDsmSysCreate setup. More...
 

Detailed Description

Dsmcc's Service Information Query API.

Date
28 September 2013
Author
Adam Sturtridge

Definition in file dsiq.h.

Typedef Documentation

typedef void(* F_DvpCancelTable)(void *ref, U32BIT rid)

Cancel request for Table data made by F_DvpRequestTable()

Parameters
refExternal reference or handle
ridRequest Id returned by F_DvpRequestTable()
Returns
void

Definition at line 65 of file dsiq.h.

typedef U32BIT(* F_DvpRequestTable)(void *ref, U16BIT pid, U16BIT xid, U8BIT tid)

SIQ requests table data - normally PMT, but could be UNT. Table data should be given to appropriate function e.g. SIQ_ProcessPMT. It should always supply it after this function is called, and then, whenever the version changes. This state should continue until F_DvpCancelTable is called.

Parameters
refExternal reference or handle
pidPID for this table
xidTable extension ID
tidTable ID (e.g. PMT is 0x02)
Returns
zero is failure, non-zero is success

Definition at line 57 of file dsiq.h.

Function Documentation

void SIQ_CacheClearPmt ( H_SiqInstance  siq,
U16BIT  serviceId 
)

Clear cached PMT information.

Parameters
H_SiqInstancesiq SIQ instance handle.
U16BITserviceId Service whose PMT needs to be cleared
Returns
void

Definition at line 595 of file siq_cache.c.

H_SiqInstance SIQ_CreateInstance ( S_SiqSetup pSetup)

Create SIQ instance.

Parameters
S_SiqSetupsetup setup parameters
Returns
SIQ instance. NULL is failure.
Parameters
S_SiqSetupsetup setup parameters
Returns

Definition at line 67 of file siq_main.c.

void SIQ_DestroyInstance ( H_SiqInstance  siq)

Destroy instance created by SIQ_CreateInstance.

Parameters
H_SiqInstancesiq SIQ instance handle.
Returns
Parameters
H_SiqInstancesiqInstance SIQ instance handle.
Returns

Definition at line 152 of file siq_main.c.

H_SiqPmtTable SIQ_ParsePmt ( H_SiqInstance  siq,
U8BIT *  pmt 
)

Provide PMT section data to SIQ. It assumes CRC has been checked and is passing valid PMT sections So the first byte of data must be PMT table id (i.e. 0x02). If SIQ does not receive PAT then this function adds SIQ knowledge of the service.

Parameters
H_SiqInstancesiqInstance SIQ instance handle.
U8BIT*pmt raw PMT section data
Returns
void

Definition at line 494 of file siq_cache.c.

void SIQ_ProcessPmt ( H_SiqInstance  siq,
H_SiqPmtTable  hNewTable,
U16BIT  serviceId,
U8BIT  version 
)

Provide PMT section data to SIQ. It assumes CRC has been checked and is passing valid PMT sections So the first byte of data must be PMT table id (i.e. 0x02). If SIQ does not receive PAT then this function adds SIQ knowledge of the service. This may initiate calls to F_ParseDataBcastId(), and may be followed by DSM-CC callback functions for Load Carousel or Load Object, where states can be any (including 'aborted').

Parameters
H_SiqInstancesiq SIQ instance handle.
U8BIT*pmt raw PMT section data
Returns
E_SIQ_STATUS

Provide PMT section data to SIQ. It assumes CRC has been checked and is passing valid PMT sections So the first byte of data must be PMT table id (i.e. 0x02). If SIQ does not receive PAT then this function adds SIQ knowledge of the service. This may initiate calls to F_ParseDataBcastId(), and may be followed by DSM-CC callback functions for Load Carousel or Load Object, where states can be any (including 'aborted').

Parameters
H_SiqInstancesiqInstance SIQ instance handle.
U8BIT*pmt raw PMT section data
Returns
void

Definition at line 509 of file siq_cache.c.

E_DscError SIQ_RequestQueryStart ( H_SiqInstance  siq,
P_SIQueryRequest  pQuery,
H_SIQueryRef  clDsmSIQueryRef,
void *  clDsmSIUserData,
P_SIQueryResult  pResult 
)

Start DSM-CC query request. Called by DSM-CC component, and given in clDsmSysCreate setup.

Parameters
H_SiqInstancesiq SIQ instance handle.
Returns
void SIQ_RequestQueryStop ( H_SiqInstance  siq,
void *  queryHandle,
H_SIQueryRef  clDsmSIQueryRef 
)

Stop DSM-CC query request. Called by DSM-CC component, and given in clDsmSysCreate setup.

Parameters
H_SiqInstancesiq SIQ instance handle.
Returns
E_SIQ_STATUS SIQ_RequirePmt ( H_SiqInstance  siq,
U8BIT *  pmt,
U16BIT *  pSid,
U8BIT *  pVer 
)

Ask SIQ whether PMT section data is required. It assumes CRC has been checked and is passing valid PMT sections So the first byte of data must be PMT table id (i.e. 0x02). If SIQ does not receive PAT then this function adds SIQ knowledge of the service.

Parameters
H_SiqInstancesiq SIQ instance handle.
U8BIT*pmt raw PMT section data header
Returns
E_SIQ_STATUS

Definition at line 433 of file siq_cache.c.

E_DscError SIQ_ServiceInfoChangeSubscribe ( H_SiqInstance  siq,
U16BIT  serviceId 
)

Subscribe a component to receive notification of any changes or alterations to the service information of a specified service. Called by DSM-CC component, and given in clDsmSysCreate setup.

Parameters
H_SiqInstancesiq SIQ instance handle.
U16BITserviceId Service to be monitored.
Returns
E_DscError
void SIQ_ServiceInfoChangeUnsubscribe ( H_SiqInstance  siq,
U16BIT  serviceId 
)

Unsubscribe component to previously subscribed service change or alteration updates. Called by DSM-CC component, and given in clDsmSysCreate setup.

Parameters
H_SiqInstancesiq SIQ instance handle.
U16BITserviceId Service being monitored.
Returns
void
void SIQ_ServiceRemoved ( H_SiqInstance  siq,
U16BIT  serviceId 
)

Inform SIQ when a service has been removed from PAT. Not required if PAT is supplied to SIQ. This may initiate calls to DSM-CC callback functions for Load Carousel or Load Object, where states are 'aborted'.

Parameters
H_SiqInstancesiq SIQ instance handle.
U16BITserviceId Service Id of removed service
Returns
void

Inform SIQ when a service has been removed from PAT. Not required if PAT is supplied to SIQ. This may initiate calls to DSM-CC callback functions for Load Carousel or Load Object, where states are 'aborted'.

Parameters
H_SiqInstancesiqInstance SIQ instance handle.
U16BITserviceId Service Id of removed service
Returns
void

Definition at line 409 of file siq_cache.c.

void SIQ_SetDebugConfig ( H_SiqInstance  siq,
F_Printf  errPrintf,
F_Printf  dbgPrintf,
U32BIT  dbgState 
)

Set Debug config for SIQ.

Parameters
H_SiqInstancesiq SIQ instance handle.
F_PrintferrPrintf Error print function
F_PrintfdbgPrintf Debug print function
U32BITdbgState State to filter debug printing
Returns
Parameters
H_SiqInstancesiq SIQ instance handle.
F_SiqPrintferrPrintf Error print function
F_SiqPrintfdbgPrintf Debug print function
U32BITdbgState State to filter debug printing
Returns

Definition at line 126 of file siq_main.c.

void SIQ_SetDebugState ( H_SiqInstance  siq,
U32BIT  dbgState 
)

Set Debug state for SIQ.

Parameters
H_SiqInstancesiq SIQ instance handle.
U32BITdbgState State to filter debug printing
Returns

Definition at line 141 of file siq_main.c.

void SIQ_SetDsmInstance ( H_SiqInstance  siq,
H_DsmCoreInst  dsmInstance 
)

Set instance handle for DSM-CC that SIQ is supporting.

Parameters
H_SiqInstancesiq SIQ instance handle.
H_DsmCoreInstdsm DSM-CC instance being supported
Returns
Parameters
void*siqInstance SIQ instance handle.
H_DsmCoreInstdsmInstance DSM-CC instance being supported
Returns

Definition at line 176 of file siq_main.c.

void SIQ_TransportChanged ( H_SiqInstance  siq,
U16BIT  origNetworkId,
U16BIT  transportId 
)

Inform SIQ when tuning to another transport stream. Not required if PAT is supplied to SIQ.

Parameters
H_SiqInstancesiq SIQ instance handle.
U16BITorigNetworkId original network Id for transport stream
U16BITtransportId Id of new transport stream
Returns
void

Inform SIQ when tuning to another transport stream. Not required if PAT is supplied to SIQ.

Parameters
H_SiqInstancesiqInstance SIQ instance handle.
U16BITtransportId Id of new transport stream
Returns
void

Definition at line 391 of file siq_cache.c.

void SIQ_UpdatePat ( H_SiqInstance  siq,
U8BIT *  dptr 
)

Provide SIQ with latest PAT data. Calling this function is optional. However, if not used, then the platform must use SIQ_ServiceRemoved and SIQ_TransportChanged.

Parameters
H_SiqInstancesiq SIQ instance handle.
U8BIT*dptr PAT section data
Returns
none.

Definition at line 301 of file siq_cache.c.