DSMCC  15.3.1
source/dsiq/inc/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

Defines

#define UNKNOWN_AIT_TYPE   0x7FFF
#define UNKNOWN_AIT_VERS   0x7F

Typedefs

typedef int(* F_DvpRequestPmt )(void *pmtref, U16BIT serviceId, U16BIT pmtpid)
 Request PMT data to be supplied to SIQ for this service. The PMT data should be supplied to SIQ_ProcessPMT(). It should always supply PMT soon after the call to this function, and then, whenever the PMT version changes. This state should continue until F_DvpCancelPmt is called. If this service has been removed from the PAT, and the platform does not give PAT data to SIQ, then it must call SIQ_ServiceRemoved().
typedef void(* F_DvpCancelPmt )(void *pmtref, U16BIT serviceId)
 Cancel request for PMT data made by F_DvpRequestPmt()
typedef struct s_SiqCachePatH_SiqCachePat
typedef struct s_SiqCachePmtH_SiqCachePmt
typedef struct s_SiqPmtTableH_SiqPmtTable

Enumerations

enum  E_SIQ_STATUS { SIQ_ERROR, SIQ_IGNORE, SIQ_UPDATE }

Functions

H_SiqInstance SIQ_CreateInstance (S_SiqSetup *pSetup)
 Create SIQ instance.
void SIQ_DestroyInstance (H_SiqInstance siq)
 Destroy instance created by SIQ_CreateInstance.
void SIQ_SetDebugConfig (H_SiqInstance siq, F_Printf errPrintf, F_Printf dbgPrintf, U32BIT dbgState)
 Set Debug config for SIQ.
void SIQ_SetDebugState (H_SiqInstance siq, U32BIT dbgState)
 Set Debug state for SIQ.
void SIQ_SetDsmInstance (H_SiqInstance siq, clDsmInstHandle_t dsm)
 Set instance handle for DSM-CC that SIQ is supporting.
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.
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.
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.
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'.
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.
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').
void SIQ_CacheClearPmt (H_SiqInstance siq, U16BIT serviceId)
 Clear cached PMT information.
clDsmErr_t SIQ_RequestQueryStart (H_SiqInstance siq, pclDsmSIQuery_t pQuery, clDsmSIQueryRef_t clDsmSIQueryRef, void *clDsmSIUserData, clDsmSIQueryResult_t *pResult)
 Start DSM-CC query request. Called by DSM-CC component, and given in clDsmSysCreate setup.
void SIQ_RequestQueryStop (H_SiqInstance siq, void *queryHandle, clDsmSIQueryRef_t clDsmSIQueryRef)
 Stop DSM-CC query request. Called by DSM-CC component, and given in clDsmSysCreate setup.
clDsmErr_t 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.
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.

Detailed Description

Dsmcc's Service Information Query API.

Date:
28 September 2013
Author:
Adam Sturtridge

Typedef Documentation

typedef void(* F_DvpCancelPmt)(void *pmtref, U16BIT serviceId)

Cancel request for PMT data made by F_DvpRequestPmt()

Parameters:
void*pmtref Handle used by DVB stack for requesting PMT's
U16BITserviceId Service no longer requiring PMT updates.
Returns:
void
typedef int(* F_DvpRequestPmt)(void *pmtref, U16BIT serviceId, U16BIT pmtpid)

Request PMT data to be supplied to SIQ for this service. The PMT data should be supplied to SIQ_ProcessPMT(). It should always supply PMT soon after the call to this function, and then, whenever the PMT version changes. This state should continue until F_DvpCancelPmt is called. If this service has been removed from the PAT, and the platform does not give PAT data to SIQ, then it must call SIQ_ServiceRemoved().

Parameters:
void*pmtref Handle used by DVB stack for requesting PMT's
U16BITserviceId Service that SIQ requires PMT updates.
U16BITpmtpid PID for this PMT (valid if PAT is supplied to SIQ.
Returns:
zero is failure, non-zero is success

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

Create SIQ instance.

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

Destroy instance created by SIQ_CreateInstance.

Parameters:
H_SiqInstancesiq SIQ instance handle.
Returns:
Parameters:
H_SiqInstancesiqInstance SIQ instance handle.
Returns:
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
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
clDsmErr_t SIQ_RequestQueryStart ( H_SiqInstance  siq,
pclDsmSIQuery_t  pQuery,
clDsmSIQueryRef_t  clDsmSIQueryRef,
void *  clDsmSIUserData,
clDsmSIQueryResult_t 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,
clDsmSIQueryRef_t  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
clDsmErr_t 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:
clDsmErr_t
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
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:
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:
void SIQ_SetDsmInstance ( H_SiqInstance  siq,
clDsmInstHandle_t  dsmInstance 
)

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

Parameters:
H_SiqInstancesiq SIQ instance handle.
clDsmInstHandle_tdsm DSM-CC instance being supported
Returns:
Parameters:
void*siqInstance SIQ instance handle.
clDsmInstHandle_tdsmInstance DSM-CC instance being supported
Returns:
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
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.
 All Data Structures Files Functions Typedefs