OmniPvdReader

Defined in pvdruntime/include/OmniPvdReader.h

class OmniPvdReader

Used to read debug information from an OmniPvdReadStream.

Using the getNextCommand function in a while loop for example one can traverse the stream one command after another. Given the command, different functions below will be available.

Using the OmniPvdCommand::Enum one can determine the type of command and like that use the appropriate get functions to extract the payload from the command.

Public Functions

inline virtual ~OmniPvdReader()
virtual void setLogFunction(OmniPvdLogFunction logFunction) = 0

Sets the log function to print the internal debug messages of the OmniPVD Reader instance.

Parameters

logFunction – The function pointer to receive the log messages

virtual void setReadStream(OmniPvdReadStream &stream) = 0

Sets the read stream that contains the OmniPVD API command stream.

Parameters

stream – The OmniPvdReadStream that holds the stream of API calls/notifications

virtual bool startReading(OmniPvdVersionType &majorVersion, OmniPvdVersionType &minorVersion, OmniPvdVersionType &patch) = 0

Extracts the versions from the binary file to read and tests if the file is older or equal to that of the reader.

Parameters
  • majorVersion – The major versions of the stream

  • minorVersion – The minor versions of the stream

  • patch – The patch number of the stream

Returns

If the reading was possible to start or not

virtual OmniPvdCommand::Enum getNextCommand() = 0

The heartbeat function of the reader class.

As long as the command that is returned is not equal to OmniPvdCommand::eINVALID, then one can safely extract the data fields from the command.

Returns

The command enum type

virtual OmniPvdVersionType getMajorVersion() = 0

Returns the major version of the stream.

Returns

The major version

virtual OmniPvdVersionType getMinorVersion() = 0

Returns the minor version of the stream.

Returns

The minor version

virtual OmniPvdVersionType getPatch() = 0

Returns the patch number of the stream.

Returns

The patch value

virtual OmniPvdContextHandle getContextHandle() = 0

Returns the context handle of the latest command, if it had one, else OMNI_PVD_INVALID_HANDLE.

Returns

The context handle of the latest command

virtual OmniPvdObjectHandle getObjectHandle() = 0

Returns the object handle of the latest command, if it had one, else OMNI_PVD_INVALID_HANDLE.

Returns

The object handle of the latest command

virtual OmniPvdClassHandle getClassHandle() = 0

Returns the class handle of the latest command, if it had one, else OMNI_PVD_INVALID_HANDLE.

Returns

The class handle of the latest command

virtual OmniPvdClassHandle getBaseClassHandle() = 0

Returns the base class handle of the latest command, if it had one, else OMNI_PVD_INVALID_HANDLE.

Returns

The base class handle of the latest command

virtual OmniPvdAttributeHandle getAttributeHandle() = 0

Returns the attribute handle of the latest command, if it had one, else OMNI_PVD_INVALID_HANDLE.

Returns

The attribute handle of the latest command

virtual const char *getClassName() = 0

Returns the class name of the latest command, if it had one, else a null terminated string of length 0.

Returns

The string containing the class name

virtual const char *getAttributeName() = 0

Returns the attribute name of the latest command, if it had one, else a null terminated string of length 0.

Returns

The string containing the attribute name

virtual const char *getObjectName() = 0

Returns the object name of the latest command, if it had one, else a null terminated string of length 0.

Returns

The string containing the object name

virtual const uint8_t *getAttributeDataPointer() = 0

Returns the attribute data pointer, if it had one, else returns 0.

Returns

The array containing the attribute data

virtual OmniPvdDataType::Enum getAttributeDataType() = 0

Returns the attribute data type, the data type is undefined if the last command did not contain attribute data.

Returns

The attribute data type

virtual uint32_t getAttributeDataLength() = 0

Returns the attribute data length, the data length of the last command if it was defined, otherwise returns 0.

Returns

The attribute data length

virtual uint32_t getAttributeNumberElements() = 0

Returns the number of elements contained in the last set operation, if they were defined, otherwise returns 0.

Returns

The number of elements

virtual OmniPvdClassHandle getAttributeClassHandle() = 0

Returns the numberclass handle of the attribute class, if it was defined, else returns OMNI_PVD_INVALID_HANDLE.

Returns

The attibute class handle

virtual uint64_t getFrameTimeStart() = 0

Returns the frame start value.

Returns

The frame ID value

virtual uint64_t getFrameTimeStop() = 0

Returns the frame stop value.

Returns

The frame ID value

virtual OmniPvdClassHandle getEnumClassHandle() = 0

Returns the class handle containing the enum values, if it was defined, else returns OMNI_PVD_INVALID_HANDLE.

Returns

The enum class handle

virtual OmniPvdEnumValueType getEnumValue() = 0

Returns the enum value for a specific flag, if it was defined, else returns 0.

Returns

The enum value