<?php $isip_window_title = "ISIP Homepage"; ?>
<?php include("/data/isip/www/templates/documentation/header/header.html"); ?>

<!--#set var="isip_page_title" value="Machine" -->
<?php include("/data/isip/www/templates/documentation/body/index_class.html"); ?>
<?php include("/data/isip/www/templates/documentation/body/bar.html"); ?>

<a name="name">
<b>

name:
<a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h">Machine</a>

</b>
<br><br>

<a name="synopsis">
<b>synopsis:</b>
<br><br>

<blockquote>
<pre>

g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_mmedia.a

#include &lt;Machine.h&gt;

static boolean diagnose(Integral::DEBUG debug_level);
PROTOCOL getProtocol();
boolean setProtocol(PROTOCOL arg);
String& getNodeName();
boolean setNodeName(String& arg);
String& getArchitecture();
boolean setArchitecture(String& arg);
long getNumProcessors();
boolean setNumProcessors(long arg);
VectorDouble& getProcessorSpeed();
boolean setProcessorSpeed(VectorDouble& arg);
double getMainMemory();
boolean setMainMemory(double arg);
double getSwapMemory();
boolean setSwapMemory(double arg);
String& getOS();
boolean setOS(String& arg);
String& getOSVersion();
boolean setOSVersion(String& arg);
</pre>
</blockquote>

<a name="quick_start">
<b>quick start:</b>
<br><br>

<blockquote>
<pre>

String tmp_str;
Machine mach_00;

tmp_str.assign(L"isip004");
mach_00.setNodeName(tmp_str);
mach_00.getNodeName().eq(tmp_str);

</pre>
</blockquote>

<a name="description">
<b>description:</b>
<br><br>

This class is used to represent a machine and its corresponding attributes.

<br><br>

<a name="dependencies">
<b>dependencies:</b>
<br><br>

<ul>
  <li> <a href="../../math/scalar/String/">String.h</a>
</ul>

<a name="constants">
<b>public constants:</b>
<br><br>

<ul>
  <li> define the class name:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&constant=CLASS_NAME">static const String CLASS_NAME = L"Machine";</a></pre>

  <li> define the protocol choices:

       <pre>enum PROTOCOL { REMOTE_SHELL = 0, SECURE_SHELL, DEF_PROTOCOL = REMOTE_SHELL };</pre>

  <li> define i/o related constants:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&constant=DEF_PARAM">static const String DEF_PARAM;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&constant=PARAM_PROTOCOL">static const String PARAM_PROTOCOL;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&constant=PARAM_NODE_NAME">static const String PARAM_NODE_NAME;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&constant=PARAM_ARCHITECTURE">static const String PARAM_ARCHITECTURE;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&constant=PARAM_NUM_PROCESSORS">static const String PARAM_NUM_PROCESSORS;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&constant=PARAM_PROCESSOR_SPEED">static const String PARAM_PROCESSOR_SPEED;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&constant=PARAM_MAIN_MEMORY">static const String PARAM_MAIN_MEMORY;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&constant=PARAM_SWAP_MEMORY">static const String PARAM_SWAP_MEMORY;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&constant=PARAM_OS_NAME">static const String PARAM_OS_NAME;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&constant=PARAM_OS_VERSION">static const String PARAM_OS_VERSION;</a></pre>

  <li> define default values and arguments:
       
       <pre>static const long DEF_NUM_PROCESSORS = 1;</pre>

       <pre>static const double DEF_PROCESSOR_SPEED = 3.0e8;</pre>

       <pre>static const double DEF_MAIN_MEMORY = 0.0;</pre>

       <pre>static const double DEF_SWAP_MEMORY = 0.0;</pre>

  <li> define NameMap objects:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&constant=PROTOCOL_MAP">static const NameMap PROTOCOL_MAP;</a></pre>

</ul>

<a name="error">
<b>error codes:</b>
<br><br>

<ul>
  <li> error codes indicating general errors:

</ul>

<a name="protected">
<b>protected data:</b>
<br><br>

<ul>
  <li> declare the preferred connection protocol for the machine (rsh/ssh):

       <pre>PROTOCOL protocol_d;</pre>

  <li> declare the nodename of the machine (isip100.isip.msstate.edu):

       <pre>String node_name_d;</pre>

  <li> declare the machine architecture (pentium/sparc):

       <pre>String architecture_d;</pre>

  <li> declare the number of processors on the machine (single/dual):

       <pre>Long num_processors_d;</pre>

  <li> declare the speed of the processor on the machine (8.0e08/1.0e09):

       <pre>VectorDouble speed_d;</pre>

  <li> declare the amount of main memory on the machine (1.0e09/2.0e09):

       <pre>Double main_memory_d;</pre>

  <li> declare the amount of swap space on the machine (1.0e06/2.0e06):

       <pre>Double swap_memory_d;</pre>

  <li> declare the operating system on the machine (solaris/linux):

       <pre>String os_d;</pre>

  <li> declare the operating system version on the machine (v_7.0/v_8.0):

       <pre>String os_version_d;</pre>

  <li> declare the debugging parameters:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&static=debug_level_d">static Integral::DEBUG debug_level_d;</a></pre>

  <li> declare the memory manager:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&static=mgr_d">static MemoryManager mgr_d;</a></pre>

</ul>

<a name="public">
<b>required public methods:</b>
<br><br>

<ul>
  <li> static methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=name&instance=0">static const String& name();</a></pre>

  <li> debug methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_01.cc&method=debug&instance=0">boolean debug(const unichar* msg) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=setDebug&instance=0">static boolean setDebug(Integral::DEBUG arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_02.cc&method=diagnose&instance=0">static boolean diagnose(Integral::DEBUG debug_level);</a></pre>
       
  <li> destructor/constructor(s):

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=destructor&instance=0">~Machine();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_00.cc&method=default+constructor&instance=0">Machine();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=copy+constructor&instance=0">Machine(const Machine& arg);</a></pre>

  <li> assign methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_05.cc&method=assign&instance=0">boolean assign(const Machine& arg);</a></pre>

  <li> operator= method:

       <pre>not present.</pre>

  <li> i/o methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=sofSize&instance=0">long sofSize() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=read&instance=0">boolean read(Sof& sof, long tag);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_03.cc&method=read&instance=0">boolean read(Sof& sof, long tag, const String& name);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=write&instance=0">boolean write(Sof& sof, long tag) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_04.cc&method=write&instance=0">boolean write(Sof& sof, long tag, const String& name) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_03.cc&method=readData&instance=0">boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_04.cc&method=writeData&instance=0">boolean writeData(Sof& sof, const String& pname =  DEF_PARAM) const;</a></pre>

  <li> equality methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_05.cc&method=eq&instance=0">boolean eq(const Machine& arg) const;</a></pre>

  <li> memory management methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=new&instance=0">static void* operator new(size_t arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=new\[\]&instance=0">static void* operator new[](size_t arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=delete&instance=0">static void operator delete(void* arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=delete\[\]&instance=0">static void operator delete[](void* arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=setGrowSize&instance=0">static boolean setGrowSize(long arg);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/mach_05.cc&method=clear&instance=0">boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);</a></pre>

</ul>

<a name="specific">
<b>class-specific public methods:</b>
<br><br>

<ul>
  <li> declare protocol related methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=getProtocol&instance=0">PROTOCOL getProtocol();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=setProtocol&instance=0">boolean setProtocol(PROTOCOL arg);</a></pre>

  <li> declare node name related methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=getNodeName&instance=0">String& getNodeName();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=setNodeName&instance=0">boolean setNodeName(String& arg);</a></pre>

  <li> declare architecture related methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=getArchitecture&instance=0">String& getArchitecture();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=setArchitecture&instance=0">boolean setArchitecture(String& arg);</a></pre>

  <li> declare number of processors related methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=getNumProcessors&instance=0">long getNumProcessors();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=setNumProcessors&instance=0">boolean setNumProcessors(long arg);</a></pre>

  <li> declare processor speed related methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=getProcessorSpeed&instance=0">VectorDouble& getProcessorSpeed();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=setProcessorSpeed&instance=0">boolean setProcessorSpeed(VectorDouble& arg);</a></pre>

  <li> declare main memory related methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=getMainMemory&instance=0">double getMainMemory();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=setMainMemory&instance=0">boolean setMainMemory(double arg);</a></pre>

  <li> declare swap memory related methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=getSwapMemory&instance=0">double getSwapMemory();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=setSwapMemory&instance=0">boolean setSwapMemory(double arg);</a></pre>

  <li> declare operating system related methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=getOS&instance=0">String& getOS();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=setOS&instance=0">boolean setOS(String& arg);</a></pre>

  <li> declare operating system version related methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=getOSVersion&instance=0">String& getOSVersion();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/mmedia/Machine/Machine.h&method=setOSVersion&instance=0">boolean setOSVersion(String& arg);</a></pre>

</ul>

<a name="private">
<b>private methods:</b>
<br><br>

<ul>
  <li> declare private methods:

</ul>

<a name="examples">
<b>examples:</b>
<br><br>

<ul>

    <li> This <a href="/perl/ifc_document.pl?file=$isip/doc/examples/class/mmedia/mmedia_example_08/example.cc">example</a> shows how to use the Machine object.
	 
</ul>

<a name="notes">
<b>notes:</b>
<br><br>

<ul>
  <li> none.
</ul>

<!--#include virtual="/hse/ies/templates/documentation/footer/footer.html" -->
