|
MLPIRESULT | mlpiParameterReadName (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, WCHAR16 *name, const ULONG numElements) |
|
MLPIRESULT | mlpiParameterReadAttribute (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, ULONG *attribute) |
|
MLPIRESULT | mlpiParameterReadUnit (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, WCHAR16 *unit, const ULONG numElements) |
|
These functions read the name, the attribute and the unit of a parameter.
The Name, the attribute and the unit are parts of a parameter (Parameter structure, sercos element 2, 3 and 4).
- Note
- The defines and functions within 'util/mlpiParameterHelper.h' supports you to evaluate the sercos attribute.
This function reads the name of a parameter (Parameter structure, sercos element 2).
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | address | Address identifying the object to be accessed. Use macro MLPI_ADDRESS_x to generate an address field. This is the sercos address. |
[in] | sidn | ID of parameter to be accessed. Use macro MLPI_SIDN_x to get the desired ID. |
[out] | name | String where the name will be stored. |
[in] | numElements | Number of WCHAR16 elements in 'name' available to read. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Read the name of parameter 'C-0-0012'.
2 WCHAR16 name[512] = L"";
3 MLPIRESULT result = mlpiParameterReadName(connection, 0, MLPI_SIDN_C(12), name, _countof(name));
This function reads the attribute of a parameter (Parameter structure, sercos element 3).
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | address | Address identifying the object to access. Use macro MLPI_ADDRESS_x to generate an address field. This is the sercos address. |
[in] | sidn | ID of parameter to be accessed. Use macro MLPI_SIDN_x to get the desired ID. |
[out] | attribute | Pointer to variable where the attribute will be stored. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Read the attribute of parameter 'C-0-0023'.
3 MLPIRESULT result = mlpiParameterReadAttribute(connection, 0, MLPI_SIDN_C(23), &attribute);
This function reads the unit of a parameter (d structure, sercos element 4).
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | address | Address identifying the object to be accessed. Use macro MLPI_ADDRESS_x to generate an address field. This is the sercos address. |
[in] | sidn | ID of parameter to be accessed. Use macro MLPI_SIDN_x to get the desired ID. |
[out] | unit | String where the unit will be stored. |
[in] | numElements | Number of WCHAR16 elements in 'unit' available to read. |
- Returns
- Return value indicating success (>=0) or error (<0).
- Example:
1 // Read the unit of parameter 'C-0-0051'.
2 WCHAR16 unit[16] = L"";
3 MLPIRESULT result = mlpiParameterReadUnit(connection, 0, MLPI_SIDN_C(51), unit, _countof(unit));