Skip to content

TPendingResponse<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>

Represents an active connection to all servers that received the TRequestMut. The client can use it to receive the corresponding Responses.

As soon as it goes out of scope, the connections are closed and the servers are informed.

Definition

Unit: Neslib.Iceoryx2.RequestResponse

type TPendingResponse<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr> = record ... end;

Type Parameters

TReqPayl:

TReqUsrHdr:

TRespPayl:

TRespUsrHdr:

Nested Types

Name Description
PRequestPayload
PRequestUserHeader
PResponsePayload
PResponseUserHeader
TRequestPayload
TRequestUserHeader
TResponsePayload
TResponseUserHeader

Properties

Name Description
Handle
HasResponse Returns True when a TServer has sent a TResponse, otherwise False.
IsConnected Returns True until the TActiveRequest goes out of scope on the TServer's side indicating that the TServer will no longer send TResponse's. It also returns False when there are no TServer's.
ServerConnectionCount Returns how many TServer's received the corresponding TRequestMut initially.

Constructors

Name Description
Assign
Finalize
Initialize

Operators

Name Description
Equal
NotEqual

Methods

Name Description
Header Returns a reference to the iceoryx2 internal TRequestHeader of the corresponding TRequestMut
Payload Returns a reference to the request payload of the corresponding TRequestMut
PayloadSlice<T> Returns a reference to the request payload of the corresponding TRequestMut
Receive Receives a TResponse from one of the servers that received the TRequestMut.
SetDisconnectHint Marks the connection state that the TClient wants to gracefully disconnect. When the TServer reads this, it can send the last TResponse and drop the corresponding TActiveRequest to terminate the connection ensuring that no TResponse is lost on the TClient side.
UserHeader Returns a reference to the user defined request header of the corresponding TRequestMut

Property Descriptions

Handle

property Handle: THandle read GetHandle

Type: THandle


HasResponse

Returns True when a TServer has sent a TResponse, otherwise False.

property HasResponse: Boolean read GetHasResponse

Type: Boolean


IsConnected

Returns True until the TActiveRequest goes out of scope on the TServer's side indicating that the TServer will no longer send TResponse's. It also returns False when there are no TServer's.

property IsConnected: Boolean read GetIsConnected

Type: Boolean


ServerConnectionCount

Returns how many TServer's received the corresponding TRequestMut initially.

property ServerConnectionCount: NativeInt read GetServerConnectionCount

Type: NativeInt


Constructor Descriptions

Assign

constructor Assign(var ADest: TPendingResponse<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>; const ASrc: TPendingResponse<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>)

Parameters

ADest: TPendingResponse<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>

ASrc: TPendingResponse<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>


Finalize

destructor Finalize


Initialize

constructor Initialize


Operator Descriptions

Equal(TPendingResponse, Pointer)

class operator Equal(const ALeft: TPendingResponse<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>; const ARight: Pointer): Boolean; inline; static

Parameters

ALeft: TPendingResponse<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>

ARight: Pointer

Returns

Boolean


NotEqual(TPendingResponse, Pointer)

class operator NotEqual(const ALeft: TPendingResponse<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>; const ARight: Pointer): Boolean; inline; static

Parameters

ALeft: TPendingResponse<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>

ARight: Pointer

Returns

Boolean


Method Descriptions

Returns a reference to the iceoryx2 internal TRequestHeader of the corresponding TRequestMut

function Header: TRequestHeader; inline

Returns

TRequestHeader


Payload

Returns a reference to the request payload of the corresponding TRequestMut

function Payload: PRequestPayload; inline

Returns

PRequestPayload

Remarks

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


PayloadSlice<T>

Returns a reference to the request payload of the corresponding TRequestMut

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

Type Parameters

T:

Returns

TSlice<T>

Remarks

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

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


Receive

Receives a TResponse from one of the servers that received the TRequestMut.

function Receive: TResult<TResponse<TRespPayl>, TReceiveError>; inline

Returns

TResult<TResponse<TRespPayl>, TReceiveError>


SetDisconnectHint

Marks the connection state that the TClient wants to gracefully disconnect. When the TServer reads this, it can send the last TResponse and drop the corresponding TActiveRequest to terminate the connection ensuring that no TResponse is lost on the TClient side.

procedure SetDisconnectHint; inline


UserHeader

Returns a reference to the user defined request header of the corresponding TRequestMut

function UserHeader: PRequestUserHeader; inline

Returns

PRequestUserHeader

Remarks

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