uint32_t PN_API_IM_addImCarrier | ( | PN_API_IM_SCarrier_t * | pImCarrier_p | ) |
Add an I&M carrier to stack.
Stack can handle I&M data independently. Priorly application shall provide all concerned I&M carriers, which are attached to the real submodules. I&M data will be stored on stack memory, enabling stack to process all external I&M data requests autonomously. External PROFINET participants can access I&M information over submodule address (api->slot->subslot). A number of I&M carriers, that can be stored on the stack is limited.
The content of the input parameter will be copied to stack. Application can safely modify or delete the instance after invoking the function.
Following rules will be observed in this function prior adding an I&M carrier.
In case a submodule, module or device representative needed to be re-assigned, the old I&M carrier must be removed.
[in] | pImCarrier_p | Pointer to I&M carrier, which is being added. |
PN_API_IM_eOK | Function successful. |
PN_API_IM_eERR_ADD_INVALID_POINTER_PARAMETER | Invalid parameters (NULL pointers). |
PN_API_IM_eERR_ADD_INVALID_ADDRESS | Invalid slot number (> 0x7FFF) or subslot number (> 0x9FFF). |
PN_API_IM_eERR_ADD_NO_FREE_SPACE | No free space for a new I&M carrier. |
PN_API_IM_eERR_ADD_INVALID_IM_VERSION | Invalid I&M version (major != 0x01 || minor != 0x01). |
PN_API_IM_eERR_ADD_INVALID_SW_PREFIX | Invalid SW Revision prefix (for reference see PN_API_IM_EImSwRevPrefix_t). |
PN_API_IM_eERR_ADD_INVALID_STRING | I&M1, I&M2 or I&M3 data contains a non-visible character. |
PN_API_IM_eERR_ADD_SUBMODULE_ALREADY_ASSIGNED | An I&M carrier is already assigned to submodule with specified address. |
PN_API_IM_eERR_ADD_MODULE_ALREADY_ASSIGNED | Specified module has already an I&M module representative. |
PN_API_IM_eERR_ADD_DEVICE_ALREADY_ASSIGNED | I&M device representative is already assigned. |
PN_API_IM_eERR_ADD_DEVICE_NO_IM123_SUPPORT | I&M device representative must support I&M1, I&M2 and I&M3 data. |
PN_API_IM_eERR_ADD_SUBMODULE_NOT_PLUGGED | Corresponding real submodule isn't plugged. |