DiCE API nvidia_logo_transpbg.gif Up
inetwork_configuration.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_INETWORK_CONFIGURATION_H
8#define MI_NEURAYLIB_INETWORK_CONFIGURATION_H
9
11
12// X11/Xlib.h defines Status to int
13#if defined(_XLIB_H_) || defined(_X11_XLIB_H_)
14#undef Status
15#endif // _XLIB_H_ || _X11_XLIB_H_
16
17namespace mi {
18
19class IString;
20
21namespace neuraylib {
22
23class IHost_callback;
24class INetwork_statistics;
25
32 mi::base::Interface_declare<0xb60d3124,0xd410,0x400b,0xa0,0x1a,0x5c,0x5a,0x23,0x8d,0xcf,0xf2>
33{
34public:
41 enum Mode
42 {
58 // Undocumented, for alignment only
59 MODE_FORCE_32_BIT = 0xffffffffU
60 };
61
70 virtual Sint32 set_mode( Mode mode) = 0;
71
81 virtual Mode get_mode() const = 0;
82
86 enum Status
87 {
101 // Undocumented, for alignment only
102 CONNECTION_FORCE_32_BIT = 0xffffffffU
103 };
104
106 virtual Status get_status() const = 0;
107
108 // Configuration for multicast networking
109
127 virtual Sint32 set_multicast_address( const char* address) = 0;
128
135 virtual const IString* get_multicast_address() const = 0;
136
146 virtual void set_multicast_ttl( Uint32 ttl) = 0;
147
153 virtual Uint32 get_multicast_ttl() const = 0;
154
183 virtual Sint32 set_cluster_interface( const char* address) = 0;
184
191 virtual const IString* get_cluster_interface() const = 0;
192
215 virtual Sint32 set_discovery_address( const char* address) = 0;
216
223 virtual const IString* get_discovery_address() const = 0;
224
244 virtual Sint32 set_discovery_identifier( const char* identifier) = 0;
245
251 virtual const IString* get_discovery_identifier() const = 0;
252
253 // Configuration of redundancy
254
267 virtual Sint32 set_redundancy_level( Uint32 level) = 0;
268
274 virtual Uint32 get_redundancy_level() const = 0;
275
276 // Configure and query the list of hosts which can connect with this host
277
287 virtual Sint32 add_configured_host( const char* address) = 0;
288
297 virtual Sint32 remove_configured_host( const char* address) = 0;
298
303
311 virtual const IString* get_configured_host( Uint32 index) const = 0;
312
326
330 virtual Sint32 get_compression_level() const = 0;
331
332 // Callbacks for joining / leaving hosts
333
346
357
361 virtual const INetwork_statistics* get_network_statistics() const = 0;
362
371 virtual Sint32 set_use_rdma( bool use_rdma) = 0;
372
376 virtual bool get_use_rdma() const = 0;
377
393 virtual Sint32 set_rdma_interface( const char* rdma_interface) = 0;
394
400 virtual const IString* get_rdma_interface() const = 0;
401};
402
405 // end group mi_neuray_configuration
407
408} // namespace neuraylib
409
410} // namespace mi
411
412// X11/Xlib.h defines Status to int
413#if defined(_XLIB_H_) || defined(_X11_XLIB_H_)
414#define Status int
415#endif // _XLIB_H_ || _X11_XLIB_H_
416
417#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:33
virtual Mode get_mode() const =0
Returns the configured networking mode.
Mode
Constants for the networking mode.
Definition: inetwork_configuration.h:42
@ MODE_UDP
Networking is switched to UDP mode with multicast.
Definition: inetwork_configuration.h:53
@ MODE_OFF
Networking is switched off.
Definition: inetwork_configuration.h:44
@ MODE_TCP_WITH_DISCOVERY
Networking is using TCP/IP connections between hosts.
Definition: inetwork_configuration.h:57
@ MODE_TCP
Networking is using TCP/IP connections between hosts.
Definition: inetwork_configuration.h:48
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.
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.
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_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
#define mi_static_assert(expr)
Compile time assertion that raises a compilation error if the constant expression expr evaluates to f...
Definition: assert.h:65
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: dice.h:89