Skip to content

Commit

Permalink
Fixed Doxygen findings
Browse files Browse the repository at this point in the history
  • Loading branch information
gabryelreyes committed Nov 13, 2023
1 parent 08ef8f7 commit 0820f8d
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 27 deletions.
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ The SerialMuxProt is being developed for the communication between the Zumo Robo
- [Network Architecture](#network-architecture)
- [Frame](#frame)
- [Control Channel](#control-channel-channel-0)
- [SYNC](#sync-d0--0x00)
- [SYNC_RSP](#sync_rsp-d0--0x01)
- [SCRB](#scrb-d0--0x02)
- [SCRB_RSP](#scrb_rsp-d0--0x03)
- [SYNC](#sync)
- [SYNC_RSP](#sync)
- [SCRB](#scrb)
- [SCRB_RSP](#scrb)
- [Internal Architecture](#internal-architecture)

---
Expand All @@ -30,11 +30,13 @@ The Protocol sends and received Frames of the following form:
/** Data container of the Frame Fields */
typedef union _Frame
{
/** Frame Fields */
struct _Fields
{
/** Header */
union _Header
{
/** Header Fields Struct */
struct _HeaderFields
{
/** Channel ID */
Expand All @@ -46,27 +48,27 @@ typedef union _Frame
/** Frame Checksum */
uint8_t m_checksum;

} __attribute__((packed)) headerFields;
} __attribute__((packed)) headerFields; /**< Header Fields */

/** Raw Header Data*/
uint8_t rawHeader[HEADER_LEN];

} __attribute__((packed)) header;
} __attribute__((packed)) header; /**< Header */

/** Payload */
struct _Payload
{
/** Data of the Frame */
uint8_t m_data[MAX_DATA_LEN];

} __attribute__((packed)) payload;
} __attribute__((packed)) payload; /**< Payload */

} __attribute__((packed)) fields;
} __attribute__((packed)) fields; /**< Frame Fields */

/** Raw Frame Data */
uint8_t raw[MAX_FRAME_LEN] = {0U};

} __attribute__((packed)) Frame;
} __attribute__((packed)) Frame; /**< Frame */
```

### Header
Expand Down Expand Up @@ -104,27 +106,31 @@ typedef union _Frame
- D0 (Data Byte 0) is used as a Command Byte. Defines the command that is being sent.
- Even-number *Commands* in D0 are used as Commands, while uneven-number *Commands* are used as the response to the immediately previous (n-1) command.

### SYNC (D0 = 0x00)
### SYNC

- D0 = 0x00
- Server sends SYNC Command with current timestamp.
- Client responds with [SYNC_RSP](#sync_rsp-d0--0x01).
- Client responds with [SYNC_RSP](#sync).
- Server can calculate Round-Trip-Time.
- SYNC Package must be sent periodically depending on current [State](#state-machine). The period is also used as a timeout for the previous SYNC.
- Used as a "Heartbeat" or "keep-alive" by the client.

### SYNC_RSP (D0 = 0x01)
### SYNC_RSP

- Client Response to [SYNC](#sync-d0--0x00).
- D0 = 0x01
- Client Response to [SYNC](#sync).
- Data Payload is the same timestamp as in SYNC Command.

### SCRB (D0 = 0x02)
### SCRB

- D0 = 0x02
- Client sends the name of the channel it wants to suscribe to.
- Server responds with the number and the name of the requested channel, if it is found and valid. If the channel is not found, the response has channel number = 0.

### SCRB_RSP (D0 = 0x03)
### SCRB_RSP

- Server Response to [SCRB](#scrb-d0--0x02).
- D0 = 0x03
- Server Response to [SCRB](#scrb).
- Channel Number on Data Byte 1 (D1).
- Channel Name on the following bytes

Expand Down
5 changes: 2 additions & 3 deletions doc/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,7 @@ WARN_LOGFILE = doxygen_warnings.txt
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = ../../src \
../../README.md
INPUT = ../../src

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -1121,7 +1120,7 @@ FILTER_SOURCE_PATTERNS =
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.

USE_MDFILE_AS_MAINPAGE = ../../README.md
USE_MDFILE_AS_MAINPAGE =

# The Fortran standard specifies that for fixed formatted Fortran code all
# characters from position 72 are to be considered as comment. A common
Expand Down
12 changes: 7 additions & 5 deletions src/SerialMuxProtCommon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,13 @@ struct Channel
/** Data container of the Frame Fields */
typedef union _Frame
{
/** Frame Fields */
struct _Fields
{
/** Header */
union _Header
{
/** Header Fields Struct */
struct _HeaderFields
{
/** Channel ID */
Expand All @@ -141,27 +143,27 @@ typedef union _Frame
/** Frame Checksum */
uint8_t m_checksum;

} __attribute__((packed)) headerFields;
} __attribute__((packed)) headerFields; /**< Header Fields */

/** Raw Header Data*/
uint8_t rawHeader[HEADER_LEN];

} __attribute__((packed)) header;
} __attribute__((packed)) header; /**< Header */

/** Payload */
struct _Payload
{
/** Data of the Frame */
uint8_t m_data[MAX_DATA_LEN];

} __attribute__((packed)) payload;
} __attribute__((packed)) payload; /**< Payload */

} __attribute__((packed)) fields;
} __attribute__((packed)) fields; /**< Frame Fields */

/** Raw Frame Data */
uint8_t raw[MAX_FRAME_LEN] = {0U};

} __attribute__((packed)) Frame;
} __attribute__((packed)) Frame; /**< Frame */

/**
* Enumeration of Commands of Control Channel.
Expand Down
6 changes: 3 additions & 3 deletions src/SerialMuxProtServer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,9 @@ class SerialMuxProtServer

private:
/* Not allowed. */
SerialMuxProtServer();
SerialMuxProtServer(const SerialMuxProtServer& avg);
SerialMuxProtServer& operator=(const SerialMuxProtServer& avg);
SerialMuxProtServer(); /**< Default Constructor */
SerialMuxProtServer(const SerialMuxProtServer& avg); /**< Copy Constructor */
SerialMuxProtServer& operator=(const SerialMuxProtServer& avg); /**< Assignment Operator */
};

/******************************************************************************
Expand Down

0 comments on commit 0820f8d

Please sign in to comment.