|
Data Structures |
| struct | message_struct |
| | Structure used to store incoming and outgoing messages. More...
|
| struct | site_struct |
| | Structure used to store other communicating sites. More...
|
Defines |
| #define | flip_sb(rs) rs^=0x1 |
Typedefs |
|
typedef message_struct | msg_s |
| | Structure used to store incoming and outgoing messages.
|
|
typedef site_struct | site_s |
| | Structure used to store other communicating sites.
|
Functions |
| void | erase (site_s *site) |
| | Erases the first message for a given site.
|
| msg_s * | new_msg (const unsigned char *header, const unsigned char *msg, unsigned char length) |
| | Creates a new message.
|
| site_s * | new_site (unsigned char id) |
| | Creates a new site.
|
| void | add (site_s *site, msg_s *m) |
| site_s * | search_and_add (unsigned char id) |
| | Searches for a site with a given id, and creates one if not found.
|
| void | AB_portHandler (const unsigned char *message, unsigned char length) |
| | This is the ISR for the infrared.
|
|
int | thread_AB_I () |
| | Thread handling incoming messages.
|
|
int | thread_AB_O () |
| | Thread handling outgoing messages.
|
Variables |
|
sem_t | sem_ab_write |
| | Semaphores for mutual exclusion and producer/consumer.
|
|
sem_t | sem_ab_portHandler |
| | Semaphores for mutual exclusion and producer/consumer.
|
|
sem_t | sem_todo_i |
| | Semaphores for mutual exclusion and producer/consumer.
|
|
sem_t | sem_todo_o |
| | Semaphores for mutual exclusion and producer/consumer.
|
|
site_s * | s_head |
| | list of current messages to (re)send
|
|
msg_s * | m_head |
| | list of received messages
|
|
msg_s * | m_tail |
| | list of received messages
|
|
unsigned char | _id |
| | Current site's id.
|
| void(* | user_portHandler_8 )(const unsigned char *buf, unsigned char len) |