Skip to content

TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>

Factory to create a new server port/endpoint for TMessagingPattern.RequestResponse based communication.

Definition

Unit: Neslib.Iceoryx2.RequestResponse

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

Type Parameters

TReqPayl:

TReqUsrHdr:

TRespPayl:

TRespUsrHdr:

Nested Types

Name Description
PRequestPayload
PRequestUserHeader
PResponsePayload
PResponseUserHeader
TRequestPayload
TRequestUserHeader
TResponsePayload
TResponseUserHeader

Methods

Name Description
AllocationStrategy Defines the allocation strategy that is used when the provided InitialMaxSliceLen is exhausted. This happens when the user acquires more than max slice len in TActiveRequest.LoanSlice or TActiveRequest.LoanSliceUninit.
BackpressureStrategy Sets the TBackpressureStrategy which defines how the TServer shall behave when a TClient cannot receive a TResponse since its internal buffer is full.
Create Creates a new TServer or returns a TServerCreateError on failure.
InitialMaxSliceLen Sets the maximum initial slice length configured for this server.
MaxLoanedResponsesPerRequest Defines the maximum number of TResponseMut's that the TServer can loan in parallel per TActiveRequest.
Name The TPortName that shall be assigned to the TServer. It does not have to be unique. If no TPortName is defined then the TServer does not have a name.
OverrideResponsePreallocation Defines a callback to reduce the number of preallocated TResponseMut's. The input argument is the worst case number of preallocated TResponseMut's required to guarantee that the TServer never runs out of TResponseMut's to loan and send. The return value is clamped between 1 and the worst case number of preallocated TResponseMut's.
SetBackpressureHandler Sets the TBackpressureHandler of the TServer. Whenever a TResponseMut cannot be sent to a TClient, this handler is called and depending on the returned TBackpressureAction, measures will be taken. If no handler is set, the measures will be determined by the value set in BackpressureStrategy.
SetRequestDegradationHandler Sets the TDegradationHandler for receiving TActiveRequest's from a TClient. Whenever a request connection to a TClient is corrupted, this handler is called and depending on the returned TDegradationAction measures will be taken.
SetResponseDegradationHandler Sets the TDegradationHandler for sending TResponseMut's to a TClient. Whenever a response connection to a TClient is corrupted, this handler is called and depending on the returned TDegradationAction measures will be taken.

Method Descriptions

AllocationStrategy(TAllocationStrategy)

Defines the allocation strategy that is used when the provided InitialMaxSliceLen is exhausted. This happens when the user acquires more than max slice len in TActiveRequest.LoanSlice or TActiveRequest.LoanSliceUninit.

function AllocationStrategy(const AValue: TAllocationStrategy): TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>; inline

Parameters

AValue: TAllocationStrategy

Returns

TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>

Remarks

Can only used when TResponsePayload is a slice (TSlice). This is checked with an assertion.


BackpressureStrategy(TBackpressureStrategy)

Sets the TBackpressureStrategy which defines how the TServer shall behave when a TClient cannot receive a TResponse since its internal buffer is full.

function BackpressureStrategy(const AValue: TBackpressureStrategy): TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>; inline

Parameters

AValue: TBackpressureStrategy

Returns

TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>


Create

Creates a new TServer or returns a TServerCreateError on failure.

function Create: TResult<TServer<TReqPayl>, TServerCreateError>

Returns

TResult<TServer<TReqPayl>, TServerCreateError>


InitialMaxSliceLen(UInt64)

Sets the maximum initial slice length configured for this server.

function InitialMaxSliceLen(const AValue: UInt64): TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>; inline

Parameters

AValue: UInt64

Returns

TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>

Remarks

Can only used when TResponsePayload is a slice (TSlice). This is checked with an assertion.


MaxLoanedResponsesPerRequest(Int64)

Defines the maximum number of TResponseMut's that the TServer can loan in parallel per TActiveRequest.

function MaxLoanedResponsesPerRequest(const AValue: Int64): TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>; inline

Parameters

AValue: Int64

Returns

TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>


Name(TPortName)

The TPortName that shall be assigned to the TServer. It does not have to be unique. If no TPortName is defined then the TServer does not have a name.

function Name(const AValue: TPortName): TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>; inline

Parameters

AValue: TPortName

Returns

TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>


OverrideResponsePreallocation(TOverridePreallocationCallback)

Defines a callback to reduce the number of preallocated TResponseMut's. The input argument is the worst case number of preallocated TResponseMut's required to guarantee that the TServer never runs out of TResponseMut's to loan and send. The return value is clamped between 1 and the worst case number of preallocated TResponseMut's.

IMPORTANT: If the user reduces the number of preallocated TResponseMut's, iceoryx2 can no longer guarantee, that the TServer can always loan a TResponseMut to send.

function OverrideResponsePreallocation(const AValue: TOverridePreallocationCallback): TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>; inline

Parameters

AValue: TOverridePreallocationCallback

Returns

TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>


SetBackpressureHandler(TBackpressureHandler)

Sets the TBackpressureHandler of the TServer. Whenever a TResponseMut cannot be sent to a TClient, this handler is called and depending on the returned TBackpressureAction, measures will be taken. If no handler is set, the measures will be determined by the value set in BackpressureStrategy.

function SetBackpressureHandler(const AValue: TBackpressureHandler): TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>; inline

Parameters

AValue: TBackpressureHandler

Returns

TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>

Remarks

The handler function needs to live as long as the generated server. If the TServer, including the send and receive functions, is accessed from multiple threads, the handler must be thread-safe if it captures data


SetRequestDegradationHandler(TDegradationHandler)

Sets the TDegradationHandler for receiving TActiveRequest's from a TClient. Whenever a request connection to a TClient is corrupted, this handler is called and depending on the returned TDegradationAction measures will be taken.

function SetRequestDegradationHandler(const AValue: TDegradationHandler): TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>; inline

Parameters

AValue: TDegradationHandler

Returns

TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>

Remarks

The handler function needs to live as long as the generated server. If the TServer, including the send and receive functions, is accessed from multiple threads, the handler must be thread-safe if it captures data


SetResponseDegradationHandler(TDegradationHandler)

Sets the TDegradationHandler for sending TResponseMut's to a TClient. Whenever a response connection to a TClient is corrupted, this handler is called and depending on the returned TDegradationAction measures will be taken.

function SetResponseDegradationHandler(const AValue: TDegradationHandler): TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>; inline

Parameters

AValue: TDegradationHandler

Returns

TPortFactoryServer<TReqPayl, TReqUsrHdr, TRespPayl, TRespUsrHdr>

Remarks

The handler function needs to live as long as the generated server. If the TServer, including the send and receive functions, is accessed from multiple threads, the handler must be thread-safe if it captures data