Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Namespaces and module suggestions again, OBDII

by shotgunefx (Parson)
on Nov 23, 2005 at 01:09 UTC ( #510977=perlquestion: print w/replies, xml ) Need Help??
shotgunefx has asked for the wisdom of the Perl Monks concerning the following question:

I'm working on a module for interfacing to my car's (OBDII - Onboard Diagnostic Port) diagnostic port. The device I'm using is an ELM323 based OBDII intepreter. Basically a serial interface to the car, which allows you to send requests to the car and retrieve data. Cars have several interfaces (ISO,VPW,CANBus), mine is targeted for ISO (though I believe the computer side is the same for most other protocols)

Something like "Device::ELM323::ISO" seems ok, but feels like OBDII should be mentioned in there somewhere.

Another thing I'm wondering about before I hit CPAN with this (and another module) is the best practice for handling example scripts.

For example, I'd like to include an example control script with the module distro, but not sure the best way to have influence the makefile. I'd like it included, but not necessarily installed anywhere outside of where the module is unzipped .

Any suggestions would be welcome.
Clarified some acronyms.


perl digital dash (in progress)
  • Comment on Namespaces and module suggestions again, OBDII

Replies are listed 'Best First'.
Re: Namespaces and module suggestions again, OBDII
by kulls (Hermit) on Nov 23, 2005 at 03:57 UTC
    I found some of other intepreters here. I suggest that you can categorized to Device::Interpreter and in that category,you can hold all your interpreter families like ELM 322, ELM320 and so on.As you mentioned,ELM323::OBDII is reasonable.
      Apparently the ELM327 is only a few weeks old. Didn't really pick up on it before, but the 320 and 322 are for cars that utilize PWM and VPW respectively. I thought they were previous revisions of the interface.

      Looking at the data sheets, seems to confirm that the command set and return values are the same for all (Excluding the 327, which uses CAN and has a lot of other options). So this should work in theory for all of the popular varients.

      So maybe OBDII::ELM32X instead? Though it seems like Device should be in there somewhere from a taxonomy point of view.

      Plus It needs a Device::SerialPort or Win32::SerialPort or subclass passed to it's constructor. What do you think of


      perl digital dash (in progress)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://510977]
Approved by monkfan
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2018-06-19 03:10 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (111 votes). Check out past polls.