Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
cebc995e
Commit
cebc995e
authored
7 years ago
by
zhuoshuguo
Browse files
Options
Downloads
Patches
Plain Diff
gnrc_gomach: add sender ID number limit in beacon packet.
parent
0454491e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sys/include/net/gnrc/gomach/gomach.h
+13
-0
13 additions, 0 deletions
sys/include/net/gnrc/gomach/gomach.h
sys/net/gnrc/link_layer/gomach/gomach_internal.c
+6
-0
6 additions, 0 deletions
sys/net/gnrc/link_layer/gomach/gomach_internal.c
with
19 additions
and
0 deletions
sys/include/net/gnrc/gomach/gomach.h
+
13
−
0
View file @
cebc995e
...
...
@@ -276,6 +276,19 @@ extern "C" {
#define GNRC_GOMACH_MAX_ALLOC_SLOTS_NUM (25U)
#endif
/**
* @brief Maximum number of senders allowed to be allocated slots in one cycle.
*
* Exclude the static GoMacH MAC header payload in the beacon, which is 20 bytes,
* we have 107 bytes left for constructing the sender-ID list and the related slots-number
* list. A combined slots allocation information pair (sender ID with its corresponded
* allocate slots number) will cost 9 (8+1) bytes, thus we can hold a maximum of 11
* i.e., ((127 - 20) / 9), sender IDs in the beacon.
*/
#ifndef GNRC_GOMACH_MAX_ALLOC_SENDER_NUM
#define GNRC_GOMACH_MAX_ALLOC_SENDER_NUM (11U)
#endif
/**
* @brief Maximum t2k attempts before going to t2u in GoMacH.
*
...
...
This diff is collapsed.
Click to expand it.
sys/net/gnrc/link_layer/gomach/gomach_internal.c
+
6
−
0
View file @
cebc995e
...
...
@@ -488,7 +488,13 @@ int gnrc_gomach_send_beacon(gnrc_netif_t *netif)
total_tdma_slot_num
-=
redueced_slots_num
;
break
;
}
j
++
;
/* If reach the maximum sender ID number limit, stop. */
if
(
total_tdma_node_num
>=
GNRC_GOMACH_MAX_ALLOC_SENDER_NUM
)
{
break
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment