rclUE
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
UROS2ServiceServer Class Reference

Class implementing ROS2 service server. More...

#include <ROS2ServiceServer.h>

Inheritance diagram for UROS2ServiceServer:
Inheritance graph
[legend]
Collaboration diagram for UROS2ServiceServer:
Collaboration graph
[legend]

Public Member Functions

virtual void Destroy ()
 Destroy publisher with rcl_client_fini. More...
 
virtual void ProcessReady () override
 Determine the relevant action client functions to call. More...
 
void SetDelegates (const FServiceCallback &InSrvCallback)
 Set SrvCallback. More...
 
- Public Member Functions inherited from UROS2Service
virtual bool InitializeWithROS2 (UROS2NodeComponent *InROS2Node)
 Initialize Service with ROS2Node. More...
 
virtual bool Init ()
 Initialize ROS2 service client with rcl_client_init, set QoS, InitializeService and InitializeServiceComponent . More...
 
virtual bool InitializeService ()
 Create Service instance and initialize it. More...
 

Static Public Member Functions

static UROS2ServiceServerCreateServiceServer (UObject *InOwner, const FString &InServiceName, const TSubclassOf< UROS2GenericSrv > &InSrvClass, const FServiceCallback &InCallback, const UROS2QoS InQoS=UROS2QoS::Services)
 Create a new UROS2ServiceServer of custom type. More...
 

Public Attributes

FServiceCallback SrvCallback
 used to receive the answer More...
 
rcl_service_t rcl_service
 ROS2 Service server.
 
bool Ready
 Service is ready or not.
 
- Public Attributes inherited from UROS2Service
FString ServiceName
 this information is redundant with Topic, but it's used to initialize it More...
 
TSubclassOf< UROS2GenericSrvSrvClass
 type of Srv class More...
 
UROS2NodeComponentOwnerNode
 ROS2Node which own this service client. More...
 
TEnumAsByte< UROS2StateState = UROS2State::Created
 Service client state. More...
 
UROS2GenericSrvService
 Service Instance. More...
 
UROS2QoS QoS = UROS2QoS::Services
 Quality of service. More...
 

Protected Member Functions

virtual void InitializeServiceComponent () override
 Initialize ROS2 service server with rcl_service_init. More...
 

Additional Inherited Members

- Protected Attributes inherited from UROS2Service
bool Ready
 Service is ready or not.
 

Detailed Description

Class implementing ROS2 service server.

Service type is defined by SrvClass

UCLASS(ClassGroup = (Custom), Blueprintable, BlueprintType, meta = (BlueprintSpawnableComponent))

Member Function Documentation

◆ CreateServiceServer()

static UROS2ServiceServer* UROS2ServiceServer::CreateServiceServer ( UObject *  InOwner,
const FString &  InServiceName,
const TSubclassOf< UROS2GenericSrv > &  InSrvClass,
const FServiceCallback &  InCallback,
const UROS2QoS  InQoS = UROS2QoS::Services 
)
static

Create a new UROS2ServiceServer of custom type.

Parameters
InTopicNameTopic name
InSrvClassCustom message type class
InCallbackCallback function

◆ Destroy()

virtual void UROS2ServiceServer::Destroy ( )
virtual

Destroy publisher with rcl_client_fini.

Reimplemented from UROS2Service.

◆ InitializeServiceComponent()

virtual void UROS2ServiceServer::InitializeServiceComponent ( )
overrideprotectedvirtual

Initialize ROS2 service server with rcl_service_init.

Set QOS for all goal, result, cancel, feedback and status

Reimplemented from UROS2Service.

◆ ProcessReady()

virtual void UROS2ServiceServer::ProcessReady ( )
overridevirtual

Determine the relevant action client functions to call.

Reimplemented from UROS2Service.

◆ SetDelegates()

void UROS2ServiceServer::SetDelegates ( const FServiceCallback &  InSrvCallback)

Set SrvCallback.

Parameters
InSrvCallback

UFUNCTION(BlueprintCallable)

Member Data Documentation

◆ SrvCallback

FServiceCallback UROS2ServiceServer::SrvCallback

used to receive the answer

UPROPERTY(EditAnywhere, BlueprintReadWrite)


The documentation for this class was generated from the following file: