28.10.2014 Views

Synergy User Manual and Tutorial. - THE CORE MEMORY

Synergy User Manual and Tutorial. - THE CORE MEMORY

Synergy User Manual and Tutorial. - THE CORE MEMORY

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Synergy</strong> <strong>User</strong> <strong>Manual</strong> <strong>and</strong> <strong>Tutorial</strong><br />

cnf_tsread(id, tpname, tpvalue, tpsize)<br />

PURPOSE: Read a tuple from a named tuple space<br />

PARAMETERS: int id -<br />

int tpsize -<br />

char *tpname -<br />

char *tpvalue -<br />

RETURNS: int tpsize – the size of the tuple received if successful or an error<br />

code otherwise<br />

cnf_write(id, buf, bytes)<br />

PURPOSE:<br />

PARAMETERS:<br />

RETURNS:<br />

Send a 'record' to file (or mailbox or decnet channel) from buffer<br />

(starting at address buff). bytes is the number of bytes to send. id<br />

is the index into cnf_map global data structure where the actual<br />

channel number or file pointer is stored.<br />

int id – index into cnf_map for channel #/ptr<br />

int bytes – number of bytes to send/write<br />

char buf[] – address of message to send<br />

1 if successful or an error code otherwise<br />

cnf_xdr_fgets(id, buf, bufsize, e_type)<br />

PURPOSE:<br />

PARAMETERS:<br />

RETURNS:<br />

Read the external data representation of a line from file into buffer<br />

(starting at address xdr_buff) <strong>and</strong> translates it to C language.<br />

int id – The index into cnf_map global data structure where the<br />

actual channel number or file pointer is stored<br />

char *buf -<br />

int bufsize – the number of bytes to read<br />

int e_type -<br />

0 on EOF or number of bytes read on success otherwise an error<br />

code on error<br />

cnf_xdr_fputs(id, buf, bufsize, e_type)<br />

PURPOSE:<br />

Translates a line to it's external data representation <strong>and</strong> sends it to<br />

file from buffer (starting at address xdr_buff). .<br />

208

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!