Logo Search packages:      
Sourcecode: obdgpslogger version File versions  Download package

Classes | Defines | Enumerations | Functions | Variables

obdsim.h File Reference

OBD Simulator Main Entrypoint. More...

#include <getopt.h>
#include <stdlib.h>
#include "obdservicecommands.h"
Include dependency graph for obdsim.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  freezeframe
 This is a frozen frame. More...
struct  obdgen_ecu
 An array of these is created, each for a different ECU. More...
struct  obdgen_ecudelays
 This is used for customdelays. More...
struct  obdiiprotocol
 Each OBDII Protocol has a number and description. More...
struct  simsettings
 All of the settings relating to the sim go into this. More...


#define DEFAULT_SIMGEN   "Cycle"
 Default sim generator.
 Default windows port.
 Adaptive timing [0,1,2].
#define ELM_DISPLAYDLC   0
 DLC Dispaly.
#define ELM_ECHO   1
 Default echo.
#define ELM_HEADERS   0
 Default hide headers.
#define ELM_LINEFEED   1
 Default linefeed.
 ELM "NO DATA" prompt.
#define ELM_OK_PROMPT   "OK"
 ELM "OK" prompt.
#define ELM_PROMPT   ">"
 This is the elm prompt.
#define ELM_QUERY_PROMPT   "?"
 ELM "don't know" prompt.
#define ELM_SPACES   1
 Default show spaces.
#define ELM_TIMEOUT   200
 Default timeout, milliseconds.
#define OBDSIM_BATTERYV   11.8
 Default car battery voltage.
 Print out benchmarks every this often [seconds].
 Default protocol. Looked up early on - better match something from the above list.
#define OBDSIM_MAXECUS   6
 Hardcode maximum number of ECUs/generators.
 Max number of frames for freeze frame.
#define OBDSIM_SLEEPTIME   1000
 Length of time to sleep between nonblocking reads [us].


enum  protocol_headertype {

There are 11 or so protocols, but fewer types of header layout.


struct obdiiprotocolfind_obdprotocol (const char *protocol_num)
 Given the single char, find the protocol for it.
void obdsim_elmreset (struct simsettings *s)
 To a reset on the elm device [ATZ/D/WS].
void printhelp (const char *argv0)
 Print Help for --help.
void printobdprotocols ()
 Print all protocol info to stdout.
void printversion ()
 Print the version string.
int set_obdprotocol (const char *prot, struct simsettings *ss)
 Given a protocol [A]{0-9}, set the protocol in the struct.


static struct option longopts []
 getopt() long options
static struct obdiiprotocol
obdprotocols []
 All the protocols I know or care about.
static const char shortopts [] = "hln:e:vs:g:q:V:D:p:Ld:"
 getopt() short options

Detailed Description

OBD Simulator Main Entrypoint.

Definition in file obdsim.h.

Generated by  Doxygen 1.6.0   Back to index