77"""
88from __future__ import print_function
99import datetime
10+ import time
1011import argparse
12+ import logging
1113
1214import can
1315from .blf import BLFReader
1416from .sqlite import SqlReader
1517
18+ log = logging .getLogger ('can.io.player' )
19+
1620
1721class LogReader (object ):
1822 """
@@ -101,7 +105,7 @@ def main():
101105 parser .add_argument ('-i' , '--interface' , dest = "interface" ,
102106 help = '''Specify the backend CAN interface to use. If left blank,
103107 fall back to reading from configuration files.''' ,
104- choices = can .interface . VALID_INTERFACES )
108+ choices = can .VALID_INTERFACES )
105109
106110 parser .add_argument ('-b' , '--bitrate' , type = int ,
107111 help = '''Bitrate to use for the CAN bus.''' )
@@ -115,7 +119,7 @@ def main():
115119 help = '''<s> skip gaps greater than 's' seconds''' )
116120
117121 parser .add_argument ('infile' , metavar = 'input-file' , type = str ,
118- help = 'The file to replay. Supported types: .db' )
122+ help = 'The file to replay. Supported types: .db, .blf ' )
119123
120124 results = parser .parse_args ()
121125
@@ -141,6 +145,8 @@ def main():
141145
142146 try :
143147 for m in in_sync :
148+ if verbosity >= 3 :
149+ print (m )
144150 bus .send (m )
145151 except KeyboardInterrupt :
146152 pass
0 commit comments