Re: I need to write a command protocol divided in 3 layers



billy wrote:
Hello

I need to write a command protocol divided in 3 layers. A data link layer, a network layer and an upper layer.

I'm programming this in C.

I would like some internet links that shows some examples of how to signal between the different layers.

I'm planning to have different state machines in the different layers. The state machines are called by an interrupt timer every 1ms.

They are going to send signals (reguests, indications and confirmation).

What is the best way to write the signaling?

Callbacks using function pointers and object handles.
.