{"action":"created","issue":{"url":"https://api.github.com/repos/contiki-os/contiki/issues/1049","labels_url":"https://api.github.com/repos/contiki-os/contiki/issues/1049/labels{/name}","comments_url":"https://api.github.com/repos/contiki-os/contiki/issues/1049/comments","events_url":"https://api.github.com/repos/contiki-os/contiki/issues/1049/events","html_url":"https://github.com/contiki-os/contiki/issues/1049","id":73498430,"number":1049,"title":"Use of mac_call_sent_callback in nullrdc.c","user":{"login":"aguirrem","id":1304511,"avatar_url":"https://avatars.githubusercontent.com/u/1304511?v=3","gravatar_id":"","url":"https://api.github.com/users/aguirrem","html_url":"https://github.com/aguirrem","followers_url":"https://api.github.com/users/aguirrem/followers","following_url":"https://api.github.com/users/aguirrem/following{/other_user}","gists_url":"https://api.github.com/users/aguirrem/gists{/gist_id}","starred_url":"https://api.github.com/users/aguirrem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aguirrem/subscriptions","organizations_url":"https://api.github.com/users/aguirrem/orgs","repos_url":"https://api.github.com/users/aguirrem/repos","events_url":"https://api.github.com/users/aguirrem/events{/privacy}","received_events_url":"https://api.github.com/users/aguirrem/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-06T03:09:24Z","updated_at":"2015-05-07T13:55:05Z","closed_at":null,"body":"I sent this question to the mailing list. I am posting it here in hopes to get a bit more visiblity\r\n\r\nLooking at the code in nullrdc.c I noticed that the last parameter in mac_call_sent_callback (numtx) is always set to '1'.\r\n\r\nBy looking at the prototype of the function mac_call_sent_callback:\r\n```\r\nmac_call_sent_callback(mac_callback_t sent, void *ptr, int status, int num_tx)\r\n```\r\n\r\nFrom the name one can deduce that the value expected in *num_tx* is the number of attempts that the packet took to be transmitted by the radio. This value is eventually passed down to the the configured RPL objective function. However with nullrdc that numtx will always be 1 even though the number of attempts can easily be retrieved from the radio driver.\r\n\r\nMy questions are the following:\r\n * Why is this value fixed at \"1\" currently?\r\n * Would there ever be a reason to use the true number of tx attempts? if so when?\r\n\r\nThanks in advance "},"comment":{"url":"https://api.github.com/repos/contiki-os/contiki/issues/comments/99876297","html_url":"https://github.com/contiki-os/contiki/issues/1049#issuecomment-99876297","issue_url":"https://api.github.com/repos/contiki-os/contiki/issues/1049","id":99876297,"user":{"login":"laurentderu","id":3338530,"avatar_url":"https://avatars.githubusercontent.com/u/3338530?v=3","gravatar_id":"","url":"https://api.github.com/users/laurentderu","html_url":"https://github.com/laurentderu","followers_url":"https://api.github.com/users/laurentderu/followers","following_url":"https://api.github.com/users/laurentderu/following{/other_user}","gists_url":"https://api.github.com/users/laurentderu/gists{/gist_id}","starred_url":"https://api.github.com/users/laurentderu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurentderu/subscriptions","organizations_url":"https://api.github.com/users/laurentderu/orgs","repos_url":"https://api.github.com/users/laurentderu/repos","events_url":"https://api.github.com/users/laurentderu/events{/privacy}","received_events_url":"https://api.github.com/users/laurentderu/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T13:55:05Z","updated_at":"2015-05-07T13:55:05Z","body":"The num_tx parameter makes sense only for CSMA as it represents the number of actual transmission performed. The radio driver and the RDC will never try to retransmit a packet after a failure, hence the value is fixed to 1. Only in CSMA you have retransmission and so different values for num_tx.\r\n"}}