Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
RemoteViz::Rendering::ServiceSettings Class Reference

RemoteViz More...

#include <RemoteViz/Rendering/ServiceSettings.h>

Public Types

enum  RunMode {
  INVENTOR_SERVICE ,
  INVENTOR_APPLICATION ,
  INDEPENDENT_SERVICE
}
 The run mode is used to change the behaviour of the RemoteViz execution in three environments. More...
 
enum  Extensions {
  VOLUMEVIZ = 0x1 ,
  VOLUMEVIZLDM = 0x2 ,
  MESHVIZ = 0x4 ,
  MESHVIZXLM = 0x8 ,
  IMAGEVIZ = 0x10 ,
  HARDCOPY = 0x20 ,
  CATIA5READER = 0x40 ,
  CATIA6READER = 0x80 ,
  DWGREADER = 0x100 ,
  IGESREADER = 0x200 ,
  JTREADER = 0x400 ,
  PROEREADER = 0x800 ,
  SOLIDEDGEREADER = 0x1000 ,
  STEPREADER = 0x2000 ,
  SOLIDWORKSREADER = 0x4000 ,
  UGREADER = 0x8000 ,
  VDAREADER = 0x10000 ,
  XMTREADER = 0x20000
}
 Each enumeration represents an Open Inventor extension. More...
 
enum  SecurityProtocols {
  SSLv2 = 0x1 ,
  SSLv3 = 0x2 ,
  TLSv1 = 0x4 ,
  TLSv1_1 = 0x8 ,
  TLSv1_2 = 0x10 ,
  TLSv1_3 = 0x20
}
 Each enumeration represents a security protocol. More...
 

Public Member Functions

 ServiceSettings ()
 Constructor.
 
 ServiceSettings (const ServiceSettings &obj)
 Copy constructor.
 
ServiceSettingsoperator= (const ServiceSettings &obj)
 Copy assignment operator.
 
 ~ServiceSettings ()
 Destructor.
 
void setIP (const std::string &ip)
 Sets the IP address.
 
const std::string & getIP () const
 Gets the IP address.
 
void setPort (unsigned short port)
 Sets the port of the service.
 
unsigned short getPort () const
 Gets the port of the service.
 
void setRunMode (ServiceSettings::RunMode runmode)
 Sets the run mode of the service.
 
ServiceSettings::RunMode getRunMode () const
 Gets the run mode of the service.
 
std::string getHostname () const
 Gets the current host name.
 
void setUsedExtensions (unsigned int extensions)
 Sets the Open Inventor extensions used by a RemoteViz application.
 
unsigned int getUsedExtensions () const
 Gets the used Open Inventor extensions.
 
std::shared_ptr< MonitoringgetMonitoring () const
 Gets the monitoring object which allows to manage metrics listeners that monitor states and performances of the service.
 
void enableSecureConnection (const std::string &publicCertificateFilePath, const std::string &privateKeyFilePath, unsigned int enabledSecurityProtocols=TLSv1_1|TLSv1_2|TLSv1_3)
 Secures the connection between the server and the clients.
 
bool isSecureConnection () const
 Gets the SSL engine activation.
 
const std::string & getPublicCertificateFile () const
 Gets the public certificate authenticating the server to the clients.
 
const std::string & getPrivateKeyFile () const
 Gets the private key used to sign the server key exchange between the client and the server.
 
unsigned int getEnabledSecurityProtocols () const
 Gets the security procotols used in RemoteViz.
 

Detailed Description

RemoteViz

Settings that define the rendering Service. A ServiceSettings object must be passed to the Service::open() method.

Definition at line 50 of file ServiceSettings.h.

Member Enumeration Documentation

◆ Extensions

Each enumeration represents an Open Inventor extension.

Use setUsedExtensions to activate them.

Enumerator
VOLUMEVIZ 
VOLUMEVIZLDM 
MESHVIZ 
MESHVIZXLM 
IMAGEVIZ 
HARDCOPY 
CATIA5READER 
CATIA6READER 
DWGREADER 
IGESREADER 
JTREADER 
PROEREADER 
SOLIDEDGEREADER 
STEPREADER 
SOLIDWORKSREADER 
UGREADER 
VDAREADER 
XMTREADER 

Definition at line 156 of file ServiceSettings.h.

◆ RunMode

The run mode is used to change the behaviour of the RemoteViz execution in three environments.


INVENTOR_SERVICE mode is used to run a RemoteViz application based on the Open Inventor render engine. This is the default mode. This mode requires a main loop.
INVENTOR_APPLICATION is used to share the rendering of a scene graph between an OIV application and a RemoteViz application. This mode uses the main loop of an Open Inventor component (SoWinExaminerViewer, SoXtRenderArea, ...).
INDEPENDENT_SERVICE mode is used to run a RemoteViz application based on its own render engine. In this mode, the Open Inventor render engine is disabled. This mode requires a main loop.

Enumerator
INVENTOR_SERVICE 
INVENTOR_APPLICATION 
INDEPENDENT_SERVICE 

Definition at line 123 of file ServiceSettings.h.

◆ SecurityProtocols

Each enumeration represents a security protocol.

Use enableSecureConnection to enable them.

Enumerator
SSLv2 
SSLv3 
TLSv1 
TLSv1_1 
TLSv1_2 
TLSv1_3 

Definition at line 289 of file ServiceSettings.h.

Constructor & Destructor Documentation

◆ ServiceSettings() [1/2]

RemoteViz::Rendering::ServiceSettings::ServiceSettings ( )

Constructor.

◆ ServiceSettings() [2/2]

RemoteViz::Rendering::ServiceSettings::ServiceSettings ( const ServiceSettings obj)

Copy constructor.

◆ ~ServiceSettings()

RemoteViz::Rendering::ServiceSettings::~ServiceSettings ( )

Destructor.

Member Function Documentation

◆ enableSecureConnection()

void RemoteViz::Rendering::ServiceSettings::enableSecureConnection ( const std::string &  publicCertificateFilePath,
const std::string &  privateKeyFilePath,
unsigned int  enabledSecurityProtocols = TLSv1_1|TLSv1_2|TLSv1_3 
)

Secures the connection between the server and the clients.

RemoteViz uses the WebSocket protocol to enable communication between the client and the service. In a production environment, it is highly recommended to use secure WebSocket. Using a secure WebSocket connection improves confidentiality and reliability because the connection is encrypted with Transport Layer Security (TLS), which reduces the risk of a variety of attacks such as man-in-the-middle tampering with your data.

The URL scheme used by the clients to connect to the service must be wss://

Parameters
publicCertificateFilePath: Path to a file containing the public certificate used to authenticate the server to the clients. The certificate has to be a PEM ("Privacy Enhanced Mail") encoded certificate.
privateKeyFilePath: Path to a file containing the private key used to sign the server key exchange between the client and the server. If the private key is protected by a passphrase, set the passphrase into the ServiceListener::onRequestedPrivateKeyPassphrase callback.
enabledSecurityProtocols: Defines the security protocols used to secure the exchange between the client and the server. By default, TLSv1.1, TLSv1.2 and TLSv1.3 protocols are enabled. A bitmask of the security protocols is used. Many security protocols can be enabled by using the logical OR operator.

◆ getEnabledSecurityProtocols()

unsigned int RemoteViz::Rendering::ServiceSettings::getEnabledSecurityProtocols ( ) const

Gets the security procotols used in RemoteViz.


Returns
the bitmask of used security protocols.

◆ getHostname()

std::string RemoteViz::Rendering::ServiceSettings::getHostname ( ) const

Gets the current host name.


Returns
the current host name

◆ getIP()

const std::string & RemoteViz::Rendering::ServiceSettings::getIP ( ) const

Gets the IP address.

Default value is "127.0.0.1".

Returns
the IP address used by the instance

◆ getMonitoring()

std::shared_ptr< Monitoring > RemoteViz::Rendering::ServiceSettings::getMonitoring ( ) const

Gets the monitoring object which allows to manage metrics listeners that monitor states and performances of the service.


Returns
the monitoring object.

◆ getPort()

unsigned short RemoteViz::Rendering::ServiceSettings::getPort ( ) const

Gets the port of the service.

Default value is 8080.

Returns
the port used by the instance

◆ getPrivateKeyFile()

const std::string & RemoteViz::Rendering::ServiceSettings::getPrivateKeyFile ( ) const

Gets the private key used to sign the server key exchange between the client and the server.

Returns
the path to the file containing the private key.

◆ getPublicCertificateFile()

const std::string & RemoteViz::Rendering::ServiceSettings::getPublicCertificateFile ( ) const

Gets the public certificate authenticating the server to the clients.

Returns
the path to the file containing the certificate.

◆ getRunMode()

ServiceSettings::RunMode RemoteViz::Rendering::ServiceSettings::getRunMode ( ) const

Gets the run mode of the service.

Default value is INVENTOR_SERVICE.

Returns
the run mode used by the instance

◆ getUsedExtensions()

unsigned int RemoteViz::Rendering::ServiceSettings::getUsedExtensions ( ) const

Gets the used Open Inventor extensions.


Returns
the bitmask of used Open Inventor extensions.

◆ isSecureConnection()

bool RemoteViz::Rendering::ServiceSettings::isSecureConnection ( ) const

Gets the SSL engine activation.

Returns
true if the secure connection is enabled.

◆ operator=()

ServiceSettings & RemoteViz::Rendering::ServiceSettings::operator= ( const ServiceSettings obj)

Copy assignment operator.

◆ setIP()

void RemoteViz::Rendering::ServiceSettings::setIP ( const std::string &  ip)

Sets the IP address.


IP version 4 (IPv4: X.X.X.X) and IP version 6 (IPv6: X::X::X::X::X::X::X::X) are supported. Default value is "127.0.0.1"
To make the service accept connections on all interfaces, use "0.0.0.0".

Parameters
ip: the IP address used by the instance

◆ setPort()

void RemoteViz::Rendering::ServiceSettings::setPort ( unsigned short  port)

Sets the port of the service.

Default value is 8080.
In case you are behind a firewall, please ensure your IT department configured the firewall to accommodate the selected port.

Parameters
port: the port used by the instance

◆ setRunMode()

void RemoteViz::Rendering::ServiceSettings::setRunMode ( ServiceSettings::RunMode  runmode)

Sets the run mode of the service.

Default value is INVENTOR_SERVICE.

Parameters
runmode: the type of run mode used by the instance

◆ setUsedExtensions()

void RemoteViz::Rendering::ServiceSettings::setUsedExtensions ( unsigned int  extensions)

Sets the Open Inventor extensions used by a RemoteViz application.

Convenient method that will be used by Service::open() to check if all the licenses necessary to start the Service are available (necessary licenses are explained below) and to call necessary Open Inventor init() methods .

RemoteViz and Open Inventor (if used) are protected by a license key mechanism that limits its use to specified computers or network environments based on a commercial agreement. Depending on the license agreement, license keys are floating licenses managed by a license server or an encrypted "master password" string (see SoLockManager).

One RemoteViz license is required to start the service. (An SDK license for development/debugging or a Runtime license for deployment.)

If the Service uses Open Inventor for rendering (runMode is not INDEPENDENT_SERVICE), then one Open Inventor license plus one license of each used extension is required to start the service. (An SDK license for development/debugging or a Runtime license for deployment.) If this method is called and licenses are missing, Service::open() will return false. If this method is not called, the licenses will not be checked until the first call to create an Open Inventor node. Alternatively the application can do explicit license checks by calling SoLicensesInfo::check() before opening the Service or creating any of the Open Inventor nodes. Note: Enabling the VolumeVizLDM extension automatically enables the VolumeViz extension.

In C++, this method also calls the init() methods for Open Inventor and all specified extensions (e.g. SoDB::init()). The corresponding finish() methods will be automatically called when the Service is stopped. Alternatively, the application can explicitly call init methods before creating any Open Inventor nodes. In that case, the application should also call the corresponding finish() methods when the Service is stopped.

When using the run mode INDEPENDENT_SERVICE, this method has no effect, i.e., only one RemoteViz license will be required to start the service.

Parameters
extensions: the bitmask of the Open Inventor extensions used in RemoteViz. Many extensions can be activated by using the logical OR operator.
For example : setUsedExtensions(VOLUMEVIZ | MESHVIZ)

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