dcDCPL_Reactor.h File Reference

DPWSCore Reactor support services. More...

#include "dcpl_target.h"
#include "dcDCPL_Error.h"
#include "dcDPWS_Reactor.h"

Functions

int dcpl_reactor_init (struct reactor *reactor, int family, uint16_t port, struct dcpl_error *error)
 Initialize platform-specific features (only) for a reactor, especially interruption specific data.
int dcpl_reactor_free (struct reactor *reactor, struct dcpl_error *error)
 Uninitialize platform-specific features (only) for a reactor initialized with dcpl_reactor_init, especially interruption specific data.
int dcpl_reactor_wait (struct reactor *reactor, uint64_t next_date, struct reactor_item **active_list, struct dcpl_error *error)
 Platform-specific function for multiplexing I/O and timer.
int dcpl_reactor_interrupt (struct reactor *reactor, struct dcpl_error *error)
 Platform-specific function for interrupting the wait function, when changes in the multiplexed objects set must be performed.


Detailed Description

DPWSCore Reactor support services.


Function Documentation

int dcpl_reactor_init ( struct reactor *  reactor,
int  family,
uint16_t  port,
struct dcpl_error error 
)

Initialize platform-specific features (only) for a reactor, especially interruption specific data.

Parameters:
reactor The reactor structure.
family The DCPL address family for the wake up socket if this method is used for interrupting the reactor.
port The (UDP) port number for the wake up socket if this method is used for interrupting the reactor.
[out] error A structure to get detailed error information.
Returns:
DCPL_OK or any DCPL error code.

int dcpl_reactor_free ( struct reactor *  reactor,
struct dcpl_error error 
)

Uninitialize platform-specific features (only) for a reactor initialized with dcpl_reactor_init, especially interruption specific data.

Parameters:
reactor The reactor structure.
[out] error A structure to get detailed error information.
Returns:
DCPL_OK or any DCPL error code.

int dcpl_reactor_wait ( struct reactor *  reactor,
uint64_t  next_date,
struct reactor_item **  active_list,
struct dcpl_error error 
)

Platform-specific function for multiplexing I/O and timer.

Corresponds to the BSD select semantics, with interrupt capabilities.

Parameters:
reactor The reactor structure containing all sockets.
next_date the latest absolute date in ms (compared to the platform RT clock) when the call must return. A 0 value means no limit.
[out] active_list Contains all active sockets.
[out] error A structure to get detailed error information.
Returns:
A positive value indicating the number of active sockets, 0 when a timeout occurs, and a negative value containing the error number on failure.

int dcpl_reactor_interrupt ( struct reactor *  reactor,
struct dcpl_error error 
)

Platform-specific function for interrupting the wait function, when changes in the multiplexed objects set must be performed.

The default technique is to use a wake up socket sending a datagram to the dcpl_reactor_wait implementation. However implementors are encouraged to used other platform-specific techniques...

Parameters:
reactor The reactor structure.
[out] error A structure to get detailed error information.
Returns:
DCPL_OK or any DCPL error code.


Generated on Fri Apr 17 15:18:24 2009 for DPWSCore by  doxygen 1.5.8