jcp.c

Go to the documentation of this file.
00001 /* $Id: */
00002 /*****************************************************************************/
00003 /*! \file dsi/lib/src/jcp.c
00004  *
00005  * \date   11/28/2000
00006  * \author Jork Loeser <jork_loeser@inf.tu-dresden.de>
00007  *
00008  * \brief  Jitter-Constrained-Periodic-Streams stuff
00009  */
00010 /*****************************************************************************/
00011 
00012 #include <l4/dsi/dsi.h>
00013 
00014 
00015 /*!\brief Convert jcp to stream-config
00016  *
00017  * \ingroup general
00018  *
00019  * \param  jcp   JCP-params bw, tau, packetsize
00020  * \retval s_cfg contains number of packets and max_sg=1
00021  */
00022 void dsi_jcp_2_config(dsi_jcp_stream_t *jcp, dsi_stream_cfg_t *s_cfg){
00023     int pps;            // packets per second
00024     
00025     pps=(jcp->bw+jcp->size-1)/jcp->size+1;
00026     s_cfg->num_packets = ((double)jcp->tau)*((double)pps)/1000000. + 2;
00027     s_cfg->max_sg = 1;
00028 }
00029 

Generated on Wed Apr 11 06:40:13 2012 for DSI - Drops Streaming Interface by  doxygen 1.5.6