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: pl_comm.c File Reference

pl_comm.c File Reference

Include dependency graph for pl_comm.c:

Go to the source code of this file.

Defines

#define _LIBRASCH_BUILD

Functions

void _trace_signame (int level, const char *sender, const char *sig_name, int num_para, struct comm_para *para)
 print infos about a signal (for debug)
void _trace_sigdest (int level, const char *dest)
 print signal destination (for debug)
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 *para)
 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

This file implements the inter-plugin-communication.

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

Definition in file pl_comm.c.


Define Documentation

#define _LIBRASCH_BUILD
 

Definition at line 22 of file pl_comm.c.


Function Documentation

void _trace_sigdest int  level,
const char *  dest
 

Parameters:
<level> level of the current signal
<dest> name of the destination
For debugging purposes. The function prints the destination the signal is sent to.

Definition at line 320 of file pl_comm.c.

References ra_print_debug_infos, and utf8_to_local().

Referenced by ra_comm_emit().

void _trace_signame int  level,
const char *  sender,
const char *  sig_name,
int  num_para,
struct comm_para para
 

Parameters:
<level> level of the current signal
<sender> name of the sender
<sig_name> name of the signal
<num_para> number of parameters
<para> pointer to a communication-parameter struct
For debugging purposes. The function prints debug information about a signal. Is only called when the define 'TRACE_SIGNAL' is set when compiling this source.

Definition at line 240 of file pl_comm.c.

References comm_para::b, comm_para::c, comm_para::d, comm_para::f, comm_para::l, comm_para::n, PARA_BYTE, PARA_CHAR, PARA_CHAR_POINTER, PARA_DOUBLE, PARA_FLOAT, PARA_INT, PARA_LONG, PARA_SHORT, PARA_UNSIGNED_INT, PARA_UNSIGNED_LONG, PARA_UNSIGNED_SHORT, comm_para::pc, ra_print_debug_infos, comm_para::sn, comm_para::ul, comm_para::un, comm_para::usn, and utf8_to_local().

Referenced by ra_comm_emit().

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:03 2005 for libRASCH by  doxygen 1.4.2