Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoRemoteVizClient Class Reference

RemoteViz Client node enables to integrate RemoteViz into Open Inventor applications. More...

#include <RemoteViz/Clients/nodes/SoRemoteVizClient.h>

+ Inheritance diagram for SoRemoteVizClient:

Classes

struct  BinaryMessageEventArg
 Structure given when a received binary message event is raised. More...
 
struct  FrameEventArg
 Structure given when a received and decoded frame event is raised. More...
 
struct  KeyboardEventArg
 Structure given when a keyboard event is raised. More...
 
struct  MessageEventArg
 Structure given when a received text message event is raised. More...
 
struct  MouseButtonEventArg
 Structure given when a mouse button event is raised. More...
 
struct  MouseLocationEventArg
 Structure given when a mouse location event is raised. More...
 
struct  MouseWheelEventArg
 Structure given when a mouse wheel event is raised. More...
 
struct  RenderAreaSizeEventArg
 Structure given when a renderArea resize event is raised. More...
 
struct  ServiceMessageEventArg
 Structure given when a ServiceMessage event is raised. More...
 
struct  TouchEventArg
 Structure given when a touch event is raised. More...
 

Public Types

enum  DisplayMode {
  STRETCH ,
  CROP ,
  FIT
}
 Display mode value. More...
 
enum  VideoDecoder {
  NONE ,
  OPENH264 ,
  INTEL_QUICKSYNC ,
  NVDECODE ,
  VPX
}
 Video decoder values. More...
 
enum  StreamingMode {
  UNKNOWN ,
  IMAGE ,
  VIDEO
}
 Streaming mode values. 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

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoRemoteVizClient ()
 Default constructor.
 
virtual ~SoRemoteVizClient ()
 Default destructor.
 
void sendMessage (const SbString &message)
 Sends a text message to the server.
 
void sendMessage (SoCpuBufferObject *buffer)
 Sends a binary message to the server.
 
void enableSecureConnection (const SbString &publicCertificateFilePath, const SbString &privateKeyFilePath, unsigned int enabledSecurityProtocols=TLSv1_1|TLSv1_2|TLSv1_3, const SbString &privateKeyPassphrase="")
 Secures the connection between the client and the server.
 
unsigned int getEnabledSecurityProtocols () const
 Gets the security procotols used in RemoteViz.
 
bool isSecureConnection () const
 Gets the SSL engine activation.
 
void requestRenderAreaSize (const SbVec2s &size)
 Sends a request to resize the renderArea associated with the connection.
 
SbVec2s getRenderAreaSize () const
 Returns the size of the renderArea managed by the RemoteViz service.
 
SbVec2s getContainerSize () const
 Returns the size of the renderArea container.
 
bool isImageStreamingSupported () const
 Checks if the client supports image streaming.
 
bool isVideoStreamingSupported () const
 Checks if the client supports video streaming.
 
VideoDecoder getVideoDecoder () const
 Returns the video decoder that has been successfully initialized and currently used by the client to decode video stream.
 
StreamingMode getStreamingMode () const
 Returns the type of streaming currently used by the client.
 
- Public Member Functions inherited from SoNode
virtual void setOverride (const SbBool state)
 Turns the override flag on or off.
 
virtual SbBool isOverride () const
 Returns the state of the override flag.
 
virtual SoNodecopy (SbBool copyConnections=FALSE) const
 Creates and returns an exact copy of the node.
 
virtual SbBool affectsState () const
 Returns TRUE if a node has an effect on the state during traversal.
 
virtual void touch ()
 Marks an instance as modified, simulating a change to it.
 
- Public Member Functions inherited from SoFieldContainer
void setToDefaults ()
 Sets all fields in this object to their default values.
 
SbBool hasDefaultValues () const
 Returns TRUE if all of the object's fields have their default values.
 
SbBool fieldsAreEqual (const SoFieldContainer *fc) const
 Returns TRUE if this object's fields are exactly equal to fc's fields.
 
void copyFieldValues (const SoFieldContainer *fc, SbBool copyConnections=FALSE)
 Copies the contents of fc's fields into this object's fields.
 
SoNONUNICODE SbBool set (const char *fieldDataString)
 Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.
 
SbBool set (const SbString &fieldDataString)
 Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.
 
void get (SbString &fieldDataString)
 Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.
 
virtual int getFields (SoFieldList &list) const
 Appends references to all of this object's fields to resultList, and returns the number of fields appended.
 
virtual int getAllFields (SoFieldList &list) const
 Returns a list of fields, including the eventIn's and eventOut's.
 
virtual SoFieldgetField (const SbName &fieldName) const
 Returns a the field of this object whose name is fieldName.
 
virtual SoFieldgetEventIn (const SbName &fieldName) const
 Returns a the eventIn with the given name.
 
virtual SoFieldgetEventOut (const SbName &fieldName) const
 Returns the eventOut with the given name.
 
SbBool getFieldName (const SoField *field, SbName &fieldName) const
 Returns the name of the given field in the fieldName argument.
 
SbBool enableNotify (SbBool flag)
 Notification at this Field Container is enabled (if flag == TRUE) or disabled (if flag == FALSE).
 
SbBool isNotifyEnabled () const
 Notification is the process of telling interested objects that this object has changed.
 
virtual void setUserData (void *data)
 Sets application data.
 
void * getUserData (void) const
 Gets user application data.
 
- Public Member Functions inherited from SoBase
virtual SbName getName () const
 Returns the name of an instance.
 
virtual void setName (const SbName &name)
 Sets the name of an instance.
 
void setSynchronizable (const bool b)
 Sets this to be a ScaleViz synchronizable object.
 
bool isSynchronizable () const
 Gets the ScaleViz synchronizable state of this object.
 
- Public Member Functions inherited from SoRefCounter
void ref () const
 Adds a reference to an instance.
 
void unref () const
 Removes a reference from an instance.
 
void unrefNoDelete () const
 unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero.
 
int getRefCount () const
 Returns current reference count.
 
void lock () const
 lock this instance.
 
void unlock () const
 unlock this instance.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoNode
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static SoNodegetByName (const SbName &name)
 A node's name can be set using SoBase::setName().
 
static int getByName (const SbName &name, SoNodeList &list)
 A node's name can be set using SoBase::setName().
 
- Static Public Member Functions inherited from SoFieldContainer
static SoType getClassTypeId ()
 Returns the type of this class.
 
- Static Public Member Functions inherited from SoBase
static SoType getClassTypeId ()
 Returns type identifier for this class.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Public Attributes

SoSFBool connect
 Opens/Closes a connection between the client and the RemoteViz service.
 
SoSFString ipAddress
 Specifies the IP address of the RemoteViz Service to which the client will connect.
 
SoSFUShort port
 Specifies the port of the RemoteViz Service to which the client will connect.
 
SoSFString renderAreaName
 Specifies the renderArea name to which the client will connect.
 
SoMFEnum videoDecoders
 This setting allows you to specify a preference list of video decoders.
 
SoMFVec2String connectionParameters
 Connection parameters that will be sent to the RemoteViz service during the connection establishment.
 
SoSFEnum displayMode
 This setting allows you to specify how to map the renderArea image (server-side) into the container (client-side).
 
SbEventHandler< ServiceMessageEventArg & > onServiceMessage
 Triggered when a service message is received from the RemoteViz service.
 
SbEventHandler< MessageEventArg & > onReceivedMessage
 Triggered when a text message is received from the RemoteViz service.
 
SbEventHandler< BinaryMessageEventArg & > onReceivedBinaryMessage
 Triggered when a binary message is received from the RemoteViz service.
 
SbEventHandler< RenderAreaSizeEventArg & > onRenderAreaResize
 Triggered when the renderArea has been resized.
 
SbEventHandler< FrameEventArg & > onReceivedFrame
 Triggered when a frame is received from the RemoteViz service.
 
SbEventHandler< FrameEventArg & > onDecodedFrame
 Triggered when a frame is decoded and displayed.
 
SbEventHandler< MouseLocationEventArg & > onMouseLocationEvent
 Triggered when a mouse location event is fired on the client.
 
SbEventHandler< MouseButtonEventArg & > onMouseButtonEvent
 Triggered when a mouse button event is fired on the client.
 
SbEventHandler< MouseWheelEventArg & > onMouseWheelEvent
 Triggered when a mouse wheel event is fired on the client.
 
SbEventHandler< KeyboardEventArg & > onKeyboardEvent
 Triggered when a keyboard event is fired on the client.
 
SbEventHandler< TouchEventArg & > onTouchEvent
 Triggered when a touch event is fired on the client.
 

Detailed Description

RemoteViz Client node enables to integrate RemoteViz into Open Inventor applications.

This node is a RemoteViz client enabling software developers to easily integrate remote 3D interaction and visualization into their Open Inventor applications. It enables to establish a connection to a RemoteViz service so that display frames into an Open Inventor viewer.
NOTE: Before using this node, initialize the RemoteVizClient module database by calling RemoteVizClient::init.

SEE ALSO

RemoteVizClient

Definition at line 66 of file SoRemoteVizClient.h.

Member Enumeration Documentation

◆ DisplayMode

Display mode value.

Enumerator
STRETCH 

Stretches the image to fill the container.

The renderArea aspect ratio is not kept.

CROP 

The image is cropped more or less (depending on the container size and the renderArea size) to keep the same scale as the renderArea.

FIT 

This mode resizes the image to fit the container by keeping the same aspect ratio as the renderArea.

Definition at line 76 of file SoRemoteVizClient.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 229 of file SoRemoteVizClient.h.

◆ StreamingMode

Streaming mode values.

Enumerator
UNKNOWN 
IMAGE 
VIDEO 

Definition at line 123 of file SoRemoteVizClient.h.

◆ VideoDecoder

Video decoder values.

Enumerator
NONE 

The video decoder is not yet initialized or the streaming mode is not StreamingMode::VIDEO.

OPENH264 

OpenH264 is a H.264 software decoding implementation.


It does not require specific hardware.

INTEL_QUICKSYNC 

Intel QuickSync enables to use an Intel CPU or GPU for H.264 and VP9 hardware accelerated decoding.


It requires compatible hardware and Intel Media SDK. See https://ark.intel.com/ to check the hardware compatibility.
This decoder is not supported on macOS.

NVDECODE 

NVIDIA Video Codec enables to use an NVIDIA GPU for H.264 and VP9 hardware accelerated decoding.


It requires compatible hardware and CUDA toolkit 10.1 or higher. See https://developer.nvidia.com/nvidia-video-codec-sdk to check the hardware compatibility.
This decoder is not supported on macOS.

VPX 

libvpx is a VP9 software decoding implementation.


It does not require specific hardware.

Definition at line 92 of file SoRemoteVizClient.h.

Constructor & Destructor Documentation

◆ SoRemoteVizClient()

SoRemoteVizClient::SoRemoteVizClient ( )

Default constructor.

◆ ~SoRemoteVizClient()

virtual SoRemoteVizClient::~SoRemoteVizClient ( )
virtual

Default destructor.

Member Function Documentation

◆ enableSecureConnection()

void SoRemoteVizClient::enableSecureConnection ( const SbString publicCertificateFilePath,
const SbString privateKeyFilePath,
unsigned int  enabledSecurityProtocols = TLSv1_1|TLSv1_2|TLSv1_3,
const SbString privateKeyPassphrase = "" 
)

Secures the connection between the client and the server.

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.
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.
privateKeyPassphrase: The passphrase that protect the private key. Security warning !! DO NOT hard-code the passphrase !!
Read it from a SECURE location on your system.

◆ getClassTypeId()

static SoType SoRemoteVizClient::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getContainerSize()

SbVec2s SoRemoteVizClient::getContainerSize ( ) const

Returns the size of the renderArea container.

Returns
the renderArea container size

◆ getEnabledSecurityProtocols()

unsigned int SoRemoteVizClient::getEnabledSecurityProtocols ( ) const

Gets the security procotols used in RemoteViz.


Returns
the bitmask of used security protocols.

◆ getRenderAreaSize()

SbVec2s SoRemoteVizClient::getRenderAreaSize ( ) const

Returns the size of the renderArea managed by the RemoteViz service.

Returns
the renderArea size

◆ getStreamingMode()

StreamingMode SoRemoteVizClient::getStreamingMode ( ) const

Returns the type of streaming currently used by the client.


This information is known after receiving the first frame. For instance, you can retrieve this information in the event callback onDecodedFrame.
If this method is called before receiving the first frame, it will return StreamingMode::UNKNOWN.

See also
StreamingMode
Returns
streaming mode used by the client.

◆ getTypeId()

virtual SoType SoRemoteVizClient::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from SoNode.

◆ getVideoDecoder()

VideoDecoder SoRemoteVizClient::getVideoDecoder ( ) const

Returns the video decoder that has been successfully initialized and currently used by the client to decode video stream.


This information is known after receiving the first frame. For instance, you can retrieve this information in the event callback onDecodedFrame.
If this method is called before receiving the first frame, it will return VideoDecoder::NONE. If the streaming mode is not StreamingMode::VIDEO (

See also
getStreamingMode), this method will return VideoDecoder::NONE.
VideoDecoder
Returns
video decoder used by the client.

◆ isImageStreamingSupported()

bool SoRemoteVizClient::isImageStreamingSupported ( ) const

Checks if the client supports image streaming.

Returns
true if the client supports image streaming

◆ isSecureConnection()

bool SoRemoteVizClient::isSecureConnection ( ) const

Gets the SSL engine activation.

Returns
true if the secure connection is enabled.

◆ isVideoStreamingSupported()

bool SoRemoteVizClient::isVideoStreamingSupported ( ) const

Checks if the client supports video streaming.

Returns
true if the client supports video streaming

◆ requestRenderAreaSize()

void SoRemoteVizClient::requestRenderAreaSize ( const SbVec2s size)

Sends a request to resize the renderArea associated with the connection.

A server-side onRequestedSize event will be triggered.
If the renderarea size is modified in the server-side onRequestSize callback, the client-side resize event will be triggered.

Parameters
size: renderArea size

◆ sendMessage() [1/2]

void SoRemoteVizClient::sendMessage ( const SbString message)

Sends a text message to the server.

After being sent, the server-side onReceivedMessage callback will be triggered.

Parameters
message: message to be sent

◆ sendMessage() [2/2]

void SoRemoteVizClient::sendMessage ( SoCpuBufferObject buffer)

Sends a binary message to the server.

After being sent, the server-side onReceivedMessage callback will be triggered.

Parameters
buffer: buffer to be sent

Member Data Documentation

◆ connect

SoSFBool SoRemoteVizClient::connect

Opens/Closes a connection between the client and the RemoteViz service.


After being connected, the server-side onPendingCreateRenderArea callback will be triggered if the renderArea does not exist otherwise the server-side onPendingShareRenderArea callback will be triggered.

Definition at line 150 of file SoRemoteVizClient.h.

◆ connectionParameters

SoMFVec2String SoRemoteVizClient::connectionParameters

Connection parameters that will be sent to the RemoteViz service during the connection establishment.

The container size will be sent to the service as RenderArea requested size. This behavior can be overriden by including the requested height ("requestedHeight") and the requested width ("requestedWidth") in the parameters. If the connection is accepted, a server-side onRequestedSize callback will be triggered.

Definition at line 185 of file SoRemoteVizClient.h.

◆ displayMode

SoSFEnum SoRemoteVizClient::displayMode

This setting allows you to specify how to map the renderArea image (server-side) into the container (client-side).


Use enum DisplayMode. Default is FIT.

Definition at line 191 of file SoRemoteVizClient.h.

◆ ipAddress

SoSFString SoRemoteVizClient::ipAddress

Specifies the IP address of the RemoteViz Service to which the client will connect.


Definition at line 156 of file SoRemoteVizClient.h.

◆ onDecodedFrame

SbEventHandler<FrameEventArg&> SoRemoteVizClient::onDecodedFrame

Triggered when a frame is decoded and displayed.


Definition at line 608 of file SoRemoteVizClient.h.

◆ onKeyboardEvent

SbEventHandler<KeyboardEventArg&> SoRemoteVizClient::onKeyboardEvent

Triggered when a keyboard event is fired on the client.


Definition at line 628 of file SoRemoteVizClient.h.

◆ onMouseButtonEvent

SbEventHandler<MouseButtonEventArg&> SoRemoteVizClient::onMouseButtonEvent

Triggered when a mouse button event is fired on the client.


Definition at line 618 of file SoRemoteVizClient.h.

◆ onMouseLocationEvent

SbEventHandler<MouseLocationEventArg&> SoRemoteVizClient::onMouseLocationEvent

Triggered when a mouse location event is fired on the client.


Definition at line 613 of file SoRemoteVizClient.h.

◆ onMouseWheelEvent

SbEventHandler<MouseWheelEventArg&> SoRemoteVizClient::onMouseWheelEvent

Triggered when a mouse wheel event is fired on the client.


Definition at line 623 of file SoRemoteVizClient.h.

◆ onReceivedBinaryMessage

SbEventHandler<BinaryMessageEventArg&> SoRemoteVizClient::onReceivedBinaryMessage

Triggered when a binary message is received from the RemoteViz service.


Definition at line 593 of file SoRemoteVizClient.h.

◆ onReceivedFrame

SbEventHandler<FrameEventArg&> SoRemoteVizClient::onReceivedFrame

Triggered when a frame is received from the RemoteViz service.


Definition at line 603 of file SoRemoteVizClient.h.

◆ onReceivedMessage

SbEventHandler<MessageEventArg&> SoRemoteVizClient::onReceivedMessage

Triggered when a text message is received from the RemoteViz service.


Definition at line 588 of file SoRemoteVizClient.h.

◆ onRenderAreaResize

SbEventHandler<RenderAreaSizeEventArg&> SoRemoteVizClient::onRenderAreaResize

Triggered when the renderArea has been resized.


Definition at line 598 of file SoRemoteVizClient.h.

◆ onServiceMessage

SbEventHandler<ServiceMessageEventArg&> SoRemoteVizClient::onServiceMessage

Triggered when a service message is received from the RemoteViz service.


Definition at line 583 of file SoRemoteVizClient.h.

◆ onTouchEvent

SbEventHandler<TouchEventArg&> SoRemoteVizClient::onTouchEvent

Triggered when a touch event is fired on the client.


Definition at line 633 of file SoRemoteVizClient.h.

◆ port

SoSFUShort SoRemoteVizClient::port

Specifies the port of the RemoteViz Service to which the client will connect.


Definition at line 162 of file SoRemoteVizClient.h.

◆ renderAreaName

SoSFString SoRemoteVizClient::renderAreaName

Specifies the renderArea name to which the client will connect.


Definition at line 168 of file SoRemoteVizClient.h.

◆ videoDecoders

SoMFEnum SoRemoteVizClient::videoDecoders

This setting allows you to specify a preference list of video decoders.


The first decoder (among the decoders of the list) successfully initialized will be used to decode the video stream.
If all decoders of the list fail to be initialized, the decoder VideoDecoder::OPENH264 will be used.
Use enum VideoDecoder. Default is OPENH264.

Definition at line 176 of file SoRemoteVizClient.h.


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