uint32_t PN_API_DEV_registerSubmoduleSubstitutes | ( | PN_API_DEV_SSubmoduleSubstitute_t * | pSubmoduleSubstitutes_p, |
uint8_t | numberElements_p, | ||
PN_API_DEV_SSubmoduleSubstituteEntry_t ** | ppSubmoduleSubstituteEntryAddress_p | ||
) |
Register an array of submodule substitutes on stack.
Stack offers a possibility to store limited number of submodule substitutes. The substitutes will be stored as a set and can be assigned to submodules.
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 submodules.
Caution by reusing same handle pointer for different submodules. If during configuration a submodule 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.
By pulling a whole module, concerned submodules will be affected as well.
[in] | pSubmoduleSubstitutes_p | Pointer to the array of submodule substitutes. |
[in] | numberElements_p | Number of elements in the array. |
[in,out] | ppSubmoduleSubstituteEntryAddress_p | Handle pointer to the stored substitute set. |
PN_API_DEV_eOK | Submodule substitutes were stored successfuly. |
PN_API_DEV_eERROR_REG_SUBMOD_SUBST_INVALID_POINTER | Invalid input: NULL pointer to the array of substitutes. |
PN_API_DEV_eERROR_REG_SUBMOD_SUBST_INVALID_NUM_OF_ELEMS | Invalid input: invalid number of elements in the array (should be > 0 and < PNC_MAX_SUBMOD_SUBST_ENTRIES) . |
PN_API_DEV_eERROR_REG_SUBMOD_SUBST_NO_FREE_SPACE | No free memory. |