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

Class implementing ROS2 service clients. More...

#include <ROS2Service.h>

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

Public Member Functions

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...
 
virtual void Destroy ()
 Destroy service with rcl_client_fini. More...
 
virtual void ProcessReady ()
 Determine the relevant service functions to call. More...
 

Public Attributes

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 ()
 Initialize ROS2 Action. Should be implemented in UROS2ServiceServer and UROS2ServiceClient. More...
 

Protected Attributes

bool Ready
 Service is ready or not.
 

Detailed Description

Class implementing ROS2 service clients.

Service type is defined by SrvClass

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

Member Function Documentation

◆ Destroy()

virtual void UROS2Service::Destroy ( )
virtual

Destroy service with rcl_client_fini.

UFUNCTION()

Reimplemented in UROS2ServiceClient, and UROS2ServiceServer.

◆ Init()

virtual bool UROS2Service::Init ( )
virtual

Initialize ROS2 service client with rcl_client_init, set QoS, InitializeService and InitializeServiceComponent .

Returns
true
false

UFUNCTION(BlueprintCallable)

◆ InitializeService()

virtual bool UROS2Service::InitializeService ( )
virtual

Create Service instance and initialize it.

Returns
true
false

UFUNCTION(BlueprintCallable)

◆ InitializeServiceComponent()

virtual void UROS2Service::InitializeServiceComponent ( )
protectedvirtual

Initialize ROS2 Action. Should be implemented in UROS2ServiceServer and UROS2ServiceClient.

UFUNCTION()

Reimplemented in UROS2ServiceClient, and UROS2ServiceServer.

◆ InitializeWithROS2()

virtual bool UROS2Service::InitializeWithROS2 ( UROS2NodeComponent InROS2Node)
virtual

Initialize Service with ROS2Node.

Parameters
InROS2NodeROS2Node which this publisher belongs to
Returns
true
false

◆ ProcessReady()

virtual void UROS2Service::ProcessReady ( )
virtual

Determine the relevant service functions to call.

Should be implemented in UROS2ServiceServer and UROS2ServiceClient

Reimplemented in UROS2ServiceClient, and UROS2ServiceServer.

Member Data Documentation

◆ OwnerNode

UROS2NodeComponent* UROS2Service::OwnerNode

ROS2Node which own this service client.

UPROPERTY(VisibleAnywhere, BlueprintReadOnly)

◆ QoS

UROS2QoS UROS2Service::QoS = UROS2QoS::Services

◆ Service

UROS2GenericSrv* UROS2Service::Service

◆ ServiceName

FString UROS2Service::ServiceName

this information is redundant with Topic, but it's used to initialize it

UPROPERTY(EditAnywhere, BlueprintReadWrite)

◆ SrvClass

TSubclassOf<UROS2GenericSrv> UROS2Service::SrvClass

◆ State

TEnumAsByte<UROS2State> UROS2Service::State = UROS2State::Created

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