项目作者: chipkin

项目描述 :
This application tests the MSTP callback functions on Linux
高级语言: C
项目地址: git://github.com/chipkin/Linux-MSTPCallbackTest.git
创建时间: 2019-05-23T22:37:47Z
项目社区:https://github.com/chipkin/Linux-MSTPCallbackTest

开源协议:

下载


Linux MSTP Callback Test

This application is an example of how to test the MSTP callback functions on Linux. This application can be be ported to other hardware to test to ensure that it will support the requirements of BACnet MSTP.

This application is designed to work in tandem with Linux High Speed Serial Monitor

Testing instructions

  1. Connect a USB RS485 converter to a Linux computer.
  2. Connect the USB RS384 [D+], [D-], [GND] to the unit under test [D+], [D-], [GND].
  3. Run Linux High Speed Serial Monitor on a Linux computer.
  4. Run the MSTP Callback Test on the unit under test.

Example output of MSTP Callback Test

  1. ./test
  2. FYI: MSTP Callback Test. Version: 0.0.0.1
  3. FYI: Test 1: Internal high speed timer
  4. FYI: Testing high speed timer. timerMS=10
  5. Success. timerMS: 10, millisecondTimer: 10.041
  6. FYI: Testing high speed timer. timerMS=20
  7. Success. timerMS: 20, millisecondTimer: 20.172
  8. FYI: Testing high speed timer. timerMS=40
  9. Success. timerMS: 40, millisecondTimer: 40.14
  10. FYI: Testing high speed timer. timerMS=80
  11. Success. timerMS: 80, millisecondTimer: 80.048
  12. FYI: Testing high speed timer. timerMS=101
  13. Success. timerMS: 101, millisecondTimer: 101.327
  14. FYI: Internal high speed timer success
  15. FYI: Connecting to serial port. SerialPort=/dev/ttyS4
  16. FYI: Connectec to serial port
  17. FYI: Test 2: Sending inital test byte. buffer='0' 0x30
  18. FYI: Check the serial port for the results to this test.
  19. FYI: Test 3: Sleep timer
  20. FYI: Check the serial port for the results to this test.
  21. FYI: Test 4: Action required ! - Send a byte to the serial port...
  22. FYI: Byte recived. buffer='f' 0x66
  23. FYI: Sending recived byte. buffer='f' 0x66
  24. FYI: Success. All tests compleat.

Example output from Linux High Speed Serial Monitor

  1. FYI: High speed serail monitor. Version: 0.0.0.1
  2. FYI: Connecting to serial port. SerialPort=/dev/ttyS5, BaudRate=38400
  3. FYI: Connected to serial port
  4. | Time (ms) | CHAR | HEX |
  5. * ---------- * -------- * -------- *
  6. | 3071.264 | 0 | 00 |
  7. | 0.628 | a | 0a |
  8. | 10.392 | b | 0b |
  9. | 10.531 | c | 0c |
  10. | 10.931 | d | 0d |
  11. | 21.001 | e | 0e |
  12. | 31.027 | f | 0f |
  13. | 40.892 | g | 0g |
  14. | 50.499 | h | 0h |

Building

A included makefile can be built with GCC

  1. make all

This project also auto built using Gitlab CI on every commit.

Binary

A compiled version of the serial monitor is included in this repo. mstpCallbackTest

Change log

2019 May 23

  • 0.0.2 Added CI build number. Updated make file to include “all”, and “Clean” steps. Added Gitlab CI auto builds.
  • 0.0.1 Initial version