![background image](http://html1.mh-extra.com/html/national-instruments/foundation-ni-fbus/foundation-ni-fbus_hardware-and-software-user-manual_709117126.webp)
Chapter 6
NI-FBUS Function Reference
NI-FBUS Hardware and Software User Manual
6-64
ni.com
nifWaitTrend
Purpose
Waits for a trend from a specific device or from any device.
Format
nifError_t
nifWaitTrend(
nifDesc_t ud,
nifTrendData_t *trend)
Input
ud
The descriptor of the session, physical device, VFD, block,
or link that the trend comes from.
Output
trend
The information about the specific trend.
Context
Block, VFD, physical device, link, session.
Description
ud
represents a descriptor of a session, link, physical device, VFD, or block. If
ud
is a VFD
descriptor, then the NI-FBUS Communications Manager waits for a trend from any block in
the Virtual Field Device. If
ud
is a block, the NI-FBUS Communications Manager waits for
a trend from the block
ud
identifies. If
ud
represents a link, the call completes when a trend
is received from any device connected to that link. If the descriptor is a session descriptor,
nifWaitTrend
waits on any trend from any attached link.
nifWaitTrend
waits indefinitely until the NI-FBUS Communications Manager interface
receives a trend. Your application can have a dedicated thread which does
nifWaitTrend
only.
When a trend comes in, the
trend
parameter is filled in with the information about the trend.
The form of
trend->trendData
depends on the value
of trend->trendType
. There are
three trend types:
TREND_FLOAT
,
TREND_DISCRETE
, and
TREND_BITSTRING
. If the trend
type is
TREND_FLOAT
, the
trend->trendData
is a 16-element array of floating point
numbers. If the trend type is
TREND_DISCRETE
, the
trend->trendData
is a 16-element
array of 1-byte integers. If the trend type is
TREND_BITSTRING
, the
trend->trendData
is
a 16-element array of 2-byte bit strings, which is equivalent to a 32-element array of 1-byte
integers.
deviceTag
and
blockTag
are the device and block tags of the parameter that has
the trend;
paramName
is the name of the parameter.