B2BITS FIX Antenna C++  2.27.1
Classes | Public Member Functions | List of all members
Bats::ServiceListener Class Referenceabstract

Unit service observer. More...

#include <B2BITS_BatsUnitService.h>

Classes

struct  Notification
 Service notifications. More...
 
struct  ReadingCtx
 Passed when it is possible to utilize current thread and proceed reading multicast feed from other threads in pool. More...
 

Public Member Functions

virtual void onMessage (UnitService *service, const PitchMsg *msg, System::u32 seconds, Timestamp &ts)=0
 Called on PITCH message. More...
 
virtual void onNotification (UnitService *service, Notification::Type type)
 Called on service notifications. More...
 
virtual void onReset (UnitService *service, ResetReason::Type resetReason)=0
 Called on service reset. More...
 
virtual void onUnitProcessed (ReadingCtx *ctx, Timestamp &ts)
 Called when whole sequenced unit has been processed. More...
 

Detailed Description

Unit service observer.

Provides interface to receive service level events.

Member Function Documentation

◆ onMessage()

virtual void Bats::ServiceListener::onMessage ( UnitService service,
const PitchMsg msg,
System::u32  seconds,
Timestamp ts 
)
pure virtual

Called on PITCH message.

This method is called when PITCH message is received, messages are guaranteed to be properly ordered

Parameters
serviceService that generated notification
msgMessage received
secondsLast BATS Unit timestamp, sent via Bats::TimeMsg message

◆ onNotification()

virtual void Bats::ServiceListener::onNotification ( UnitService service,
Notification::Type  type 
)
inlinevirtual

Called on service notifications.

Parameters
serviceService that generated notification
typeType of notification

◆ onReset()

virtual void Bats::ServiceListener::onReset ( UnitService service,
ResetReason::Type  resetReason 
)
pure virtual

Called on service reset.

Parameters
serviceService that generated notification
resetReasonreason why reset has been generated

◆ onUnitProcessed()

virtual void Bats::ServiceListener::onUnitProcessed ( ReadingCtx ctx,
Timestamp ts 
)
inlinevirtual

Called when whole sequenced unit has been processed.

Parameters
serviceService that generated notification
ctxIf not NULL, can be used to utilize current thread and continue reading multicast feed