[求助]关于Mscomm控件初始化
笔者最近做一个串口控制程序,任务是模拟一个给定软件的功能。监测其初始化如下:
COM2【DEVICE_CONTROL:SET_BAUD_RATE】80 25 00 00
COM2【DEVICE_CONTROL:SET_LINE_CONTROL】00 00 08
COM2【DEVICE_CONTROL:SET_CHARS】00 00 00 00 11 13
COM2【DEVICE_CONTROL:SET_HANDFLOW】00 00 00 00 00 00 00 00 00 08 00 00 00 02 00 00
COM2【DEVICE_CONTROL:SET_QUEUE_SIZE】00 04 00 00 00 02 00 00
COM2【DEVICE_CONTROL:PURGE】0F 00 00 00
COM2【DEVICE_CONTROL:SET_WAIT_MASK】01 00 00 00
COM2【DEVICE_CONTROL:SET_TIMEOUTS】14 00 00 00 0A 00 00 00 64 00 00 00 0A 00 00 00 64 00 00 00
其中大部分数据的功能都已经弄明白了,只剩下SET_HANDFLOW和SET_WAIT_MASK百思不得其解。
故遍寻百度,无奈完全没有资料可供参考。
只做出如下效果:
COM2【DEVICE_CONTROL:SET_QUEUE_SIZE】00 04 00 00 00 02 00 00
COM2【DEVICE_CONTROL:SET_TIMEOUTS】FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 88 13 00 00
COM2【DEVICE_CONTROL:SET_BAUD_RATE】80 25 00 00
COM2【DEVICE_CONTROL:SET_LINE_CONTROL】00 00 08
COM2【DEVICE_CONTROL:SET_CHARS】1A 00 00 00 11 13
COM2【DEVICE_CONTROL:SET_WAIT_MASK】FD 01 00 00 FD 01 00 00
COM2【DEVICE_CONTROL:SET_HANDFLOW】01 00 00 00 00 00 00 00 00 01 00 00 00 01 00 00
COM2【DEVICE_CONTROL:SET_TIMEOUTS】14 00 00 00 0A 00 00 00 64 00 00 00 0A 00 00 00 64 00 00 00
如有高人路过,劳烦指点一二!!