com.supermap.mobjects.situationmonitor
类 SatelliteCommunication
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.InternalHandleDisposable
-
- com.supermap.mobjects.situationmonitor.SatelliteCommunication
-
- 所有已实现的接口:
- IDisposable
public class SatelliteCommunication extends com.supermap.data.InternalHandleDisposable
卫星通讯类
-
-
构造器概要
构造器 构造器和说明 SatelliteCommunication()
构造函数
-
方法概要
所有方法 实例方法 具体方法 限定符和类型 方法和说明 void
addSatelliteReceiveDataListener(SatelliteReceiveDataListener l)
注册监听boolean
close()
关闭协议模块void
dispose()
释放对象boolean
init(String szPort, long hWnd, int uiUserMsg, int nProtocalType, long dwBaudRate, int nSsptRdType, int nSsptRnType)
协议模块初始化boolean
initFlag(String dwUSerID)
下属机初始化成功标识void
removeSatelliteReceiveDataListener(SatelliteReceiveDataListener l)
移除监听ResolveDataObject
resolveData(long lCharHandle, int nLength)
解析数据boolean
sendData(SendDataObject structSEND_DATA, String strSendMsg)
发送数据void
testSignal(String strSignal, int nLength)
-
-
-
方法详细资料
-
dispose
public void dispose()
释放对象
-
init
public boolean init(String szPort, long hWnd, int uiUserMsg, int nProtocalType, long dwBaudRate, int nSsptRdType, int nSsptRnType)
协议模块初始化- 参数:
szPort
- 串口名称,例如"COM1"hWnd
- 当底层有数据时, 接收通知消息的窗口句柄,若没有窗口,填NULLuiUserMsg
- 当底层有数据时,向窗口所发的消息代码,若没有窗口,可以填通知信号量句柄; 当使用vxworks系统时,此参数为串口类型nProtocalType
- 接口协议类型dwBaudRate
- 串口波特率,默认值为115200nSsptRdType
- Rd类型,默认值为0nSsptRnType
- Rn类型,默认值为0- 返回:
- 若成功则返回PROTO_SUCCESS(0),失败返回-1
-
close
public boolean close()
关闭协议模块- 返回:
- 若成功则返回PROTO_SUCCESS(0),失败返回-1
-
sendData
public boolean sendData(SendDataObject structSEND_DATA, String strSendMsg)
发送数据- 参数:
structSEND_DATA
- 发送数据的结构体strSendMsg
- 需要发送的信息- 返回:
- 若成功则返回PROTO_SUCCESS(0),失败返回-1
-
resolveData
public ResolveDataObject resolveData(long lCharHandle, int nLength)
解析数据- 参数:
lCharHandle
-nLength
-- 返回:
-
addSatelliteReceiveDataListener
public void addSatelliteReceiveDataListener(SatelliteReceiveDataListener l)
注册监听
-
removeSatelliteReceiveDataListener
public void removeSatelliteReceiveDataListener(SatelliteReceiveDataListener l)
移除监听
-
initFlag
public boolean initFlag(String dwUSerID)
下属机初始化成功标识- 参数:
dwUSerID
-- 返回:
- 初始化是否成功
-
testSignal
public void testSignal(String strSignal, int nLength)
-
-
Copyright © 2021–2024 SuperMap. All rights reserved.