Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openstack/02b-MAChigh/msf.h: add ifndef guards #530

Merged
merged 1 commit into from
Oct 27, 2020

Conversation

fjmolinas
Copy link
Contributor

This PR simply adds some ifndef guards to allow easily modifying the values of the msf algorithm.

@fjmolinas
Copy link
Contributor Author

Maybe @TimothyClaeys can take a look?

@TimothyClaeys
Copy link
Member

TimothyClaeys commented Oct 27, 2020

@fjmolinas I think it is a good idea to make it easy to customize these values during compile time. Maybe you can add the ifdef guards to the config.h file, similar to how the values for IEEE802154E_SINGLE_CHANNEL or PACKETQUEUE_LENGTH are set.

Copy link
Member

@TimothyClaeys TimothyClaeys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add:

#ifndef MSF_MAX_NUMCELLS
#define MSF_MAX_NUMCELLS                   32
#endif

to the config.h file and replace the defines here with:

#ifndef MSF_MAX_NUMCELLS
#define MAX_NUMCELLS                   32
#else
#define MAX_NUMCELLS                   MSF_MAX_NUMCELLS 
#endif

In the config.h these values only are useful when ADAPTIVE_MSF is active. So maybe add an #if guard like we did for the OPENWSN_6LO_FRAGMENTATION_C options

@fjmolinas
Copy link
Contributor Author

Done, lets see what travis says

@fjmolinas
Copy link
Contributor Author

@TimothyClaeys all green here!

@TimothyClaeys TimothyClaeys merged commit 5617e77 into openwsn-berkeley:develop Oct 27, 2020
@fjmolinas fjmolinas deleted the pr_msf_guards branch October 27, 2020 10:12
@fjmolinas
Copy link
Contributor Author

Thanks of the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants