Skip to content

Commit 2dabcfb

Browse files
authored
Merge pull request #16 from bringauto/jan_kubalek/documentation_update
Documentation updated to reflect key points of Fleet Protocol
2 parents 309e180 + 818a9cf commit 2dabcfb

2 files changed

Lines changed: 41 additions & 25 deletions

File tree

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
_tmp/
2-
_build/
1+
_*
32
cmake-build-*
43
.idea

README.md

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,60 @@
11
# Fleet Protocol
22

3-
Fleet Protocol is a communication protocol developed by BringAuto to allow simple and reliable communication between
4-
multiple devices and cloud infrastructure.
5-
**Complete protocol documentation will be released soon**. Protocol consists of three parts:
3+
Fleet Protocol is a communication technology developed by BringAuto to allow for **simple and reliable** communication between
4+
devices deployed in an **internet-connection-unstable** environment and cloud infrastructure.
65

7-
* internal client - specific part of device that communicates with module gateway
8-
* module gateway:
9-
- internal server - communicates with internal client
10-
- aggregator - aggregates status messages
11-
- external client - communicates with external server
12-
* external server - communicates with server infrastructure that gives user the ability to control devices
6+
Protocol consists of three parts:
7+
8+
* Internal Client (Remote) - part of a device which communicates with a Module Gateway
9+
* Module Gateway (Remote):
10+
- internal server - communicates with internal clients
11+
- aggregator - aggregates status messages, gathers and aggragates messages in case of connection outage, ...
12+
- external client - communicates with an External Server
13+
* External Server (Cloud) - deployed as part of the cloud infrastructure. It provides status messages and can be used to control devices by command messages.
1314

1415
## Communication protocol
1516

16-
We use [ProtoBuf] library for message format (version [Protobuf version]) and serialization/deserialization - protocol
17+
We use the [ProtoBuf] library for message format (version [Protobuf version]) and serialization/deserialization - protocol
1718
specification
18-
can be found in protobuff folder.
19+
can be found in protobuf folder.
1920

20-
Each message must be prefixed with four bytes long (uint32_t data type) header which holds
21-
information about size of the ProtoBuf message.
21+
Each message must be prefixed with a four bytes long (uint32_t data type) header, which holds
22+
information about the size of the ProtoBuf message.
2223

23-
To read more about the system architecture look at Fleet Protocol v2 documentation:
24+
To read more about the system architecture, check the Fleet Protocol v2 documentation:
2425

25-
- [Summary]
26+
- [Summary] - overall high-level summary
2627
- [Fleet Protocol Requirements]
2728
- [Internal Client]
2829
- [Module Gateway]
2930
- [External Server]
30-
- [Modules]
31+
- [Modules] - list of implemented modules
3132
- [Message Structure]
3233
- [Internal Client design]
3334
- [Module Gateway design]
3435
- [External Server design]
36+
37+
## HTTP Interface
38+
39+
The Fleet Protocol HTTP API represents the protocol in the form of an HTTP API.
40+
41+
A Fleet Protocol Module can use the HTTP API to provide its statuses and retrieve its commands
42+
through a simple and understandable REST API for easy integration with other services.
43+
44+
Fleet Protocol HTTP API is a standalone project and is not part of the Fleet Protocol v2 core specification.
45+
3546
- [HTTP API]
47+
- [HTTP API C++ Client]
48+
- [HTTP API Python3 Client]
3649
- [HTTP API Wait Mechanism]
3750

38-
### Protocol messages
51+
## Protocol messages
3952

40-
Messages are described by ProtoBuff v3.
53+
Messages are described by ProtoBuf v3.
4154

42-
If the message filed is not mandatory then it's marked as OPTIONAL by "OPTIONAL"
55+
If a message field is not mandatory, then it's marked as OPTIONAL by "OPTIONAL"
4356
as the last comment in documentation for the given field.
44-
Optional fields has defaults as described in [ProtoBuf] v3 doc.
57+
Optional fields have defaults as described in the [ProtoBuf] v3 doc.
4558

4659
## Repo structure
4760

@@ -57,7 +70,7 @@ Header files of interfaces
5770

5871
### Protobuf
5972

60-
Protobuf compiled and non-compiled files
73+
Compiled and non-compiled protobuf files
6174

6275
## Usage
6376

@@ -67,7 +80,7 @@ Protobuf compiled and non-compiled files
6780

6881
### Installation
6982

70-
To install the library, first configure the project with CMake option BRINGAUTO_INSTALL=ON and BRINGAUTO_PACKAGE=ON and then install it.
83+
To install the library, first configure the project with the CMake option BRINGAUTO_INSTALL=ON and BRINGAUTO_PACKAGE=ON, and then install it.
7184

7285
```bash
7386
mkdir _build && cd _build
@@ -95,7 +108,7 @@ FIND_PACKAGE(fleet-protocol-interface REQUIRED)
95108
TARGET_LINK_LIBRARIES(<target> PUBLIC fleet-protocol-interface::fleet-protocol-interface)
96109
```
97110

98-
This will link all interfaces. If you want to link only specific interface, use the interfaces from the list below:
111+
This will link all interfaces. If you want to only link a specific interface, chose from the interfaces listed below:
99112

100113
* fleet-protocol-interface::common-headers-interface
101114
* fleet-protocol-interface::internal-client-interface
@@ -136,3 +149,7 @@ This will link all interfaces. If you want to link only specific interface, use
136149
[HTTP API]: https://ref.bringautofleet.com/r/protocol/http-api/1.0.0/http-api
137150

138151
[HTTP API Wait Mechanism]: https://ref.bringautofleet.com/r/protocol/http-api/1.0.0/wait-mechanism
152+
153+
[HTTP API C++ Client]: https://github.com/bringauto/fleet-protocol-http-client-cxx
154+
155+
[HTTP API Python3 Client]: https://github.com/bringauto/fleet-protocol-http-client-python

0 commit comments

Comments
 (0)