Takes a list of Modbus register names as input and produces two lists as output - the corresponding Modbus addresses and types. These two lists can serve as input to functions that have Address/aAddresses and Type/aTypes as input parameters.
LJM_ERROR_RETURN LJM_NamesToAddresses(
int NumFrames,
const char ** aNames,
int * aAddresses,
int * aTypes)
LJM errorcodes or 0 for no error.
For each register identifier in aNames that is invalid, the corresponding aAddresses value will be set to LJM_INVALID_NAME_ADDRESS.
[C/C++] Get the addresses and types of "AIN3" and "DAC0".
int LJMError; const char * aNames[2] = {"AIN3", "DAC0"}; int aAddresses[2]; int aTypes[2]; int AIN3Address; int AIN3Type; int DAC0Address; int DAC0Type; LJMError = LJM_NamesToAddresses(2, aNames, aAddresses, aTypes); AIN3Address = aAddresses[0]; AIN3Type = aTypes[0]; DAC0Address = aAddresses[1]; DAC0Type = aTypes[1];