www.vtiinstruments.com
EX1629 Command Set
213
vtex1629_read_teds_URN
F
UNCTION
P
ROTOTYPE
ViStatus vtex1629_read_teds_URN (ViSession
vi
, ViInt32
channel
, ViInt32
teds_urnArraySize
, ViInt8 _VI_FAR
teds_urn[]
, ViPInt32
teds_urnActualSize
);
F
UNCTION
P
ARAMETERS
vi
= contains a session handle to the instrument. This handle is obtained by the function and remains valid until the
session is closed.
channel
= an input integer value that specifies the channel number for the TEDS device from which the Unique
Registration Number (URN) should be read. Valid input values: 0 to 47.
teds_urnArraySize
= an integer indicating the size of the array that holds the URN. Its value should be equal to
VTEX1629_MAX_MLAN_URN_SIZE.
teds_urn[]
= an output array that will contain the TEDS URN. Its size should be equal to
VTEX1629_MAX_MLAN_URN_SIZE.
teds_urnActualSize
= Output integer indicating the number of bytes actually written to the array that holds the
URN.
D
ATA
I
TEM
R
ESET
V
ALUE
Not applicable to this function.
D
ESCRIPTION
This function reads the Unique Registration Number (URN) from a TEDS device. This is a 64-bit value which
encodes a device family and a unique serial number.
NOTES
1)
Details
of
the
MLAN
specification
can
be
found
at
http://www.maxim-
ic.com/products/ibutton/applications
/ and other sites.
2)
The bytes returned in ‘buffer’ need to be interpreted by the application in accordance with the
MLAN specification.
E
XAMPLE
ViSession instrumentHandle;
ViStatus status;
ViInt32 urnActualSize;
ViInt8 urnData[VTEX1629_MAX_MLAN_URN_SIZE];
…
status = vtex1629_read_teds_URN
(instrumentHandle, 15, VTEX1629_MAX_MLAN_URN_SIZE, urnData, &urnActualSize);
If (status >= VI_SUCCESS)
{
<do something with the device’s URN>
} else {
<inform the user the API call failed>
}
Содержание EX1629
Страница 310: ...VTI Instruments Corp 310 EX1629 Command Set...
Страница 342: ...VTI Instruments Corp 342 EX1629 Onboard Memory...