iox::popo::UntypedPublisherImpl🔗
Inherits from iox::popo::BasePublisher<>
Public Functions🔗
Name | |
---|---|
UntypedPublisherImpl(const capro::ServiceDescription & service, const PublisherOptions & publisherOptions =PublisherOptions()) | |
UntypedPublisherImpl(const UntypedPublisherImpl & other) | |
UntypedPublisherImpl & | operator=(const UntypedPublisherImpl & ) |
UntypedPublisherImpl(UntypedPublisherImpl && rhs) =default | |
UntypedPublisherImpl & | operator=(UntypedPublisherImpl && rhs) =default |
virtual | ~UntypedPublisherImpl() =default |
cxx::expected< void *, AllocationError > | loan(const uint32_t userPayloadSize, const uint32_t userPayloadAlignment =iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT, const uint32_t userHeaderSize =iox::CHUNK_NO_USER_HEADER_SIZE, const uint32_t userHeaderAlignment =iox::CHUNK_NO_USER_HEADER_ALIGNMENT) Get a chunk from loaned shared memory. |
void | publish(void *const userPayload) Publish the provided memory chunk. |
void | release(void *const userPayload) Releases the ownership of the chunk provided by the user-payload pointer. |
Additional inherited members🔗
Public Types inherited from iox::popo::BasePublisher<>
Name | |
---|---|
using port_t | PortType |
Public Functions inherited from iox::popo::BasePublisher<>
Name | |
---|---|
BasePublisher(const BasePublisher & other) | |
BasePublisher(BasePublisher && rhs) | |
virtual | ~BasePublisher() |
uid_t | getUid() const uid Get the UID of the publisher. |
capro::ServiceDescription | getServiceDescription() const getServiceDescription Get the service description of the publisher. |
void | offer() offer Offer the service to be subscribed to. |
void | stopOffer() stopOffer Stop offering the service. |
bool | isOffered() const isOffered |
bool | hasSubscribers() const hasSubscribers |
Protected Functions inherited from iox::popo::BasePublisher<>
Name | |
---|---|
BasePublisher() =default | |
BasePublisher(const capro::ServiceDescription & service, const PublisherOptions & publisherOptions) | |
const port_t & | port() const port |
port_t & | port() port |
Protected Attributes inherited from iox::popo::BasePublisher<>
Name | |
---|---|
port_t | m_port |
Detailed Description🔗
template <typename BasePublisher_t =BasePublisher<>>
class iox::popo::UntypedPublisherImpl;
Public Functions Documentation🔗
function UntypedPublisherImpl🔗
inline UntypedPublisherImpl(
const capro::ServiceDescription & service,
const PublisherOptions & publisherOptions =PublisherOptions()
)
function UntypedPublisherImpl🔗
UntypedPublisherImpl(
const UntypedPublisherImpl & other
)
function operator=🔗
UntypedPublisherImpl & operator=(
const UntypedPublisherImpl &
)
function UntypedPublisherImpl🔗
UntypedPublisherImpl(
UntypedPublisherImpl && rhs
) =default
function operator=🔗
UntypedPublisherImpl & operator=(
UntypedPublisherImpl && rhs
) =default
function ~UntypedPublisherImpl🔗
virtual ~UntypedPublisherImpl() =default
function loan🔗
inline cxx::expected< void *, AllocationError > loan(
const uint32_t userPayloadSize,
const uint32_t userPayloadAlignment =iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT,
const uint32_t userHeaderSize =iox::CHUNK_NO_USER_HEADER_SIZE,
const uint32_t userHeaderAlignment =iox::CHUNK_NO_USER_HEADER_ALIGNMENT
)
Get a chunk from loaned shared memory.
Parameters:
- usePayloadSize The expected user-payload size of the chunk.
- userPayloadAlignment The expected user-payload alignment of the chunk.
Return: A pointer to the user-payload of a chunk of memory with the requested size or an AllocationError if no chunk could be loaned.
Note: An AllocationError occurs if no chunk is available in the shared memory.
function publish🔗
inline void publish(
void *const userPayload
)
Publish the provided memory chunk.
Parameters:
- userPayload Pointer to the user-payload of the allocated shared memory chunk.
Return: Error if provided pointer is not a user-payload of a valid memory chunk.
function release🔗
inline void release(
void *const userPayload
)
Releases the ownership of the chunk provided by the user-payload pointer.
Parameters:
- userPayload pointer to the user-payload of the chunk to be released
The userPayload pointer must have been previously provided by loan and not have been already released. The chunk must not be accessed afterwards as its memory may have been reclaimed.
Updated on 26 April 2021 at 15:31:02 CEST