Difference between revisions of "HamsterAPIInstall"

From cogniteam
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
  
 
=== Installing the HamsterAPI on the Hamster ===
 
=== Installing the HamsterAPI on the Hamster ===
 +
 +
=== Import project to Eclipse ===
 +
TBD
  
 
=== HamsterAPI Java ===
 
=== HamsterAPI Java ===
 +
* The base address should be set (if using the default configuration) to 10.0.2
 +
* The port should correspond to the number on the Hamster, in this example 2
 +
* The Agent number should be passed in the constructor
 +
 
<syntaxhighlight lang="java" line='line'>
 
<syntaxhighlight lang="java" line='line'>
 
     HamsterClientParameters params = new HamsterClientParameters();
 
     HamsterClientParameters params = new HamsterClientParameters();
     params.port = 8101;
+
    params.base_address = "10.0.2";
     Hamster hamster = new Hamster(1,params);
+
     params.port = 8102;
 +
     Hamster hamster = new Hamster(2,params);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
  
 
* Eclipse project [https://cloud.cogni.io/index.php/s/0IEiIgPhpFqwQ4x JAVA Client API]
 
* Eclipse project [https://cloud.cogni.io/index.php/s/0IEiIgPhpFqwQ4x JAVA Client API]

Latest revision as of 12:27, 29 March 2017


Installing the HamsterAPI on the Hamster

Import project to Eclipse

TBD

HamsterAPI Java

  • The base address should be set (if using the default configuration) to 10.0.2
  • The port should correspond to the number on the Hamster, in this example 2
  • The Agent number should be passed in the constructor

<syntaxhighlight lang="java" line='line'>

    HamsterClientParameters params = new HamsterClientParameters();
    params.base_address = "10.0.2";
    params.port = 8102;
    Hamster hamster = new Hamster(2,params);

</syntaxhighlight>