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.

Classes

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...

Defines

#define DEFAULT_SIMGEN   "Cycle"
 Default sim generator.
#define DEFAULT_WINPORT   "CNCA0"
 Default windows port.
#define ELM_ADAPTIVETIMING   1
 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.
#define ELM_NODATA_PROMPT   "NO DATA"
 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.
#define OBDSIM_BENCHMARKTIME   10
 Print out benchmarks every this often [seconds].
#define OBDSIM_DEFAULT_PROTOCOLNUM   "8"
 Default protocol. Looked up early on - better match something from the above list.
#define OBDSIM_MAXECUS   6
 Hardcode maximum number of ECUs/generators.
#define OBDSIM_MAXFREEZEFRAMES   5
 Max number of frames for freeze frame.
#define OBDSIM_SLEEPTIME   1000
 Length of time to sleep between nonblocking reads [us].
#define VARIABLE_IS_NOT_USED

Enumerations

enum  protocol_headertype {
  OBDHEADER_NULL, OBDHEADER_J1850PWM, OBDHEADER_J1850VPW, OBDHEADER_14230,
  OBDHEADER_CAN29, OBDHEADER_CAN11
}
 

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


Functions

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.

Variables

static struct option longopts []
 getopt() long options
static struct obdiiprotocol
VARIABLE_IS_NOT_USED 
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