TPortFactorySubscriber<TPayload, TUserHeader>
Factory to create a new subscriber port/endpoint for TMessagingPattern.PublishSubscribe based communication.
Definition
Unit: Neslib.Iceoryx2.PublishSubscribe
Type Parameters
TPayload:
TUserHeader:
Methods
| Name | Description |
|---|---|
| BufferSize | Defines the required buffer size of the subscriber. Smallest possible value is 1. |
| Create | Creates a new TSubscriber or returns a TSubscriberCreateError`on failure. |
| HistoryRequest | Defines the amount of requested history samples. By default the value defined with the service's HistorySize is used. |
| Name | The TPortName that shall be assigned to the TSubscriber. It does not have to be unique. If no TPortName is defined then the TSubscriber does not have a name. |
| SetDegradationHandler | Sets the TDegradationHandler of the TSubscriber. Whenever a connection to a TPublisher is corrupted, this handler is called and depending on the returned TDegradationAction measures will be taken. |
Method Descriptions
BufferSize(UInt64)
Defines the required buffer size of the subscriber. Smallest possible value is 1.
function BufferSize(const AValue: UInt64): TPortFactorySubscriber<TPayload, TUserHeader>; inline
Parameters
AValue: UInt64
Returns
TPortFactorySubscriber<TPayload, TUserHeader>
Create
Creates a new TSubscriber or returns a TSubscriberCreateError`on failure.
function Create: TResult<TSubscriber<TPayload>, TSubscriberCreateError>
Returns
TResult<TSubscriber<TPayload>, TSubscriberCreateError>
HistoryRequest(UInt64)
Defines the amount of requested history samples. By default the value defined with the service's HistorySize is used.
function HistoryRequest(const AValue: UInt64): TPortFactorySubscriber<TPayload, TUserHeader>; inline
Parameters
AValue: UInt64
Returns
TPortFactorySubscriber<TPayload, TUserHeader>
Name(TPortName)
The TPortName that shall be assigned to the TSubscriber. It does not have to be unique. If no TPortName is defined then the TSubscriber does not have a name.
function Name(const AValue: TPortName): TPortFactorySubscriber<TPayload, TUserHeader>; inline
Parameters
AValue: TPortName
Returns
TPortFactorySubscriber<TPayload, TUserHeader>
SetDegradationHandler(TDegradationHandler)
Sets the TDegradationHandler of the TSubscriber. Whenever a connection to a TPublisher is corrupted, this handler is called and depending on the returned TDegradationAction measures will be taken.
function SetDegradationHandler(const AValue: TDegradationHandler): TPortFactorySubscriber<TPayload, TUserHeader>; inline
Parameters
AValue: TDegradationHandler
Returns
TPortFactorySubscriber<TPayload, TUserHeader>
Remarks
The handler function needs to live as long as the generated subscriber. If the TSubscriber including the receive function, is accessed from multiple threads, the handler must be thread-safe if it captures data