Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions erpc_c/infra/erpc_basic_codec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void BasicCodec::startWriteUnion(int32_t discriminator)

void BasicCodec::writeNullFlag(bool isNull)
{
write(static_cast<uint8_t>(isNull ? kIsNull : kNotNull));
write(static_cast<uint8_t>(isNull ? null_flag_t::kIsNull : null_flag_t::kNotNull));
}

void BasicCodec::writeCallback(arrayOfFunPtr callbacks, uint8_t callbacksCount, funPtr callback)
Expand Down Expand Up @@ -392,7 +392,7 @@ void BasicCodec::readNullFlag(bool &isNull)
read(flag);
if (isStatusOk())
{
isNull = (flag == (uint8_t)kIsNull);
isNull = (flag == static_cast<uint8_t>(null_flag_t::kIsNull));
}
}

Expand Down
2 changes: 1 addition & 1 deletion erpc_c/infra/erpc_basic_codec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace erpc {
/*!
* @brief Values of the uint8 flag prefixing nullable values.
*/
enum _null_flag
enum class null_flag_t
{
kNotNull = 0,
kIsNull
Expand Down
2 changes: 1 addition & 1 deletion erpc_c/infra/erpc_client_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void ClientManager::verifyReply(RequestContext &request)
if (request.getCodec()->isStatusOk() == true)
{
// Verify that this is a reply to the request we just sent.
if ((msgType != kReplyMessage) || (sequence != request.getSequence()))
if ((msgType != message_type_t::kReplyMessage) || (sequence != request.getSequence()))
{
request.getCodec()->updateStatus(kErpcStatus_ExpectedReply);
}
Expand Down
4 changes: 2 additions & 2 deletions erpc_c/infra/erpc_client_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ class ClientManager : public ClientServerCommon
#endif

protected:
uint32_t m_sequence; //!< Sequence number.
client_error_handler_t m_errorHandler; //!< Pointer to function error handler.
uint32_t m_sequence; //!< Sequence number.
client_error_handler_t m_errorHandler; //!< Pointer to function error handler.
#if ERPC_NESTED_CALLS
Server *m_server; //!< Server used for nested calls.
Thread::thread_id_t m_serverThreadId; //!< Thread in which server run function is called.
Expand Down
4 changes: 2 additions & 2 deletions erpc_c/infra/erpc_codec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ namespace erpc {
/*!
* @brief Types of messages that can be encoded.
*/
typedef enum _message_type
enum class message_type_t
{
kInvocationMessage = 0,
kOnewayMessage,
kReplyMessage,
kNotificationMessage
} message_type_t;
};

typedef void *funPtr; // Pointer to functions
typedef funPtr *arrayOfFunPtr; // Pointer to array of functions
Expand Down
2 changes: 1 addition & 1 deletion erpc_c/infra/erpc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ erpc_status_t Server::processMessage(Codec *codec, message_type_t msgType, uint3
erpc_status_t err = kErpcStatus_Success;
Service *service;

if ((msgType != kInvocationMessage) && (msgType != kOnewayMessage))
if ((msgType != message_type_t::kInvocationMessage) && (msgType != message_type_t::kOnewayMessage))
{
err = kErpcStatus_InvalidArgument;
}
Expand Down
4 changes: 2 additions & 2 deletions erpc_c/infra/erpc_simple_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ erpc_status_t SimpleServer::runInternalEnd(Codec *codec, message_type_t msgType,

if (err == kErpcStatus_Success)
{
if (msgType != kOnewayMessage)
if (msgType != message_type_t::kOnewayMessage)
{
#if ERPC_MESSAGE_LOGGING
err = logMessage(codec->getBuffer());
Expand Down Expand Up @@ -183,7 +183,7 @@ erpc_status_t SimpleServer::run(RequestContext &request)
break;
}

if (msgType == kReplyMessage)
if (msgType == message_type_t::kReplyMessage)
{
if (sequence == request.getSequence())
{
Expand Down
4 changes: 2 additions & 2 deletions erpc_c/infra/erpc_transport_arbitrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ erpc_status_t TransportArbitrator::receive(MessageBuffer *message)
}

// If this message is an invocation, return it to the calling server.
if ((msgType == kInvocationMessage) || (msgType == kOnewayMessage))
if ((msgType == message_type_t::kInvocationMessage) || (msgType == message_type_t::kOnewayMessage))
{
break;
}

// Just ignore messages we don't know what to do with.
if (msgType != kReplyMessage)
if (msgType != message_type_t::kReplyMessage)
{
continue;
}
Expand Down
3 changes: 2 additions & 1 deletion erpc_c/setup/erpc_arbitrated_client_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ extern "C" {
*
* @return erpc_client_t Pointer to client structure.
*/
erpc_client_t erpc_arbitrated_client_init(erpc_transport_t transport, erpc_mbf_t message_buffer_factory, erpc_transport_t *arbitrator);
erpc_client_t erpc_arbitrated_client_init(erpc_transport_t transport, erpc_mbf_t message_buffer_factory,
erpc_transport_t *arbitrator);

/*!
* @brief This function sets error handler function.
Expand Down
2 changes: 1 addition & 1 deletion erpc_c/transports/erpc_rpmsg_lite_transport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class RPMsgTransport : public RPMsgBaseTransport
*
* @return True if exist received message, else false.
*/
virtual bool hasMessage(void) { return ((0UL < m_messageQueue.size()) ? true: false); }
virtual bool hasMessage(void) { return ((0UL < m_messageQueue.size()) ? true : false); }

protected:
/*!
Expand Down
Loading