|
Practical FPGA Programming in C Authors: Pellerin D., Thibault S. Published year: 2005 Pages: 164-167/208 |
CO_STREAM_EOSint co_stream_eos(co_stream stream); Header Fileco.h DescriptionThis function checks if a stream is at an end-of-stream condition. This function must be called from within a process run function. ArgumentsThe argument for co_stream_eos is as follows :
Return ValueReturns an integer value: 0 if no end-of-stream is detected , and 1 if there is an end-of-stream. NotesWhen co_stream_eos returns 1 (true), subsequent calls to co_stream_eos continue to return 1 until the reader closes the stream. |
CO_STREAM_OPEN
co_error co_stream_open(co_stream stream,
mode_t mode,
co_type type);
Header Fileco.h DescriptionThis function opens a stream. It must be called from within a process run function. ArgumentsThe arguments for co_stream_open are as follows :
Return ValuePossible return values are listed, with the resulting value of co_errno shown in parentheses:
|
CO_STREAM_READ
co_error co_stream_read(co_stream stream,
void *buffer,
size_t buffersize);
Header Fileco.h DescriptionThis function reads a data packet from a previously opened stream. This function must be called from within a process run function. ArgumentsThe arguments for co_stream_read are as follows :
Return ValuePossible return values are listed, with the resulting value of co_errno shown in parentheses:
NotesThe co_stream_read function must be used only on streams that have been opened with mode O_RDONLY . The co_stream_read function blocks (waits) if the stream is empty or until the writer closes the stream. |
CO_STREAM_READ_NB
co_error co_stream_read_nb(co_stream stream,
void *buffer,
size_t buffersize);
Header Fileco.h DescriptionThis function reads a data packet from a previously opened stream but does not block if the stream is empty. This function must be called from within a process run function. ArgumentsThe arguments for co_stream_read_nb are as follows :
Return ValuePossible return values are listed, with the resulting value of co_errno shown in parentheses:
NotesThe co_stream_read_nb function must be used only on streams that have been opened with mode O_RDONLY . The co_stream_read_nb function does not block if the stream is empty. You must therefore check for a co_err_none return value to determine that a data value has been successfully read from the stream. |
|
Practical FPGA Programming in C Authors: Pellerin D., Thibault S. Published year: 2005 Pages: 164-167/208 |
![]() FPGA Prototyping By Verilog Examples: Xilinx Spartan-3 Version | ![]() 100 Power Tips For FPGA Designers | ![]() C++ Concurrency in Action: Practical Multithreading |