Skip to content

TSampleMutUninit<TPayload, TUserHeader>

An uninitialized version of TSampleMut<>. It's the responsibility of the user to initialize the sample before passing it on.

Definition

Unit: Neslib.Iceoryx2.PublishSubscribe

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

Type Parameters

TPayload:

TUserHeader:

Nested Types

Name Description
PPayload
PUserHeader

Properties

Name Description
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.

Methods

Name Description
AssumeInit Converts the uninitialized TSampleMutUninit into the initialized version TSampleMut.
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.
WriteFromFunction<T> Writes the slice payload to the sample using a function.
WriteFromSlice<T> Writes the provided payload into the TSampleMutUninit and returns an initialized TSampleMut.
WritePayload Writes the payload to the sample

Property Descriptions

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.


Method Descriptions

AssumeInit

Converts the uninitialized TSampleMutUninit into the initialized version TSampleMut.

function AssumeInit: TSampleMut<TPayload, TUserHeader>; inline

Returns

TSampleMut<TPayload, TUserHeader>


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.


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.


WriteFromFunction<T>(TWriteElementFunc<T>)

Writes the slice payload to the sample using a function.

function WriteFromFunction<T>(const AFunc: TWriteElementFunc<T>): TSampleMut<TPayload, TUserHeader>; inline

Type Parameters

T:

Parameters

AFunc: TWriteElementFunc<T>

Returns

TSampleMut<TPayload, TUserHeader>

Remarks

Can only be used when TPayload is a slice (TSlice). This is checked with an assertion. Otherwise use WritePayload 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.


WriteFromSlice<T>(TSlice<T>)

Writes the provided payload into the TSampleMutUninit and returns an initialized TSampleMut.

function WriteFromSlice<T>(const AValue: TSlice<T>): TSampleMut<TPayload, TUserHeader>; inline

Type Parameters

T:

Parameters

AValue: TSlice<T>

Returns

TSampleMut<TPayload, TUserHeader>

Remarks

Can only be used when TPayload is a slice (TSlice). This is checked with an assertion. Otherwise use WritePayload 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.


WritePayload(TPayload)

Writes the payload to the sample

function WritePayload(const AValue: TPayload): TSampleMut<TPayload, TUserHeader>; inline

Parameters

AValue: TPayload

Returns

TSampleMut<TPayload, TUserHeader>

Remarks

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