Skip to content

Commit 332af88

Browse files
committed
REF: refactor to fit google style
1 parent bf68bca commit 332af88

File tree

7 files changed

+220
-220
lines changed

7 files changed

+220
-220
lines changed

robotiq_hande_driver/include/application.hpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ class ApplicationLayer{
1313
public:
1414

1515
struct Status{
16-
bool isReset;
17-
bool isReady;
18-
bool isMoving;
19-
bool isStopped;
20-
bool isOpened;
21-
bool isClosed;
22-
bool objectDetected;
16+
bool is_reset;
17+
bool is_ready;
18+
bool is_moving;
19+
bool is_stopped;
20+
bool is_opened;
21+
bool is_closed;
22+
bool object_detected;
2323
};
2424

2525
struct FaultStatus{
26-
bool isError;
26+
bool is_error;
2727
};
2828

2929
ApplicationLayer();
@@ -37,7 +37,7 @@ class ApplicationLayer{
3737
* @return none
3838
* @note see status on success, exception thrown if communicatoin issues
3939
*/
40-
void stop();
40+
void Stop();
4141

4242
/**
4343
* @brief Resets the gripper: deactivate and activate again
@@ -46,7 +46,7 @@ class ApplicationLayer{
4646
* @return none
4747
* @note see status on success, exception thrown if communicatoin issues
4848
*/
49-
void reset();
49+
void Reset();
5050

5151
/**
5252
* Emergency auto-release, gripper fingers are slowly opened, reactivation necessary
@@ -55,7 +55,7 @@ class ApplicationLayer{
5555
* @return none
5656
* @note see status on success, exception thrown if communicatoin issues
5757
*/
58-
void auto_release();
58+
void AutoRelease();
5959

6060
/**
6161
* @brief Activates the gripper, after that it can be used
@@ -64,7 +64,7 @@ class ApplicationLayer{
6464
* @return none
6565
* @note see status on success, exception thrown if communicatoin issues
6666
*/
67-
void activate();
67+
void Activate();
6868

6969
/**
7070
* @brief Opens the gripper
@@ -73,7 +73,7 @@ class ApplicationLayer{
7373
* @return none
7474
* @note see status on success, exception thrown if communicatoin issues
7575
*/
76-
void open();
76+
void Open();
7777

7878
/**
7979
* @brief Closes the gripper
@@ -82,7 +82,7 @@ class ApplicationLayer{
8282
* @return none
8383
* @note see status on success, exception thrown if communicatoin issues
8484
*/
85-
void close();
85+
void Close();
8686

8787
/**
8888
* @brief Updates gripper status
@@ -91,7 +91,7 @@ class ApplicationLayer{
9191
* @return none
9292
* @note see status on success, exception thrown if communicatoin issues
9393
*/
94-
void update_status();
94+
void UpdateStatus();
9595

9696
/**
9797
* @brief Returns the gripper status
@@ -100,7 +100,7 @@ class ApplicationLayer{
100100
* @return Gripper status
101101
* @note see status on success, exception thrown if communicatoin issues
102102
*/
103-
Status status();
103+
Status GetStatus();
104104

105105
/**
106106
* @brief Returns the gripper fault status
@@ -109,7 +109,7 @@ class ApplicationLayer{
109109
* @return Fault Status
110110
* @note see status on success, exception thrown if communicatoin issues
111111
*/
112-
FaultStatus fault_status();
112+
FaultStatus GetFaultStatus();
113113

114114
/**
115115
* @brief Returns the gripper requsted position
@@ -118,7 +118,7 @@ class ApplicationLayer{
118118
* @return Gripper requested position
119119
* @note see status on success, exception thrown if communicatoin issues
120120
*/
121-
uint8_t requested_position();
121+
uint8_t RequestedPosition();
122122

123123
/**
124124
* @brief Returns the gripper position
@@ -127,7 +127,7 @@ class ApplicationLayer{
127127
* @return Gripper position in
128128
* @note see status on success, exception thrown if communicatoin issues
129129
*/
130-
uint8_t position();
130+
uint8_t Position();
131131

132132
/**
133133
* @brief Moves the gripper to requested position
@@ -136,7 +136,7 @@ class ApplicationLayer{
136136
* @return none
137137
* @note see status on success, exception thrown if communicatoin issues
138138
*/
139-
void set_position(uint8_t position);
139+
void SetPosition(uint8_t position);
140140

141141
/**
142142
* @brief Returns the gripper current
@@ -145,12 +145,12 @@ class ApplicationLayer{
145145
* @return Gripper current in mA (range: 0-2550mA)
146146
* @note see status on success, exception thrown if communicatoin issues
147147
*/
148-
uint16_t current();
148+
uint16_t Current();
149149

150150

151-
void read();
151+
void Read();
152152

153-
void write();
153+
void Write();
154154

155155
private:
156156
/**

robotiq_hande_driver/include/communication.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace hande_driver
1111
{
12-
constexpr auto registerWordLength = 3;
12+
constexpr auto kRegisterWordLength = 3;
1313

1414
class Communication{
1515
public:
@@ -24,7 +24,7 @@ class Communication{
2424
* @return none
2525
* @note see status on success, exception thrown in case of communication issues
2626
*/
27-
void connect();
27+
void Connect();
2828

2929
/**
3030
* @brief Disconnect from gripper using modbus rtu and virtual socket
@@ -33,7 +33,7 @@ class Communication{
3333
* @return none
3434
* @note see status on success, exception thrown in case of communication issues
3535
*/
36-
void disconnect();
36+
void Disconnect();
3737

3838
/**
3939
* @brief Read and write input.output registers at once
@@ -42,13 +42,13 @@ class Communication{
4242
* @return none
4343
* @note see status on success, exception thrown in case of communication issues
4444
*/
45-
void read_write_registers();
45+
void ReadWiteRegisters();
4646

47-
uint16_t input_registers[registerWordLength];
48-
uint16_t output_registers[registerWordLength];
47+
uint16_t input_registers_[kRegisterWordLength];
48+
uint16_t output_registers_[kRegisterWordLength];
4949

5050
private:
51-
modbus_t *mb;
51+
modbus_t *mb_;
5252

5353
};
5454
} // namespace hande_driver

0 commit comments

Comments
 (0)