transfer.h File Reference

#include "chromo.h"

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


Functions

int file_recv (char *filename, int sender, int msgid)
 Wait for file sent from sender.
int file_mcast (char *filename, int *recipients, int num, int msgtag)
 Multicast file to all recipients.
int file_send (char *filename, int recipient, int msgtag)
 Send file to one recipient.
int table_recv (population *pop, int num, int sender, int msgtag)
 Wait for timetables from sender.
int table_send (population *pop, int num, int recipient, int msgtag)
 Send timetables to a recipient.
populationpopulation_recv (int sender, int msgtag)
 Receive the entire population.
int population_send (population *pop, int recipient, int msgtag)
 Send the entire population.

Detailed Description


Function Documentation

int file_mcast ( char *  filename,
int *  recipients,
int  num,
int  msgtag 
)

Multicast file to all recipients.

Parameters:
filename File to multicast.
recipients Array of num task IDs.
num Number of recipients.
msgtag Message tag.
Returns:
0 on success and -1 on error.

int file_recv ( char *  filename,
int  sender,
int  msgtag 
)

Wait for file sent from sender.

Parameters:
filename File will be saved under this name.
sender Task ID of the sender task.
msgtag Message tag.
Returns:
0 on success and -1 on error.

int file_send ( char *  filename,
int  recipient,
int  msgtag 
)

Send file to one recipient.

Parameters:
filename File to multicast.
recipient Task ID of the recipient task.
msgtag Message tag.
Returns:
0 on success and -1 on error.

population* population_recv ( int  sender,
int  msgtag 
)

Receive the entire population.

Parameters:
sender Task ID of the sender task.
msgtag Message tag.
Returns:
Pointer to the allocated population struct or NULL on error.

int population_send ( population pop,
int  recipient,
int  msgtag 
)

Send the entire population.

Parameters:
pop Pointer to the population struct.
recipient Task ID of the recipient task.
msgtag Message tag.
Returns:
0 on success and -1 on error.

int table_recv ( population pop,
int  num,
int  sender,
int  msgtag 
)

Wait for timetables from sender.

Received timetables are stored at the end of the population.

Parameters:
pop Pointer to the population struct.
num Number of chromosomes to receive.
sender Task ID of the sender task.
msgtag Message tag.
Returns:
0 on success and -1 on error.

int table_send ( population pop,
int  num,
int  recipient,
int  msgtag 
)

Send timetables to a recipient.

Timetables are read from the start of the population.

Parameters:
pop Pointer to the population struct.
num Number of chromosomes to send.
recipient Task ID of the recipient task.
msgtag Message tag.
Returns:
0 on success and -1 on error.


Generated on Tue Jul 3 13:23:36 2007 for Tablix by  doxygen 1.5.2