TUM-Logo

libRASCH

 

Home
 

General

About libRASCH/News
Design
Screen shots
Sample programs (with source code)
License
 

Download

libRASCH
Tools
 

Documentation

User
Developer
 

Resources

Mailing list
Supported Formats
Plugins
Status
Links
 
Contact
About this site
 
Last updated
Tue Mar 27 23:03:52 2007
libRASCH: ra_pl_comm.h File Reference

ra_pl_comm.h File Reference

Include dependency graph for ra_pl_comm.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define MAX_SIGNAL_NAME   250
#define PARA_CHAR   0
#define PARA_BYTE   1
#define PARA_SHORT   2
#define PARA_UNSIGNED_SHORT   3
#define PARA_INT   4
#define PARA_UNSIGNED_INT   5
#define PARA_LONG   6
#define PARA_UNSIGNED_LONG   7
#define PARA_FLOAT   8
#define PARA_DOUBLE   9
#define PARA_CHAR_POINTER   10
#define PARA_BYTE_POINTER   11
#define PARA_SHORT_POINTER   12
#define PARA_UNSIGNED_SHORT_POINTER   13
#define PARA_INT_POINTER   14
#define PARA_UNSIGNED_INT_POINTER   15
#define PARA_LONG_POINTER   16
#define PARA_UNSIGNED_LONG_POINTER   17
#define PARA_FLOAT_POINTER   18
#define PARA_DOUBLE_POINTER   19
#define PARA_VOID_POINTER   20

Typedefs

typedef void * dest_handle

Functions

LIBRAAPI int ra_comm_add (meas_handle mh, plugin_handle p, dest_handle dh, const char *sig_name)
 add a signal receiver
LIBRAAPI void ra_comm_del (meas_handle mh, dest_handle dh, const char *sig_name)
 delete a signal receiver
LIBRAAPI void ra_comm_emit (meas_handle mh, const char *sender, const char *sig_name, int num_para, struct comm_para *p)
 emits a signal
signalfind_signal (struct plugin_comm *plc, const char *sig_name)
 look for a signal
signaladd_signal (struct plugin_comm *plc, const char *sig_name)
 add a signal
int find_slot (struct signal *sig, dest_handle dh)
 checks if a signal can be handled


Detailed Description

Implements a Qt like signal/slot architecture for communication between libRASCH plugins.

Author:
Raphael Schneider (rasch@med1.med.tum.de)

Definition in file ra_pl_comm.h.


Define Documentation

#define MAX_SIGNAL_NAME   250
 

Definition at line 29 of file ra_pl_comm.h.

Referenced by add_signal().

#define PARA_BYTE   1
 

Definition at line 76 of file ra_pl_comm.h.

Referenced by _trace_signame().

#define PARA_BYTE_POINTER   11
 

Definition at line 86 of file ra_pl_comm.h.

#define PARA_CHAR   0
 

Definition at line 75 of file ra_pl_comm.h.

Referenced by _trace_signame().

#define PARA_CHAR_POINTER   10
 

Definition at line 85 of file ra_pl_comm.h.

Referenced by _trace_signame().

#define PARA_DOUBLE   9
 

Definition at line 84 of file ra_pl_comm.h.

Referenced by _trace_signame().

#define PARA_DOUBLE_POINTER   19
 

Definition at line 94 of file ra_pl_comm.h.

#define PARA_FLOAT   8
 

Definition at line 83 of file ra_pl_comm.h.

Referenced by _trace_signame().

#define PARA_FLOAT_POINTER   18
 

Definition at line 93 of file ra_pl_comm.h.

#define PARA_INT   4
 

Definition at line 79 of file ra_pl_comm.h.

Referenced by _trace_signame().

#define PARA_INT_POINTER   14
 

Definition at line 89 of file ra_pl_comm.h.

#define PARA_LONG   6
 

Definition at line 81 of file ra_pl_comm.h.

Referenced by _trace_signame().

#define PARA_LONG_POINTER   16
 

Definition at line 91 of file ra_pl_comm.h.

#define PARA_SHORT   2
 

Definition at line 77 of file ra_pl_comm.h.

Referenced by _trace_signame().

#define PARA_SHORT_POINTER   12
 

Definition at line 87 of file ra_pl_comm.h.

#define PARA_UNSIGNED_INT   5
 

Definition at line 80 of file ra_pl_comm.h.

Referenced by _trace_signame().

#define PARA_UNSIGNED_INT_POINTER   15
 

Definition at line 90 of file ra_pl_comm.h.

#define PARA_UNSIGNED_LONG   7
 

Definition at line 82 of file ra_pl_comm.h.

Referenced by _trace_signame().

#define PARA_UNSIGNED_LONG_POINTER   17
 

Definition at line 92 of file ra_pl_comm.h.

#define PARA_UNSIGNED_SHORT   3
 

Definition at line 78 of file ra_pl_comm.h.

Referenced by _trace_signame().

#define PARA_UNSIGNED_SHORT_POINTER   13
 

Definition at line 88 of file ra_pl_comm.h.

#define PARA_VOID_POINTER   20
 

Definition at line 95 of file ra_pl_comm.h.


Typedef Documentation

typedef void* dest_handle
 

Definition at line 30 of file ra_pl_comm.h.


Function Documentation

struct signal* add_signal struct plugin_comm plc,
const char *  sig_name
 

Parameters:
<plc> pointer to a plugin-communication struct
<sig_name> name of the signal to be added
The functions adds the signal 'sig_name' to 'plc'.

Definition at line 184 of file pl_comm.c.

References find_signal(), MAX_SIGNAL_NAME, signal::name, plugin_comm::num_signals, signal::num_slots, plugin_comm::sig, and signal::slot.

Referenced by ra_comm_add().

struct signal* find_signal struct plugin_comm plc,
const char *  sig_name
 

Parameters:
<plc> pointer to a plugin-communication struct
<sig_name> name of the signal looked for
The functions looks if the signal 'sig_name' is set in 'plc' and returns a pointer to it.

Definition at line 158 of file pl_comm.c.

References signal::name, and plugin_comm::sig.

Referenced by add_signal(), ra_comm_add(), ra_comm_del(), and ra_comm_emit().

int find_slot struct signal sig,
dest_handle  dh
 

Parameters:
<sig> pointer to a signal
<dh> handle to a signal-destination
The functions checks if the signal 'sig' can be send to 'dh'.

Definition at line 210 of file pl_comm.c.

References slot_info::dest, signal::num_slots, and signal::slot.

Referenced by ra_comm_del().

LIBRAAPI int ra_comm_add meas_handle  mh,
plugin_handle  p,
dest_handle  dh,
const char *  sig_name
 

Parameters:
<mh> measurement handle
<p> plugin handle
<dh> destination handle
<sig_name> name of the signal
This function adds a new signal receiver p and dh for the signal sig_name to the inter-plugin-communication. Whenever the signal sig_name is emitted, the signal will be send to the plugin p. The plugin-instance will be identified with the help of dh.

Definition at line 44 of file pl_comm.c.

References add_signal(), slot_info::dest, find_signal(), signal::num_slots, ra_meas::plc, slot_info::plugin, and signal::slot.

LIBRAAPI void ra_comm_del meas_handle  mh,
dest_handle  dh,
const char *  sig_name
 

Parameters:
<mh> measurement handle
<dh> destination handle
<sig_name> name of the signal
This function deletes the signal receiver dh for the signal sig_name.

Definition at line 73 of file pl_comm.c.

References find_signal(), find_slot(), signal::name, signal::num_slots, ra_meas::plc, ra_comm_del(), and plugin_comm::sig.

Referenced by ra_comm_del().

LIBRAAPI void ra_comm_emit meas_handle  mh,
const char *  sender,
const char *  sig_name,
int  num_para,
struct comm_para para
 

Parameters:
<mh> measurement handle
<sender> name of the sender (needed for debug, can be NULL)
<sig_name> name of the signal
<num_para> number of signal parameters
<para> signal parameters
This function emits the signal sig_name wit num_para parameters.

Definition at line 118 of file pl_comm.c.

References _trace_sigdest(), _trace_signame(), slot_info::dest, find_signal(), plugin_struct::handle_signal, plugin_struct::info, plugin_infos::name, signal::num_slots, ra_meas::plc, slot_info::plugin, and signal::slot.


Generated on Fri May 27 11:33:36 2005 for libRASCH by  doxygen 1.4.2