VTI Instruments Corp.
212 EX1629 Command Set
vtex1629_read_teds_MLAN
FUNCTION PROTOTYPE
ViStatus vtex1629_read_teds_MLAN (ViSession vi, ViInt32 channel, ViInt32 bufferArraySize, ViInt8 _VI_FAR
buffer[],ViPInt32 bufferActualSize);
FUNCTION PARAMETERS
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 MicroLAN
(MLAN) buffer should be read. Valid input values: 0 to 47.
bufferArraySize = an input integer indicating the size of the array that holds the MLAN buffer data. Its value
should be less than VTEX1629_MAX_MLAN_DATA_LEN.
buffer[] = an output array that will contain the TEDS MLAN buffer data. Its size should be equal to
VTEX1629_MAX_MLAN_DATA_LEN.
bufferActualSize = an output integer indicating the number of bytes actually written to the array holding the
MLAN buffer data.
DATA ITEM RESET VALUE
Not applicable to this function.
DESCRIPTION
This function reads the MicroLAN (MLAN) response buffer from a TEDS device. This response buffer is the
response from the TEDS device that corresponds to a series of MLAN commands that were issued to the device
using a vtex1629_write_teds_MLAN function. Refer to the vtex1629_write_teds_MLAN function for more
information, as well as the MicroLAN (MLAN) Primer appendix.
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.
EXAMPLE
ViSession instrumentHandle;
ViStatus status;
ViInt32 bufferActualSize;
ViInt8 mlanData[VTEX1629_MAX_MLAN_DATA_LEN];
…
status = vtex1629_read_teds_MLAN(instrumentHandle,
15,
VTEX1629_MAX_MLAN_DATA_LEN,
mlanData,
&bufferActualSize);
If (status >= VI_SUCCESS)
{
<interpret the data structure in mlanData>
} else {
<inform the user the API call failed>
}