Skip to content

TSampleMut<TPayload, TUserHeader>

Acquired by a TPublisher * TPublisher.Loan * TPublisher.LoanUninit * TPublisher.LoanSlice * TPublisher.LoanSliceUninit

It stores the payload that will be sent to all connected subscribers. If the TSampleMut is not sent it will release the loaned memory when going out of scope.

Definition

Unit: Neslib.Iceoryx2.PublishSubscribe

type TSampleMut<TPayload, TUserHeader> = record ... end;

Type Parameters

TPayload:

TUserHeader:

Remarks

IMPORTANT: Do not move the sample into another thread!

Nested Types

Name Description
PPayload
PUserHeader

Properties

Name Description
Handle
Header Returns the header of the sample.
UserHeader Returns a reference to the user header of the sample
UserHeaderMut Returns a mutable reference to the user header of the sample.

Constructors

Name Description
Assign
Finalize
Initialize

Operators

Name Description
Equal
NotEqual

Methods

Name Description
Payload Returns a reference to the const payload of the sample.
PayloadMut Returns a reference to the payload of the sample.
PayloadSlice<T> Returns an immutable slice to the payload of the sample.
PayloadSliceMut<T> Returns a mutable slice to the payload of the sample.
Send Sends the payload

Property Descriptions

Handle

property Handle: THandle read GetHandle

Type: THandle


Returns the header of the sample.

property Header: THeaderPublishSubscribe read GetHeader

Type: THeaderPublishSubscribe


UserHeader

Returns a reference to the user header of the sample

Cannot be used when there is no TUserHeader (that is, when TUserHeader=Void). This is checked with an assertion.

property UserHeader: PUserHeader read GetUserHeader

Type: PUserHeader


UserHeaderMut

Returns a mutable reference to the user header of the sample.

property UserHeaderMut: PUserHeader read GetUserHeaderMut

Type: PUserHeader

Remarks

Cannot be used when there is no TUserHeader (that is, when TUserHeader=Void). This is checked with an assertion.


Constructor Descriptions

Assign

constructor Assign(var ADest: TSampleMut<TPayload, TUserHeader>; const ASrc: TSampleMut<TPayload, TUserHeader>)

Parameters

ADest: TSampleMut<TPayload, TUserHeader>

ASrc: TSampleMut<TPayload, TUserHeader>


Finalize

destructor Finalize


Initialize

constructor Initialize


Operator Descriptions

Equal(TSampleMut, Pointer)

class operator Equal(const ALeft: TSampleMut<TPayload, TUserHeader>; const ARight: Pointer): Boolean; inline; static

Parameters

ALeft: TSampleMut<TPayload, TUserHeader>

ARight: Pointer

Returns

Boolean


NotEqual(TSampleMut, Pointer)

class operator NotEqual(const ALeft: TSampleMut<TPayload, TUserHeader>; const ARight: Pointer): Boolean; inline; static

Parameters

ALeft: TSampleMut<TPayload, TUserHeader>

ARight: Pointer

Returns

Boolean


Method Descriptions

Payload

Returns a reference to the const payload of the sample.

function Payload: PPayload; inline

Returns

PPayload

Remarks

Cannot be used when TPayload is a slice (TSlice). This is checked with an assertion. Otherwise use PayloadSlice instead


PayloadMut

Returns a reference to the payload of the sample.

function PayloadMut: PPayload; inline

Returns

PPayload

Remarks

Cannot be used when TPayload is a slice (TSlice). This is checked with an assertion. Otherwise use PayloadSliceMut instead


PayloadSlice<T>

Returns an immutable slice to the payload of the sample.

function PayloadSlice<T>: TSlice<T>; inline

Type Parameters

T:

Returns

TSlice<T>

Remarks

Can only be used when TPayload is a slice (TSlice). This is checked with an assertion. Otherwise use PayloadMut instead

The type parameter T must be the element type of the slice. E.g. if TPayload = TSlice<word>, then T must be Word. This is checked with an assertion.


PayloadSliceMut<T>

Returns a mutable slice to the payload of the sample.

function PayloadSliceMut<T>: TSlice<T>; inline

Type Parameters

T:

Returns

TSlice<T>

Remarks

Can only be used when TPayload is a slice (TSlice). This is checked with an assertion. Otherwise use PayloadMut instead

The type parameter T must be the element type of the slice. E.g. if TPayload = TSlice<word>, then T must be Word. This is checked with an assertion.


Send

Sends the payload

function Send: TResult<NativeInt, TSendError>; inline

Returns

TResult<NativeInt, TSendError>: The number of subscribers that received the sample or an error