Holger Hans Peter Freyther
6058220d2a
types: Add a simple testcase for basic types and fix the LLC code
...
* Make append_data, remaining_space and fits_in_current.. work
on m_length and not the index. This ways things can't overflow.
* The current API consumer was moving the m_index so it should have
worked okay.
2013-11-21 21:30:23 +01:00
Holger Hans Peter Freyther
b1302b083e
llc: Move the decision if a frame has expired into the LLC
...
This way the generation of the expiry information and the check
is at the same place. This should make reading the code more easy.
2013-11-13 17:16:28 +01:00
Holger Hans Peter Freyther
32f9a59ab4
llc: Make the index 'private' by appending a m_ to it.
...
At some point in the future we can start using the private/protected
keywords in this struct.
2013-11-13 17:14:42 +01:00
Holger Hans Peter Freyther
e23102602c
llc: Move some more secrets from the TBF into the LLC
...
Introduce a method to append data to a TBF and then reset the
read pointer when the frame has been sent.
2013-11-13 17:08:07 +01:00
Holger Hans Peter Freyther
fce431cf3a
llc: Move the timeout calculation into the TBF
2013-11-13 15:17:12 +01:00
Holger Hans Peter Freyther
857281f7ff
llc: Remove one of the two variants to put data into the frame
2013-11-13 14:58:19 +01:00
Holger Hans Peter Freyther
acb5427bda
llc: Move all direct accesses to the frame into the llc structure
...
Add some todo items where we could add assertions now that I see
the constraints and invariants of this code.
2013-11-07 08:15:58 +01:00
Holger Hans Peter Freyther
be57081721
llc: Move the llc structure to a new header file
2013-11-07 08:02:10 +01:00