« Close

Datasheets and User Guides

App Notes

Software & Driver

 

LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES

Summary

LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES is a numerical readable-writable LJM library configuration that determines whether or not LJM will automatically condense congruent address reads/writes into array reads/writes.

For example, if a call to LJM_eNames contains two frames next to each other that write to AIN0 then AIN1, LJM would automatically condense these frames into one frame that writes to both AIN0 and AIN1.

The constant LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES can be used interchangeably with the string "LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES".

Details

0 - false/disabled

1 - true/enabled (Default)

Relevant Functions

To read LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES, use LJM_ReadLibraryConfigS.

To write LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES, use LJM_WriteLibraryConfigS or LJM_LoadConfigurationFile.

Example

[C/C++] Read LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES, set LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES, then read it again

char ErrorString[LJM_MAX_NAME_SIZE];
double Value;
int LJMError = LJM_ReadLibraryConfigS(LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES, &Value);
if (LJMError != 0) {
    LJM_ErrorToString(LJMError, ErrorString);
    printf("LJM_ReadLibraryConfigS error: %s\n", ErrorString);
}
if (Value == 0) {
    printf("LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES is disabled by default.\n");
}
else {
    printf("LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES is enabled by default.\n");
}

printf("Disabling LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES\n");
LJMError = LJM_WriteLibraryConfigS(LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES, 0);
if (LJMError != 0) {
    LJM_ErrorToString(LJMError, ErrorString);
    printf("LJM_WriteLibraryConfigS error: %s\n", ErrorString);
}

LJMError = LJM_ReadLibraryConfigS(LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES, &Value);
if (LJMError != 0) {
    LJM_ErrorToString(LJMError, ErrorString);
    printf("LJM_ReadLibraryConfigS error: %s\n", ErrorString);
}
if ((int)Value == 0) {
    printf("LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES is now disabled.\n");
}
else {
    printf("LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES is now enabled.\n");
}

Possible output:

LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES is enabled by default.
Disabling LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES
LJM_ALLOWS_AUTO_CONDENSE_ADDRESSES is now disabled.

 

For more LJM configurations, see Library Configuration Functions.