Ports.c File Reference

Input port and output port implementations. More...

#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <pvm3.h>
#include "Ports.h"
#include "../Messages.h"

Include dependency graph for Ports.c:

Go to the source code of this file.

Functions

OutputPortcreateOutputPort ()
 constructor
void destroyOutputPort (OutputPort *o)
 destroyer: must release the libraries
void resetOutputPort (OutputPort *op)
 resets the output port, i.e open it
void closeOutputPort (OutputPort *op)
 closes the door, must be called before finalizing if port is not closed
void setOPState (OutputPort *op, int state)
 set stuff, user can free the second argument after that
void setOPName (OutputPort *op, const char *name)
void setOPNumDestinations (OutputPort *op, int num)
void setOPWritePolicy (OutputPort *op, writePolicy_t p)
void setOPNextToSend (OutputPort *op, int next)
void setOPTag (OutputPort *op, const int tag)
void setOPLibName (OutputPort *op, const char *libname)
void setOPTidsDestinations (OutputPort *op, const int *tids)
InputPortcreateInputPort ()
 constructor
void destroyInputPort (InputPort *o)
 destroyer: must release the libraries
void resetInputPort (InputPort *ip)
 reset an input port. Must be used before starting work
void setIPName (InputPort *ip, const char *name)
void setIPNumSources (InputPort *ip, int num)
void setIPTag (InputPort *ip, int tag)
void setIPTidsSources (InputPort *ip, const int *tids)
int loadOPLSData (OutputPort *o)
 This function loads the libraries of the labeled stream, returns 1 on success 0 otherwise.
int loadOPMLSData (OutputPort *o)


Detailed Description

Input port and output port implementations.

Todo:
Make message buffering.

Definition in file Ports.c.


Function Documentation

void closeOutputPort OutputPort op  ) 
 

closes the door, must be called before finalizing if port is not closed

used to notify manager this filter ended its work

Definition at line 48 of file Ports.c.

References MSGT_EOW, OutputPort::numDestinations, OP_STATE_CLOSED, setOPState(), OutputPort::state, OutputPort::tag, and OutputPort::tidsDestinations.

Referenced by dsCloseOutputPort().

Here is the call graph for this function:

InputPort* createInputPort  ) 
 

constructor

Definition at line 126 of file Ports.c.

References InputPort::numEowRecv.

OutputPort* createOutputPort  ) 
 

constructor

Definition at line 17 of file Ports.c.

References setOPState().

Referenced by recvFilterData().

Here is the call graph for this function:

void destroyInputPort InputPort o  ) 
 

destroyer: must release the libraries

Definition at line 139 of file Ports.c.

Referenced by destroyFilterData().

void destroyOutputPort OutputPort o  ) 
 

destroyer: must release the libraries

Definition at line 28 of file Ports.c.

References LABELED_STREAM, OutputPort::lsData, __LabeledStreamData::lsHandler, MULTICAST_LABELED_STREAM, and OutputPort::writePolicy.

int loadOPLSData OutputPort o  ) 
 

This function loads the libraries of the labeled stream, returns 1 on success 0 otherwise.

Definition at line 187 of file Ports.c.

References error, __LabeledStreamData::getLabel, __LabeledStreamData::hash, hashDefault(), __LabeledStreamData::libname, OutputPort::lsData, and __LabeledStreamData::lsHandler.

Referenced by recvFilterData().

Here is the call graph for this function:

int loadOPMLSData OutputPort o  ) 
 

Todo:
Check the mangled name of this function

Definition at line 230 of file Ports.c.

References error, __LabeledStreamData::getLabel, __LabeledStreamData::libname, OutputPort::lsData, __LabeledStreamData::lsHandler, __LabeledStreamData::mlshash, and mlsHashDefault().

Referenced by recvFilterData().

Here is the call graph for this function:

void resetInputPort InputPort ip  ) 
 

reset an input port. Must be used before starting work

Definition at line 148 of file Ports.c.

References InputPort::numEowRecv, and InputPort::tag.

Referenced by runFilter().

void resetOutputPort OutputPort op  ) 
 

resets the output port, i.e open it

Definition at line 43 of file Ports.c.

References OP_STATE_OPEN, and setOPState().

Referenced by runFilter().

Here is the call graph for this function:

void setIPName InputPort ip,
const char *  name
 

Definition at line 158 of file Ports.c.

References InputPort::name.

void setIPNumSources InputPort ip,
int  num
 

Definition at line 163 of file Ports.c.

References InputPort::numSources.

void setIPTag InputPort ip,
int  tag
 

Definition at line 168 of file Ports.c.

References InputPort::tag.

void setIPTidsSources InputPort ip,
const int *  tids
 

Definition at line 172 of file Ports.c.

References InputPort::numSources, and InputPort::tidsSources.

void setOPLibName OutputPort op,
const char *  libname
 

Definition at line 95 of file Ports.c.

References __LabeledStreamData::libname, OutputPort::lsData, MAX_HNAME_LENGTH, and MAX_LNAME_LENGTH.

Referenced by recvFilterData().

void setOPName OutputPort op,
const char *  name
 

Definition at line 71 of file Ports.c.

References OutputPort::name.

Referenced by recvFilterData().

void setOPNextToSend OutputPort op,
int  next
 

Definition at line 86 of file Ports.c.

References OutputPort::nextToSend.

Referenced by recvFilterData().

void setOPNumDestinations OutputPort op,
int  num
 

Definition at line 76 of file Ports.c.

References OutputPort::numDestinations.

Referenced by recvFilterData().

void setOPState OutputPort op,
int  state
 

set stuff, user can free the second argument after that

Definition at line 66 of file Ports.c.

References OutputPort::state.

Referenced by closeOutputPort(), createOutputPort(), and resetOutputPort().

void setOPTag OutputPort op,
const int  tag
 

Definition at line 91 of file Ports.c.

References OutputPort::tag.

Referenced by recvFilterData().

void setOPTidsDestinations OutputPort op,
const int *  tids
 

Definition at line 109 of file Ports.c.

References OutputPort::numDestinations, and OutputPort::tidsDestinations.

Referenced by recvFilterData().

void setOPWritePolicy OutputPort op,
writePolicy_t  p
 

Definition at line 81 of file Ports.c.

References OutputPort::writePolicy.

Referenced by recvFilterData().


Generated on Tue Jan 17 19:25:18 2006 for Void by  doxygen 1.4.6