uint32_t PN_API_DEV_plugModule | ( | uint16_t | slotNumber_p, |
PN_API_DEV_SModuleDescriptor_t * | pModuleDescriptor_p | ||
) |
Plug a module.
With this function the application can plug a module to a slot. By doing this, the module will be registered on stack and can be visible from outside.
Function takes a pointer to an instance of the module description structure and checks, that it is filled with valid parameters. If the parameters are correct and the desired slot is free, the function will copy the instance to the stack. Application can modify the module instance and the pointer to it after invoking the function.
[in] | slotNumber_p | Number of the slot. |
[in] | pModuleDescriptor_p | Module to be plugged. |
PN_API_DEV_eOK | Module was plugged successfuly. |
PN_API_DEV_eERROR_PLUG_MODULE_INVALID_SLOT | Invalid slot number (> PNC_SLOT_MAX). |
PN_API_DEV_eERROR_PLUG_MODULE_SLOT_ALREADY_PLUGGED | The slot is already plugged. |
PN_API_DEV_eERROR_PLUG_MODULE_INVALID_MODULE_TYPE | Invalid type of the module. |