Likewise, in the case with J1939, dbcfeeder.py imports j1939reader.py instead of dbcreader.py and passes the required arguments when creating an instance of j1939reader.J1939Reader. Then the j1939reader.J1939Reader instance starts a thread by running start_listening() and receiving PGN data through a j1939.ElectronicControlUnit instance that is connected to the passed CAN interface (cfg['can.port']).
Sae J1939 71 Pdf Download
j1939reader.py (code) reuses OwnCaToProduceCyclicMessages and dbcreader.py for the requirement A and C with the add-on PGN decode functionality for the requirement B that is closely explained in the following.
start_listening creates a j1939.ElectronicControlUnit instance and connects it to the passed CAN interface (cfg['can.port']). Then the ECU instance adds the current j1939reader.J1939Reader (precisely, j1939.ControllerApplication inherited by j1939reader.J1939Reader) instance and starts a thread of it. After running start_listening, the ECU instance can start reading raw CAN frames from the connected CAN interface, convert them into PGN data and send the result to a callback function, on_message, of the j1939reader.J1939Reader instance. 2ff7e9595c
Comments