sipxportlib  Version 3.3
OsTimerMsg.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005-2007 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2004-2007 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // Copyright (C) 2004-2007 Pingtel Corp.
9 // Licensed to SIPfoundry under a Contributor Agreement.
10 //
11 // $$
13 
14 
15 #ifndef _OsTimerMsg_h_
16 #define _OsTimerMsg_h_
17 
18 // SYSTEM INCLUDES
19 
20 // APPLICATION INCLUDES
21 #include "os/OsDefs.h"
22 #include "os/OsRpcMsg.h"
23 
24 // DEFINES
25 // MACROS
26 // EXTERNAL FUNCTIONS
27 // EXTERNAL VARIABLES
28 // CONSTANTS
29 // STRUCTS
30 // TYPEDEFS
31 
32 // FORWARD DECLARATIONS
33 class OsTimer;
34 
35 //:Messages used to request timer services
36 
37 class OsTimerMsg : public OsRpcMsg
38 {
39 /* //////////////////////////// PUBLIC //////////////////////////////////// */
40 public:
41 
43  {
52  };
53 
54 /* ============================ CREATORS ================================== */
55 
56  OsTimerMsg(const unsigned char subType,
57  OsTimer* pTimer,
58  OsEvent* pEvent);
59  //:Constructor
60 
61  OsTimerMsg(const OsTimerMsg& rOsTimerMsg);
62  //:Copy constructor
63 
64  virtual OsMsg* createCopy(void) const;
65  //:Create a copy of this msg object (which may be of a derived type)
66 
67  virtual
68  ~OsTimerMsg();
69  //:Destructor
70 
71 /* ============================ MANIPULATORS ============================== */
72 
73  OsTimerMsg& operator=(const OsTimerMsg& rhs);
74  //:Assignment operator
75 
76 /* ============================ ACCESSORS ================================= */
77 
78  virtual int getMsgSize(void) const;
79  //:Return the size of the message in bytes
80  // This is a virtual method so that it will return the accurate size for
81  // the message object even if that object has been upcast to the type of
82  // an ancestor class.
83 
85  inline OsTimer* getTimerP(void) const
86  {
87  return mpTimer;
88  }
89 
91  inline OsEvent* getEventP(void) const
92  {
93  return OsRpcMsg::getEvent();
94  }
95 
96 /* ============================ INQUIRY =================================== */
97 
98 /* //////////////////////////// PROTECTED ///////////////////////////////// */
99 protected:
100 
101 /* //////////////////////////// PRIVATE /////////////////////////////////// */
102 private:
103 
104  OsTimer* mpTimer;
105 
106  void init(void);
107  //:Initialization common to all constructors
108 
109 };
110 
111 /* ============================ INLINE METHODS ============================ */
112 
113 #endif // _OsTimerMsg_h_
virtual int getMsgSize(void) const
Definition: OsTimerMsg.cpp:78
OsTimer * getTimerP(void) const
Return the (pointer to the OsTimer object) in this message.
Definition: OsTimerMsg.h:85
update the status of the timer
Definition: OsTimerMsg.h:44
OsTimerMsg(const unsigned char subType, OsTimer *pTimer, OsEvent *pEvent)
Definition: OsTimerMsg.cpp:28
Definition: OsTimerMsg.h:48
shut down the timer task */
Definition: OsTimerMsg.h:51
Definition: OsTimerMsg.h:45
OsEvent * getEventP(void) const
Return the (pointer to the OsEvent object) in this message.
Definition: OsTimerMsg.h:91
virtual OsEvent * getEvent(void) const
Definition: OsRpcMsg.cpp:84
virtual ~OsTimerMsg()
Definition: OsTimerMsg.cpp:51
MsgSubType
Definition: OsTimerMsg.h:42
Events are used to synchronize a task with an ISR or between two tasks.
Definition: OsEvent.h:70
virtual OsMsg * createCopy(void) const
Definition: OsTimerMsg.cpp:45
Definition: OsRpcMsg.h:42
Definition: OsTimer.h:105
Definition: OsMsg.h:36
OsTimerMsg & operator=(const OsTimerMsg &rhs)
Definition: OsTimerMsg.cpp:60
Definition: OsTimerMsg.h:37