Hi Mark,
Assuming you have the latest example from the web site, there is a section
of code at "Step 24" that handles the "scrollback".
After examining the example, looks like I made yet another error. I forgot
to call the function "put_CurrentTime" before the "Value2" function was
called, so it's probably returning failure and the value is undefined.
Here's the corrected code:
// Step 24. Check to see if the user is in scroll back mode (and thus the
time could be randomly jumping)
// or the display is streaming data at the current time
if ( mIsRealTime == VARIANT_FALSE )
{
// The user is scrolling back with the scrollbar, so let's just read
data from the current time
// Depending on your display needs, you could actually read a block of
data from the current time for N seconds
// Set the current time in the parameter
mParameters[0]->put_CurrentTime( parentContainerTime );
// Now get the value from the parameter
CComVariant dataValue;
mParameters[0]->Value2( iadsTimeNoChange, &dataValue,
NULL/*OptionTimeReturn*/ );
// Extract the value from the variant returned
mValueToDisplay = GetArrayValueHelper( dataValue.vt, &dataValue, 0 );
this->FireViewChange(); // Ask that our display be redrawn with the
new value
// Reset the state of the streaming frame read
mParameters[0]->put_HaveStartedFrameRead( VARIANT_FALSE );
return S_OK;
}
Let me know how it goes. If you're still getting garbage, step into the
'GetArrayValueHelper' and make sure it's extracting the value from the
variant correctly.
I'll try to get the example update asap,
Jim
--------------------------------------------------
From: "Mark Richman" <
markari...@gmail.com>
Sent: Monday, May 21, 2012 2:20 PM
To: "IADS" <
ia...@googlegroups.com>
Subject: [IADS] SampleEveryDataPoint example does not work in playback mode
> --
> You received this message because you are subscribed to the Google Groups
> "IADS" group.
> To post to this group, send email to
ia...@googlegroups.com.
> To unsubscribe from this group, send email to
>
iads+uns...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/iads?hl=en.
>