Chapter 6
NI-FBUS Function Reference
NI-FBUS Hardware and Software User Manual
6-40
ni.com
Description
nifGetObjectType
is used to read the Object Dictionary type values of objects such as
block parameters, MIB objects, or communication parameters from devices.
•
If
ud
is the descriptor of a link, then
objName
must be in
BLOCKTAG.PARAM_NAME
format.
•
If
ud
is a session descriptor, then all links are searched for the given
BLOCKTAG.PARAM_NAME
. The call fails if identical
BLOCKTAG.PARAM_NAME
tags are
found on the bus. Index access is not allowed for session descriptors.
•
If
ud
is the descriptor of a general function block application VFD, and you use the
NIFB_INDEX
macro, the index specified is the index of the object in the VFD.
•
If
ud
is the descriptor of a function block,
name
must be in
PARAM_NAME
format.
•
If
ud
is the descriptor of a function block, and you use the
NIFB_INDEX
or
NIFB_INDEX_SUBINDEX
macro, the index specified is the relative index of the
parameter within the block. Relative indices start at one for the first parameter.
Index zero retrieves the OD type of the block itself.
•
In all cases, you can expand
PARAM_NAME
to
STRUCT.ELEMENT
format to represent a
named element of a named structure.
Refer to Table 6-5 for an explanation of how to use macros to specify the parameter.
The
nifObjTypeList_t
data structure is defined as follows:
typedef struct {
uint8 objectCode;
uint16 numElems;
char blockTag[TA 1];
nifObjElem_t *allElems;
} nifObjTypeList_t;
The
nifObjElem_t
data type is defined as follows:
typedef struct {
uint16 objTypeIndex;
uint16 objSize;
} nifObjElem_t;
The
objectCode
returned in the data structure
nifObjTypeList_t
is as specified in the
FMS Specifications
section of the
Fieldbus Foundation Specifications
document and is listed
in Table 6-3, for your convenience.