DiCE API nvidia_logo_transpbg.gif Up
inetwork_configuration.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2025 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_INETWORK_CONFIGURATION_H
8#define MI_NEURAYLIB_INETWORK_CONFIGURATION_H
9
11#include <mi/neuraylib/version.h> // for MI_NEURAYLIB_DEPRECATED_ENUM_VALUE
12
13// X11/Xlib.h defines Status to int
14#if defined(_XLIB_H_) || defined(_X11_XLIB_H_)
15#undef Status
16#endif // _XLIB_H_ || _X11_XLIB_H_
17
18namespace mi {
19
20class IString;
21
22namespace neuraylib {
23
24class IHost_callback;
25class INetwork_statistics;
26
33 mi::base::Interface_declare<0xb60d3124,0xd410,0x400b,0xa0,0x1a,0x5c,0x5a,0x23,0x8d,0xcf,0xf2>
34{
35public:
42 enum Mode : Uint32
43 {
59 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(MODE_FORCE_32_BIT, 0xffffffffU)
60 };
61
70 virtual Sint32 set_mode( Mode mode) = 0;
71
81 virtual Mode get_mode() const = 0;
82
87 {
101 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(CONNECTION_FORCE_32_BIT, 0xffffffffU)
102 };
103
105 virtual Status get_status() const = 0;
106
107 // Configuration for multicast networking
108
126 virtual Sint32 set_multicast_address( const char* address) = 0;
127
134 virtual const IString* get_multicast_address() const = 0;
135
145 virtual void set_multicast_ttl( Uint32 ttl) = 0;
146
152 virtual Uint32 get_multicast_ttl() const = 0;
153
182 virtual Sint32 set_cluster_interface( const char* address) = 0;
183
190 virtual const IString* get_cluster_interface() const = 0;
191
214 virtual Sint32 set_discovery_address( const char* address) = 0;
215
222 virtual const IString* get_discovery_address() const = 0;
223
243 virtual Sint32 set_discovery_identifier( const char* identifier) = 0;
244
250 virtual const IString* get_discovery_identifier() const = 0;
251
252 // Configuration of redundancy
253
266 virtual Sint32 set_redundancy_level( Uint32 level) = 0;
267
273 virtual Uint32 get_redundancy_level() const = 0;
274
275 // Configure and query the list of hosts which can connect with this host
276
286 virtual Sint32 add_configured_host( const char* address) = 0;
287
296 virtual Sint32 remove_configured_host( const char* address) = 0;
297
302
310 virtual const IString* get_configured_host( Uint32 index) const = 0;
311
325
329 virtual Sint32 get_compression_level() const = 0;
330
331 // Callbacks for joining / leaving hosts
332
345
356
360 virtual const INetwork_statistics* get_network_statistics() const = 0;
361
370 virtual Sint32 set_use_rdma( bool use_rdma) = 0;
371
375 virtual bool get_use_rdma() const = 0;
376
392 virtual Sint32 set_rdma_interface( const char* rdma_interface) = 0;
393
400 virtual const IString* get_rdma_interface() const = 0;
401};
402 // end group mi_neuray_configuration
404
405} // namespace neuraylib
406
407} // namespace mi
408
409// X11/Xlib.h defines Status to int
410#if defined(_XLIB_H_) || defined(_X11_XLIB_H_)
411#define Status int
412#endif // _XLIB_H_ || _X11_XLIB_H_
413
414#endif // MI_NEURAYLIB_INETWORK_CONFIGURATION_H
A simple string class.
Definition: istring.h:22
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Abstract interface to report cluster status changes.
Definition: ihost_callback.h:35
This interface is used to query and change the networking configuration.
Definition: inetwork_configuration.h:34
virtual Mode get_mode() const =0
Returns the configured networking mode.
Status
The different states for the networking connection.
Definition: inetwork_configuration.h:87
@ CONNECTION_STARTING
DiCE is in the process of starting up.
Definition: inetwork_configuration.h:92
@ CONNECTION_STANDALONE
Networking is not enabled (see set_mode()) or is not available, e.g., due to license restrictions.
Definition: inetwork_configuration.h:90
@ CONNECTION_SHUTDOWN
DiCE has shut down.
Definition: inetwork_configuration.h:98
@ CONNECTION_FAILURE
Networking has failed for some reason.
Definition: inetwork_configuration.h:100
@ CONNECTION_ESTABLISHED
All connections are established as configured.
Definition: inetwork_configuration.h:94
@ CONNECTION_SHUTTINGDOWN
DiCE is in the process of shutting down.
Definition: inetwork_configuration.h:96
virtual Sint32 set_multicast_address(const char *address)=0
Sets the base multicast address to be used for networking.
virtual Sint32 add_configured_host(const char *address)=0
Adds a host to the list of hosts to connect to.
Mode
Constants for the networking mode.
Definition: inetwork_configuration.h:43
@ MODE_UDP
Networking is switched to UDP mode with multicast.
Definition: inetwork_configuration.h:54
@ MODE_OFF
Networking is switched off.
Definition: inetwork_configuration.h:45
@ MODE_TCP_WITH_DISCOVERY
Networking is using TCP/IP connections between hosts.
Definition: inetwork_configuration.h:58
@ MODE_TCP
Networking is using TCP/IP connections between hosts.
Definition: inetwork_configuration.h:49
virtual Sint32 set_discovery_identifier(const char *identifier)=0
Sets the discovery identifier.
virtual Sint32 unregister_host_callback(IHost_callback *callback)=0
Unregisters a callback for cluster changes.
virtual Sint32 set_redundancy_level(Uint32 level)=0
Sets the redundancy level to be used for storing objects in the database.
virtual bool get_use_rdma() const =0
Indicates whether RDMA InfiniBand is enabled.
virtual const IString * get_rdma_interface() const =0
Returns RDMA InfiniBand interface to be used.
virtual const IString * get_cluster_interface() const =0
Returns the chosen cluster interface address.
virtual Status get_status() const =0
Returns the status of the networking connection.
virtual Uint32 get_multicast_ttl() const =0
Returns the set multicast TTL/hop value.
virtual Sint32 remove_configured_host(const char *address)=0
Removes a host from the list of hosts to connect to.
virtual Sint32 get_compression_level() const =0
Returns the compression level for network traffic.
virtual Sint32 set_use_rdma(bool use_rdma)=0
Enables or disables the usage of RDMA InfiniBand.
virtual Sint32 register_host_callback(IHost_callback *callback)=0
Registers a callback for cluster changes.
virtual Sint32 set_rdma_interface(const char *rdma_interface)=0
Set the RDMA InfiniBand interface to be used.
virtual Sint32 set_compression_level(Uint32 level)=0
Sets the compression level for network traffic.
virtual const INetwork_statistics * get_network_statistics() const =0
Returns an interface to inquire network statistics.
virtual const IString * get_discovery_identifier() const =0
Returns the discovery identifier.
virtual const IString * get_discovery_address() const =0
Returns the discovery address.
virtual Sint32 set_cluster_interface(const char *address)=0
Sets the interface to be used for outgoing packets.
virtual const IString * get_configured_host(Uint32 index) const =0
Returns the address of a host from the list of configured hosts.
virtual Uint32 get_redundancy_level() const =0
Returns the redundancy level.
virtual Uint32 get_number_of_configured_hosts() const =0
Returns the current number of configured hosts.
virtual Sint32 set_mode(Mode mode)=0
Sets the networking mode.
virtual const IString * get_multicast_address() const =0
Returns the base multicast address.
virtual void set_multicast_ttl(Uint32 ttl)=0
Sets the time to live (TTL/hops) of multicast packets.
virtual Sint32 set_discovery_address(const char *address)=0
Sets the discovery address to be used for automatic host discovery.
This interface is used to inquire statistics about the network usage etc.
Definition: inetwork_statistics.h:23
int Sint32
32-bit signed integer.
Definition: types.h:46
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: dice.h:89
Major and minor version number and an optional qualifier.