[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] test_nmea2000
From: |
address@hidden |
Subject: |
[gpsd-dev] test_nmea2000 |
Date: |
Thu, 29 Jan 2015 14:33:15 +0100 |
Hello,
i have pushed a test script for the nmea2000 stuff now.
It uses a bit different approch then the other test.
I starts a gpsd with a private socket number, and let it listen on the virtual
canbus.
I use the "canplayer" from the can-utils to play the logfile, and gpspipe to
get the results.
With this approach, i can test gpsd with all its internal timing.
canplayer generate the traffic on the virtual CAN bus with about the same
timing as the can frames are recorded.
I have two problems left with the script:
1.) Messages from gpsd (it is started as a daemon) are redirected to the syslog.
2.) The version info and the activation time of chk file and the generated
output differ (and must differ). A tricky grep command is still needed to
suppress this.
Here is how i start the test at the moment,
./test_nmea2000 test/nmea2000/logfile_20140914_365495765_can.log
and this are the expected (and correct, but a bit nasty) results.
1,2c1,2
<
{"class":"VERSION","release":"3.12~dev","rev":"release-3.11-285-g84eeb35","proto_major":3,"proto_minor":10}
<
{"class":"DEVICES","devices":[{"class":"DEVICE","path":"nmea2000://vcan0","driver":"NMEA2000","activated":"2015-01-28T15:55:14.973Z"}]}
---
> {"class":"VERSION","release":"3.12~dev","rev":"release-3.11-292-gc22e4ad","proto_major":3,"proto_minor":10}
> {"class":"DEVICES","devices":[{"class":"DEVICE","path":"nmea2000://vcan0","driver":"NMEA2000","activated":"2015-01-29T13:02:45.663Z"}]}
57c57
< {"class":"DEVICE","path":"nmea2000://vcan0:176","activated":1422460530.339308}
---
> {"class":"DEVICE","path":"nmea2000://vcan0:176","activated":1422536568.493006}
76c76
< {"class":"DEVICE","path":"nmea2000://vcan0:1","activated":1422460530.641723}
---
> {"class":"DEVICE","path":"nmea2000://vcan0:1","activated":1422536568.795175}
142c142
< {"class":"DEVICE","path":"nmea2000://vcan0:17","activated":1422460531.585339}
---
> {"class":"DEVICE","path":"nmea2000://vcan0:17","activated":1422536569.738049}
The test take about 3.5 minutes.
I will continue to test the nmea2000 port, but other people should be able to
do some basic test too.
Reinhard
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gpsd-dev] test_nmea2000,
address@hidden <=