boards: bsim: fix bug with single settings file for few bsim devices
Reapply the part of4b5cd92312
that added new functionality/fixed the actual issues described in the original commit message withtout the further cleanup. There was also some cross-commit content from2b91ebe16e
as part of the cleanup in test_friendship.c which is also included. + added cleanup also to test_provision.c on request from Aleksandr. Original commit msg: ----------- Multiple bsim devices cannot store individual settings with the existing settings backend for bsim. Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no> ----------- Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This commit is contained in:
parent
26d7d7c8c8
commit
9249609071
5 changed files with 36 additions and 18 deletions
|
@ -226,5 +226,15 @@ void nrfbsim_cleanup_args(void)
|
|||
bs_cleanup_dynargs(&args_struct);
|
||||
}
|
||||
|
||||
char *get_simid(void)
|
||||
{
|
||||
return arg.s_id;
|
||||
}
|
||||
|
||||
unsigned int get_device_nbr(void)
|
||||
{
|
||||
return arg.global_device_nbr;
|
||||
}
|
||||
|
||||
NATIVE_TASK(nrfbsim_register_args, PRE_BOOT_1, 0);
|
||||
NATIVE_TASK(nrfbsim_cleanup_args, ON_EXIT, 10);
|
||||
|
|
|
@ -26,6 +26,8 @@ struct NRF_bsim_args_t {
|
|||
|
||||
struct NRF_bsim_args_t *nrfbsim_argsparse(int argc, char *argv[]);
|
||||
void bs_add_extra_dynargs(bs_args_struct_t *args_struct_toadd);
|
||||
char *get_simid(void);
|
||||
unsigned int get_device_nbr(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue