File tree 2 files changed +25
-0
lines changed
2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 13
13
extern void * __dso_handle;
14
14
#endif
15
15
16
+ namespace rtps
17
+ {
18
+ namespace Config
19
+ {
20
+ extern std::array<uint8_t , 4 > IP_ADDRESS;
21
+ }
22
+ }
23
+
16
24
namespace mros2
17
25
{
18
26
@@ -81,6 +89,8 @@ class Subscriber
81
89
82
90
void spin ();
83
91
92
+ void setIPAddrRTPS (std::array<uint8_t , 4 > ipaddr);
93
+
84
94
} /* namespace mros2 */
85
95
86
96
namespace message_traits
Original file line number Diff line number Diff line change @@ -282,6 +282,13 @@ void spin()
282
282
}
283
283
}
284
284
285
+ void setIPAddrRTPS (std::array<uint8_t , 4 > ipaddr)
286
+ {
287
+ rtps::Config::IP_ADDRESS = ipaddr;
288
+
289
+ MROS2_DEBUG (" [MROS2LIB] set IP address for RTPS communication" );
290
+ }
291
+
285
292
} /* namespace mros2 */
286
293
287
294
@@ -311,6 +318,14 @@ void setTrue(void* args)
311
318
*static_cast <volatile bool *>(args) = true ;
312
319
}
313
320
321
+ namespace rtps
322
+ {
323
+ namespace Config
324
+ {
325
+ std::array<uint8_t , 4 > IP_ADDRESS;
326
+ }
327
+ } /* namespace rtps */
328
+
314
329
/*
315
330
* specialize template functions described in platform's workspace
316
331
*/
You can’t perform that action at this time.
0 commit comments