DVBCore  20.3.0
DVBCore Documentation
Typedefs | Enumerations | Functions
ap_ci.h File Reference

Application level CI control functions. More...

#include "techtype.h"

Go to the source code of this file.

Typedefs

typedef void(* F_NotifyStartTuning) (U32BIT module, U16BIT onet_id, U16BIT trans_id, U16BIT serv_id, E_CIP_TUNE_FLAGS flags)
 Notify that DVB is about to tune to service or transport stream. This function would be called as a result of STB_CITuneBroadcastRequest(), STB_CITuneLCNRequest(), STB_CITuneTripletRequest(), or STB_CITuneIPRequest() but before tuning occurs. More...
 

Enumerations

enum  E_CIP_START_OPERATOR_SEARCH { CIP_START_OPERATOR_SEARCH_NO, CIP_START_OPERATOR_SEARCH_YES, CIP_START_OPERATOR_SEARCH_ASK }
 
enum  E_CIP_TUNE_FLAGS { CIP_NORMAL_TUNE, CIP_QUIET_TUNE, CIP_KEEP_APP_RUNING, CIP_QUIET_KEEP_APP }
 

Functions

U8BIT ACI_GetCamUpgradeMode (void)
 Return CAM upgrade option (Yes/No/Ask) More...
 
void ACI_SetCamUpgradeMode (U8BIT upgrade_mode)
 Sets the CAM upgrade option (Yes/No/Ask) More...
 
E_CIP_START_OPERATOR_SEARCH ACI_GetOperatorSearchMode (void)
 Return the option for starting an operator profile search (yes/no/ask) More...
 
void ACI_SetOperatorSearchMode (E_CIP_START_OPERATOR_SEARCH search_mode)
 Sets the operator profile search mode (Yes/No/Ask). This should be used by the app to control whether a search can be started, or the user should be asked first, or can't run. More...
 
void ACI_OperatorSearchRequired (U32BIT module, BOOLEAN required)
 Sets whether an operator profile search needs to be run. More...
 
void ACI_ScheduleOperatorSearch (U32BIT cicam_id, U16BIT date, U8BIT hour, U8BIT min)
 Sets the date/time that an operator search should be started for the given module. More...
 
BOOLEAN ACI_IsOperatorSearchRequired (void)
 Returns whether an operator profile search has been requested. More...
 
U32BIT ACI_GetOperatorSearchModule (void)
 Returns the module performing or requiring and operator search. More...
 
BOOLEAN ACI_GetFirstOperatorSearchModule (U32BIT *module)
 Checks all the CI+ profiles to see if any have requested an update search. More...
 
BOOLEAN ACI_GetFirstScheduledOperatorSearch (U32BIT *module, U16BIT *date, U8BIT *hours, U8BIT *mins)
 Checks all the CI+ profiles to find the one with the earliest scheduled search. All returned values are only valid if the function returns TRUE. More...
 
BOOLEAN ACI_StartOperatorSearchForModule (U32BIT module)
 Called by the app to start an operator profile search for the given module. More...
 
BOOLEAN ACI_AcquireCISlot (U8BIT path, void *s_ptr)
 Acquires a CI slot for the given path on the given service after releasing any slot already being used by the path. More...
 
BOOLEAN ACI_AcquireCISlotForRecording (U8BIT path, void *s_ptr)
 Acquires a CI slot for the recording path. This function may need to "steal" the CI slot from the live path (if they are not the same path). More...
 
U8BIT ACI_FindCISlotForService (void *serv_ptr)
 Looks for a CAM that's able to descramble the given service and returns its slot id. More...
 
S32BIT ACI_ReadPinForSlot (U8BIT slot_id)
 Checks if a pin has been saved for the CAM in the given slot and returns it. More...
 
BOOLEAN ACI_WritePinForSlot (U8BIT slot_id, S32BIT pin)
 Saves the given pin associated with the CAM in the given slot. If the pin for this CAM has previously been saved then the saved value will be updated. If all entries are used then the oldest will be overwritten. More...
 
BOOLEAN ACI_SendPinToCam (U8BIT slot_id, U32BIT pin)
 Converts the pin value to ASCII and sends it to the CAM An STB_EVENT_CI_PIN_STATUS event will be sent to notify the validity, or otherwise, of the pin. More...
 
void ACI_RegisterStartTuneNotifyCallback (F_NotifyStartTuning cb_func)
 Register callback function to notify start of tuning process due to CI tune request. More...
 

Detailed Description

Application level CI control functions.

Date
February 2011
Author
Ocean Blue

Definition in file ap_ci.h.

Typedef Documentation

◆ F_NotifyStartTuning

typedef void(* F_NotifyStartTuning) (U32BIT module, U16BIT onet_id, U16BIT trans_id, U16BIT serv_id, E_CIP_TUNE_FLAGS flags)

Notify that DVB is about to tune to service or transport stream. This function would be called as a result of STB_CITuneBroadcastRequest(), STB_CITuneLCNRequest(), STB_CITuneTripletRequest(), or STB_CITuneIPRequest() but before tuning occurs.

Parameters
onet_idoriginal network id
trans_idtransport id
serv_idservice id
tuneflags Presentation engine tuning flags (Quiet tune / Keep app running)
Returns
n/a

Definition at line 64 of file ap_ci.h.

Function Documentation

◆ ACI_AcquireCISlot()

BOOLEAN ACI_AcquireCISlot ( U8BIT  path,
void *  s_ptr 
)

Acquires a CI slot for the given path on the given service after releasing any slot already being used by the path.

Parameters
pathdecode path
s_ptrservice to be used on the path
Returns
TRUE if a slot is acquired, FALSE otherwise

Definition at line 1433 of file ap_ci.c.

◆ ACI_AcquireCISlotForRecording()

BOOLEAN ACI_AcquireCISlotForRecording ( U8BIT  path,
void *  s_ptr 
)

Acquires a CI slot for the recording path. This function may need to "steal" the CI slot from the live path (if they are not the same path).

Parameters
pathdecode path for recording
s_ptrservice to be used on the path
pathdecode path for recording
s_ptrservice to be used on the path
Returns
TRUE if a slot is acquired, FALSE otherwise

Definition at line 1515 of file ap_ci.c.

◆ ACI_FindCISlotForService()

U8BIT ACI_FindCISlotForService ( void *  serv_ptr)

Looks for a CAM that's able to descramble the given service and returns its slot id.

Parameters
serv_ptrservice
Returns
slot id, if CAM is found, or INVALID_RES_ID if not

Definition at line 1578 of file ap_ci.c.

◆ ACI_GetCamUpgradeMode()

U8BIT ACI_GetCamUpgradeMode ( void  )

Return CAM upgrade option (Yes/No/Ask)

Returns
U8BIT the cams current upgrade mode

Definition at line 1009 of file ap_ci.c.

◆ ACI_GetFirstOperatorSearchModule()

BOOLEAN ACI_GetFirstOperatorSearchModule ( U32BIT *  module)

Checks all the CI+ profiles to see if any have requested an update search.

Parameters
modulepointer to return the handle of the first module requiring an update Only valid if the function returns TRUE
Returns
TRUE if a profile needs updating, FALSE otherwise

Definition at line 1138 of file ap_ci.c.

◆ ACI_GetFirstScheduledOperatorSearch()

BOOLEAN ACI_GetFirstScheduledOperatorSearch ( U32BIT *  module,
U16BIT *  date,
U8BIT *  hours,
U8BIT *  mins 
)

Checks all the CI+ profiles to find the one with the earliest scheduled search. All returned values are only valid if the function returns TRUE.

Parameters
modulepointer to return the handle of the first module requiring an update
datepointer to return the date code of the search
hourspointer to return the hour of the search
minspointer to return the minute of the search
Returns
TRUE if a scheduled search is found for a profile, FALSE otherwise

Definition at line 1181 of file ap_ci.c.

◆ ACI_GetOperatorSearchMode()

E_CIP_START_OPERATOR_SEARCH ACI_GetOperatorSearchMode ( void  )

Return the option for starting an operator profile search (yes/no/ask)

Returns
The current setting

Definition at line 1031 of file ap_ci.c.

◆ ACI_GetOperatorSearchModule()

U32BIT ACI_GetOperatorSearchModule ( void  )

Returns the module performing or requiring and operator search.

Returns
module

Definition at line 1125 of file ap_ci.c.

◆ ACI_IsOperatorSearchRequired()

BOOLEAN ACI_IsOperatorSearchRequired ( void  )

Returns whether an operator profile search has been requested.

Returns
TRUE if a search has been requested, FALSE otherwise

Definition at line 1114 of file ap_ci.c.

◆ ACI_OperatorSearchRequired()

void ACI_OperatorSearchRequired ( U32BIT  module,
BOOLEAN  required 
)

Sets whether an operator profile search needs to be run.

Parameters
modulemodule requesting or cancelling an operator search
requiredTRUE if a search is required, FALSE otherwise

Definition at line 1056 of file ap_ci.c.

◆ ACI_ReadPinForSlot()

S32BIT ACI_ReadPinForSlot ( U8BIT  slot_id)

Checks if a pin has been saved for the CAM in the given slot and returns it.

Parameters
slot_idCI slot
Returns
pin value, or -1 if there's no CAM in the slot or no pin has been saved

Definition at line 1714 of file ap_ci.c.

◆ ACI_RegisterStartTuneNotifyCallback()

void ACI_RegisterStartTuneNotifyCallback ( F_NotifyStartTuning  cb_func)

Register callback function to notify start of tuning process due to CI tune request.

Parameters
cb_funcCallback function - NULL disables the call.

Definition at line 2353 of file ap_ci.c.

◆ ACI_ScheduleOperatorSearch()

void ACI_ScheduleOperatorSearch ( U32BIT  cicam_id,
U16BIT  date,
U8BIT  hour,
U8BIT  min 
)

Sets the date/time that an operator search should be started for the given module.

Parameters
cicam_idID of the CICAM requesting an operator search
dateUTC MJD date code
hourUTC hour
minUTC minute

Definition at line 1088 of file ap_ci.c.

◆ ACI_SendPinToCam()

BOOLEAN ACI_SendPinToCam ( U8BIT  slot_id,
U32BIT  pin 
)

Converts the pin value to ASCII and sends it to the CAM An STB_EVENT_CI_PIN_STATUS event will be sent to notify the validity, or otherwise, of the pin.

Parameters
slot_id- slot Id
pin- pin value
Returns
TRUE if the pin was sent, FALSE otherwise

Definition at line 2301 of file ap_ci.c.

◆ ACI_SetCamUpgradeMode()

void ACI_SetCamUpgradeMode ( U8BIT  upgrade_mode)

Sets the CAM upgrade option (Yes/No/Ask)

Parameters
upgrade_modecam upgrade mode

Definition at line 1020 of file ap_ci.c.

◆ ACI_SetOperatorSearchMode()

void ACI_SetOperatorSearchMode ( E_CIP_START_OPERATOR_SEARCH  search_mode)

Sets the operator profile search mode (Yes/No/Ask). This should be used by the app to control whether a search can be started, or the user should be asked first, or can't run.

Parameters
search_modesearch mode

Definition at line 1044 of file ap_ci.c.

◆ ACI_StartOperatorSearchForModule()

BOOLEAN ACI_StartOperatorSearchForModule ( U32BIT  module)

Called by the app to start an operator profile search for the given module.

Parameters
moduleoperator module
Returns
TRUE if the search is started, FALSE otherwise

Definition at line 1244 of file ap_ci.c.

◆ ACI_WritePinForSlot()

BOOLEAN ACI_WritePinForSlot ( U8BIT  slot_id,
S32BIT  pin 
)

Saves the given pin associated with the CAM in the given slot. If the pin for this CAM has previously been saved then the saved value will be updated. If all entries are used then the oldest will be overwritten.

Parameters
slot_idCI slot
pinpin value to be saved
Returns
TRUE on success, FALSE otherwise

Definition at line 1810 of file ap_ci.c.