www.vtiinstruments.com
EX1629 Command Set
111
vtex1629_compare_digests
F
UNCTION
P
ROTOTYPE
ViStatus vtex1629_compare_digests (ViInt32
digestArraySize
, ViInt8 _VI_FAR
digestA[]
,ViInt8 _VI_FAR
digestB[]
, ViPBoolean
equal
);
F
UNCTION
P
ARAMETERS
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.
D
ATA
I
TEM
R
ESET
V
ALUE
Not applicable to this function.
D
ESCRIPTION
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.
E
XAMPLE
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>
}}
Содержание EX1629
Страница 310: ...VTI Instruments Corp 310 EX1629 Command Set...
Страница 342: ...VTI Instruments Corp 342 EX1629 Onboard Memory...