下载此文档

GPS 编程类.doc


文档分类:IT计算机 | 页数:约23页 举报非法文档有奖
1/23
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/23 下载此文档
文档列表 文档介绍
using System; using ; using ; namespace BaseStationPDA { class GPS { public string PortNum; public int BaudRate; public byte ByteSize; public byte Parity; // 0-4=no,odd,even,mark,space public byte StopBits; //0,1,2 =1,, 2 public int ReadTimeout; //comm port win32 file handle private int hComm = -1; public bool Opened = false; //win32 api constants private const uint GENERIC_READ =0x80000000; private const uint GENERIC_WRITE =0x40000000; private const int OPEN_EXISTING =3; private const int INVALID_HANDLE_VALUE = -1; [StructLayout()] public struct DCB { //taken from c struct in platform sdk public int DCBlength; // sizeof(DCB) public int BaudRate; //指定当前波特率 current baud rate // these are the c struct bit fields, bit twiddle flag to set public int fBinary; //指定是否允许二进制模式,在 windows95 中必须主 TRUE binary mode, no EOF check public int fParity; //指定是否允许奇偶校验 enable parity checking public int fOutxCtsFlow; //指定 CTS 是否用于检测发送控制,当为 TRUE 是 CTS 为 OFF ,发送将被挂起。 CTS output flow control public int fOutxDsrFlow; //指定 CTS 是否用于检测发送控制 DSR output flow control public int fDtrControl; // DTR_CONTROL_DISABLE 值将 DTR 置为 OFF, DTR_CONTROL_ENABLE 值将 DTR 置为 ON, DTR_CONTROL_HANDSHAKE 允许 DTR" 握手" DTR flow control type public int fDsrSensitivity; //当该值为 TRUE 时 DSR 为 OFF 时接收的字节被忽略 DSR sensitivity public int fTXContinueOnXoff; //指定当接收缓冲区已满,并且驱动程序已经发送出 XoffChar 字符时发送是否停止。 TRUE 时,在接收缓冲区接收到缓冲区已满的字节 XoffLim 且驱动程序已经发送出 XoffChar 字符中止接收字节之后, 发送继续进行。 FALSE 时,在接收缓冲区接收到代表缓冲区已空的字节 XonCha r且驱动程序已经发送出恢复发送的 XonCha r之后,发送继续进行。 XOFF continues Tx public int fOutX; // TRUE 时,接收到 XoffChar 之后便停止发送接收到 XonChar 之后将重新开始 XON/XOFF out flow control public int fInX; // TRUE 时,接收缓冲区接收到代表缓冲区满的 XoffLim 之后, XoffChar 发送出去接收缓冲区接收到代表缓冲区空的 XonLim 之后, XonChar 发送出去 XON/XOFF in flow control public int fErrorChar; //该值为 TRU E且 fParit y为 TRU E时,用 ErrorChar 成员指定的字符代替奇偶校验错误的接收字符 enable error replacement public int fNull; // eTRUE 时,接收时去掉空(0值)字节 enable null stripping public int fRtsCo

GPS 编程类 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数23
  • 收藏数0 收藏
  • 顶次数0
  • 上传人yuzonghong1
  • 文件大小116 KB
  • 时间2017-02-20