EasyManua.ls Logo

VTI Instruments EX1629 - Vtex1629_Compare_Digests

Default Icon
346 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
www.vtiinstruments.com
EX1629 Command Set 111
vtex1629_compare_digests
FUNCTION PROTOTYPE
ViStatus vtex1629_compare_digests (ViInt32 digestArraySize, ViInt8 _VI_FAR digestA[],ViInt8 _VI_FAR
digestB[], ViPBoolean equal);
FUNCTION PARAMETERS
digestArraySize = defines how many bytes from the two digests will be compared. For consistency, this number
should be VTEX1629_MAX_DIGEST_LENGTH bytes.
digestA[]= configuration digest (obtained from system)
digestB[]= configuration digest (obtained from system).
equal = a pointer to a return Boolean value indicating whether all the bytes in the configuration digests are the same.
A value of VI_TRUE indicates that the digests are equal, where a value of VI_FALSE indicates otherwise.
DATA ITEM RESET VALUE
Not applicable to this function.
DESCRIPTION
This function compares the two provided digests byte-by-byte. If VI_TRUE is returned in equal, all bytes in
digestA and digestB are equal. A digest is a digital signature, or a fingerprint, representing the actual configuration
data.
EXAMPLE
ViSession instrumentHandle;
ViStatus status;
ViInt8 active[VTEX1629_MAX_DIGEST_LENGTH], stored[VTEX1629_MAX_DIGEST_LENGTH];
ViInt32 actualDigestSize;
ViBoolean equal;
status = vtex1629_get_current_config_digest // Read active configuration signature
(instrumentHandle,
VTEX1629_MAX_DIGEST_LENGTH,
active,
actualDigestSize);
if (status >= VI_SUCCESS) // Read stored configuration signature
{
status = vtex1629_get_stored_config_digest (instrumentHandle,
VTEX1629_MAX_DIGEST_LENGTH,
stored,
actualDigestSize);
}
if (status >= VI_SUCCESS) // Compare the two
{
status = vtex1629_compare_digests (VTEX1629_MAX_DIGEST_LENGTH,
active,
stored,
&equal);
}
if (status >= VI_SUCCESS)
{
if (equal == VI_TRUE)
{
<the current configuration is the same as the stored one>
} else
<the current configuration differs from the stored one>
}}

Table of Contents

Related product manuals