NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DBus< M > Class Template Reference

A bus is a way to connect devices. More...

#include <bus.h>

Classes

struct  Entry

Public Member Functions

void add (Device *dev, ReceiveFunction func)
bool send (M &msg, bool earlyout=false)
 Send message LIFO.
bool send_fifo (M &msg)
 Send message in FIFO order.
bool send_rr (M &msg, unsigned &start)
 Send message first hit round robin and return the number of the next one that accepted the message.
unsigned count ()
 Return the number of entries in the list.
void debug_dump ()
 Debugging output.
 DBus ()
 Default constructor.

Private Types

typedef bool(* ReceiveFunction )(Device *, M &)

Private Member Functions

 DBus (const DBus< M > &bus)
 To avoid bugs we disallow the copy constuctor.
void set_size (unsigned new_size)

Private Attributes

unsigned long _debug_counter
unsigned _list_count
unsigned _list_size
struct Entry_list

Detailed Description

template<class M>
class DBus< M >

A bus is a way to connect devices.

Member Typedef Documentation

template<class M>
typedef bool(* DBus< M >::ReceiveFunction)(Device *, M &)
private

Constructor & Destructor Documentation

template<class M>
DBus< M >::DBus ( const DBus< M > &  bus)
inlineprivate

To avoid bugs we disallow the copy constuctor.

template<class M>
DBus< M >::DBus ( )
inline

Default constructor.

Member Function Documentation

template<class M>
void DBus< M >::add ( Device dev,
ReceiveFunction  func 
)
inline
template<class M>
unsigned DBus< M >::count ( )
inline

Return the number of entries in the list.

template<class M>
void DBus< M >::debug_dump ( )
inline

Debugging output.

template<class M>
bool DBus< M >::send ( M &  msg,
bool  earlyout = false 
)
inline

Send message LIFO.

template<class M>
bool DBus< M >::send_fifo ( M &  msg)
inline

Send message in FIFO order.

template<class M>
bool DBus< M >::send_rr ( M &  msg,
unsigned &  start 
)
inline

Send message first hit round robin and return the number of the next one that accepted the message.

template<class M>
void DBus< M >::set_size ( unsigned  new_size)
inlineprivate

Member Data Documentation

template<class M>
unsigned long DBus< M >::_debug_counter
private
template<class M>
struct Entry* DBus< M >::_list
private
template<class M>
unsigned DBus< M >::_list_count
private
template<class M>
unsigned DBus< M >::_list_size
private

The documentation for this class was generated from the following file: