1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
|
<HTML>
<HEAD>
<TITLE>class SignallingEngine</TITLE>
<META NAME="Generator" CONTENT="KDOC ">
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
<TABLE WIDTH="100%" BORDER="0">
<TR>
<TD>
<TABLE BORDER="0">
<TR><TD valign="top" align="left" cellspacing="10">
<h1>class SignallingEngine</h1>
</TD>
<TD valign="top" align="right" colspan="1">Main signalling component holder. <small><A HREF="#longdesc">More...</A></small></TD></TR>
</TABLE>
<HR>
<TABLE BORDER="0">
<TR><TH>Full name</TH><TD><code><A HREF="TelEngine.html">TelEngine</A>::SignallingEngine</code></TD></TR>
<TR><TH>Definition</TH><TD><code>#include <<A HREF="libs___ysig___yatesig_h.html">libs/ysig/yatesig.h</A>></code></TD></TR>
<TR><TH>Inherits</TH><TD><A HREF="TelEngine__DebugEnabler.html">TelEngine::DebugEnabler</A> <small>[public ]</small>, <A HREF="TelEngine__Mutex.html">TelEngine::Mutex</A> <small>[public ]</small></TD></TR>
<TR><TH><A HREF="full-list-TelEngine__SignallingEngine.html">List of all Methods</A></TH></TR>
</TABLE>
</TD>
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
</TABLE></TD></TR></TABLE>
<h4>Public Methods</h4><ul><LI> <b><A HREF="#ref3">SignallingEngine</A></b> (const char* name = "signalling")
</LI>
<LI>virtual <b><A HREF="#ref4">~SignallingEngine</A></b> ()
</LI>
<LI>void <b><A HREF="#ref5">insert</A></b> (SignallingComponent* component)
</LI>
<LI>void <b><A HREF="#ref6">remove</A></b> (SignallingComponent* component)
</LI>
<LI>bool <b><A HREF="#ref7">remove</A></b> (const String& name)
</LI>
<LI>SignallingComponent* <b><A HREF="#ref8">find</A></b> (const String& name)
</LI>
<LI>SignallingComponent* <b><A HREF="#ref9">find</A></b> (const String& name, const String& type, const SignallingComponent* start = 0)
</LI>
<LI>SignallingComponent* <b><A HREF="#ref10">build</A></b> (const String& type, const NamedList& params, bool init = false)
</LI>
<LI>bool <b><A HREF="#ref11">control</A></b> (NamedList& params)
</LI>
<LI>bool <b><A HREF="#ref12">find</A></b> (const SignallingComponent* component)
</LI>
<LI>bool <b><A HREF="#ref13">start</A></b> (const char* name = "Sig Engine", Thread::Priority prio = Thread::Normal, unsigned long usec = 0)
</LI>
<LI>void <b><A HREF="#ref14">stop</A></b> ()
</LI>
<LI>Thread* <b><A HREF="#ref15">thread</A></b> () const
</LI>
<LI>unsigned long <b><A HREF="#ref16">tickSleep</A></b> (unsigned long usec = 1000000)
</LI>
<LI>inline unsigned long <b><A HREF="#ref17">tickDefault</A></b> () const
</LI>
</ul><h4>Public Static Methods</h4><ul><LI>static template <class Obj> inline void <b><A HREF="#ref18">destruct</A></b> (Obj*& obj)
</LI>
</ul><h4>Protected Methods</h4><ul><LI>virtual unsigned long <b><A HREF="#ref19">timerTick</A></b> (const Time& when)
</LI>
</ul><h4>Protected Members</h4><ul><LI>ObjList <b><A HREF="#ref20">m_components</A></b></LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
The engine is the center of all SS7 or ISDN applications.
It is used as a base to build the protocol stack from components.
</p>
<A NAME="SignallingEngine"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>SignallingEngine</strong> (const char* name = "signalling")
<br></td><td align="right"><h3><strong>SignallingEngine</strong></h3></td></tr></table><p></p><p>
Constructor of an empty engine
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">The debug name of this engine
</TD></TR>
</TABLE></P>
<A NAME="~SignallingEngine"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>~SignallingEngine</strong> ()
<br></td><td align="right"><h3><strong>~SignallingEngine</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
Destructor, removes all components
</p>
<A NAME="insert"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>insert</strong> (SignallingComponent* component)
<br></td><td align="right"><h3><strong>insert</strong></h3></td></tr></table><p></p><p>
Insert a component in the engine, lock the list while doing so
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>component</i></TD><TD align="left" valign="top">Pointer to component to insert in engine
</TD></TR>
</TABLE></P>
<A NAME="remove"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>remove</strong> (SignallingComponent* component)
<br></td><td align="right"><h3><strong>remove</strong></h3></td></tr></table><p></p><p>
Remove a component from the engine, lock the list while doing so
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>component</i></TD><TD align="left" valign="top">Pointer to component to remove from engine
</TD></TR>
</TABLE></P>
<A NAME="remove"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>remove</strong> (const String& name)
<br></td><td align="right"><h3><strong>remove</strong></h3></td></tr></table><p></p><p>
Remove and destroy a component from the engine by name
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Name of component to remove from engine
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if a component was found and destroyed
</p>
<A NAME="find"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td>SignallingComponent* <strong>find</strong> (const String& name)
<br></td><td align="right"><h3><strong>find</strong></h3></td></tr></table><p></p><p>
Retrive a component by name, lock the list while searching for it
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Name of the component to find
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to component found or NULL
</p>
<A NAME="find"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td>SignallingComponent* <strong>find</strong> (const String& name, const String& type, const SignallingComponent* start = 0)
<br></td><td align="right"><h3><strong>find</strong></h3></td></tr></table><p></p><p>
Retrive a component by name and class, lock the list while searching for it
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Name of the component to find, empty to find any of the type
</TD></TR>
<TR><TD align="left" valign="top"><i>type</i></TD><TD align="left" valign="top">Class or base class of the component to find, empty to match any
</TD></TR>
<TR><TD align="left" valign="top"><i>start</i></TD><TD align="left" valign="top">Component to start searching from, search all list if NULL
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to component found or NULL
</p>
<A NAME="build"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td>SignallingComponent* <strong>build</strong> (const String& type, const NamedList& params, bool init = false)
<br></td><td align="right"><h3><strong>build</strong></h3></td></tr></table><p></p><p>
Retrive and reference an existing component, create by factory if not present
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>type</i></TD><TD align="left" valign="top">Class or base class of the component to find or create
</TD></TR>
<TR><TD align="left" valign="top"><i>params</i></TD><TD align="left" valign="top">Name of component to find or create and creation parameters
</TD></TR>
<TR><TD align="left" valign="top"><i>init</i></TD><TD align="left" valign="top">Set to true to initialize a newly created component
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to component found or created, NULL on failure
</p>
<A NAME="control"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>control</strong> (NamedList& params)
<br></td><td align="right"><h3><strong>control</strong></h3></td></tr></table><p></p><p>
Apply a control operation to all components in the engine
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>params</i></TD><TD align="left" valign="top">The list of parameters to query or change
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if the control operation was executed by at least one component
</p>
<A NAME="find"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>find</strong> (const SignallingComponent* component)
<br></td><td align="right"><h3><strong>find</strong></h3></td></tr></table><p></p><p>
Check if a component is in the engine's list
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>component</i></TD><TD align="left" valign="top">Pointer to component to check
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if the component is in the engine's list
</p>
<A NAME="start"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>start</strong> (const char* name = "Sig Engine", Thread::Priority prio = Thread::Normal, unsigned long usec = 0)
<br></td><td align="right"><h3><strong>start</strong></h3></td></tr></table><p></p><p>
Starts the worker thread that keeps components alive
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>name</i></TD><TD align="left" valign="top">Static name of the thread
</TD></TR>
<TR><TD align="left" valign="top"><i>prio</i></TD><TD align="left" valign="top">Thread's priority
</TD></TR>
<TR><TD align="left" valign="top"><i>usec</i></TD><TD align="left" valign="top">How long to sleep between iterations in usec, 0 to use library default
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True if (already) started, false if an error occured
</p>
<A NAME="stop"></A><A NAME="ref14"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>stop</strong> ()
<br></td><td align="right"><h3><strong>stop</strong></h3></td></tr></table><p></p><p>
Stops and destroys the worker thread if running
</p>
<A NAME="thread"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td>Thread* <strong>thread</strong> ()
<br></td><td align="right"><h3><strong>thread</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Return a pointer to the worker thread
</p>
<p><b>Returns</b>: Pointer to running worker thread or NULL
</p>
<A NAME="tickSleep"></A><A NAME="ref16"></A><table width="100%"><tr bgcolor="#eeeeee"><td>unsigned long <strong>tickSleep</strong> (unsigned long usec = 1000000)
<br></td><td align="right"><h3><strong>tickSleep</strong></h3></td></tr></table><p></p><p>
Adjust (decrease only) the desired maximum time until next tick.
Can be called only from within timerTick()
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>usec</i></TD><TD align="left" valign="top">Desired time until next timerTick() call in usec
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Timer sleep in usec after applying the current change
</p>
<A NAME="tickDefault"></A><A NAME="ref17"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline unsigned long <strong>tickDefault</strong> ()
<br></td><td align="right"><h3><strong>tickDefault</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the default engine tick sleep time in microseconds
</p>
<p><b>Returns</b>: Default timer sleep in usec
</p>
<A NAME="destruct"></A><A NAME="ref18"></A><table width="100%"><tr bgcolor="#eeeeee"><td>template <class Obj> inline void <strong>destruct</strong> (Obj*& obj)
<br></td><td align="right"><h3><strong>destruct</strong></h3></td></tr></table><p> <small>[static]</small></p><p>
Helper template used to remove a component descendant from its engine,
destroy it and set the received pointer to 0
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>obj</i></TD><TD align="left" valign="top">Reference to pointer (lvalue) to the object to remove and destroy
</TD></TR>
</TABLE></P>
<A NAME="timerTick"></A><A NAME="ref19"></A><table width="100%"><tr bgcolor="#eeeeee"><td> unsigned long <strong>timerTick</strong> (const Time& when)
<br></td><td align="right"><h3><strong>timerTick</strong></h3></td></tr></table><p> <small>[protected virtual]</small></p><p>
Method called periodically by the worker thread to keep everything alive
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>when</i></TD><TD align="left" valign="top">Time to use as computing base for events and timeouts
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Desired sleep (in usec) until thread's next tick interval
</p>
<A NAME="m_components"></A><A NAME="ref20"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList <strong>m_components</strong>
</td><td align="right"><h3><strong>m_components</strong></h3></td></tr></table><p> <small>[protected]</small></p><HR>
<table>
<tr><td><small>Generated by: paulc on bussard on Mon Mar 8 12:18:15 2010, using kdoc 2.0a54.</small></td></tr>
</table>
</BODY>
</HTML>
|