#include <rc_driver_object.h>
It contains all the infrastructure necessary to cache the calls that have to be forwarded. There also is a handle to the process that represents the driver. A driver object normally uses an own process instance which performs the forwarding. In case of non-blocking drivers it is also possible to shares one static process among all other driver objects.
Definition at line 125 of file rc_driver_object.h.
Protected Types | |
typedef boost::function < void(void)> | call_type |
The type of the forwarded function object. | |
typedef std::vector < write_call > | write_call_vector |
The type of the write call vector. | |
typedef std::vector < write_call > ::iterator | write_call_iterator |
The type of the write call vector iterator. | |
Protected Member Functions | |
rc_driver_object_base () | |
Constructor. | |
virtual | ~rc_driver_object_base () |
Virtual destructor. | |
virtual void | writer_method_proc () |
The writer method process. | |
virtual void | writer_thread_proc () |
The writer thread process. | |
Static Protected Member Functions | |
static void | safe_event_notify (sc_event &e) |
Notifies an event. | |
Protected Attributes | |
sc_process_handle | m_hproc |
Handle of the forwarding process of this driver object. | |
write_call_vector * | m_write_call_vector |
Vector caching all pending calls of this driver object. | |
sc_event * | m_pending_write_event |
Pending write event. | |
bool | m_pending_write_event_notified_flag |
Flag to indicate whether the write event was notified. | |
bool * | m_pending_write_event_notified |
Pointer to the notification flag used by this driver object. | |
Static Protected Attributes | |
static sc_process_handle | s_hproc |
shared static driver process for non-blocking interfaces | |
static write_call_vector | s_write_call_vector |
shared write call vector | |
static sc_event | s_pending_write_event |
shared pending write event | |
static bool | s_pending_write_event_notified_flag = false |
shared notification flag | |
Private Member Functions | |
rc_driver_object_base (const rc_driver_object_base &dobj) | |
(disabled) | |
rc_driver_object_base & | operator= (const rc_driver_object_base &dobj) |
(disabled) | |
Static Private Member Functions | |
static void | s_writer_method_proc () |
The static method process that forwards non-blocking calls. | |
static sc_process_handle | s_create_method_process () |
Creates a method process that forwards non-blocking calls . | |
Friends | |
class | internals::driver_object::nb_driver_access_call |
Gives the non-blocking call object access to the members. | |
class | internals::driver_object::driver_access_call |
Gives the blocking call object access to the members. | |
Classes | |
struct | write_call |
Class representing a write call (+properties). More... |
typedef boost::function<void (void)> call_type [protected] |
The type of the forwarded function object.
A forwarded function object is always of the form: void f(void).
Reimplemented in rc_driver_object_b< IF, false >, and rc_driver_object_b< IF, true >.
Definition at line 141 of file rc_driver_object.h.
typedef std::vector<write_call> write_call_vector [protected] |
The type of the write call vector.
Reimplemented in rc_driver_object_b< IF, false >, and rc_driver_object_b< IF, true >.
Definition at line 151 of file rc_driver_object.h.
typedef std::vector<write_call>::iterator write_call_iterator [protected] |
The type of the write call vector iterator.
Reimplemented in rc_driver_object_b< IF, false >, and rc_driver_object_b< IF, true >.
Definition at line 155 of file rc_driver_object.h.
rc_driver_object_base | ( | ) | [protected] |
~rc_driver_object_base | ( | ) | [protected, virtual] |
rc_driver_object_base | ( | const rc_driver_object_base & | dobj | ) | [private] |
(disabled)
void writer_method_proc | ( | ) | [protected, virtual] |
void writer_thread_proc | ( | ) | [protected, virtual] |
void safe_event_notify | ( | sc_event & | e | ) | [static, protected] |
Notifies an event.
e | the event to be notified |
Definition at line 150 of file rc_driver_object.cpp.
Referenced by driver_access_call::operator()(), driver_access_call< void >::operator()(), and nb_driver_access_call::operator()().
void s_writer_method_proc | ( | ) | [static, private] |
The static method process that forwards non-blocking calls.
Definition at line 52 of file rc_driver_object.cpp.
Referenced by rc_driver_object_base::rc_driver_object_base().
static sc_process_handle s_create_method_process | ( | ) | [static, private] |
Creates a method process that forwards non-blocking calls .
rc_driver_object_base& operator= | ( | const rc_driver_object_base & | dobj | ) | [private] |
(disabled)
friend class internals::driver_object::nb_driver_access_call [friend] |
Gives the non-blocking call object access to the members.
Definition at line 130 of file rc_driver_object.h.
friend class internals::driver_object::driver_access_call [friend] |
Gives the blocking call object access to the members.
Definition at line 135 of file rc_driver_object.h.
sc_process_handle m_hproc [protected] |
Handle of the forwarding process of this driver object.
Definition at line 199 of file rc_driver_object.h.
Referenced by rc_driver_object_base::rc_driver_object_base().
write_call_vector* m_write_call_vector [protected] |
Vector caching all pending calls of this driver object.
Definition at line 203 of file rc_driver_object.h.
Referenced by driver_access_call::operator()(), driver_access_call< void >::operator()(), nb_driver_access_call::operator()(), rc_driver_object_base::writer_method_proc(), rc_driver_object_base::writer_thread_proc(), and rc_driver_object_base::~rc_driver_object_base().
sc_event* m_pending_write_event [protected] |
Pending write event.
This event is notified if new calls have to be forwarded. The forwarder process is sensitive to this event.
Definition at line 210 of file rc_driver_object.h.
Referenced by driver_access_call::operator()(), driver_access_call< void >::operator()(), nb_driver_access_call::operator()(), and rc_driver_object_base::~rc_driver_object_base().
bool m_pending_write_event_notified_flag [protected] |
Flag to indicate whether the write event was notified.
The flag is set to true if the write event was notified. The flag is set to false when the writer process is activated.
Definition at line 217 of file rc_driver_object.h.
bool* m_pending_write_event_notified [protected] |
Pointer to the notification flag used by this driver object.
The indirection is necessary to allow the use of the static method writer process as well as another writer process.
Definition at line 224 of file rc_driver_object.h.
Referenced by driver_access_call::operator()(), driver_access_call< void >::operator()(), nb_driver_access_call::operator()(), rc_driver_object_base::writer_method_proc(), and rc_driver_object_base::writer_thread_proc().
sc_process_handle s_hproc [static, protected] |
shared static driver process for non-blocking interfaces
Definition at line 232 of file rc_driver_object.h.
Referenced by rc_driver_object_base::rc_driver_object_base().
rc_driver_object_base::write_call_vector s_write_call_vector [static, protected] |
shared write call vector
Definition at line 237 of file rc_driver_object.h.
Referenced by rc_driver_object_base::s_writer_method_proc(), and rc_driver_object_base::~rc_driver_object_base().
sc_event s_pending_write_event [static, protected] |
shared pending write event
Definition at line 242 of file rc_driver_object.h.
Referenced by rc_driver_object_base::rc_driver_object_base(), and rc_driver_object_base::~rc_driver_object_base().
bool s_pending_write_event_notified_flag = false [static, protected] |
shared notification flag
Definition at line 247 of file rc_driver_object.h.
Referenced by rc_driver_object_base::s_writer_method_proc().