EasyManuals Logo

DDC TR122 User Manual

Default Icon
38 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #30 background imageLoading...
Page #30 background image
Copyright © 2005 Data Design Corporation Version 05.02.06
All rights reserved.
30
3.2.4 The Auto Thread
In order to present analog data as an oscilloscope, the application must continuously
collect, read, and display data. To be effective it can not be distracted from that task as the user
works with the controls. There are also a number of timing functions which will work more
smoothly if they are independent of anything else that is happening in the top level application.
For this reason the oscilloscope mode depends on a program thread which exists entirely within
the API library.
The thread is called “Auto Thread” probably mostly because of the necessity of this
approach in implementing the auto trigger mode. However, the thread also automatically uses
the API functions to perform transient recordings and display data to the screen DIB without
intervention from the top level application. The continuously updated DIB is painted to a device
context specified when the thread is started. Because the thread uses all of these functions
asynchronously to the top level application, many API functions contain code which is designed
to share resources with the auto thread if it is running.
Presented below are the exported functions related to the auto thread with a brief
description of their place in the design. They are ordered differently than in the source code
for clarity of discussion.
DCAPI TR122_AutoThread(HDC hDestDC, long XSize, long YSize, BYTE EnableThread);
This function is used to start the auto thread running or to stop it if it is running. The EnableThread argument
specifies if the thread should be started or stopped. The other arguments are the same arguments as specified for the
TR122_D_Paint function. The device context would exist in the top level application and the started instance of the
auto thread would be associated with that application. It is important to know that the paint process will write to the
foreground image of a display object. In the case of the auto thread the display object should not be set to
automatically display its background image. The auto thread regularly updates the display regardless of the state
of its data collection activities. This action in itself should be enough to satisfy the needs of the repaint action of the
Windows application.
DCAPI TR122_AutoThreadTriggerMode(BYTE Mode);
The trigger mode is set with the Mode argument to one of the oscilloscope trigger modes as defined in the header
file. This function is directly associated with the oscilloscope mode trigger options. This parameter will affect the
operation of the auto thread only.
DCAPI TR122_AutoThreadTriggerRun(BYTE RunRequest);
This function directly provides the Run/Stop control functionality in oscilloscope mode. The argument will set
RUN for 1 and STOP for 0. This parameter will affect the operation of the auto thread only.

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the DDC TR122 and is the answer not in the manual?

DDC TR122 Specifications

General IconGeneral
BrandDDC
ModelTR122
CategoryControl Unit
LanguageEnglish