WE310F5  39.00.000
m2mb_os_ev.h
Go to the documentation of this file.
1 /* $version: 301934 */
2 /*===============================================================================================*/
3 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
28 #ifndef M2MB_OS_EV_H
29 #define M2MB_OS_EV_H
30 
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
45 /*-----------------------------------------------------------------------------------------------*/
46 
51 /*-----------------------------------------------------------------------------------------------*/
52 
53 
54 /* GLOBAL DECLARATIONS ----------------------------------------------------------- */
55 #define M2MB_OS_EV_INVALID 0
56 #define M2MB_OS_EV_INVALID_ATTR 0
57 
58 
59 
60 /* Global declarations ==========================================================================*/
61 /*-----------------------------------------------------------------------------------------------
62 
63  can be called directly without specify CMDS_ARGS
64  osRes = m2mb_os_ev_setAttrItem_( &evAttrHandle,
65  M2MB_OS_EV_SEL_CMD_CREATE_ATTR, NULL,
66  M2MB_OS_EV_SEL_CMD_NAME, "event_1",
67  M2MB_OS_EV_SEL_CMD_USRNAME, "myevent1"
68  );
69  -----------------------------------------------------------------------------------------------*/
70 #define m2mb_os_ev_setAttrItem_( h, args,... ) m2mb_os_ev_setAttrItem( h, CMDS_ARGS( args ) )
71 
72 /* Global typedefs --------------------------------------------------------------- */
73 
74 typedef enum
75 {
78  /* use as Os name , can be used during creation */
80  /* if set, usr name could be different from Os used in creation */
82  /* number of task suspended on this resource */
84  /* first task (M2MB_OS_TASK_HANDLE) to be served when its required resources will be available */
86  /* to get the status of current bits event */
88 
89  /* ---- */
93 
94 /* options for setting event bits: set or clear specified ones */
95 typedef enum
96 {
99 
100  /* ---- */
104 
105 /* options for getting event bits: get all selected (and clear) or get any of selected (and clear matches) */
106 typedef enum
107 {
108  /* get the event if any of the selected event bits are set ...*/
110  /* ... then clear all the set bit in selected event bits */
112  /* get the event if all the selected event bits are set ...*/
114  /* ... then clear all the set bit in selected event bits */
116 
117  /* ---- */
121 
122 typedef struct M2MB_OS_EV_HANDLE_TAG *M2MB_OS_EV_HANDLE;
123 typedef struct M2MB_OS_EV_ATTR_HANDLE_TAG *M2MB_OS_EV_ATTR_HANDLE;
124 
125 
126 /* Global functions =============================================================================*/
127 
128 /*-----------------------------------------------------------------------------------------------*/
190 /*-----------------------------------------------------------------------------------------------*/
192 
193 /*-----------------------------------------------------------------------------------------------*/
230 /*-----------------------------------------------------------------------------------------------*/
232 
233 /*-----------------------------------------------------------------------------------------------*/
284 /*-----------------------------------------------------------------------------------------------*/
286  M2MB_OS_EV_HANDLE evHandle,
287  UINT32 evBits,
288  M2MB_OS_EV_SET_OPT_E optSet
289 );
290 
291 /*-----------------------------------------------------------------------------------------------*/
362 /*-----------------------------------------------------------------------------------------------*/
364  M2MB_OS_EV_HANDLE evHandle,
365  UINT32 reqEvBits,
366  M2MB_OS_EV_GET_OPT_E optGet,
367  UINT32 *pCurEvBits,
368  UINT32 timeout
369 );
370 
371 /*-----------------------------------------------------------------------------------------------*/
445 /*-----------------------------------------------------------------------------------------------*/
447 
448 /*-----------------------------------------------------------------------------------------------*/
526 /*-----------------------------------------------------------------------------------------------*/
528  M2MB_OS_EV_HANDLE evHandle,
529  M2MB_OS_EV_SEL_CMD_E selCmd,
530  MEM_W *pOut,
531  void *pIn
532 );
533 
534 /*-----------------------------------------------------------------------------------------------*/
574 /*-----------------------------------------------------------------------------------------------*/
576  M2MB_OS_EV_HANDLE evHandle,
577  M2MB_OS_EV_SEL_CMD_E selCmd,
578  void *pIn
579 );
580 
581 
582 #ifdef __cplusplus
583 }
584 #endif
585 
586 #endif /* M2MB_OS_EV_H */
#define ENUM_TO_INT(Prefix)
Definition: m2mb_types.h:207
M2MB_OS_EV_SET_OPT_E
Definition: m2mb_os_ev.h:95
M2MB_OS_EV_GET_OPT_E
Definition: m2mb_os_ev.h:106
unsigned char UINT8
Definition: m2mb_types.h:86
struct M2MB_OS_EV_HANDLE_TAG * M2MB_OS_EV_HANDLE
Definition: m2mb_os_ev.h:122
M2MB_OS_RESULT_E m2mb_os_ev_setAttrItem(M2MB_OS_EV_ATTR_HANDLE *pEvAttr, UINT8 nCmds,...)
Set specific attribute for event init or creation.
M2MB_OS_RESULT_E m2mb_os_ev_setItem(M2MB_OS_EV_HANDLE evHandle, M2MB_OS_EV_SEL_CMD_E selCmd, void *pIn)
Set specific properties of the event.
M2MB_OS_RESULT_E m2mb_os_ev_set(M2MB_OS_EV_HANDLE evHandle, UINT32 evBits, M2MB_OS_EV_SET_OPT_E optSet)
Set bits of event in a specified event.
M2MB_OS_RESULT_E m2mb_os_ev_get(M2MB_OS_EV_HANDLE evHandle, UINT32 reqEvBits, M2MB_OS_EV_GET_OPT_E optGet, UINT32 *pCurEvBits, UINT32 timeout)
Get an application event.
M2MB_OS_RESULT_E m2mb_os_ev_getItem(M2MB_OS_EV_HANDLE evHandle, M2MB_OS_EV_SEL_CMD_E selCmd, MEM_W *pOut, void *pIn)
Get specific properties of the event.
enum M2MB_OS_RESULT M2MB_OS_RESULT_E
M2MB_OS_RESULT_E m2mb_os_ev_deinit(M2MB_OS_EV_HANDLE eveHandle)
Application Event deinit or deletion.
unsigned long int UINT32
Definition: m2mb_types.h:88
UINT32 MEM_W
Definition: m2mb_types.h:94
struct M2MB_OS_EV_ATTR_HANDLE_TAG * M2MB_OS_EV_ATTR_HANDLE
Definition: m2mb_os_ev.h:123
M2MB_OS_EV_SEL_CMD_E
Definition: m2mb_os_ev.h:74
M2MB_OS_RESULT_E m2mb_os_ev_init(M2MB_OS_EV_HANDLE *pEvHandle, M2MB_OS_EV_ATTR_HANDLE *pEvAttr)
Application Event Set Creation.