Skip to content

Commit 6d2b424

Browse files
committed
Documentation fixes
1 parent a3a6f0b commit 6d2b424

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ make -j`nproc`
1010
```
1111

1212
## Classes
13-
- **CPU** - Get CPU informations.
13+
- **CPU** - Get CPU information.
1414
- **DoubleExtras** - Less, Greater, Equal, Between, Round, Split.
1515
- **Exec** - Run command and return stdout or mixed (stdout and stderr) and result code.
1616
- **KeyState** - Check for caps lock state.
1717
- **Serial** - Serial communication class.
1818
- **StringExtras** - LeftTrim, RightTrim, Trim.
19-
- **Timing** - Measering time, cpu and real time.
19+
- **Timing** - Measuring time, cpu and real time.
2020

2121
## Template classes
22-
- **CSVWriter** - Write out comma seperated values.
22+
- **CSVWriter** - Write out comma-separated values.
2323
- **Timer** - Timeout thread on time or interval.
2424

2525
## Unixservice class

source/CPU.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
namespace vx {
4040

4141
/**
42-
* @brief The CPU class for receiving information about the CPU.
42+
* @brief The CPU class to receive information about the CPU.
4343
* @author Florian Becker <fb\@vxapps.com> (VX Apps)
4444
*/
4545
class CPU {
@@ -90,43 +90,43 @@ namespace vx {
9090
inline unsigned int extendedFamily() const { return ( m_leaf[0] >> 20 ) & 0xFF; }
9191

9292
/**
93-
* @brief Does cpu supports smx?
93+
* @brief Does cpu support smx?
9494
* @return True, if the cpu supports smx - otherwise false.
9595
*/
9696
inline bool smxSupport() const { return ( m_leaf[2] >> 6 ) & 1; }
9797

9898
/**
99-
* @brief Does cpu supports sgx?
99+
* @brief Does cpu support sgx?
100100
* @return True, if the cpu supports sgx - otherwise false.
101101
*/
102102
inline bool sgxSupport() const { return ( m_extendedLeaf[1] >> 2 ) & 0x1; }
103103

104104
/**
105-
* @brief Does cpu supports sgx launch control?
105+
* @brief Does cpu support sgx launch control?
106106
* @return True, if the cpu supports sgx launch control - otherwise false.
107107
*/
108108
inline bool sgxLaunchControlSupport() const { return ( m_extendedLeaf[2] >> 30 ) & 0x01; }
109109

110110
/**
111-
* @brief Does cpu supports sgx version 1?
111+
* @brief Does cpu support sgx version 1?
112112
* @return True, if the cpu supports sgx version 1 - otherwise false.
113113
*/
114114
inline bool sgxVersion1Support() const { return m_sgxLeaf[0] & 0x1; }
115115

116116
/**
117-
* @brief Does cpu supports sgx version 2?
117+
* @brief Does cpu support sgx version 2?
118118
* @return True, if the cpu supports sgx version 2 - otherwise false.
119119
*/
120120
inline bool sgxVersion2Support() const { return ( m_sgxLeaf[0] >> 1 ) & 0x1; }
121121

122122
/**
123-
* @brief Maximum size of enclave.
123+
* @brief Returns maximum size of enclave.
124124
* @return Maximum enclave size.
125125
*/
126126
inline unsigned int maximumEnclaveSize() const { return m_sgxLeaf[2] & 0xFF; }
127127

128128
/**
129-
* @brief Maximum size of enclave.
129+
* @brief Returns maximum size of enclave.
130130
* @return Maximum enclave size.
131131
*/
132132
inline unsigned int maximumEnclaveSize64() const { return ( m_sgxLeaf[2] >> 8 ) & 0xFF; }
@@ -165,7 +165,7 @@ namespace vx {
165165

166166
private:
167167
/**
168-
* @brief Current asked leaf.
168+
* @brief Currently asked leaf.
169169
*/
170170
std::array<unsigned int, 4> m_currentLeaf = {};
171171

source/DoubleExtras.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,23 @@ namespace vx {
4848
double _right );
4949

5050
/**
51-
* @brief Is _left less _right or _orEqual?
51+
* @brief Is _left less than _right or _orEqual?
5252
* @param _left The first value.
5353
* @param _right The second value.
5454
* @param _orEqual Check if _left and _right are equal - default false.
55-
* @return True, if _left less _right or _left and _right are equal and
55+
* @return True, if _left is less than _right or _left and _right are equal and
5656
* _orEqual is set to true - otherwise false.
5757
*/
5858
bool doubleLess( double _left,
5959
double _right,
6060
bool _orEqual = false );
6161

6262
/**
63-
* @brief Is _left greater _right or _orEqual?
63+
* @brief Is _left greater than _right or _orEqual?
6464
* @param _left The first value.
6565
* @param _right The second value.
6666
* @param _orEqual Check if _left and _right are equal - default false.
67-
* @return True, if _left greater _right or _left and _right are equal and
67+
* @return True, if _left is greater than _right or _left and _right are equal and
6868
* _orEqual is set to true - otherwise false.
6969
*/
7070
bool doubleGreater( double _left,
@@ -85,18 +85,18 @@ namespace vx {
8585
bool _orEqual = false );
8686

8787
/**
88-
* @brief Round a double _value by _precision. Rounded by default to second places.
88+
* @brief Round a double _value by _precision. Rounded by default to two decimal places.
8989
* @param _value Value to round.
90-
* @param _precision Places to round.
90+
* @param _precision Decimal places to round.
9191
* @return The rounded value.
9292
*/
9393
double doubleRound( double _value,
9494
std::size_t _precision = 2 );
9595

9696
/**
97-
* @brief Split a double _value to its integral and fraction parts.
97+
* @brief Split a double _value to its integer and decimal places.
9898
* @param _value Value to split.
99-
* @return The integral and fraction part.
99+
* @return The integer and decimal places.
100100
*/
101101
std::pair<double, double> doubleSplit( double _value );
102102
}

source/Serial.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ namespace vx {
4343
*/
4444
enum class Baudrate {
4545

46-
Speed9600 = 9000, /**< Baudrate speed of 9600. */
47-
Speed19200 = 19200, /**< Baudrate speed of 19200. */
48-
Speed38400 = 38400, /**< Baudrate speed of 38400. */
49-
Speed57600 = 57600 /**< Baudrate speed of 57600. */
46+
Speed9600 = 9000, /**< Baudrate of 9600. */
47+
Speed19200 = 19200, /**< Baudrate of 19200. */
48+
Speed38400 = 38400, /**< Baudrate of 38400. */
49+
Speed57600 = 57600 /**< Baudrate of 57600. */
5050
};
5151

5252
/**
@@ -59,7 +59,7 @@ namespace vx {
5959
/**
6060
* @brief Default constructor for Serial.
6161
* @param _path Device path.
62-
* @param _baudrate Baudrate speed.
62+
* @param _baudrate Baudrate.
6363
*/
6464
explicit Serial( const std::string &_path,
6565
Baudrate _baudrate = Baudrate::Speed9600 );
@@ -92,21 +92,21 @@ namespace vx {
9292
virtual ~Serial();
9393

9494
/**
95-
* @brief Is the serial device open.
95+
* @brief Is the serial device open?
9696
* @return True, if open - otherwise false.
9797
*/
9898
inline bool isOpen() const { return m_isOpen; }
9999

100100
/**
101101
* @brief Flush the serial port.
102-
* @return True, if fushing is successded - otherwise false.
102+
* @return True, if fushing is successful - otherwise false.
103103
*/
104104
bool flush() const;
105105

106106
/**
107107
* @brief Write data to the serial device.
108108
* @param _data Date written to the device.
109-
* @return True, if the data written was successfull - otherwise false.
109+
* @return True, if the data writing was successful - otherwise false.
110110
*/
111111
bool write( const std::string &_data ) const;
112112

@@ -118,7 +118,7 @@ namespace vx {
118118

119119
/**
120120
* @brief Descriptor of current device.
121-
* @return The descriptor of the serial device - -1 is not valid descriptor.
121+
* @return The descriptor of the serial device - -1 is not a valid descriptor.
122122
*/
123123
inline int descriptor() const { return m_descriptor; }
124124

@@ -134,7 +134,7 @@ namespace vx {
134134
bool m_isOpen = false;
135135

136136
/**
137-
* @brief Membber for descriptor.
137+
* @brief Member for descriptor.
138138
*/
139139
int m_descriptor = -1;
140140
};

source/Timing.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace vx {
5050

5151
public:
5252
/**
53-
* @brief Default constuctor for Timing.
53+
* @brief Default constructor for Timing.
5454
*/
5555
Timing() = default;
5656

@@ -83,12 +83,12 @@ namespace vx {
8383
std::string m_action = {};
8484

8585
/**
86-
* @brief Clock to calculate system time elapsed.
86+
* @brief Clock to calculate the elapsed system time.
8787
*/
8888
std::chrono::time_point<std::chrono::high_resolution_clock> m_start = {};
8989

9090
/**
91-
* @brief Clock to calculate the cpu time elasped.
91+
* @brief Clock to calculate the elapsed cpu time.
9292
*/
9393
std::clock_t m_cpu = 0;
9494
};

source/templates/Timer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace vx {
4949
/**
5050
* @brief Call a function after timeout.
5151
* @param _function Call back function.
52-
* @param _delay Delay after the function is valled in milliseconds.
52+
* @param _delay Delay in milliseconds after the function is called.
5353
*/
5454
template<typename Function>
5555
void setTimeout( Function _function, int _delay ) {
@@ -74,7 +74,7 @@ namespace vx {
7474
/**
7575
* @brief Call a function after interval.
7676
* @param _function Call back function.
77-
* @param _interval Intervall after the function is called in milliseconds.
77+
* @param _interval Interval in milliseconds after the function is called.
7878
*/
7979
template<typename Function>
8080
void setInterval( Function _function, int _interval ) {
@@ -100,7 +100,7 @@ namespace vx {
100100
}
101101

102102
/**
103-
* @brief Stoping the current timer to not exeecute the call back function.
103+
* @brief Stopping the current timer to not execute the call back function.
104104
*/
105105
inline void stop() { this->m_clear = true; }
106106

0 commit comments

Comments
 (0)