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) |
public void dispose()
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类型,默认值为0public boolean close()
public boolean sendData(SendDataObject structSEND_DATA, String strSendMsg)
structSEND_DATA
- 发送数据的结构体strSendMsg
- 需要发送的信息public ResolveDataObject resolveData(long lCharHandle, int nLength)
lCharHandle
- nLength
- public void addSatelliteReceiveDataListener(SatelliteReceiveDataListener l)
public void removeSatelliteReceiveDataListener(SatelliteReceiveDataListener l)
public boolean initFlag(String dwUSerID)
dwUSerID
- public void testSignal(String strSignal, int nLength)
Copyright © 2021–2024 SuperMap. All rights reserved.