Skip to content

Commit ba3577b

Browse files
author
Avi SZYCHTER
committed
Fix table of contents and README's sections
1 parent 4769d30 commit ba3577b

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

README.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,21 @@ Table of Contents
99

1010
- [C++ CAN Parser](#c-can-parser)
1111
- [Table of Contents](#table-of-contents)
12-
- [Compile and include the library](#compile-and-include-the-library)
13-
- [The public headers](#the-public-headers)
14-
- [Compilation](#compilation)
15-
- [Parsing a CAN database](#parsing-a-can-database)
16-
- [The API](#the-api)
17-
- [`CANSignal`](#cansignal)
18-
- [`CANFrame`](#canframe)
19-
- [`CANDatabase`](#candatabase)
20-
- [can-parse](#can-parse)
21-
- [Supported standards:](#supported-standards)
12+
- [Compile and include the library](#compile-and-include-the-library)
13+
- [The public headers](#the-public-headers)
14+
- [Compilation](#compilation)
15+
- [Parsing a CAN database](#parsing-a-can-database)
16+
- [How to use the database](#how-to-use-the-database)
17+
- [`CANSignal`](#cansignal)
18+
- [`CANFrame`](#canframe)
19+
- [`CANDatabase`](#candatabase)
20+
- [can-parse](#can-parse)
21+
- [Supported standards](#supported-standards)
2222

23-
## Compile and include the library
23+
Compile and include the library
24+
===============================
2425

25-
### The public headers
26+
## The public headers
2627

2728
You need to put the public headers in an appropriate place:
2829

@@ -33,7 +34,7 @@ your_project/
3334
|_ cpp-can-parser/ # <-- Put here the public headers
3435
```
3536

36-
### Compilation
37+
## Compilation
3738

3839
cpp-can-parser is not a header-only library. I recommand CMake to include the library into your project:
3940

@@ -59,7 +60,8 @@ cpp-can-parser is not provided with an already existing Makefile. You will still
5960
LD_FLAGS=-Lpath/to/the/library -lcpp-can-parser
6061
```
6162

62-
## Parsing a CAN database
63+
Parsing a CAN database
64+
======================
6365

6466
The main feature of the library is the possibility of parsing a file representing the CAN database. There are several popular file formats and the list of the currently ones is available at the end of this README.
6567

@@ -89,7 +91,8 @@ One can see that `CANDatabase::fromFile()` can throw a CANDatabaseException. Thi
8991
If the data that you are using does not come from a file, it is also possible to use `CANDatabase::fromString("...")` which behaves just like its counterpart.
9092
9193
92-
## The API
94+
How to use the database
95+
=======================
9396
9497
The library exposes three main kind of objects:
9598
* `CANDatabase` : represents the whole database. It gatherse all the informations of the database such as the frames and their signals, but you can also find the filename from which the database was created (if applicable).
@@ -98,7 +101,7 @@ The library exposes three main kind of objects:
98101
99102
All those classes try to behave the closest possible to STL containers. They notably implement all the required iterators methods so **they can be used in range-based for loops**
100103
101-
### `CANSignal`
104+
## `CANSignal`
102105
103106
Here are the most important properties of a `CANSignal` instance:
104107
@@ -114,7 +117,7 @@ Here are the most important properties of a `CANSignal` instance:
114117
115118
Sometimes the database also includes "enumerations", ie for given signals we associate string literals to values (example: 0 = Nothing, 1 = State 1, 2 = State 2). `choices()` allows to iterate through the signal's enumeration (if any).
116119
117-
### `CANFrame`
120+
## `CANFrame`
118121
119122
Here are the most important properties of a `CANFrame` instance:
120123
@@ -136,7 +139,7 @@ for(const auto& sig : frame) {
136139
}
137140
```
138141

139-
### `CANDatabase`
142+
## `CANDatabase`
140143

141144
Here are the most important properties of a `CANDatabase` instance:
142145

@@ -155,7 +158,8 @@ for(const auto& frame : db) {
155158
}
156159
```
157160

158-
## can-parse
161+
can-parse
162+
=========
159163

160164
`can-parse` is a utility program that allows you to parse the content of a CAN database which is then output to the standard output.
161165

@@ -196,5 +200,7 @@ To compile, just use the following instructions:
196200
197201
There you got yourself a very nice installation of `can-parse` :) !
198202
199-
## Supported standards:
203+
Supported standards
204+
===================
205+
200206
* DBC (in progress)

0 commit comments

Comments
 (0)