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 OmniPvdCommandEnum 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 ro 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 OmniPvdCommandEnum::Enum getNextCommand() = 0
The heartbeat function of the reader class.
As long as the command that is returned is not equal to OmniPvdCommandEnum::eOmniPvdInvalid, then one can safely extract the data fields from the command.
- Returns
The command enum type
-
virtual OmniPvdCommandEnum::Enum getCommandType() = 0
Returns the command type as an enumerator of the latest command.
- Returns
The latest 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 commmnd, if it had one, else 0.
- Returns
The context handle of the latest command
-
virtual OmniPvdObjectHandle getObjectHandle() = 0
Returns the object handle of the latest commmnd, if it had one, else 0.
- Returns
The object handle of the latest command
-
virtual OmniPvdClassHandle getClassHandle() = 0
Returns the class handle of the latest commmnd, if it had one, else 0.
- Returns
The class handle of the latest command
-
virtual OmniPvdClassHandle getBaseClassHandle() = 0
Returns the base class handle of the latest commmnd, if it had one, else 0.
- Returns
The base class handle of the latest command
-
virtual OmniPvdAttributeHandle getAttributeHandle() = 0
Returns the attribute handle of the latest commmnd, if it had one, else 0.
- Returns
The attribute handle of the latest command
-
virtual char *getClassName() = 0
Returns the class name of the latest commmnd, if it had one, else a null terminated string of length 0.
- Returns
The string containing the class name
-
virtual char *getAttributeName() = 0
Returns the attribute name of the latest commmnd, if it had one, else a null terminated string of length 0.
- Returns
The string containing the attribute name
-
virtual char *getObjectName() = 0
Returns the object name of the latest commmnd, if it had one, else a null terminated string of length 0.
- Returns
The string containing the object name
-
virtual uint8_t *getAttributeDataPointer() = 0
Returns the attribute data pointer, the data is undefined if the last command did not contain attribute data.
- Returns
The array containing the attribute data
-
virtual OmniPvdAttributeDataType getAttributeDataType() = 0
Returns the attribute data type, the data 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.
- Returns
The attribute data length
-
virtual uint32_t getAttributeNumberElements() = 0
Returns the number of elements contained in the last set operation.
- Returns
The number of elements
-
virtual OmniPvdClassHandle getAttributeClassHandle() = 0
Returns the numberclass handle of the attribute class.
- 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.
- Returns
The enum class handle
-
virtual uint32_t getEnumValue() = 0
Returns the enum value for a specific flag.
- Returns
The enum value
-
inline virtual ~OmniPvdReader()