DSMCC  17.9.0
 All Data Structures Files Functions Typedefs
dsm_control.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2013 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
25 #ifndef _DSMAPI_H
26 #define _DSMAPI_H
27 
28 #include "siqfuncs.h"
29 #include "dmxtypes.h"
30 #include "dsm_types.h"
31 #include "stdfuncs.h"
32 
33 /*---Constant and macro definitions for public use-----------------------------*/
34 
35 /* Macro for API backward compatibiliy */
36 #define obtainSiDirect controlFlags
37 
38 /* Following flags to be use in 'controlFlags' */
39 /* Set GET_PMT_DIRECT_FROM_HW_FLAG when DSMCC should get PMT data from hardware,
40  * rather than notifications from DVB stack using STB_SIRegisterPmtObserver */
41 #define GET_PMT_DIRECT_FROM_HW_FLAG (1 << 0)
42 
43 /* Set DISABLE_AUTO_CACHING_FLAG when DSMCC should not automaticaaly download
44  * and cache data blocks of DSMCC modules */
45 #define DISABLE_AUTO_CACHING_FLAG (2 << 0)
46 
47 /*---Enumerations for public use-----------------------------------------------*/
48 
49 /*---Global type defs for public use-------------------------------------------*/
50 
51 
52 typedef void (*F_CarouselLoad)( H_ObjCarousel hOC, E_OCLoadStatus result, U32BIT carouselId );
53 
54 
55 typedef struct s_DsmccConfig
56 {
57  /* DSMCC task priority value - passed to STB_OSCreateTask
58  * The specified task priority value is used by the DSMCC task
59  */
60  U32BIT taskPriority;
61 
62  /* Size of internal section buffers memory pool in 4096 byte blocks. This is
63  * used to provide data directly to DSM-CC instance. The task priority has a
64  * direct influence over section buffer size. Lower task priority means larger
65  * buffer pool requirements.
66  * Minimum value: 100 (400 Kbytes)
67  * Recommended: 200
68  */
69  U8BIT sectionBuffPoolSize;
70 
71  /* Size of section buffer manager cache in 64K byte blocks. This is separate
72  * to sectionBuffPoolSize and this memory is used to store section data not
73  * immediately required by DSM-CC instance. This facilitates faster DSM-CC file
74  * loading - particularly when the number of hardware section filters is limited.
75  * Minimum value: 0
76  * Suggested value: 16
77  */
78  U8BIT sectionBuffCacheSize;
79 
80  /* It is manditory to set memAlloc and memFree */
81  F_MemAlloc memAlloc;
82  F_MemFree memFree;
83 
84  /* parsePmtDone is optional and may be set to NULL */
85  F_PmtParseInit parsePmtInit;
86 
87  /* It is manditory to set at least one of the following
88  * either parseDataBroadcastId or parseSsuSelectorBytes */
89  F_ParseDataBcastId parseDataBroadcastId;
90  F_ParseSsuSelectorBytes parseSsuSelectorBytes;
91 
92  /* parsePmtDone is optional and may be set to NULL */
93  F_PmtParseDone parsePmtDone;
94 
95  /* It is manditory to set either 'carouselLoad' or the four functions in 'F_SsuConfig' */
96  F_CarouselLoad carouselLoad;
97  S_SsuConfig ssuFuncs;
98 
99  /* notifyAitInfo is optional and may be set to NULL */
100  F_NotifyAitInfo notifyAitInfo;
101 
102  U32BIT controlFlags;
103 } S_DsmccConfig;
104 
105 
106 /*---Global Function prototypes for public use---------------------------------*/
107 
113 H_DsmControl DSMCC_Open( S_DsmccConfig *config );
114 
120 void DSMCC_Close( H_DsmControl instance );
121 
144 BOOLEAN DSMCC_Start( H_DsmControl instance, S_DvbLocator *locator,
145  U32BIT boot_carousel_id, DMXREF dmxref );
146 
156 void DSMCC_SetTunedTransportInfo( H_DsmControl instance, U16BIT onet_id,
157  U16BIT tran_id, DMXREF dmxref );
158 
180 BOOLEAN DSMCC_StartFs( H_DsmControl instance, U16BIT service_id, U32BIT carousel_id );
181 
191 BOOLEAN DSMCC_StartSsu( H_DsmControl instance, U16BIT service_id, U32BIT oui );
192 
202 BOOLEAN DSMCC_StartSsuWithPid( H_DsmControl instance, U16BIT pid, U32BIT oui );
203 
210 void DSMCC_Stop( H_DsmControl instance, E_DsmRstMode mode );
211 
218 void DSMCC_Reboot( H_DsmControl instance );
219 
225 H_ObjCarousel DSMCC_CurrentCarousel( H_DsmControl dsmctrl );
226 
232 U32BIT DSMCC_CurrentCarouselId( H_DsmControl dsmctrl );
233 
241 BOOLEAN DSMCC_SetCurrentCarousel(H_DsmControl dsmctrl, H_ObjCarousel hOC);
242 
250 void DSMCC_UnloadCarousel(H_DsmControl dsmctrl, H_ObjCarousel hOC, E_DsmRstMode mode);
251 
258 void DSMCC_SiqCacheClearPmt( H_DsmControl dsmctrl, U16BIT serviceId );
259 
264 const char* DSMCC_VersionString(void);
265 
272 H_DsmControl DSMCC_FindInstance( U16BIT serviceId, DMXREF dmxref );
273 
284 void DSMCC_SetFileSystemCacheLimit( H_DsmControl dsmctrl, U32BIT cacheSize );
285 
294 void DSMCC_SsuUnloadModule( H_DsmControl dsmctrl, H_DsmCarousel hCarousel,
295  U32BIT moduleRef );
296 
297 
298 #endif /*_DSMAPI_H */
BOOLEAN DSMCC_StartSsu(H_DsmControl instance, U16BIT service_id, U32BIT oui)
Start DSM-CC controling instance. This must follow call to DSMCC_SetTunedTransportInfo. The function will start loading Update Carousel for SSU on specified service.
Definition: dsm_control.c:1731
const char * DSMCC_VersionString(void)
Returns version major.minor.patch as string.
Definition: dsm_control.c:2020
BOOLEAN DSMCC_Start(H_DsmControl instance, S_DvbLocator *locator, U32BIT boot_carousel_id, DMXREF dmxref)
The function is depreciated. It starts DSM-CC controlling instance, and will start search for a boot ...
Definition: dsm_control.c:1636
BOOLEAN DSMCC_StartFs(H_DsmControl instance, U16BIT service_id, U32BIT carousel_id)
Start DSM-CC controlling instance. This must follow call to DSMCC_SetTunedTransportInfo. The function will start search for an Object Carousel on the specified service. The search depends on the value given 'carousel_id' parameter. When carousel id is set to INVALID_CAROUSEL_ID, DSM-CC will attempt to start on a carousel which the client recognises in callback function 'parseDataBroadcastId'. Even when the PMT does not contain a recognised data broadcast id, this function will return TRUE, and the DSM-CC will keep searching. When the carousel id is set to a specific value or UNKNOWN_CAROUSEL_ID and a carousel of the required ID is not present, either this function will return FALSE or 'carouselLoad' callback will be passed a result of OC_LOAD_ABORTED_ERROR. When carousel id is set to UNKNOWN_CAROUSEL_ID, DSM-CC will attempt to start on whatever carousel is signalled in PMT for that service.
Definition: dsm_control.c:1688
H_ObjCarousel DSMCC_CurrentCarousel(H_DsmControl dsmctrl)
Get currently loaded carousel handle.
Definition: dsm_control.c:1887
BOOLEAN(* F_ParseSsuSelectorBytes)(U8BIT *selPtr, U8BIT selLen)
Parse "Selector Bytes" contained in "System Software Update Info" of PMT's data broadcast Id decr...
Definition: siqfuncs.h:80
void DSMCC_Stop(H_DsmControl instance, E_DsmRstMode mode)
Stop DSM-CC controling instance. Causes all carousels to unload.
Definition: dsm_control.c:1783
void DSMCC_Close(H_DsmControl instance)
Close DSM-CC controling instance, and destroy all resources.
Definition: dsm_control.c:1580
Define Demux types use in section filter API.
void DSMCC_SetTunedTransportInfo(H_DsmControl instance, U16BIT onet_id, U16BIT tran_id, DMXREF dmxref)
Inform DSMCC instance of the tuned transport details. This must be called before calling DSMCC_StartF...
Definition: dsm_control.c:1653
U32BIT(* F_ParseDataBcastId)(H_PmtRef pmtref, U32BIT carouselId, U8BIT *dbcPtr, U8BIT dbcLen)
Parse data broadcast id descriptor for recognised application(s) SIQ wants to know whether this PMT s...
Definition: siqfuncs.h:58
H_DsmControl DSMCC_Open(S_DsmccConfig *config)
Open DSM-CC and create controling instance.
Definition: dsm_control.c:1507
H_PmtRef(* F_PmtParseInit)(U16BIT serviceId)
Inform the DSM-CC client that parsing of PMT data is about to start The return value is passed to sub...
Definition: siqfuncs.h:37
void DSMCC_Reboot(H_DsmControl instance)
Reboot DSM-CC controling instance. Causes all carousels to unload and initiate search for boot carous...
Definition: dsm_control.c:1833
U32BIT DSMCC_CurrentCarouselId(H_DsmControl dsmctrl)
Get currently loaded carousel ID.
Definition: dsm_control.c:1901
DSM-CC types used for client control.
void DSMCC_SsuUnloadModule(H_DsmControl dsmctrl, H_DsmCarousel hCarousel, U32BIT moduleRef)
Unload SSU module. This is intended to be called once the client has finished saving the data for thi...
Definition: dsm_control.c:1970
void(* F_NotifyAitInfo)(U16BIT serviceId, U16BIT appType, U16BIT pid, U8BIT version)
Callback to inform of first or changed AIT info in PMT.
Definition: siqfuncs.h:90
void(* F_PmtParseDone)(H_PmtRef pmtref)
Inform the DSM-CC client that parsing of PMT data has completed.
Definition: siqfuncs.h:67
BOOLEAN DSMCC_StartSsuWithPid(H_DsmControl instance, U16BIT pid, U32BIT oui)
Start DSM-CC controling instance. This must follow call to DSMCC_SetTunedTransportInfo. The function will start loading Update Carousel for SSU on a single specified PID.
Definition: dsm_control.c:1761
H_DsmControl DSMCC_FindInstance(U16BIT serviceId, DMXREF dmxref)
Find DSMCC instance that has beed started on specified service.
Definition: dsm_control.c:2031
void DSMCC_SiqCacheClearPmt(H_DsmControl dsmctrl, U16BIT serviceId)
Clear cached PMT for particular service.
Definition: dsm_control.c:2008
Service Information Query: external function prototypes.
void DSMCC_UnloadCarousel(H_DsmControl dsmctrl, H_ObjCarousel hOC, E_DsmRstMode mode)
Unload specified Carousel.
Definition: dsm_control.c:1945
BOOLEAN DSMCC_SetCurrentCarousel(H_DsmControl dsmctrl, H_ObjCarousel hOC)
Set current carousel. This does not unload any previously loaded carousels.
Definition: dsm_control.c:1920
Define standard function types.
void DSMCC_SetFileSystemCacheLimit(H_DsmControl dsmctrl, U32BIT cacheSize)
Set limit of DSMCC dynamic memory usage for file system caching This function overrides the default s...
Definition: dsm_control.c:1995