WIP of the data layer

Most of the timing rules are implemented, and for the sender part it seems to be working.
Commented lines are because the buffered system for the frames doesn't support that a
procedure be interupted like that (I made them anyway so I can try to change the buffer later)