S Morita / mbed-mros2

Dependents:   mbed-os-example-mros2 example-mbed-mros2-sub-pose example-mbed-mros2-pub-twist example-mbed-mros2-mturtle-teleop

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers config_aurix.h Source File

config_aurix.h

00001 /*
00002 The MIT License
00003 Copyright (c) 2019 Lehrstuhl Informatik 11 - RWTH Aachen University
00004 Permission is hereby granted, free of charge, to any person obtaining a copy
00005 of this software and associated documentation files (the "Software"), to deal
00006 in the Software without restriction, including without limitation the rights
00007 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00008 copies of the Software, and to permit persons to whom the Software is
00009 furnished to do so, subject to the following conditions:
00010 The above copyright notice and this permission notice shall be included in
00011 all copies or substantial portions of the Software.
00012 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00013 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00014 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00015 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00016 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00017 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
00018 THE SOFTWARE
00019 
00020 This file is part of embeddedRTPS.
00021 
00022 Author: i11 - Embedded Software, RWTH Aachen University
00023 */
00024 
00025 #ifndef RTPS_CONFIG_H
00026 #define RTPS_CONFIG_H
00027 
00028 #include "rtps/common/types.h"
00029 
00030 namespace rtps {
00031 
00032 #define IS_LITTLE_ENDIAN 1
00033 
00034 namespace Config {
00035 const VendorId_t VENDOR_ID = {13, 37};
00036 const std::array<uint8_t, 4> IP_ADDRESS = {192, 168, 0, 42};
00037 const GuidPrefix_t BASE_GUID_PREFIX{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
00038 
00039 const uint8_t DOMAIN_ID = 0; // 230 possible with UDP
00040 const uint8_t NUM_STATELESS_WRITERS = 2;
00041 const uint8_t NUM_STATELESS_READERS = 2;
00042 const uint8_t NUM_STATEFUL_READERS = 2;
00043 const uint8_t NUM_STATEFUL_WRITERS = 2;
00044 const uint8_t MAX_NUM_PARTICIPANTS = 1;
00045 const uint8_t NUM_WRITERS_PER_PARTICIPANT = 4;
00046 const uint8_t NUM_READERS_PER_PARTICIPANT = 4;
00047 const uint8_t NUM_WRITER_PROXIES_PER_READER = 3;
00048 const uint8_t NUM_READER_PROXIES_PER_WRITER = 3;
00049 
00050 const uint8_t HISTORY_SIZE = 10;
00051 
00052 const uint8_t MAX_TYPENAME_LENGTH = 20;
00053 const uint8_t MAX_TOPICNAME_LENGTH = 20;
00054 
00055 const int HEARTBEAT_STACKSIZE = 1200;          // byte
00056 const int THREAD_POOL_WRITER_STACKSIZE = 1100; // byte
00057 const int THREAD_POOL_READER_STACKSIZE = 1600; // byte
00058 const uint16_t SPDP_WRITER_STACKSIZE = 550;    // byte
00059 
00060 const uint16_t SF_WRITER_HB_PERIOD_MS = 4000;
00061 const uint16_t SPDP_RESEND_PERIOD_MS = 10000;
00062 const uint8_t SPDP_WRITER_PRIO = 3;
00063 const uint8_t SPDP_MAX_NUMBER_FOUND_PARTICIPANTS = 5;
00064 const uint8_t SPDP_MAX_NUM_LOCATORS = 5;
00065 const Duration_t SPDP_LEASE_DURATION = {100, 0};
00066 
00067 const int MAX_NUM_UDP_CONNECTIONS = 10;
00068 
00069 const int THREAD_POOL_NUM_WRITERS = 1;
00070 const int THREAD_POOL_NUM_READERS = 1;
00071 const int THREAD_POOL_WRITER_PRIO = 3;
00072 const int THREAD_POOL_READER_PRIO = 3;
00073 const int THREAD_POOL_WORKLOAD_QUEUE_LENGTH = 10;
00074 
00075 constexpr int OVERALL_HEAP_SIZE =
00076     THREAD_POOL_NUM_WRITERS * THREAD_POOL_WRITER_STACKSIZE +
00077     THREAD_POOL_NUM_READERS * THREAD_POOL_READER_STACKSIZE +
00078     MAX_NUM_PARTICIPANTS * SPDP_WRITER_STACKSIZE +
00079     NUM_STATEFUL_WRITERS * HEARTBEAT_STACKSIZE;
00080 } // namespace Config
00081 } // namespace rtps
00082 
00083 #endif // RTPS_CONFIG_H