Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > 7f0e9d2cc294974b84562d13b27b6991 > files > 29

ocamlviz-1.01-1.1mdv2010.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Bproto.html">
<link rel="next" href="Graph.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Binary" rel="Chapter" href="Binary.html">
<link title="Bproto" rel="Chapter" href="Bproto.html">
<link title="Db" rel="Chapter" href="Db.html">
<link title="Graph" rel="Chapter" href="Graph.html">
<link title="Monitor_sig" rel="Chapter" href="Monitor_sig.html">
<link title="Ocamlviz" rel="Chapter" href="Ocamlviz.html">
<link title="Ocamlviz_threads" rel="Chapter" href="Ocamlviz_threads.html">
<link title="Protocol" rel="Chapter" href="Protocol.html">
<link title="Timemap" rel="Chapter" href="Timemap.html"><title>Db</title>
</head>
<body>
<div class="navbar"><a href="Bproto.html">Previous</a>
&nbsp;<a href="index.html">Up</a>
&nbsp;<a href="Graph.html">Next</a>
</div>
<center><h1>Module <a href="type_Db.html">Db</a></h1></center>
<br>
<pre><span class="keyword">module</span> Db: <code class="code">sig</code> <a href="Db.html">..</a> <code class="code">end</code></pre>the Ocamlviz interface for clients<br>
<hr width="100%">
<br><code><span class="keyword">type</span> <a name="TYPEstatus"></a><code class="type"></code>status = </code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">St_active</span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">St_killed</span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">St_collected</span></code></td>

</tr></table>

<div class="info">
The status of a monitored value<br>
</div>

<br><code><span class="keyword">type</span> <a name="TYPEtag"></a><code class="type"></code>tag = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>id&nbsp;: <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a></code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>kind&nbsp;: <code class="type"><a href="Protocol.html#TYPEkind">Protocol.kind</a></code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>name&nbsp;: <code class="type">string</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>tmap&nbsp;: <code class="type"><a href="Protocol.html#TYPEvalue">Protocol.value</a> <a href="Timemap.html#TYPEt">Timemap.t</a></code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>value&nbsp;: <code class="type">float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>tmap_st&nbsp;: <code class="type"><a href="Db.html#TYPEstatus">status</a> <a href="Timemap.html#TYPEt">Timemap.t</a></code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>status&nbsp;: <code class="type">float * <a href="Db.html#TYPEstatus">status</a></code>;</code></td>

</tr></table>
}

<div class="info">
This is the client side type used to describe a monitored data . 
    <code class="code">tmap</code> is the array containing successive values of the tag <code class="code">id</code> over time. 
    <code class="code">tmap_st</code> is the equivalent of <code class="code">tmap</code> for status.<br>
</div>

<br>
<br>
<pre><span class="keyword">val</span> <a name="VALadd_tag"></a>add_tag : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> <a href="Protocol.html#TYPEkind">Protocol.kind</a> -> string -> unit</code></pre><div class="info">
<code class="code">add_tag id k n</code> adds to the database a tag whose id is <code class="code">id</code>, kind <code class="code">k</code>, and name <code class="code">n</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALchange_value"></a>change_value : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> <a href="Protocol.html#TYPEvalue">Protocol.value</a> -> unit</code></pre><div class="info">
<code class="code">change_value id v</code> replaces the value of the tag whose identifier is <code class="code">id</code> by the value <code class="code">v</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALinterp"></a>interp : <code class="type"><a href="Protocol.html#TYPEmsg">Protocol.msg</a> -> unit</code></pre><div class="info">
<code class="code">interp m</code> matches the message <code class="code">m</code> and calls <code class="code">add_tag</code> if <code class="code">m</code> is a <code class="code">Declare</code> message, or
      <code class="code">change_value</code> if <code class="code">m</code> is a <code class="code">Send</code> message.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALclean_up"></a>clean_up : <code class="type">unit -> unit</code></pre><div class="info">
<code class="code">clean_up ()</code> cleans up every stored values from every timemaps that are older than the record window.<br>
</div>
<br>
<br>
<pre><span class="keyword">val</span> <a name="VALget_current_time"></a>get_current_time : <code class="type">unit -> float</code></pre><div class="info">
<code class="code">get_current_time ()</code> returns the current time. This is the last time datas were received.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALset_observe_time"></a>set_observe_time : <code class="type">float -> unit</code></pre><div class="info">
<code class="code">set_observe_time t</code> sets the observation time of the data base at <code class="code">t</code>. 
      It is an alternative to <code class="code">set_offset t'</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_observe_time"></a>get_observe_time : <code class="type">unit -> float</code></pre><div class="info">
<code class="code">get_observe_time ()</code> returns the observation time of the data base.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALset_offset"></a>set_offset : <code class="type">float -> unit</code></pre><div class="info">
<code class="code">set_offset t</code> sets the offset of the database at the time <code class="code">t</code>, which means that the difference 
      between the observation time and the current time will be <code class="code">t</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_offset"></a>get_offset : <code class="type">unit -> float</code></pre><div class="info">
<code class="code">get_offset ()</code> returns the difference between observation time and current time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALset_record_window"></a>set_record_window : <code class="type">float -> unit</code></pre><div class="info">
<code class="code">set_record_window t</code> changes the size of the record window with <code class="code">t</code> in seconds.
  This means that the database will now record <code class="code">t</code> seconds of execution.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_record_window"></a>get_record_window : <code class="type">unit -> float</code></pre><div class="info">
<code class="code">get_time_window ()</code> returns the size of the record window in seconds.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_log_size"></a>get_log_size : <code class="type">unit -> int</code></pre><pre><span class="keyword">val</span> <a name="VALset_log_size"></a>set_log_size : <code class="type">int -> unit</code></pre><pre><span class="keyword">val</span> <a name="VALget_tag"></a>get_tag : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> <a href="Db.html#TYPEtag">tag</a></code></pre><div class="info">
<code class="code">get_tag id</code> returns the tag whose identifier is <code class="code">id</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_bindings"></a>get_bindings : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> <a href="Protocol.html#TYPEtag">Protocol.tag</a> list</code></pre><div class="info">
<code class="code">get_bindings id</code> returns a list of tags who are bound together.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_heap_total_size"></a>get_heap_total_size : <code class="type">unit -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_heap_total_size ()</code> returns the total size value of the major heap
      that is the closest to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_heap_alive_size"></a>get_heap_alive_size : <code class="type">unit -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_heap_alive_size ()</code> returns the alive datas size value of the major heap
      that is the closest to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_heap_max_size"></a>get_heap_max_size : <code class="type">unit -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_heap_max_size ()</code> returns the maximum size value of the major heap 
      that is the closest to the observation time along with its last change time.<br>
</div>
<br>
<br>
<br>
The following functions return couples (time,<code class="code">value</code>) for the given <code class="code">Protocol.tag</code>.<br>
<br>
<br>
<pre><span class="keyword">val</span> <a name="VALget_point"></a>get_point : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_point id</code> returns the value of the monitored <code class="code">Point</code> <code class="code">id</code> that is the closest 
      to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_time"></a>get_time : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_time id</code> returns the value of the monitored <code class="code">Time</code> <code class="code">id</code> that is the closest 
      to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_percent_time"></a>get_percent_time : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_percent_time id</code> returns the percentage of the monitored <code class="code">Time</code> <code class="code">id</code>, related to the observation time, that is the closest 
      to the observation time. The time returned is the one returned by <code class="code">get_time id</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_tag_size"></a>get_tag_size : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_tag_size id</code> returns the size value of the monitored <code class="code">Tag</code> <code class="code">id</code> that is the closest 
      to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_tag_max_size"></a>get_tag_max_size : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_tag_max_size id</code> returns the maximum size value of the monitored <code class="code">Tag</code> <code class="code">id</code> that is the closest 
      to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_tag_percent_size"></a>get_tag_percent_size : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_tag_percent_size id</code> returns the percentage of the monitored <code class="code">Tag</code> <code class="code">id</code>, related to the major heap size, that is the closest 
      to the observation time. The time returned is the one returned by <code class="code">get_tag_size id</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_tag_count"></a>get_tag_count : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_tag_count id</code> returns the cardinal-number value of the monitored <code class="code">Tag</code> <code class="code">id</code> that is the closest 
      to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_tag_max_count"></a>get_tag_max_count : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_tag_max_count id</code> returns the maximum cardinal-number value of the monitored <code class="code">Tag</code> <code class="code">id</code> that is the closest 
      to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_value_int"></a>get_value_int : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_value_int id</code> returns the value of the monitored integer <code class="code">Value</code> <code class="code">id</code> that is the closest 
      to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_value_float"></a>get_value_float : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_value_float id</code> returns the value of the monitored floating-point <code class="code">Value</code> <code class="code">id</code> that is the closest 
      to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_value_string"></a>get_value_string : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_value_string id</code> returns the value of the monitored string <code class="code">Value</code> <code class="code">id</code> that is the closest 
      to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_value_bool"></a>get_value_bool : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_value_bool id</code> returns the value of the monitored boolean <code class="code">Value</code> <code class="code">id</code> that is the closest 
      to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_tree"></a>get_tree : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_tree id</code> returns the value of the monitored <code class="code">Tree</code> <code class="code">id</code> that is the closest 
      to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_hash"></a>get_hash : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_hash id</code> returns the value of the monitored <code class="code">Hashtable</code> <code class="code">id</code> that is the closest 
      to the observation time along with its last change time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_hash_percent_filled"></a>get_hash_percent_filled : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_hash_percent_filled id</code> returns the filling rate of the monitored <code class="code">Hashtable</code> <code class="code">id</code> that is the closest 
      to the observation time. The time returned is the one returned by <code class="code">get_hash id</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_hash_mean"></a>get_hash_mean : <code class="type"><a href="Protocol.html#TYPEtag">Protocol.tag</a> -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre><div class="info">
<code class="code">get_hash_mean id</code> returns the buckets' mean length of the monitored <code class="code">Hashtable</code> <code class="code">id</code> that is the closest 
      to the observation time. The time returned is the one returned by <code class="code">get_hash id</code>.<br>
</div>
<br>
<br>
<br>
The following functions return lists of value of a certain <code class="code">kind</code>.<br>
<br>
<br>
<pre><span class="keyword">val</span> <a name="VALget_point_list"></a>get_point_list : <code class="type">unit -> <a href="Db.html#TYPEtag">tag</a> list</code></pre><div class="info">
<code class="code">get_point_list ()</code> returns a list of every tags whose <code class="code">kind</code> is Point.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_time_list"></a>get_time_list : <code class="type">unit -> <a href="Db.html#TYPEtag">tag</a> list</code></pre><div class="info">
<code class="code">get_time_list ()</code> returns a list of every tags whose <code class="code">kind</code> is Time.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_tag_count_list"></a>get_tag_count_list : <code class="type">unit -> <a href="Db.html#TYPEtag">tag</a> list</code></pre><div class="info">
<code class="code">get_tag_count_list ()</code> returns a list of every tags whose <code class="code">kind</code> is Tag_count.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_tag_size_list"></a>get_tag_size_list : <code class="type">unit -> <a href="Db.html#TYPEtag">tag</a> list</code></pre><div class="info">
<code class="code">get_tag_size_list ()</code> returns a list of every tags whose <code class="code">kind</code> is Tag_size.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_value_int_list"></a>get_value_int_list : <code class="type">unit -> <a href="Db.html#TYPEtag">tag</a> list</code></pre><div class="info">
<code class="code">get_value_int_list ()</code> returns a list of every tags whose <code class="code">kind</code> is Value_int.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_value_float_list"></a>get_value_float_list : <code class="type">unit -> <a href="Db.html#TYPEtag">tag</a> list</code></pre><div class="info">
<code class="code">get_value_float_list ()</code> returns a list of every tags whose <code class="code">kind</code> is Value_float.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_value_string_list"></a>get_value_string_list : <code class="type">unit -> <a href="Db.html#TYPEtag">tag</a> list</code></pre><div class="info">
<code class="code">get_value_string_list ()</code> returns a list of every tags whose <code class="code">kind</code> is Value_string.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_value_bool_list"></a>get_value_bool_list : <code class="type">unit -> <a href="Db.html#TYPEtag">tag</a> list</code></pre><div class="info">
<code class="code">get_value_bool_list ()</code> returns a list of every tags whose <code class="code">kind</code> is Value_bool.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_tree_list"></a>get_tree_list : <code class="type">unit -> <a href="Db.html#TYPEtag">tag</a> list</code></pre><div class="info">
<code class="code">get_tree_list ()</code> returns a list of every tags whose <code class="code">kind</code> is Ktree.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_hash_list"></a>get_hash_list : <code class="type">unit -> <a href="Db.html#TYPEtag">tag</a> list</code></pre><div class="info">
<code class="code">get_hash_list ()</code> returns a list of every tags whose <code class="code">kind</code> is Hash.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALget_log"></a>get_log : <code class="type">unit -> float * <a href="Protocol.html#TYPEvalue">Protocol.value</a></code></pre></body></html>