Class CallData

template<class ServiceType, typename RequestType, typename ResponseType>
class CallData

A class that manages the state of a generic RPC call.

DoWork() can be used in child threads to automatically progress the state of the call.

Template Parameters:
  • ServiceType – The type of the service that this CallData is associated with

  • RequestType – The type of the request message for the RPC, this is an incoming message to Unreal

  • ResponseType – The type of the response message for the RPC, this is an outgoing message from Unreal

Subclassed by ExchangeCallData< ServiceType, RequestType, ResponseType >

Public Functions

inline CallData(ServiceType *Service, ServerCompletionQueue *CQueue, AsyncAPIHandler TargetRPC, bool bReusable = false, bool bAutoCreate = true)

Construct a new CallData object.

Parameters:
  • Service[in] The AsyncService that this CallData is associated with

  • CQueue[in] The completion queue that this CallData will tracked with

  • TargetRPC[in] The method that this CallData will be servicing

  • bReusable[in] Whether this CallData should be reused after serving one RPC

  • bAutoCreate[in] Whether this CallData should automatically create itself, or it should happen later via Create()

inline void Create()

Create/setup the calldata instance.

This registers the calldata as the tag to return when the TargetRPC is called.

inline void Submit()

Submit a response to the caller of the TargetRPC.

This will put us back on the queue once the response finished processing.

inline void Reset()

Reset the RPC state object so it can be reused again by another RPC in the future.

inline void Finish()

The RPC has been deleted so perform final cleanup.

inline void CleanUp()

clean up, both this object and any other objects owned by it

inline const RequestType &GetRequest()

Get the request associated with this RPC.

May be empty if the RPC is not ready

Returns:

A reference to the RPC Request Message from the client

inline ResponseType *GetMutableResponse()

Get a Response message that can be mutated in place.

Returns:

A pointer to a response message owned by this object

inline void SetResponse(ResponseType *NewResponse)

Set the response message.

Note

Caller must relinquish ownership of the response message

Parameters:

NewResponse[in] The new Response message to associate with this call.

inline bool HasResponse()

Has the response message been set already.

Returns:

true iff the response message has been set

inline bool IsReady()

Returns whether the RPC is ready for processing.

Specifically, does the RPC have a Request?

Returns:

true iff this RPC has a request but has not submitted a response

inline void DoWork()

Progress the state of the RPC.

Call this on a child process to handle automatically setting up and completing gRPC calls.

Public Members

int Id = 0

The unique ID of this CallData instance.

Used for debugging,

Related pages

  • Visit the Schola product page for download links and more information.

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNA™ 2 GPUs, AMD Ryzen™ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!