SWT Serial Port Programming


This topic is about serial port communication in Java.

Some equipment will send data automatically, but some will need to send a request command from PC.

To let the Java application communicate with the equipment via the RS-232 hardware (serial ports), need the JavaComm or RXTX library.

Java programming, need to implement SerialPortEventListener in order to listen for incoming data.


To display data on SWT component need to put under this code.

Note: See full source code here.

หมายเลขบันทึก: 597472เขียนเมื่อ 19 พฤศจิกายน 2015 13:42 น. ()แก้ไขเมื่อ 20 พฤศจิกายน 2015 15:07 น. ()สัญญาอนุญาต: ไม่สงวนสิทธิ์ใดๆจำนวนที่อ่านจำนวนที่อ่าน:


ความเห็น (0)

ไม่มีความเห็น

พบปัญหาการใช้งานกรุณาแจ้ง LINE ID @gotoknow
ClassStart
ระบบจัดการการเรียนการสอนผ่านอินเทอร์เน็ต
ทั้งเว็บทั้งแอปใช้งานฟรี
ClassStart Books
โครงการหนังสือจากคลาสสตาร์ท