Functions | |
MLPIRESULT | mlpiParameterReadListLength (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, ULONG *numElements, ULONG *numMaxElements, ULONG *elementSize) |
MLPIRESULT | mlpiParameterImportFile (const MLPIHANDLE connection, const WCHAR16 *path, MlpiSidnError *errorList, const ULONG numElements, ULONG *numElementsRet, const WCHAR16 *mapping) |
MLPIRESULT | mlpiParameterExportFile (const MLPIHANDLE connection, const WCHAR16 *path, const WCHAR16 *exportPattern, MlpiSidnError *errorList, const ULONG numElements, ULONG *numElementsRet) |
MLPIRESULT | mlpiParameterReadEverything (const MLPIHANDLE connection, MlpiReadEverything *readEverything, const ULONG numElements, UCHAR *data, const ULONG dataSize) |
MLPIRESULT | mlpiParameterExportFileStartProcess (const MLPIHANDLE connection, const WCHAR16 *path, const WCHAR16 *exportPattern, PROCESSHANDLE *process) |
MLPIRESULT | mlpiParameterImportFileStartProcess (const MLPIHANDLE connection, const WCHAR16 *path, const WCHAR16 *mapping, PROCESSHANDLE *process) |
MLPIRESULT | mlpiParameterImportExportStatus (const MLPIHANDLE connection, const PROCESSHANDLE process, MlpiParamProcessStatus *status, ULONG *currentCount, ULONG *expectedCount, ULONG *errorsCount, MlpiSidnError *errorList, ULONG numElements) |
MLPIRESULT | mlpiParameterImportExportGetInfo (const MLPIHANDLE connection, const PROCESSHANDLE process, WCHAR16 *pattern, ULONG numElementsPattern, WCHAR16 *file, ULONG numElementsFile) |
MLPIRESULT | mlpiParameterImportExportAbort (const MLPIHANDLE connection, const PROCESSHANDLE process) |
MLPIRESULT | mlpiParameterWriteAccessSetup (const MLPIHANDLE connection, MlpiParamWriteAccess *writeAccess, const ULONG numElements, PROCESSHANDLE *process) |
MLPIRESULT | mlpiParameterWriteAccessStatus (const MLPIHANDLE connection, const PROCESSHANDLE process, const BOOL8 waitForWriteAccess, const ULONG timeout, MlpiParamWriteAccess *writeAccess, const ULONG numElements, ULONG *numElementsRet) |
MLPIRESULT | mlpiParameterWriteAccessAbort (const MLPIHANDLE connection, const PROCESSHANDLE process) |
These functions support import, export and further activities in relation to parameters.
MLPIRESULT mlpiParameterReadListLength | ( | const MLPIHANDLE | connection, |
const ULLONG | address, | ||
const ULLONG | sidn, | ||
ULONG * | numElements, | ||
ULONG * | numMaxElements, | ||
ULONG * | elementSize | ||
) |
This function reads the current and maximum length of a list parameter.
[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. |
[in] | sidn | ID of parameter to be accessed. Use macro MLPI_SIDN_x to get the desired ID. |
[out] | numElements | Pointer to variable where the number of current elements in the list will be stored. |
[out] | numMaxElements | Pointer to variable where the maximum number of elements that can be in the list will be stored. |
[out] | elementSize | Pointer to variable where the size in bytes of single list element will be stored. |
MLPIRESULT mlpiParameterImportFile | ( | const MLPIHANDLE | connection, |
const WCHAR16 * | path, | ||
MlpiSidnError * | errorList, | ||
const ULONG | numElements, | ||
ULONG * | numElementsRet, | ||
const WCHAR16 * | mapping | ||
) |
This function imports a parameter file from CF-card. The string 'mapping' can give information on which instance should be imported and to which number of instance it should be written.
[in] | connection | Handle for multiple connections. |
[in] | path | Absolute path of file which should be imported. |
[out] | errorList | Pointer to an array of structure where the wrong parameter and the error codes will be stored |
[in] | numElements | Number of MlpiSidnError elements available in 'errorList' for writing. |
[out] | numElementsRet | Number of elements needed to collect all information of import errors. |
[in] | mapping | String which tells you which parameter instance should be imported and to which instance number. The general structure is a tag list of jobs: {JobPart;} Each job is separated by a semicolon. When no job is given, all parameters will be imported to the instance written in the header of the sercos ASCII file. A job has the following structure: [InstanceMapping]:Parametertype (in squared brackets). Parametertype is represented by A, C, K, M, N, O, S and P. In part InstanceMapping, you can select which parameter is imported to which instance. If given a single number only, this instance will be imported. If there is a parameter file in which data are associated with another instance number, one instance can be mapped to the other using '>'. It's also possible to map one instance to a range of instances. Examples: [1]:A will import axis parameter for axis 1. [1>3]:A will map axis parameter from instance 1 to 3. [1>2-5]:A will map axis parameter from instance 1 to axis 2 till 5. |
MLPIRESULT mlpiParameterExportFile | ( | const MLPIHANDLE | connection, |
const WCHAR16 * | path, | ||
const WCHAR16 * | exportPattern, | ||
MlpiSidnError * | errorList, | ||
const ULONG | numElements, | ||
ULONG * | numElementsRet | ||
) |
This function exports parameters to a file on CF-card. In String 'exportPattern' the instances can be selected.
[in] | connection | Handle for multiple connections. |
[in] | path | Absolute path of file where exported parameter will be stored. |
[in] | exportPattern | String where you can select which instances and which types of parameter should be exported. The general structure is a tag list of jobs: (JobPart;)* All jobs are separated by a semicolon. When no job is selected, no parameter will be exported. The structure of a job is the following: [InstanceRanges]:ParameterType[ParameterRanges] (with all squared brackets). The elements "[InstanceRanges]:" and "[ParameterRanges]" are optional. If these elements are not part of a string, the whole available range is used. The element ParameterType is mandatory. "[InstanceRanges]:" and "[ParameterRanges]" can be lists of numbers, ranges or words "TO_SAVE" (all parameters which are needed to restore) or "MODIFIED" (all modified parameters). The stated words cannot be combined with the list of numbers or ranges. Furthermore, "MODIFIED" is only available for sercos parameters. When related parameter not exist on sercos device none parameter will export. Examples: A;C will export all axis and control parameters for each instance. [2]:A will export all axis parameter for axis 2. A[1-5] will export axis parameter A-0-0001 till A-0-0005 for each axis. [1,3-4,5]:A[8-9,11-13] Will export axis parameters (A-0-0008, A-0-0009, A-0-0011, A-0-0012, A-0-0013) for axis 1, 3, 4 and 5. A[TO_SAVE];[1-3]:S[MODIFIED] Will export parameters of all axes which are needed to resore and all modified parameters of sercos device 1 till 3. |
[out] | errorList | Pointer to an array of structures where the wrong parameter and the error codes will be stored |
[in] | numElements | Number of MlpiSidnError elements available in 'errorList' for reading. |
[out] | numElementsRet | Number of elements used or needed. When this is greater than numElements, all elements in the array are filled out but some information about errors is lost. |
MLPIRESULT mlpiParameterReadEverything | ( | const MLPIHANDLE | connection, |
MlpiReadEverything * | readEverything, | ||
const ULONG | numElements, | ||
UCHAR * | data, | ||
const ULONG | dataSize | ||
) |
This function reads every element of a list of given parameters (Parameter structure). This means that you can read multiple parameters at once and you can read each element (value, default value, min, max, attribute, ...) of each parameter at once. All with a single function call instead of multiple calls to different functions. On the server side, the firmware tries to read the data in parallel where possible.
[in] | connection | Handle for multiple connections. |
[out] | readEverything | Structure where the information of all elements of the parameter are stored. The address and the sidn are input parameters. They define the address identifying the object and the ID of the parameter to be accessed. The elements attribute and IDN of an parameter have an fixed length. The values are stored in attribute and dataStatus. All other elements have an variable length. Their values are written into 'data'. To access an element value, use the offsets. The length of the elements minimum, maximum and data is stored in dataLength. If the the parameter is a list its length of the data is stored in dataSize. In this case the maximum list length is stored in maxDataSize. The parameter result indicates if this single request succeeded or failed. An error is returned if an general error occurred or if reading of one mandatory element failed (Parameter structure). Which elements are valid can be read via the validElements parameter. |
[in] | numElements | Number of MlpiReadEverything elements available in 'readEverything' for reading. |
[out] | data | Buffer to store the data of all elements with variable length. |
[in] | dataSize | Number of UCHAR elements available in 'data' for reading. |
MLPIRESULT mlpiParameterExportFileStartProcess | ( | const MLPIHANDLE | connection, |
const WCHAR16 * | path, | ||
const WCHAR16 * | exportPattern, | ||
PROCESSHANDLE * | process | ||
) |
This function exports parameters to a file on CF card in a asynchronous way. In string 'exportPattern', the instances can be selected.
[in] | connection | Handle for multiple connections. |
[in] | path | Absolute path of file where exported parameter will be stored. |
[in] | exportPattern | String where you can select which instances and which types of parameter should be exported. The general structure is a tag list of jobs: (JobPart;)* All jobs are separated by a semicolon. When no job is selected, no parameter will be exported. The structure of a job is the following: [InstanceRanges]:ParameterType[ParameterRanges] (with all squared brackets). The elements "[InstanceRanges]:" and "[ParameterRanges]" are optional. If these elements are not part of string, the whole available range is used. The element ParameterType is mandatory. "[InstanceRanges]:" and "[ParameterRanges]" can be lists of numbers, ranges or words "TO_SAVE" (all parameters which are needed to restore) or "MODIFIED" (all modified parameters). The stated words cannot combined with list of numbers or ranges. Furthermore, "MODIFIED" is only available for sercos parameters. When related parameter not exist on sercos device none parameter will export. Examples: A;C will export all axis and control parameters for each instance. [2]:A will export all axis parameter for axis 2. A[1-5] will export axis parameter A-0-0001 till A-0-0005 for each axis. [1,3-4,5]:A[8-9,11-13] Will export axis parameters (A-0-0008, A-0-0009, A-0-0011, A-0-0012, A-0-0013) for axis 1, 3, 4 and 5. A[TO_SAVE];[1-3]:S[MODIFIED] Will export parameters of all axes which are needed to resore and all modified parameters of sercos device 1 till 3. |
[out] | process | Handle of created process |
MLPIRESULT mlpiParameterImportFileStartProcess | ( | const MLPIHANDLE | connection, |
const WCHAR16 * | path, | ||
const WCHAR16 * | mapping, | ||
PROCESSHANDLE * | process | ||
) |
This function imports a parameter file from CF card in a asynchronous way. The string 'mapping' can give information on which instance should be imported and to which number of instance it should be written.
[in] | connection | Handle for multiple connections. |
[in] | path | Absolute path of file which should be imported. |
[in] | mapping | String which tells you which parameter instance should be imported and to which instance number. The general structure is a tag list of jobs: {JobPart;} Each job is separated by a semicolon. When no job is given, all parameters will be imported to the instance written in the header of the sercos ASCII file. A job has the following structure: [InstanceMapping]:Parametertype (in squared brackets). Parametertype is represented by A, C, K, M, N, O, S and P. In part InstanceMapping, you can select which parameter is imported to which instance. If given a single number only, this instance will be imported. If there is a parameter file in which data are associated with another instance number, one instance can be mapped to the other using '>'. It's also possible to map one instance to a range of instances. Examples: [1]:A will import axis parameter for axis 1. [1>3]:A will map axis parameter from instance 1 to 3. [1>2-5]:A will map axis parameter from instance 1 to axis 2 till 5. |
[out] | process | Handle of created process |
MLPIRESULT mlpiParameterImportExportStatus | ( | const MLPIHANDLE | connection, |
const PROCESSHANDLE | process, | ||
MlpiParamProcessStatus * | status, | ||
ULONG * | currentCount, | ||
ULONG * | expectedCount, | ||
ULONG * | errorsCount, | ||
MlpiSidnError * | errorList, | ||
ULONG | numElements | ||
) |
This function returns the status of a parameter process (import or export).
[in] | connection | Handle for multiple connections. |
[in] | process | Handle of process |
[out] | status | status of process |
[out] | currentCount | count of current parameters to export or import |
[out] | expectedCount | count of expected parameters to export or import |
[out] | errorsCount | Number of errors while import or export. When this is greater than numElements, all elements in the array are filled out but some information about errors is lost. |
[out] | errorList | Pointer to an array of structures where the wrong parameter and the error codes will be stored |
[in] | numElements | Number of MlpiSidnError elements available in 'errorList' for reading. |
MLPIRESULT mlpiParameterImportExportGetInfo | ( | const MLPIHANDLE | connection, |
const PROCESSHANDLE | process, | ||
WCHAR16 * | pattern, | ||
ULONG | numElementsPattern, | ||
WCHAR16 * | file, | ||
ULONG | numElementsFile | ||
) |
This function returns information about a parameter process (import or export).
[in] | connection | Handle for multiple connections. |
[in] | process | Handle of process |
[out] | pattern | Given pattern of process |
[in] | numElementsPattern | Size of pattern |
[out] | file | Given file of process |
[in] | numElementsFile | Size of file |
MLPIRESULT mlpiParameterImportExportAbort | ( | const MLPIHANDLE | connection, |
const PROCESSHANDLE | process | ||
) |
This function stops a given parameter process.
[in] | connection | Handle for multiple connections. |
[in] | process | Handle of process |
MLPIRESULT mlpiParameterWriteAccessSetup | ( | const MLPIHANDLE | connection, |
MlpiParamWriteAccess * | writeAccess, | ||
const ULONG | numElements, | ||
PROCESSHANDLE * | process | ||
) |
This function initializes a monitoring of parameters on a write access of the operation data. Not the modification of the operation data is monitored, but the write access. A process is started in the control. The status of this process can be read via the function mlpiParameterWriteAccessStatus. The process can be stopped via the function mlpiParameterWriteAccessAbort.
[in] | connection | Handle for multiple connections. |
[in] | writeAccess | Structure which conntains the information of the parameters to be monitored. |
[in] | numElements | Number of MlpiParamWriteAccess elements available in 'writeAccess'. |
[out] | process | Handle of created process |
MLPIRESULT mlpiParameterWriteAccessStatus | ( | const MLPIHANDLE | connection, |
const PROCESSHANDLE | process, | ||
const BOOL8 | waitForWriteAccess, | ||
const ULONG | timeout, | ||
MlpiParamWriteAccess * | writeAccess, | ||
const ULONG | numElements, | ||
ULONG * | numElementsRet | ||
) |
This function reads the status of a write access monitoring process. The process has be initialized via the function mlpiParameterWriteAccessSetup. The written parameters will only be reseted if this function succeded.
[in] | connection | Handle for multiple connections. |
[in] | process | Handle of process |
[in] | waitForWriteAccess | Set this value 'true' to call this function synchronously. The function returns in this case if one monitored parameter has been written. |
[in] | timeout | Timeout in milliseconds if the value of 'waitForWriteAccess' is 'true'. Use MLPI_INFINITE for infinite wait. |
[in] | writeAccess | Structure to store the information of (only) the written parameters. |
[out] | numElements | Number of MlpiParamWriteAccess elements available in 'writeAccess'. |
[out] | numElementsRet | Number of elements used. |
MLPIRESULT mlpiParameterWriteAccessAbort | ( | const MLPIHANDLE | connection, |
const PROCESSHANDLE | process | ||
) |
This function aborts a write access monitoring process.
[in] | connection | Handle for multiple connections. |
[in] | process | Handle of process |