MHEG5  18.9.0
MHEG5 Documentation
glue_queue.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2011 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 _GLUE_QUEUE_H
26 #define _GLUE_QUEUE_H
27 
28 #include "mherrors.h"
29 #include "dvb_misc.h"
30 #include "mheg5_control.h"
31 #include "mheg5_keypress.h"
32 #include "dvbevents.h"
33 #include "dmxtype.h"
34 #include "dvblocator.h"
35 #include "fs_types.h"
36 #include "dtvstring.h"
37 #ifndef CI_PLUS_ONLY
38 #include "dsm_types.h"
39 #endif
40 #include "mh5queue.h"
41 #include "glue_type.h"
42 
43 typedef void (*F_QueueNotify)( void );
44 
45 typedef enum
46 {
52 } E_PRIORITY;
53 
54 typedef enum
55 {
63 } E_DATA_TYPE;
64 
70 typedef void (*F_MSG_PROCESS)( void *data );
71 
72 /* MHEG5StartEvent parameters. */
73 typedef struct s_StartDsmApp
74 {
77 
78 typedef struct s_keypressevent
79 {
82 
83 #ifndef CI_PLUS_ONLY
84 typedef struct s_DsmccEvent
85 {
87  H_ObjCarousel hCarousel;
88 } S_DsmccEvent;
89 
90 typedef struct s_StreamEvent
91 {
95 #endif
97 typedef struct s_CiStart
98 {
101 } S_CiStart;
102 
103 typedef struct s_CiStop
104 {
107 } S_CiStop;
108 
109 /* MHEG5StopEvent parameters. */
111 {
114 
115 /* MHEG5ResetScreenEvent params */
117 {
122 
123 /* MHEG5TimerEvent parameters. */
125 {
127  void *callerRef;
128  void *timerHandle;
130 
131 typedef struct s_fileAck
132 {
136 
137 /* MHEG5CiFileAcknowledgeEvent parameters. */
139 {
140  /* structure is same format as S_CONTENT */
147 
148 #ifdef INCLUDE_IC
149 /* MHEG5HttpResponseEvent parameters. */
150 typedef struct MHEG5HttpResponseEventParams_tag
151 {
152  U32BIT len;
153  U8BIT *data;
154  U32BIT requestId;
155  U32BIT status;
156  U32BIT code;
157  U8BIT requestType;
158 } MHEG5HttpResponseEventParams_t;
159 
160 #ifdef INCLUDE_ICS
161 /* MHEG5StreamerEvent parameters. */
162 typedef struct MHEG5StreamerEventParams_tag
163 {
164  U32BIT requestId;
165  U32BIT eventType;
166  U32BIT status;
167  U32BIT code;
168  S32BIT triggerId;
169 } MHEG5StreamerEventParams_t;
170 #endif /* INCLUDE_ICS */
171 
172 #endif /* INCLUDE_IC */
173 
175 {
181 
182 typedef struct s_dvpeventtype
183 {
187 
188 #ifdef SURFACE_THRESHOLD
189 typedef struct MHEG5SurfaceThresholdEventParams_tag
190 {
191  S32BIT pixels;
192 } MHEG5SurfaceThresholdEventParams_t;
193 #endif
194 
195 /* Event parameters. */
196 typedef struct s_mhg_message
197 {
200  union
201  {
214  #ifndef CI_PLUS_ONLY
217  #endif
218  #ifdef INCLUDE_IC
219  MHEG5HttpResponseEventParams_t httpResponse;
220  #ifdef INCLUDE_ICS
221  MHEG5StreamerEventParams_t streamer;
222  #endif /* INCLUDE_ICS */
223  #endif /* INCLUDE_IC */
225  #ifdef INCLUDE_FREESAT
226  MHEG5FsStorageParams_t fsStorage;
227  #endif
228  #ifdef SURFACE_THRESHOLD
229  MHEG5SurfaceThresholdEventParams_t surfaceThreshold;
230  #endif
231  } data;
233 
243 E_MhegErr VQ_Open( S_MhegConfig *cfg_params );
244 
245 
251 void VQ_Close(void);
252 
263 E_MhegErr VQ_PutMsg( S_MhegMessage *pMsg, E_PRIORITY priority );
264 
265 
274 E_MhegErr VQ_GetMsg( S_MhegMessage *pElem );
275 
282 U16BIT VQ_GetSizeFree( E_PRIORITY priority );
283 
289 
295 void* VQ_RegisterNotify( F_QueueNotify normal_rcvd, F_QueueNotify critical_rcvd,
296  F_QueueNotify critical_done );
297 
302 void VQ_UnRegisterNotify( void *qn );
303 
304 #endif /*_GLUE_QUEUE_H*/
struct MHEG5CiFileAcknowledgeEventParams_tag MHEG5CiFileAcknowledgeEventParams_t
E_DATA_TYPE
Definition: glue_queue.h:54
E_MhegErr VQ_PutMsg(S_MhegMessage *pMsg, E_PRIORITY priority)
Post event or section message on queue. Copies data into queue.
Definition: glue_queue.c:248
struct MHEG5FsStorageParams_tag MHEG5FsStorageParams_t
F_MSG_PROCESS proc_msg_func
Definition: glue_queue.h:198
U32BIT module_id
Definition: glue_queue.h:105
E_DvbEvent
Definition: dvbevents.h:33
Define MHEG5 String type.
H_ObjCarousel hCarousel
Definition: glue_queue.h:87
U8BIT * name
Definition: glue_queue.h:93
const char * data
Definition: mh5gate.c:56
U16BIT VQ_GetSizeFree(E_PRIORITY priority)
Get size available on a queue.
Definition: glue_queue.c:434
void(* F_DESTROY)(FS_HANDLE fs_handle)
Definition: fs_types.h:47
struct s_mhg_message S_MhegMessage
struct MHEG5TimerEventParams_tag MHEG5TimerEventParams_t
Define Demux type.
void(* F_QueueNotify)(void)
Definition: glue_queue.h:43
BOOLEAN VQ_EventNeedsProcessing(void)
Check whether any events on component queues needs processing.
Definition: glue_queue.c:457
U_PARAM unique
Definition: glue_queue.h:92
struct s_dvpeventtype S_DvpEventType
S_CiStop ciStop
Definition: glue_queue.h:205
struct MHEG5ResetResolutionParams_tag MHEG5ResetResolutionParams_t
MHEG5CiFileAcknowledgeEventParams_t ciFileAcknowledge
Definition: glue_queue.h:213
E_MhegErr
Definition: mherrors.h:28
struct s_mhg_message MHEG5eventMessage_t
E_MHEG5_KEY
void * FS_HANDLE
Definition: fs_types.h:46
S_KeyPressEvent keypress
Definition: glue_queue.h:207
MHEG5 engine interface error codes.
void(* F_MSG_PROCESS)(void *data)
Function to Process voyager message.
Definition: glue_queue.h:70
U32BIT id
Definition: glue_queue.h:86
uint8_t U8BIT
Definition: techtype.h:82
S_StartDsmApp start
Definition: glue_queue.h:209
S_CiStart ciStart
Definition: glue_queue.h:204
E_FsStatus status
Definition: glue_queue.h:134
struct s_StreamEvent S_StreamEvent
File System types.
Type definitions for glue module.
void VQ_Close(void)
Close component control and section queue component. Destroys all allocated memory and resources for ...
Definition: glue_queue.c:140
S_STRING string
Definition: glue_queue.h:203
This file provides the control interface for MHEG5 engine. The use of this component MUST comply with...
struct s_CiStop S_CiStop
void * VQ_RegisterNotify(F_QueueNotify normal_rcvd, F_QueueNotify critical_rcvd, F_QueueNotify critical_done)
Definition: glue_queue.c:507
S_CONTENT content
Definition: glue_queue.h:133
struct s_CiStart S_CiStart
S_StreamEvent streamEvent
Definition: glue_queue.h:216
MHEG5ResetResolutionParams_t resetRes
Definition: glue_queue.h:224
struct MHEG5StopEventParams_tag MHEG5StopEventParams_t
S32BIT serviceIndex
Definition: glue_queue.h:75
E_MHEG5_KEY key
Definition: glue_queue.h:80
E_ENGINE_EVENT engineEvent
Definition: glue_queue.h:210
struct s_fileAck S_FileSystemAck
int len
Definition: mh5gate.c:57
E_DvbEvent eType
Definition: glue_queue.h:184
MHEG5TimerEventParams_t timer
Definition: glue_queue.h:212
int32_t S32BIT
Definition: techtype.h:87
E_DATA_TYPE data_type
Definition: glue_queue.h:199
struct s_keypressevent S_KeyPressEvent
uint16_t U16BIT
Definition: techtype.h:84
E_MhegErr VQ_GetMsg(S_MhegMessage *pElem)
Get an event or section from the component queues. This is a blocking function.
Definition: glue_queue.c:341
S_CONTENT content
Definition: glue_queue.h:202
E_MhegErr VQ_Open(S_MhegConfig *cfg_params)
Initialise component control and section queues. Allocates memory for, sets up and creates event (com...
Definition: glue_queue.c:96
struct s_DsmccEvent S_DsmccEvent
S_DvpEventType dvpEvent
Definition: glue_queue.h:206
Key press interface with MHEG5 engine.
U32BIT module_id
Definition: glue_queue.h:100
S_FileSystemAck fsAck
Definition: glue_queue.h:208
Definition of DVB locator and DVB component types.
U8BIT BOOLEAN
Definition: techtype.h:99
void VQ_UnRegisterNotify(void *qn)
Definition: glue_queue.c:530
struct s_StartDsmApp S_StartDsmApp
Definition of events sent to MHEG5 engine.
E_PRIORITY
Definition: glue_queue.h:45
S_DsmccEvent dsmEvent
Definition: glue_queue.h:215
References: [1] UK1 Profile - Digital Terrestrial Television - Requirements for interoperability (The...
U8BIT code
Definition: glue_queue.h:106
S_STRING name
Definition: glue_queue.h:99
uint32_t U32BIT
Definition: techtype.h:86
E_FsStatus
Definition: fs_types.h:34
E_ENGINE_EVENT
Definition: mh5queue.h:43
MHEG5StopEventParams_t stop
Definition: glue_queue.h:211