Menu

[b30717]: / include / elm327.h  Maximize  Restore  History

Download this file

64 lines (54 with data), 1.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* openobd
* Copyright (C) Simon Booth 2010 <simesb@users.sourceforge.net>
*
* openobd is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* openobd is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _ELM327_H_
#define _ELM327_H_
#include "obdbase.h"
#define PROTO_AUTOMATIC 0x00 ///< Automatic protocol
#define PROTO_J1850_PWM 0x01 ///<
#define PROTO_J1850_VPW 0x02 ///<
#define PROTO_9141 0x03 ///<
#define PROTO_14230_BAUD_INIT 0x04 ///<
#define PROTO_14230_FAST_INIT 0x05 ///<
#define PROTO_15765_11_500 0x06 ///<
#define PROTO_15765_29_500 0x07 ///<
#define PROTO_15765_11_250 0x08 ///<
#define PROTO_15765_29_250 0x09 ///<
#define PROTO_J1939 0x0A ///<
#define PROTO_USER_1 0x0B ///<
#define PROTO_USER_2 0x0C ///<
class elm327: public obdbase
{
public:
elm327 (const wxString& serialPort);
bool obdProtocolSet (int OBDprotocol);
wxString obdDeviceIdentify ();
wxString obdProtocolGet();
void obdInitSlow ();
void obdInitFast ();
void obdDeviceDisconnect();
bool elmSetHeaders (bool show);
bool elmSetEcho (bool show);
bool elmSetCanAutoformat(bool on);
double elmGetVersion();
protected:
private:
double version_;
wxString elmSendAtCommand (const wxString& command);
};
#endif // _ELM327_H_