www.pudn.com > ThermoGroup-SDK.rar > MagDevice_link.html, change:2014-12-12,size:4853b


<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>文档</title>
    <link type="text/css" rel="stylesheet" href="..\assets/css/bootstrap.css"/>
	<link type="text/css" rel="stylesheet" href="..\assets/css/prettify.css"/>
    <style>
      body {
        padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
      }
    </style>
    <link type="text/css" rel="stylesheet" href="..\assets/css/bootstrap-responsive.css"/>
    
  </head>
<body>

  <div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
      <div class="container">
        <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="brand" href="../index.html">目录</a>
        <div class="nav-collapse collapse">
          <ul class="nav">
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </div>
  </div>

  <div class="container">
    <a name="______magdevice_"></a><h1>连接与收听(MagDevice)<a class="anchorlink" href="#______magdevice_"></a></h1>
<a name="____"></a><h3>函数总览<a class="anchorlink" href="#____"></a></h3>
<pre class="prettyprint">package com.magnity;

public class MagDevice {
    // ....
    // ....

    public boolean IsLinked();
    public boolean LinkCamera(String strIP, int iTimeout);
    public boolean LinkCamera(int intIP, int iTimeout);
    public void DisLinkCamera();
    public int GetRecentHeartBeat();
    public boolean IsListening();
    public boolean ListenTo(int intIP);
    public void StopListen();

    // ....
    // ....
}</pre>
<a name="____"></a><h3>函数详解<a class="anchorlink" href="#____"></a></h3>
<ul class="list">
<li><p><code>public boolean IsLinked();</code></p>
<blockquote>
<ul class="list">
<li>功能描述:判断是否已连接热像仪。</li>
<li>输入参数:无。</li>
<li>返回值:<code>true</code>-是;<code>false</code>-否。</li>
</ul>
</blockquote>
</li>
<li><p><code>public boolean LinkCamera(String strIP, int iTimeout);</code></p>
<blockquote>
<ul class="list">
<li>功能描述:连接热像仪,一个对象不能同时与超过1台热像仪保持连接或收听。</li>
<li>输入参数:strIP -热像仪的IP地址的<code>String</code>形式;intTimeoutMS-超时设置,单位ms。</li>
<li>返回值:<code>true</code>-成功;<code>false</code>-失败。</li>
</ul>
</blockquote>
</li>
<li><p><code>public boolean LinkCamera(int intIP, int iTimeout);</code></p>
<blockquote>
<ul class="list">
<li>功能描述:连接热像仪,一个对象不能同时与超过1台热像仪保持连接或收听。</li>
<li>输入参数:intIP -热像仪的IP地址, 以太网字节序;intTimeoutMS-超时设置,单位ms。</li>
<li>返回值:<code>true</code>-成功;<code>false</code>-失败。</li>
</ul>
</blockquote>
</li>
<li><p><code>public void DisLinkCamera();</code></p>
<blockquote>
<ul class="list">
<li>功能描述:与已连接的热像仪断开连接。如果正在接收图像,会停止接收。</li>
<li>输入参数:无。</li>
<li>返回值:无。</li>
</ul>
</blockquote>
</li>
<li><p><code>public int GetRecentHeartBeat();</code></p>
<blockquote>
<ul class="list">
<li>功能描述:查询已连接热像仪接收到的最近一次心跳。</li>
<li>输入参数:无。</li>
<li>返回值:最近一次心跳包到达时刻距离当前时刻的毫秒数。</li>
</ul>
</blockquote>
</li>
<li><p><code>public boolean IsListening();</code></p>
<blockquote>
<ul class="list">
<li>功能描述:判断是否正在收听组播。</li>
<li>输入参数:无。</li>
<li>返回值:<code>true</code>-是;<code>false</code>-否。</li>
</ul>
</blockquote>
</li>
<li><p><code>public boolean ListenTo(int intIP);</code></p>
<blockquote>
<ul class="list">
<li>功能描述:收听组播,一个对象不能同时与超过1台热像仪保持连接或收听。</li>
<li>输入参数:intIP-发送组播的热像仪IP。</li>
<li>返回值:<code>true</code>-成功;<code>false</code>-失败。</li>
</ul>
</blockquote>
</li>
<li><p><code>public void StopListen();</code></p>
<blockquote>
<ul class="list">
<li>功能描述:如果正在收听组播,会停止收听。</li>
<li>输入参数:无。</li>
<li>返回值:无。</li>
</ul>
</blockquote>
</li>
</ul>

  </div>

  <script type="text/javascript" src="..\assets/js/jquery.min.js"></script>
  <script type="text/javascript" src="..\assets/js/bootstrap.min.js"></script>
  <script type="text/javascript" src="..\assets/js/prettify.js"></script>
  <script type="text/javascript" src="..\assets/js/runner.js"></script>
</body>
</html>