TiScope.NeedPacketsNow

TiScope

Indicates whether the Scope needs data packets.

property NeedPacketsNow : Boolean

Description

Use NeedPacketsNow get whether the Scope currently needs data packets for the display and trigger. Use this property to speed-up the Scope by dropping data not needed to keep up with the specified UpdateFrameRate, or in other words decrease the processor time needed by the Scope.

Simple Explanation: always check this property before adding data. If it is TRUE, then go ahead and add data at this time. If it is FALSE, then do not add data to the chart. Be sure to call DataBlockClear to clear any data from the buffer since it will not become invalid .

Detailed Explanation: checking this property will check to see if we need additional data to display a frame of data on the display to keep under the specified UpdateFrameRate. For example, if we set our UpdateFrameRateto 20 (20 frames per second, or a frame displayed every 50ms), the component will set the NeedPacketsNow property to FALSE when a frame has been displayed in the past 50ms. After the 50ms has expired, the NeedPacketsNow property will be reset to TRUE. You will need to be sure to call DataBlockClear if the NeedPacketsNow property is ever found to be FALSE as any remaining data from the last frame display will now become invalid.

Example

Delphi

NeedPacket := iComponent.NeedPacketsNow;

if NeedPacket then

begin

iComponent.DataBlockClear;

exit; //Exit Routine, try again later

end;

iComponent.DataBlockBegin;

//Add your Data Here

iComponent.DataBlockEnd;

C++ Builder

NeedPacket = iComponent->NeedPacketsNow;

if NeedPacket

{

iComponent->DataBlockClear();

Exit; //Exit Routine, try again later

};

iComponent->DataBlockBegin();

//Add your Data Here

iComponent->DataBlockEnd();

Note: this property is Read-Only.

Contents | Index | Previous | Next