Skip to content

Commit 18e8da9

Browse files
committed
Merge branch 'main' into concurrent_features
2 parents ab14513 + 13c66b4 commit 18e8da9

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"url": "https://github.com/eigen-value",
1212
"maintainer": true
1313
},
14-
"version": "0.1.0",
14+
"version": "0.1.1",
1515
"license": "MIT",
1616
"frameworks": "arduino",
1717
"platforms": "*",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Arduino_RPClite
2-
version=0.1.0
2+
version=0.1.1
33
author=Lucio Rossi (eigen-value)
44
maintainer=Lucio Rossi (eigen-value)
55
sentence=A MessagePack RPC library for Arduino

src/client.h

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

88
class RPCClient {
99
RpcDecoder<>* decoder = nullptr;
10-
int _waiting_msg_id;
10+
uint32_t _waiting_msg_id;
1111

1212
public:
1313
RpcError lastError;
@@ -22,7 +22,7 @@ class RPCClient {
2222

2323
template<typename... Args>
2424
void notify(const MsgPack::str_t method, Args&&... args) {
25-
int _id;
25+
uint32_t _id;
2626
decoder->send_call(NOTIFY_MSG, method, _id, std::forward<Args>(args)...);
2727
}
2828

@@ -46,7 +46,7 @@ class RPCClient {
4646

4747
template<typename... Args>
4848
bool send_rpc(const MsgPack::str_t method, Args&&... args) {
49-
int msg_id;
49+
uint32_t msg_id;
5050
if (decoder->send_call(CALL_MSG, method, msg_id, std::forward<Args>(args)...)) {
5151
_waiting_msg_id = msg_id;
5252
return true;

src/decoder.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class RpcDecoder {
1919
RpcDecoder(ITransport& transport) : _transport(transport) {}
2020

2121
template<typename... Args>
22-
bool send_call(const int call_type, const MsgPack::str_t method, int& msg_id, Args&&... args) {
22+
bool send_call(const int call_type, const MsgPack::str_t method, uint32_t& msg_id, Args&&... args) {
2323

2424
if (call_type!=CALL_MSG && call_type!=NOTIFY_MSG) return false;
2525

@@ -58,7 +58,7 @@ class RpcDecoder {
5858

5959
MsgPack::arr_size_t resp_size;
6060
int resp_type;
61-
int resp_id;
61+
uint32_t resp_id;
6262

6363
if (!unpacker.deserialize(resp_size, resp_type, resp_id)) return false;
6464
if (resp_size.size() != RESPONSE_SIZE) return false;
@@ -209,7 +209,7 @@ class RpcDecoder {
209209
size_t _bytes_stored = 0;
210210
int _packet_type = NO_MSG;
211211
size_t _packet_size = 0;
212-
int _msg_id = 0;
212+
uint32_t _msg_id = 0;
213213

214214
inline bool buffer_full() const { return _bytes_stored == BufferSize; }
215215

src/server.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class RPCServer {
6161
if (!unpacker.feed(req.buffer, req.size)) return;
6262

6363
int msg_type;
64-
int msg_id;
64+
uint32_t msg_id;
6565
MsgPack::str_t method;
6666
MsgPack::arr_size_t req_size;
6767

0 commit comments

Comments
 (0)