Go to the documentation of this file.
28 #ifndef FREERTOS_CONFIG_H
29 #define FREERTOS_CONFIG_H
45 #include <freertos_platform_config.h>
47 #define configUSE_PREEMPTION 1
48 #define configUSE_IDLE_HOOK 1
49 #define configUSE_TICK_HOOK 1
50 #define configMAX_PRIORITIES (56)
51 #define configMINIMAL_STACK_SIZE ((unsigned short)128)
52 #define configTOTAL_HEAP_SIZE ((size_t)(8 * 1024)) // Using heap3 so it's ingored anyway2
53 #define configMAX_TASK_NAME_LEN (20)
54 #define configUSE_TRACE_FACILITY 1
55 #define configUSE_16_BIT_TICKS 0
56 #define configIDLE_SHOULD_YIELD 1
57 #define configUSE_MUTEXES 1
58 #define configQUEUE_REGISTRY_SIZE 8
59 #define configCHECK_FOR_STACK_OVERFLOW 2
60 #define configUSE_RECURSIVE_MUTEXES 1
61 #define configUSE_MALLOC_FAILED_HOOK 1
62 #define configUSE_APPLICATION_TASK_TAG 0
63 #define configUSE_COUNTING_SEMAPHORES 1
64 #define configSUPPORT_DYNAMIC_ALLOCATION 1
65 #define configSUPPORT_STATIC_ALLOCATION 1
66 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
69 #define configUSE_CO_ROUTINES 0
70 #define configMAX_CO_ROUTINE_PRIORITIES (2)
73 #define configUSE_TIMERS 1
74 #define configTIMER_TASK_PRIORITY (2)
75 #define configTIMER_QUEUE_LENGTH 10
76 #define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 2)
80 #define INCLUDE_vTaskPrioritySet 1
81 #define INCLUDE_uxTaskPriorityGet 1
82 #define INCLUDE_vTaskDelete 1
83 #define INCLUDE_vTaskCleanUpResources 1
84 #define INCLUDE_vTaskSuspend 1
85 #define INCLUDE_vTaskDelayUntil 1
86 #define INCLUDE_vTaskDelay 1
89 #ifdef __NVIC_PRIO_BITS
91 #define configPRIO_BITS __NVIC_PRIO_BITS
93 #define configPRIO_BITS 4
98 #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0xf
104 #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
108 #define configKERNEL_INTERRUPT_PRIORITY \
109 (configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS))
112 #define configMAX_SYSCALL_INTERRUPT_PRIORITY \
113 (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS))
117 #define configASSERT(x) \
119 taskDISABLE_INTERRUPTS(); \
Definition: IInterloc.h:10
ICircularQueue< MessageDTO > & m_hostQueue
Definition: HiveMindHostApiRequestHandler.h:28
IHiveConnectHiveMindApiMessageHandler & m_hiveconnectApiMessageHandler
Definition: MessageDispatcher.h:38
IGreetSender & m_greetSender
Definition: MessageDispatcher.h:39
virtual uint16_t getUUId() const =0
Returns the unique id associated with the board.
bool deserializeAndDispatch() override
deserialize a message and dispatches it in the appropriate queue
Definition: MessageDispatcher.cpp:27
ICircularQueue< MessageDTO > & m_buzzOutputQueue
Definition: MessageDispatcher.h:32
virtual std::optional< RelativePosition > getRobotPosition(uint16_t robotId) const =0
Returns the last known relative position of a given robot.
const IInterloc & m_interloc
Definition: HiveMindHostApiRequestHandler.h:30
bool dispatchRequest(const MessageDTO &message, const RequestDTO &request)
Definition: MessageDispatcher.cpp:96
const IBSP & m_bsp
Definition: MessageDispatcher.h:40
bool dispatchUserCall(const MessageDTO &message, const UserCallTargetDTO &dest)
Definition: MessageDispatcher.cpp:60
MessageDispatcher(ICircularQueue< MessageDTO > &buzzOutputQ, ICircularQueue< MessageDTO > &hostOutputQ, ICircularQueue< MessageDTO > &remoteOutputQ, ICircularQueue< MessageDTO > &interlocQ, IHiveMindHostDeserializer &deserializer, IHiveMindHostApiRequestHandler &hivemindApiReqHandler, IHiveConnectHiveMindApiMessageHandler &hiveconnectApiMessageHandler, IGreetSender &greetSender, const IBSP &bsp, ILogger &logger)
Definition: MessageDispatcher.cpp:5
virtual const PositionsTable & getPositionsTable() const =0
Returns the position table for all robots in the swarm.
ILogger & m_logger
Definition: HiveConnectHiveMindApiMessageHandler.h:25
IHiveMindHostDeserializer & m_deserializer
Definition: GreetHandler.h:21
virtual LogRet log(LogLevel level, const char *format,...)=0
Logs if the provided level is higher than the current log level (Thread-safe)
HiveMindHostApiRequestHandler(const IBSP &bsp, ICircularQueue< MessageDTO > &hostQueue, ICircularQueue< MessageDTO > &remoteQueue, const IInterloc &interloc, ILogger &logger)
Definition: HiveMindHostApiRequestHandler.cpp:3
ICircularQueue< MessageDTO > & m_remoteQueue
Definition: HiveMindHostApiRequestHandler.h:29
Definition: HiveMindHostApiRequestHandler.h:10
GreetHandler(IHiveMindHostSerializer &serializer, IHiveMindHostDeserializer &deserializer, IBSP &bsp)
Definition: GreetHandler.cpp:3
ThreadSafeQueue< MessageDTO > & getBuzzMsgQueue()
get the buzz message queue
Definition: MessageHandlerContainer.cpp:35
bool dispatchUserCallResponse(const MessageDTO &message, const UserCallResponseDTO &response)
Definition: MessageDispatcher.cpp:90
virtual bool handleMessage(uint16_t sourceId, uint16_t destId, const HiveConnectHiveMindApiDTO &message)=0
handles HiveConnectHiveMindApi
bool m_isInLineOfSight
Definition: RelativePosition.h:22
bool handleMessage(uint16_t sourceId, uint16_t destId, const HiveConnectHiveMindApiDTO &message) override
handles HiveConnectHiveMindApi
Definition: HiveConnectHiveMindApiMessageHandler.cpp:9
ILogger & m_logger
Definition: HiveMindHostApiRequestHandler.h:31
Handles HiveMindApi requests and sends the response to the appropriate target.
Definition: IHiveMindHostApiRequestHandler.h:10
const IBSP & m_bsp
Definition: HiveMindHostApiRequestHandler.h:27
ICircularQueue< MessageDTO > & m_hostQueue
Definition: HiveConnectHiveMindApiMessageHandler.h:23
HiveConnectHiveMindApiMessageHandler(ICircularQueue< MessageDTO > &hostQueue, ICircularQueue< MessageDTO > &remoteQueue, ILogger &logger)
Definition: HiveConnectHiveMindApiMessageHandler.cpp:3
void vApplicationMallocFailedHook(void)
Definition: freertos_hooks.c:12
bool dispatchResponse(const MessageDTO &message, const ResponseDTO &response)
Definition: MessageDispatcher.cpp:118
Definition: HiveConnectHiveMindApiMessageHandler.h:10
NotificationQueue< MessageDTO > & getRemoteMsgQueue()
get the remote message queue
Definition: MessageHandlerContainer.cpp:57
float m_angle
Angle of other agent in current agent frame (in degrees)
Definition: RelativePosition.h:17
MessageDispatcher createMessageDispatcher(IHiveMindHostDeserializer &deserializer, IHiveMindHostApiRequestHandler &hivemindApiReqHandler, IHiveConnectHiveMindApiMessageHandler &hiveconnectApiMessageHandler, IGreetSender &greetSender)
create a message dispatcher
Definition: MessageHandlerContainer.cpp:24
bool handleRequest(const MessageDTO &message) override
handles HiveMindHostAPI request and sends a response to the approriate target
Definition: HiveMindHostApiRequestHandler.cpp:15
HiveMindHostApiRequestHandler createHiveMindHostApiRequestHandler()
create a request handler
Definition: MessageHandlerContainer.cpp:18
uint16_t m_positionsLength
Definition: IInterloc.h:12
ICircularQueue< MessageDTO > & m_remoteQueue
Definition: HiveConnectHiveMindApiMessageHandler.h:24
IHiveMindHostSerializer & m_serializer
Definition: MessageSender.h:23
Handles HiveConnectHiveMindApi messages and makes the proper request.
Definition: IHiveConnectHiveMindApiMessageHandler.h:9
IBSP & m_bsp
Definition: GreetHandler.h:22
ICircularQueue< MessageDTO > & m_inputQueue
Definition: MessageSender.h:22
void vApplicationStackOverflowHook(TaskHandle_t xTask, char *pcTaskName)
Definition: freertos_hooks.c:19
bool dispatchUserCallRequest(const MessageDTO &message, const UserCallRequestDTO &request)
Definition: MessageDispatcher.cpp:84
Logger & getLogger()
Return a reference to the global logger.
Definition: LoggerContainer.cpp:5
IHiveMindHostDeserializer & m_deserializer
Definition: MessageDispatcher.h:36
bool dispatchMessage(const MessageDTO &message)
Definition: MessageDispatcher.cpp:131
A logger class with basic logging capabilities.
Definition: ILogger.h:35
bool greet() override
wait for a greet and then send the greet response. Serializes directly to the stream and not the the ...
Definition: GreetHandler.cpp:8
ICircularQueue< MessageDTO > & m_hostOutputQueue
Definition: MessageDispatcher.h:33
IBSP & getBSP()
Returns an instance of the platform dependent BSP.
Definition: BSPContainer.cpp:13
IInterloc & getInterloc()
Definition: InterlocContainer.cpp:12
ILogger & m_logger
Definition: MessageDispatcher.h:41
GreetSender(ICircularQueue< MessageDTO > &outputQueue, IBSP &bsp)
Definition: GreetSender.cpp:3
virtual bool handleRequest(const MessageDTO &message)=0
handles HiveMindHostAPI request and sends a response to the approriate target
Definition: RelativePosition.h:6
bool processAndSerialize() override
process an item in the queue, serializes it and sends it to the deserializer
Definition: MessageSender.cpp:9
ICircularQueue< MessageDTO > & m_interlocQueue
Definition: MessageDispatcher.h:35
void vApplicationTickHook(void)
Definition: freertos_hooks.c:10
NotificationQueue< MessageDTO > & getInterlocMsgQueue()
get the interloc message queue
Definition: MessageHandlerContainer.cpp:70
ICircularQueue< MessageDTO > & m_remoteOutputQueue
Definition: MessageDispatcher.h:34
Definition: IInterloc.h:15
HiveConnectHiveMindApiMessageHandler createHiveConnectHiveMindApiMessageHandler()
create a message handler
Definition: MessageHandlerContainer.cpp:13
NotificationQueue< MessageDTO > & getHostMsgQueue()
get the host message queue
Definition: MessageHandlerContainer.cpp:44
std::array< RelativePosition, MAX_AGENTS_IN_SWARM > m_positions
Definition: IInterloc.h:11
bool sendGreet() override
send a greet to the output queue
Definition: GreetSender.cpp:6
constexpr uint16_t gc_queueMaxSize
Definition: MessageHandlerContainer.cpp:10
Definition: MessageDispatcher.h:14
IHiveMindHostSerializer & m_serializer
Definition: GreetHandler.h:20
ICircularQueue< MessageDTO > & m_outputQueue
Definition: GreetSender.h:18
MessageSender(ICircularQueue< MessageDTO > &inputQueue, IHiveMindHostSerializer &serializer, IBSP &bsp, ILogger &logger)
Definition: MessageSender.cpp:3
Definition: IGreetSender.h:4
virtual bool sendGreet()=0
send a greet to the output queue
IBSP & m_bsp
Definition: GreetSender.h:19
IHiveMindHostApiRequestHandler & m_hivemindApiReqHandler
Definition: MessageDispatcher.h:37
bool handleHiveMindHostApiRequest(uint16_t requestId, const MessageDTO &message, const HiveMindHostApiRequestDTO &request)
Definition: HiveMindHostApiRequestHandler.cpp:29
float m_distance
Distance in meters.
Definition: RelativePosition.h:12