uint32_t PN_API_DEV_registerModuleSubstitutes | ( | PN_API_DEV_SModuleSubstitute_t * | pModuleSubstitutes_p, |
uint8_t | numberElements_p, | ||
PN_API_DEV_SModuleSubstituteEntry_t ** | ppModuleSubstituteEntryAddress_p | ||
) |
Register an array of module substitutes on stack.
Stack offers a possibility to store limited number of module substitutes. The substitutes will be stored as a set and can be assigned to modules.
Application must create an array of module substitutes and pass them to the stack. If input parameters are correct and there is free memory, stack will store the input array in form of linked list chain. Stack will return a pointer to the stored substitute set. Application can use this pointer to assign a group of substitutes to one ore more module.
Caution by reusing same handle pointer for different modules. If during configuration a module was plugged and then pulled, stack will check, if attached substitute set is not used elsewhere. If not - stack will remove the set from stack and handle to the concerned substitute set (if stored) will become invalid.
[in] | pModuleSubstitutes_p | Pointer to the array of module substitutes. |
[in] | numberElements_p | Number of elements in the array. |
[in,out] | ppModuleSubstituteEntryAddress_p | Handle pointer to the stored substitute set. |
PN_API_DEV_eOK | Module substitutes were stored successfuly. |
PN_API_DEV_eERROR_REG_MOD_SUBST_INVALID_POINTER | Invalid input: NULL pointer to the array of substitutes. |
PN_API_DEV_eERROR_REG_MOD_SUBST_INVALID_NUM_OF_ELEMS | Invalid input: invalid number of elements in the array (should be > 0 and < PNC_MAX_MOD_SUBST_ENTRIES) . |
PN_API_DEV_eERROR_REG_MOD_SUBST_NO_FREE_SPACE | No free memory. |