This program is for an autonomous robot for the competition at the Hochschule Luzern. We are one of the 32 teams. <a href="http://cruisingcrepe.wordpress.com/">http://cruisingcrepe.wordpress.com/</a> The postition control is based on this Documentation: Control of Wheeled Mobile Robots: An Experimental Overview from Alessandro De Luca, Giuseppe Oriolo, Marilena Vendittelli. For more information see here: <a href="http://www.dis.uniroma1.it/~labrob/pub/papers/Ramsete01.pdf">http://www.dis.uniroma1.it/~labrob/pub/papers/Ramsete01.pdf</a>
Fork of autonomousRobotAndroid by
Diff: MicroBridge/PacketBuffer/PacketBuffer.h
- Revision:
- 18:306d362d692b
diff -r b5d949136a21 -r 306d362d692b MicroBridge/PacketBuffer/PacketBuffer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MicroBridge/PacketBuffer/PacketBuffer.h Fri May 03 08:35:29 2013 +0000 @@ -0,0 +1,49 @@ + + +/** @file PacketBuffer.h + * @brief Packet Buffer + */ + +#ifndef PacketBuffer_H +#define PacketBuffer_H + +#include "mbed.h" + +typedef struct +{ + char *buf; + int size; +} PacketBufInf; + +class PacketBuffer { +public: + /** init Stack class + * @param num buffering packet num + * @param packet_size size of packet(max size) + */ + PacketBuffer(int num,int packet_size); + ~PacketBuffer(); + + /** put to Packet buffer + * @param packet packet data + * @param len packet length + * @return put length + */ + int PutPacket(char *packet, int len); + + /** get from ring buffer + * @param packet packet data + * @return get length + */ + int GetPacket(char *packet); + + void clear(); + int available(); + int use(); + +private: + PacketBufInf *p_buf; + int max_num,max_size; + int addr_w, addr_r; +}; +#endif \ No newline at end of file