Skip to main content

DPF C++ Client Library 2024 R2

ansys::dpf::RuntimeClientConfig Class Reference

Last update: 16.07.2025

#include <dpf_api.h>

Inherits ansys::dpf::RuntimeConfig.

Public Member Functions

 RuntimeClientConfig (RuntimeClientConfig const &rhs)
 
 RuntimeClientConfig (RuntimeClientConfig &&rhs) noexcept
 
void enableCache (bool use_cache)
 
bool isCacheEnabled () const
 
void setStreamingBufferSize (int size)
 
int getStreamingBufferSize () const
 
void setStreamFloatsInsteadOfDoubles (bool use_float)
 
bool streamingFloatsInsteadOfDouble () const
 
void setMetadata (std::map< std::string, std::string > const &metadata)
 
std::map< std::string, std::string > getMetadata () const
 
void setSecureConnection (bool secure)
 
bool isConnectionSecure () const
 

Detailed Description

enables to set runtime configuration options to DPF Client.

Member Function Documentation

◆ enableCache()

void ansys::dpf::RuntimeClientConfig::enableCache ( bool  use_cache)

Sets whether gRPC calls should be intercepted to cache responses or not.

◆ getMetadata()

std::map< std::string, std::string > ansys::dpf::RuntimeClientConfig::getMetadata ( ) const

Gets the custom metadata appended to gRPC packets.

◆ getStreamingBufferSize()

int ansys::dpf::RuntimeClientConfig::getStreamingBufferSize ( ) const
Returns
the chunk size (in bytes) used in gRPC streaming calls.

◆ isCacheEnabled()

bool ansys::dpf::RuntimeClientConfig::isCacheEnabled ( ) const
Returns
Whether gRPC calls are intercepted to cache responses or not.

◆ isConnectionSecure()

bool ansys::dpf::RuntimeClientConfig::isConnectionSecure ( ) const

Returns if the gRPC communication is secured by using TLS.

◆ setMetadata()

void ansys::dpf::RuntimeClientConfig::setMetadata ( std::map< std::string, std::string > const &  metadata)

Sets the custom metadata appended to gRPC packets.

◆ setSecureConnection()

void ansys::dpf::RuntimeClientConfig::setSecureConnection ( bool  secure)

Sets the use of TLS for secure gRPC connections.

◆ setStreamFloatsInsteadOfDoubles()

void ansys::dpf::RuntimeClientConfig::setStreamFloatsInsteadOfDoubles ( bool  use_float)

Sets whether double values (8 bytes) should be converted and streamed as floats values (4 bytes) in gRPC streaming calls.

◆ setStreamingBufferSize()

void ansys::dpf::RuntimeClientConfig::setStreamingBufferSize ( int  size)

Sets the chunk size (in bytes) used in gRPC streaming calls.

◆ streamingFloatsInsteadOfDouble()

bool ansys::dpf::RuntimeClientConfig::streamingFloatsInsteadOfDouble ( ) const
Returns
Whether double values (8 bytes) are converted and streamed as floats values (4 bytes) in gRPC streaming calls.

Connect with Ansys