J1708🎉 #85
Replies: 1 comment 4 replies
-
Very nice! I'd like to note that RP1210Client is a child of RP1210VendorList, which stores instances of all available RP1210Config objects in a list (which is populated via the API names in RP121032.ini in C:\Windows). RP1210Client allows you to select which vendor and which device you want to use (accessed via RP1210Client initializes its own instances of RP1210API and RP1210Config, which can be accessed via client = RP1210.RP1210Client()
# set vendor and device (intended for use with a dropdown menu):
client.setVendor(self.dll_name)
device_id = client.getCurrentVendor().getProtocol("J1708").getDevices()[0]
client.setDevice(device_id)
# connect to device that was selected in previous step:
client.connect(b"J1708:Baud=9600") # this returns clientID, but will also automatically store in client.clientID This functionality would be more clear if I populated the This discussion made me realize that it'd be convenient to have the current RP1210API and RP1210Config list accessible as properties; I'll add an issue for that. It would also be nice to break out current device as a property. I should probably also add support for selecting protocol and baud with RP1210Client, which would eliminate the need for the user of the package to generate their own protocol string. Thanks for using the package - your comment has been a big help to me just by showing me how you used it. |
Beta Was this translation helpful? Give feedback.
-
Thanks for this library. I'm able to use J1708 on an RP1210 adapter by monkeypatching clienID
then
client
is ready to go.rx()
return the expected 4 bytes of timestamps which need to be discarded andtx()
expects a byte prepended which is discarded before sending the rest.Beta Was this translation helpful? Give feedback.
All reactions