Skip to content

Commit

Permalink
Renamed class Queue to MessageQueue for eCv
Browse files Browse the repository at this point in the history
  • Loading branch information
dc42 committed May 3, 2022
1 parent ca0872b commit 3fc14f3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/RTOSIface/RTOSIface.h
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,10 @@ class QueueBase
static QueueBase * null thread;
};

template <class Message> class Queue : public QueueBase
template <class Message> class MessageQueue : public QueueBase
{
public:
Queue() noexcept : messageStorage(nullptr) { }
MessageQueue() noexcept : messageStorage(nullptr) { }

void Create(const char *p_name, size_t capacity) noexcept;
bool PutToBack(const Message &m, uint32_t timeout) noexcept;
Expand All @@ -550,7 +550,7 @@ template <class Message> class Queue : public QueueBase
uint8_t * _ecv_array null messageStorage;
};

template <class Message> void Queue<Message>::Create(const char *p_name, size_t capacity) noexcept
template <class Message> void MessageQueue<Message>::Create(const char *p_name, size_t capacity) noexcept
{
if (handle == nullptr)
{
Expand All @@ -559,17 +559,17 @@ template <class Message> void Queue<Message>::Create(const char *p_name, size_t
}
}

template <class Message> bool Queue<Message>::PutToBack(const Message &m, uint32_t timeout) noexcept
template <class Message> bool MessageQueue<Message>::PutToBack(const Message &m, uint32_t timeout) noexcept
{
return xQueueSendToBack(handle, &m, timeout) == pdTRUE;
}

template <class Message> bool Queue<Message>::PutToFront(const Message &m, uint32_t timeout) noexcept
template <class Message> bool MessageQueue<Message>::PutToFront(const Message &m, uint32_t timeout) noexcept
{
return xQueueSendToFront(handle, &m, timeout) == pdTRUE;
}

template <class Message> bool Queue<Message>::Get(Message& m, uint32_t timeout) noexcept
template <class Message> bool MessageQueue<Message>::Get(Message& m, uint32_t timeout) noexcept
{
return xQueueReceive(handle, &m, timeout) == pdTRUE;
}
Expand Down

0 comments on commit 3fc14f3

Please sign in to comment.