beautypg.com

Nledgetdeviceinfo, Syntax, Remarks – Rockwell Automation 6182 SDK User Manual

Page 55

background image

RAC6182-Specific Extensions to the CE API

4–15

Publication 6182-UM002B-EN-P

NLedGetDeviceInfo

This function gets the LED Status Information.

Syntax

#include
#include

BOOL NLedGetDeviceInfo(UINT nInfoId, void *pOutput)

Remarks
Use this function to request information about the system LEDs.

Information that is accessible with this function includes the number of
LEDs installed, the capabilities of each installed LED, and the current
settings for each installed LED. In general, an LED may be in one of
three states: on, off, or blinking. The on and off states can be obtained
without any special ado, but the blinking state can be obtained only by
specifying the values of adjustable parameters that determine the blink
rate and duty cycle Thus, the capabilities information accessible with
this function relates to the adjustability of blink parameters. The
settings information relates to the basic state and to the additional
settings that determine blink rate and duty cycle.

Note that for blink to be possible, at least two of the following
parameters must be adjustable: on time, off time, total cycle time (the
sum of on and off times.) As of this writing, the capabilities of the
RAC6182 LEDs include adjustability of only one of these parameters.
Therefore, intrinsic blink is not available. However, it is still possible to
make the LEDs blink using NLedSedDevice to toggle between the “on”
and “off” states at an interval determined by a separate timer such as is
available with the RAC6182 user timer functions.

Note:

Do not confuse this function with
NLedDriverGetDeviceInfo() described in the Microsoft CE
documentation, which is a kernel level function, not
callable by applications.

nInfoId may be evaluated with one of the following macros defined in
nleddrv.h (included by nledapi.h):

Macro

Description

NLED_COUNT_
INFO_ID

Use to request the number of LEDs installed.

pOutput should point to a caller allocated structure defined (in
nleddrv.h) as follows:

struct NLED_COUNT_INFO {
UINT cLeds; // Count of LEDs

};

This manual is related to the following products: