Skip to content

Commit b1bcd2f

Browse files
author
Alexandru Kampmann
committed
STM32 config
1 parent 6e4fb52 commit b1bcd2f

File tree

1 file changed

+39
-23
lines changed

1 file changed

+39
-23
lines changed

include/rtps/config_stm.h

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,46 +37,62 @@ namespace rtps {
3737
namespace Config {
3838
const VendorId_t VENDOR_ID = {13, 37};
3939
const std::array<uint8_t, 4> IP_ADDRESS = {
40-
192, 168, 0, 66}; // Needs to be set in lwipcfg.h too.
41-
const GuidPrefix_t BASE_GUID_PREFIX{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12};
40+
192, 168, 127, 103}; // Needs to be set in lwipcfg.h too.
41+
const GuidPrefix_t BASE_GUID_PREFIX{1, 33, 63, 84,15, 36, 68, 3, 34, 41, 1};
4242

4343
const uint8_t DOMAIN_ID = 0; // 230 possible with UDP
44-
const uint8_t NUM_STATELESS_WRITERS = 2;
45-
const uint8_t NUM_STATELESS_READERS = 2;
44+
const uint8_t NUM_STATELESS_WRITERS = 5;
45+
const uint8_t NUM_STATELESS_READERS = 5;
4646
const uint8_t NUM_STATEFUL_READERS = 2;
4747
const uint8_t NUM_STATEFUL_WRITERS = 2;
4848
const uint8_t MAX_NUM_PARTICIPANTS = 1;
49-
const uint8_t NUM_WRITERS_PER_PARTICIPANT = 4;
50-
const uint8_t NUM_READERS_PER_PARTICIPANT = 4;
51-
const uint8_t NUM_WRITER_PROXIES_PER_READER = 3;
52-
const uint8_t NUM_READER_PROXIES_PER_WRITER = 3;
49+
const uint8_t NUM_WRITERS_PER_PARTICIPANT = 10;
50+
const uint8_t NUM_READERS_PER_PARTICIPANT = 10;
51+
const uint8_t NUM_WRITER_PROXIES_PER_READER = 6;
52+
const uint8_t NUM_READER_PROXIES_PER_WRITER = 6;
5353

54-
const uint8_t HISTORY_SIZE = 10;
54+
const uint8_t MAX_NUM_UNMATCHED_REMOTE_WRITERS = 50;
55+
const uint8_t MAX_NUM_UNMATCHED_REMOTE_READERS = 50;
56+
57+
const uint8_t MAX_NUM_READER_CALLBACKS = 5;
5558

56-
const uint8_t MAX_TYPENAME_LENGTH = 20;
57-
const uint8_t MAX_TOPICNAME_LENGTH = 20;
59+
60+
const uint8_t HISTORY_SIZE_STATELESS = 2;
61+
const uint8_t HISTORY_SIZE_STATEFUL = 10;
62+
63+
const uint8_t MAX_TYPENAME_LENGTH = 64;
64+
const uint8_t MAX_TOPICNAME_LENGTH = 64;
5865

5966
const int HEARTBEAT_STACKSIZE = 1200; // byte
60-
const int THREAD_POOL_WRITER_STACKSIZE = 1100; // byte
61-
const int THREAD_POOL_READER_STACKSIZE = 1600; // byte
62-
const uint16_t SPDP_WRITER_STACKSIZE = 550; // byte
67+
const int THREAD_POOL_WRITER_STACKSIZE = 3*1100; // byte
68+
const int THREAD_POOL_READER_STACKSIZE = 3*1600; // byte
69+
const uint16_t SPDP_WRITER_STACKSIZE = 3*550; // byte
6370

64-
const uint16_t SF_WRITER_HB_PERIOD_MS = 4000;
65-
const uint16_t SPDP_RESEND_PERIOD_MS = 10000;
71+
const uint16_t SF_WRITER_HB_PERIOD_MS = 2000;
72+
const uint16_t SPDP_RESEND_PERIOD_MS = 1000;
6673
const uint8_t SPDP_CYCLECOUNT_HEARTBEAT =
6774
2; // skip x SPDP rounds before checking liveliness
68-
const uint8_t SPDP_WRITER_PRIO = 3;
69-
const uint8_t SPDP_MAX_NUMBER_FOUND_PARTICIPANTS = 5;
70-
const uint8_t SPDP_MAX_NUM_LOCATORS = 5;
71-
const Duration_t SPDP_LEASE_DURATION = {100, 0};
75+
const uint8_t SPDP_WRITER_PRIO = 24;
76+
const uint8_t SPDP_MAX_NUMBER_FOUND_PARTICIPANTS = 10;
77+
const uint8_t SPDP_MAX_NUM_LOCATORS = 1;
78+
const Duration_t SPDP_DEFAULT_REMOTE_LEASE_DURATION = {
79+
5, 0}; // Default lease duration for remote participants, usually
80+
// overwritten by remote info
81+
const Duration_t SPDP_MAX_REMOTE_LEASE_DURATION = {
82+
180,
83+
0}; // Absolute maximum lease duration, ignoring remote participant info
84+
85+
const Duration_t SPDP_LEASE_DURATION = {5, 0};
7286

7387
const int MAX_NUM_UDP_CONNECTIONS = 10;
7488

7589
const int THREAD_POOL_NUM_WRITERS = 1;
7690
const int THREAD_POOL_NUM_READERS = 1;
77-
const int THREAD_POOL_WRITER_PRIO = 3;
78-
const int THREAD_POOL_READER_PRIO = 3;
79-
const int THREAD_POOL_WORKLOAD_QUEUE_LENGTH = 10;
91+
const int THREAD_POOL_WRITER_PRIO = 24;
92+
const int THREAD_POOL_READER_PRIO = 24;
93+
const int THREAD_POOL_WORKLOAD_QUEUE_LENGTH_USERTRAFFIC = 60;
94+
const int THREAD_POOL_WORKLOAD_QUEUE_LENGTH_METATRAFFIC = 60;
95+
8096

8197
constexpr int OVERALL_HEAP_SIZE =
8298
THREAD_POOL_NUM_WRITERS * THREAD_POOL_WRITER_STACKSIZE +

0 commit comments

Comments
 (0)