Skip to content

Commit

Permalink
RPi32 fixes: increased various footprints
Browse files Browse the repository at this point in the history
  • Loading branch information
serges147 committed Feb 14, 2025
1 parent 3d0320d commit 5da584d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions include/libcyphal/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct Config
///
static constexpr std::size_t IExecutor_Callback_FunctionMaxSize() // NOSONAR cpp:S799
{
return sizeof(void*) * 8;
return 64;
}

/// Defines footprint size reserved for a callback implementation.
Expand All @@ -38,7 +38,7 @@ struct Config
static constexpr std::size_t IExecutor_Callback_ReserveSize() // NOSONAR cpp:S799
{
/// Size is chosen arbitrary, but it should be enough to store any lambda or function pointer.
return sizeof(void*) * 16;
return 160;
}

/// Defines various configuration parameters for the application layer.
Expand All @@ -52,7 +52,7 @@ struct Config
static constexpr std::size_t HeartbeatProducer_UpdateCallback_FunctionSize() // NOSONAR cpp:S799
{
/// Size is chosen arbitrary, but it should be enough to store any lambda or function pointer.
return sizeof(void*) * 4;
return 64;
}

}; // Node
Expand All @@ -68,23 +68,23 @@ struct Config
static constexpr std::size_t ResponsePromiseBase_Callback_FunctionSize() // NOSONAR cpp:S799
{
/// Size is chosen arbitrary, but it should be enough to store any lambda or function pointer.
return sizeof(void*) * 4;
return 64;
}

/// Defines max footprint of a callback function in use by the RPC server response continuation.
///
static constexpr std::size_t ServerBase_ContinuationImpl_FunctionMaxSize() // NOSONAR cpp:S799
{
/// Size is chosen arbitrary, but it should be enough to store any lambda or function pointer.
return sizeof(void*) * 5;
return 64;
}

/// Defines max footprint of a callback function in use by the RPC server request notification.
///
static constexpr std::size_t ServerBase_OnRequestCallback_FunctionMaxSize() // NOSONAR cpp:S799
{
/// Size is chosen arbitrary, but it should be enough to store any lambda or function pointer.
return sizeof(void*) * 5;
return 64;
}

/// Defines the size serialization/deserialization payload buffer which is considered as a small one,
Expand All @@ -103,7 +103,7 @@ struct Config
static constexpr std::size_t Subscriber_OnReceiveCallback_FunctionMaxSize() // NOSONAR cpp:S799
{
/// Size is chosen arbitrary, but it should be enough to store any lambda or function pointer.
return sizeof(void*) * 4;
return 64;
}
};

Expand All @@ -117,7 +117,7 @@ struct Config
static constexpr std::size_t IMessageRxSession_OnReceiveCallback_FunctionMaxSize() // NOSONAR cpp:S799
{
/// Size is chosen arbitrary, but it should be enough to store any lambda or function pointer.
return sizeof(void*) * 4;
return 64;
}

/// Defines max footprint of a callback function in use by the service RX session notification.
Expand All @@ -126,23 +126,23 @@ struct Config
static constexpr std::size_t ISvcRxSession_OnReceiveCallback_FunctionMaxSize() // NOSONAR cpp:S799
{
/// Size is chosen arbitrary, but it should be enough to store any lambda or function pointer.
return sizeof(void*) * 4;
return 64;
}

/// Defines max footprint of a platform-specific error implementation.
///
static constexpr std::size_t PlatformErrorMaxSize()
{
/// Size is chosen arbitrary, but it should be enough to store simple implementation.
return sizeof(void*) * 3;
return 32;
}

/// Defines max footprint of a storage implementation used by the scattered buffer.
///
static constexpr std::size_t ScatteredBuffer_StorageVariantFootprint() // NOSONAR cpp:S799
{
/// Size is chosen arbitrary, but it should be enough to store any implementation.
return sizeof(void*) * 8;
return 64;
}

/// Defines various configuration parameters for the CAN transport sublayer.
Expand All @@ -154,7 +154,7 @@ struct Config
static constexpr std::size_t ICanTransport_TransientErrorHandlerMaxSize() // NOSONAR cpp:S799
{
/// Size is chosen arbitrary, but it should be enough to store simple lambda or function pointer.
return sizeof(void*) * 3;
return 32;
}

}; // Can
Expand All @@ -168,7 +168,7 @@ struct Config
static constexpr std::size_t IUdpTransport_TransientErrorHandlerMaxSize() // NOSONAR cpp:S799
{
/// Size is chosen arbitrary, but it should be enough to store simple lambda or function pointer.
return sizeof(void*) * 3;
return 32;
}

}; // Udp
Expand Down

0 comments on commit 5da584d

Please sign in to comment.