Content-type: text/html Manpage of MCL_WAIT_EVENT

MCL_WAIT_EVENT

Section: Misc. Reference Manual Pages (2)
Updated:
Index Return to Main Contents

 

NAME

mcl_wait_event - wait an event of the MultiCast Library (MCL)

 

SYNOPSIS

#include "../src/common/mcl_lib_api.h"

int mcl_wait_event (int id, int event);

 

DESCRIPTION

mcl_wait_event enables the application to sleep until the event specified occurs. It applies to the current session (identified by the id identifier). As this function uses polling, it may not be awaken immediately after that the expected event has occurred.

The arguments are:

int id
session identifier returned by mcl_open

int event
event name.

The following events are defined:

MCL_WAIT_EVENT_END_TX:
wait the end of transmission of the last symbol of each layer (which can take quite a long time on the slowest layer). Only valid with a traffic source.

MCL_WAIT_EVENT_END_RX:
wait the end of reception (i.e. once enough symbols have been received to decode all objects) or until the MCL session has received a ``CLOSE'' message from the traffic source. Only valid at a receiver.

MCL_WAIT_EVENT_CLOSED:
wait untill a CLOSE message has been received, meaning that no symbol will ever been sent for this session.

Using MCL_WAIT_EVENT_CLOSED requires that a MCL_OPT_NEVER_LEAVE_BASE_LAYER (see mcl_ctl(2) manual) has been issued at the session start. Indeed, CLOSE messages are sent on the base layer and without this option the receiver leaves the base layer once all objects have been successfully decoded.

 

RETURN VALUE

On success returns 0, on error a non-zero value.

 

EXAMPLE

Here is a simple example.

        int     err = 0;

        if ((err = mcl_wait_event(id, MCL_WAIT_EVENT_END_TX)) < 0) {
                printf("ERROR: mcl_wait_event failed);
                exit(-1);
        }

 

COPYRIGHTS

Copyright (c) 1999-2003 INRIA - Universite Paris 6 -
All rights reserved
(main author: Vincent Roca - vincent.roca@inrialpes.fr)

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

 

SEE ALSO

mcl_open(3), MCL documentation

 

AUTHORS

Vincent Roca (INRIA Rhone-Alpes, Planete project)

$Id: mcl_wait_event.man.2,v 1.2 2003/10/27 09:55:47 roca Exp $


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
EXAMPLE
COPYRIGHTS
SEE ALSO
AUTHORS

This document was created by man2html, using the manual pages.
Time: 13:49:41 GMT, November 26, 2003