Se connecter avec
S'enregistrer | Connectez-vous

"Ring Puffer" Please Help

Dernière réponse : dans Programmation

Salut tout le monde.
Je debute en C et j'ai grand besoin d'aide pour la resolution de ce probleme:

le voici:

Create a ring buffer of telegrams.
Each telegram contains an ID and a data member.
The buffer can store 3 telegrams before the first telegram is overwritten again.

The following public interfaces of the buffer are to be supported:
// Push one byte into the ring buffer.
pushByte(Byte)
// Retrieve one byte from the ring buffer.
unsigned char popByte()

You may use two variables for the buffer handling: ReadIndex, WriteIndex.

The program will create telegrams and write them into the ring buffer. Then it will read the telegrams out of the ring buffer.
The program will test to put 4 telegrams into the buffer. Demonstrate the result.

Autres pages sur : ring puffer please help

Lassé par la pub ? Créez un compte
Lassé par la pub ? Créez un compte