gusimplewhiteboard
wb_channels.h File Reference
#include <gu_util.h>
Include dependency graph for wb_channels.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wb_channels
 UPPAAL style synchronisation channels. More...
 

Macros

#define CHANNELS_BYTES   (sizeof(gu_simple_message))
 message size More...
 
#define CHANNELS_COUNT   (CHANNELS_BYTES*8)
 channels available More...
 
#define CHANNEL_SEND(s, n)   ( (s)->_channels[(n)/8] |= (1<<((n)%8)) )
 Set channel state ON. More...
 
#define CHANNEL_CLEAR(s, n)   ( (s)->_channels[(n)/8] &= ~(1<<((n)%8)) )
 Set channel state OFF. More...
 
#define CHANNEL_WAITING(s, n)   ( ((s)->_channels[(n)/8] & (1<<((n)%8))) != 0 )
 Return the state of the channel. More...
 

Macro Definition Documentation

◆ CHANNEL_CLEAR

#define CHANNEL_CLEAR (   s,
 
)    ( (s)->_channels[(n)/8] &= ~(1<<((n)%8)) )

Set channel state OFF.

Definition at line 71 of file wb_channels.h.

◆ CHANNEL_SEND

#define CHANNEL_SEND (   s,
 
)    ( (s)->_channels[(n)/8] |= (1<<((n)%8)) )

Set channel state ON.

Definition at line 68 of file wb_channels.h.

◆ CHANNEL_WAITING

#define CHANNEL_WAITING (   s,
 
)    ( ((s)->_channels[(n)/8] & (1<<((n)%8))) != 0 )

Return the state of the channel.

Definition at line 74 of file wb_channels.h.

◆ CHANNELS_BYTES

#define CHANNELS_BYTES   (sizeof(gu_simple_message))

message size

Definition at line 64 of file wb_channels.h.

◆ CHANNELS_COUNT

#define CHANNELS_COUNT   (CHANNELS_BYTES*8)

channels available

Definition at line 65 of file wb_channels.h.