<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ PingSCSCPservice</code>( <var class="Arg">hostname</var>, <var class="Arg">portnumber</var> )</td><tdclass="tdright">( function )</td></tr></table></div>
<p>Returns: <code class="keyw">true</code> or <code class="keyw">fail</code></p>
<p>This function returns <code class="keyw">true</code> if the client can establish connection with the SCSCP server at <var class="Arg">hostname</var>:<var class="Arg">portnumber</var>. Otherwise, it returns <code class="keyw">fail</code>.</p>
<p>The function is similar to the UNIX <code class="code">ping</code>. It tries <var class="Arg">n</var> times to establish connection with the SCSCP server at <var class="Arg">hostname</var>:<var class="Arg">portnumber</var>, and then displays statistical information.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InfoSCSCP</code></td><td class="tdright">( info class )</td></tr></table></div>
<p><code class="func">InfoSCSCP</code> is a special Info class for the <strong class="pkg">SCSCP</strong> package. The amount of information to be displayed can be specified by the user by setting InfoLevel for this class from 0 to 4, and the default value of InfoLevel for the package is specified in the file <code class="file">scscp/config.g</code>. The higher the level is, the more information will be displayed. To change the InfoLevel to <code class="code">k</code>, use the command <codeclass="code">SetInfoLevel(InfoSCSCP, k)</code>. In the following examples we demonstrate various degrees of outputdetails using Info messages.</p>
<p>Default Info level:</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">SetInfoLevel(InfoSCSCP,2); </span>
<span class="GAPprompt">gap></span> <span class="GAPinput">EvaluateBySCSCP( "WS_Factorial",[10],"localhost",26133); </span>
#I Creating a socket ...
#I Connecting to a remote socket via TCP/IP ...
#I Got connection initiation message
#I <?scscp service_name="GAP" service_version="4.dev" service_id="localhost:2\
6133:286" scscp_versions="1.0 1.1 1.2 1.3" ?>
#I Requesting version 1.3 from the server ...
#I Server confirmed version 1.3 to the client ...
#I Request sent ...
#I Waiting for reply ...
#I <?scscp start ?>
#I <?scscp end ?>
#I Got back: object 3628800 with attributes
[ [ "call_id", "localhost:26133:286:JL6KRQeh" ] ]
rec( attributes := [ [ "call_id", "localhost:26133:286:JL6KRQeh" ] ], object := 3628800 )
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ InfoMasterWorker</code></td><td class="tdright">( info class )</td></tr></table></div>
<p><code class="code">InfoMasterWorker</code> is a special Info class for the Master-Worker skeleton <code class="func">ParListWithSCSCP</code> (<a href="chap8_mj.html#X788208B57D4C497F"><span class="RefLink">8.2-1</span></a>). The amount of information to be displayed can be specified by the user by setting InfoLevel for this class from 0 to 5, and the default value of InfoLevel for the package is specified in the file <code class="file">scscp/config.g</code>. The higher the level is, the more information will be displayed. To change the InfoLevel to <code class="code">k</code>, use the command <code class="code">SetInfoLevel(InfoMasterWorker, k)</code>. In the following examples we demonstrate various degrees of outputdetails using Info messages.</p>
<p>Returns the current date in the ISO-8601 YYYY-MM-DD format. This is an internal function of the package which is used by the <strong class="pkg">SCSCP</strong> server to generate the transient content dictionary, accordingly to the definition of the <strong class="pkg">OpenMath</strong> symbol <code class="code">meta.CDDate</code>.</p>
<p>Returns the result of the call to <code class="file">date</code>. This is an internal function of the package which is used to add the timestamp to the <strong class="pkg">SCSCP</strong> service description.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">CurrentTimestamp();</span> "Tue 30 Jan 2017 11:19:38 BST"
<p>Returns the result of the call to <code class="file">hostname</code>. This function may be used in the configuration file <code class="file">scscp/config.g</code> to specify that the default hostname which will be used by the <strong class="pkg">SCSCP</strong> server will be detected automatically using <code class="file">hostname</code>.</p>
<p>Returns the current volume of the memory used by <strong class="pkg">GAP</strong> in kylobytes. This is equivalent to calling <code class="file">ps -p <PID> -o vsz</code>, where <code class="code"><PID></code> is the process ID of the <strong class="pkg">GAP</strong> process. This is an internal function of the package which is used by the <strong class="pkg">SCSCP</strong> server to report its memory usage in the <code class="code">info_memory</code> attribute when being called with the option <code class="code">debuglevel=2</code> (see options in <code class="func">EvaluateBySCSCP</code> (<a href="chap6_mj.html#X7C745B2878E0AC41"><span class="RefLink">6.3-1</span></a>) and <codeclass="func">NewProcess</code> (<a href="chap6_mj.html#X8712E82B811A4170"><span class="RefLink">6.2-2</span></a>)).</p>
<p>Returns the call ID contained in the most recently received message. It may contain some useful debugging information; in particular, the call ID for the <strong class="pkg">GAP</strong> <strong class="pkg">SCSCP</strong> client and server contains colon-separated server name, port number, process ID and a random string.</p>
<p>This function "pickles" or "serialises" the object <var class="Arg">obj</var> using the operation <code class="func">IO_Pickle</code> (<a href="../../../pkg/io/doc/chap5_mj.html#X7E01770481297DF1"><span class="RefLink">IO: IO_Pickle</span></a>) from the <strong class="pkg">IO</strong> package, and writes it to a string, from which it could be later restored using <code class="func">IO_UnpickleFromString</code> (<a href="chap9_mj.html#X813EACD27C218E19"><span class="RefLink">9.3-7</span></a>). This provides a way to design <strong class="pkg">SCSCP</strong> procedures which transmit <strong class="pkg">GAP</strong> objects in the "pickled" format as <strong class="pkg">OpenMath</strong> strings, which may be useful for objects which may be "pickled" by the <strong class="pkg">IO</strong> package but can not be converted to <strong class="pkg">OpenMath</strong> or for which the "pickled" representation is more compact or can be encoded/decoded much faster.</p>
<p>See <code class="func">IO_Pickle</code> (<a href="../../../pkg/io/doc/chap5_mj.html#X7E01770481297DF1"><span class="RefLink">IO: IO_Pickle</span></a>) and <code class="func">IO_Unpickle</code> (<a href="../../../pkg/io/doc/chap5_mj.html#X8228EE63809A6DEF"><span class="RefLink">IO: IO_Unpickle</span></a>) for more details.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ IO_UnpickleFromString</code>( <var class="Arg">s</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: "unpickled" GAP object</p>
<p>This function "unpickles" the string <var class="Arg">s</var> which was created using the function <code class="func">IO_PickleToString</code> (<a href="chap9_mj.html#X84F055ED860120D5"><span class="RefLink">9.3-6</span></a>), using the operation <code class="func">IO_Unpickle</code> (<a href="../../../pkg/io/doc/chap5_mj.html#X8228EE63809A6DEF"><span class="RefLink">IO: IO_Unpickle</span></a>) from the <strong class="pkg">IO</strong> package. See <code class="func">IO_PickleToString</code> (<a href="chap9_mj.html#X84F055ED860120D5"><span class="RefLink">9.3-6</span></a>) for more details and suggestions about its usage.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">IO_UnpickleFromString( f ); </span>
GF(5^3)
<span class="GAPprompt">gap></span> <span class="GAPinput">f = IO_UnpickleFromString( IO_PickleToString( f ) ); </span>
true
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.