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
|
<HTML>
<HEAD>
<TITLE>class DataSource</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 DataSource</h1>
</TD>
<TD valign="top" align="right" colspan="1">
A data source
<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>::DataSource</code></TD></TR>
<TR><TH>Definition</TH><TD><code>#include <<A HREF="yatephone_h.html">yatephone.h</A>></code></TD></TR>
<TR><TH>Inherits</TH><TD><A HREF="TelEngine__DataNode.html">TelEngine::DataNode</A> <small>[public ]</small>, <A HREF="TelEngine__Mutex.html">TelEngine::Mutex</A> <small>[public ]</small></TD></TR>
<TR><TH>Inherited by</TH><TD><i><A HREF="TelEngine__ThreadedSource.html">ThreadedSource</A></i></TD></TR>
<TR><TH><A HREF="full-list-TelEngine__DataSource.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>inline <b><A HREF="#ref2">DataSource</A></b> (const char* format = "slin")
</LI>
<LI>virtual void <b><A HREF="#ref3">destroyed</A></b> ()
</LI>
<LI>virtual void* <b><A HREF="#ref4">getObject</A></b> (const String& name) const
</LI>
<LI>virtual bool <b><A HREF="#ref5">valid</A></b> () const
</LI>
<LI>unsigned long <b><A HREF="#ref6">Forward</A></b> (const DataBlock& data, unsigned long tStamp = invalidStamp(),
unsigned long flags = 0)
</LI>
<LI>bool <b><A HREF="#ref7">attach</A></b> (DataConsumer* consumer, bool override = false)
</LI>
<LI>bool <b><A HREF="#ref8">detach</A></b> (DataConsumer* consumer)
</LI>
<LI>void <b><A HREF="#ref9">clear</A></b> ()
</LI>
<LI>inline DataTranslator* <b><A HREF="#ref10">getTranslator</A></b> () const
</LI>
<LI>void <b><A HREF="#ref11">synchronize</A></b> (unsigned long tStamp)
</LI>
<LI>inline unsigned long <b><A HREF="#ref12">nextStamp</A></b> () const
</LI>
</ul><h4>Protected Members</h4><ul><LI>unsigned long <b><A HREF="#ref13">m_nextStamp</A></b></LI>
<LI>DataTranslator* <b><A HREF="#ref14">m_translator</A></b></LI>
<LI>ObjList <b><A HREF="#ref15">m_consumers</A></b></LI>
</ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p>
A data source
</p>
<A NAME="DataSource"></A><A NAME="ref2"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline <strong>DataSource</strong> (const char* format = "slin")
<br></td><td align="right"><h3><strong>DataSource</strong></h3></td></tr></table><p></p><p>
Source constructor
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>format</i></TD><TD align="left" valign="top">Name of the data format, default "slin" (Signed Linear)
</TD></TR>
</TABLE></P>
<A NAME="destroyed"></A><A NAME="ref3"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void <strong>destroyed</strong> ()
<br></td><td align="right"><h3><strong>destroyed</strong></h3></td></tr></table><p> <small>[virtual]</small></p><p>
Source's destruct notification - detaches all consumers
</p>
<p>Reimplemented from <A HREF="TelEngine__RefObject.html#destroyed">RefObject</A>.</p>
<A NAME="getObject"></A><A NAME="ref4"></A><table width="100%"><tr bgcolor="#eeeeee"><td> void* <strong>getObject</strong> (const String& name)
<br></td><td align="right"><h3><strong>getObject</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>
Get a pointer to a derived class given that class 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 the class we are asking for
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Pointer to the requested class or NULL if this object doesn't implement it
</p>
<p>Reimplemented from <A HREF="TelEngine__GenObject.html#getObject">GenObject</A>.</p>
<A NAME="valid"></A><A NAME="ref5"></A><table width="100%"><tr bgcolor="#eeeeee"><td> bool <strong>valid</strong> ()
<br></td><td align="right"><h3><strong>valid</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p>
Check if this data source is still valid
</p>
<p><b>Returns</b>: True if still valid, false if node should be removed
</p>
<p>Reimplemented from <A HREF="TelEngine__DataNode.html#valid">DataNode</A>.</p>
<A NAME="Forward"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td>unsigned long <strong>Forward</strong> (const DataBlock& data, unsigned long tStamp = invalidStamp(),
unsigned long flags = 0)
<br></td><td align="right"><h3><strong>Forward</strong></h3></td></tr></table><p></p><p>
Forwards the data to its consumers
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>data</i></TD><TD align="left" valign="top">The raw data block to forward
</TD></TR>
<TR><TD align="left" valign="top"><i>tStamp</i></TD><TD align="left" valign="top">Timestamp of data - typically samples
</TD></TR>
<TR><TD align="left" valign="top"><i>flags</i></TD><TD align="left" valign="top">Indicator flags associated with the data block
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: Number of samples actually forwarded to all consumers
</p>
<A NAME="attach"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>attach</strong> (DataConsumer* consumer, bool override = false)
<br></td><td align="right"><h3><strong>attach</strong></h3></td></tr></table><p></p><p>
Attach a data consumer
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>consumer</i></TD><TD align="left" valign="top">Data consumer to attach
</TD></TR>
<TR><TD align="left" valign="top"><i>override</i></TD><TD align="left" valign="top">Attach as temporary source override
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True on success, false on failure
</p>
<A NAME="detach"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>detach</strong> (DataConsumer* consumer)
<br></td><td align="right"><h3><strong>detach</strong></h3></td></tr></table><p></p><p>
Detach a data consumer
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>consumer</i></TD><TD align="left" valign="top">Data consumer to detach
</TD></TR>
</TABLE></P>
<p><b>Returns</b>: True on success, false on failure
</p>
<A NAME="clear"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>clear</strong> ()
<br></td><td align="right"><h3><strong>clear</strong></h3></td></tr></table><p></p><p>
Detach all data consumers
</p>
<A NAME="getTranslator"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline DataTranslator* <strong>getTranslator</strong> ()
<br></td><td align="right"><h3><strong>getTranslator</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the master translator object if this source is part of a translator
</p>
<p><b>Returns</b>: A pointer to the DataTranslator object or NULL
</p>
<A NAME="synchronize"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>synchronize</strong> (unsigned long tStamp)
<br></td><td align="right"><h3><strong>synchronize</strong></h3></td></tr></table><p></p><p>
Synchronize the source and attached consumers with another timestamp
</p>
<p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5">
<TR><TD align="left" valign="top"><i>tStamp</i></TD><TD align="left" valign="top">New timestamp of data - typically samples
</TD></TR>
</TABLE></P>
<A NAME="nextStamp"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td>inline unsigned long <strong>nextStamp</strong> ()
<br></td><td align="right"><h3><strong>nextStamp</strong></h3></td></tr></table><p> <small>[const]</small></p><p>
Get the next expected position in the data stream
</p>
<p><b>Returns</b>: Timestamp of next expected data position, may be invalid/unknown
</p>
<A NAME="m_nextStamp"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td>unsigned long <strong>m_nextStamp</strong>
</td><td align="right"><h3><strong>m_nextStamp</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_translator"></A><A NAME="ref14"></A><table width="100%"><tr bgcolor="#eeeeee"><td>DataTranslator* <strong>m_translator</strong>
</td><td align="right"><h3><strong>m_translator</strong></h3></td></tr></table><p> <small>[protected]</small></p><A NAME="m_consumers"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td>ObjList <strong>m_consumers</strong>
</td><td align="right"><h3><strong>m_consumers</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>
|