Ports.h File Reference

#include "../constants.h"
#include "Policies.h"
#include "hashDefault.h"

Include dependency graph for Ports.h:

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

Go to the source code of this file.

Data Structures

struct  __LabeledStreamData
struct  OutputPort
struct  InputPort

Defines

#define OP_STATE_OPEN   1
#define OP_STATE_CLOSED   0

Typedefs

typedef int OutputPortHandler
 index of the OutputPort int the FilterData, used for every operations the filter make to a stream.
typedef int InputPortHandler
 Index of InputPort in the FilterData.
typedef void() GetLabel (void *msg, int tamMsg, char label[])
 getLabel prototype
typedef int() Hash (char *label, int image)
 Hash function prototype.
typedef void() MLSHash (char *label, int image, int destArray[])
 Multicast LS hash function prototype.
typedef __LabeledStreamData LabeledStreamData

Functions

OutputPortcreateOutputPort ()
 constructor
void destroyOutputPort (OutputPort *o)
 destroyer: must release the libraries
void closeOutputPort (OutputPort *o)
 closes the door, must be called before finalizing if port is not closed
void resetOutputPort (OutputPort *o)
 resets the output port, i.e open it
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 setOPLibName (OutputPort *op, const char *libname)
void setOPTidsDestinations (OutputPort *op, const int *tids)
void setOPTag (OutputPort *op, int tag)
int loadOPLSData (OutputPort *op)
 This function loads the libraries of the labeled stream, returns 1 on success 0 otherwise.
int loadOPMLSData (OutputPort *op)
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)
void setNumEowRecv (InputPort *ip, int numRecv)


Define Documentation

#define OP_STATE_CLOSED   0
 

Definition at line 18 of file Ports.h.

Referenced by closeOutputPort().

#define OP_STATE_OPEN   1
 

Definition at line 17 of file Ports.h.

Referenced by resetOutputPort().


Typedef Documentation

typedef void() GetLabel(void *msg, int tamMsg, char label[])
 

getLabel prototype

Definition at line 22 of file Ports.h.

typedef int() Hash(char *label, int image)
 

Hash function prototype.

Definition at line 23 of file Ports.h.

typedef int InputPortHandler
 

Index of InputPort in the FilterData.

Definition at line 14 of file Ports.h.

typedef struct __LabeledStreamData LabeledStreamData
 

typedef void() MLSHash(char *label, int image, int destArray[])
 

Multicast LS hash function prototype.

Definition at line 24 of file Ports.h.

typedef int OutputPortHandler
 

index of the OutputPort int the FilterData, used for every operations the filter make to a stream.

Definition at line 13 of file Ports.h.


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 op  ) 
 

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 o  ) 
 

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 setNumEowRecv InputPort ip,
int  numRecv
 

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,
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:30 2006 for Void by  doxygen 1.4.6