原理说明

网页不能访问外部设备,因此系统将外部设备进行包装,形成设备服务网址,通过网址进行访问,因此网络设备可以是局域网的设备。

设备的使用过程如下:

1) 部署设备服务

2) 在门户中定义设备

3) 选择使用设备


  • 部署设备服务器,配置文件如下

<?xml version="1.0" encoding="UTF-8"?>

<srp>

       <deployment host="127.0.0.1" id="3" port="10190"  groupid='0'/>

               <!--中心地址-->

               <dirdev url="https://dev.tuplec.com/tby1" lurl="https://dev.tuplec.com/tby1"/>

               <dir url="https://srp.tuplec.com/srp" lurl="https://srp.tuplec.com/srp"/>

               <!--sqlserver 数据库服务器的配置 用于创建部署-->

               <dbserver code="mssql" pass="Libsys6339~" type="mssql" url="jdbc:sqlserver://sql.haoyuncloud.com" user="sa"/>

               <dbserver code="mysql" pass="Libsys6339~" type="mysql" url="jdbc:mysql://localhost:3306/dbname?serverTimezone=Asia/Shanghai&amp;useUnicode=true&amp;characterEncoding=utf8&amp;allowMultiQueries=true" user="root"/>

       <!--设备服务器需要的配置 -->

       <devices>

               <!--服务器登录信息,用户必须具有指定设备的权限 code为账号-->

               <account code="jhtest" />

               <!--code设备的代码,type设备类型printer ,rfid,barcode,idle  -->

               <device code="printer1" type="printer" printer="L565 Series(网络)"  />

               <device code="RFID" type="rfid" port="COM3,115200" anti="00" reader="01" pass="00000000" subtype='str' size='12'/>

               <device code="sp" type="serialport" port="COM11" baudrate="9600"   replacestr="kg" databites="8" stopbites="1"  parity="0" subtype='str' resethex="54"/>

       </devices>

</srp>


  • 在门户中定义设备



 

在门户中新增设备记录, 设备编号需要同<device code=''../> code的值, 设备类型,需要匹配 定义总的type,控制权限,如果选择,标识使用明细中的工作组来分配权限。 访问网址是设备服务器的地址。 

  • 使用设备



在录入界面中选择设备。 代码同 上述配置的 code


说明:由于在https的页面中不能访问http网址,因此若设备服务配置为http请求, 系统应也使用http的方式登录,若设备使用https方式请求,系统可以任意方式登录。

Created with the Personal Edition of HelpNDoc: Write EPub books for the iPad