Constants
| [Menu] |
|
Description Line type for get or put data.
|
| [Menu] |
|
Description The value of SJ_ERR_OK is "0". the other error codes have negative values.
|
| [Menu] |
|
Description This parameter is specified when creating a general-purpose stream joint. This parameter determines whether or not to link data chunks that are supplied by the SJ_PutChunk function.
|
Process Macros
| [Menu] |
|
Format int SJUNI_CALC_WORK(nck); Input nck: The number of chunks Output None. Return Value Work area size (bytes) Description Calculates the work area size for a general-purpose stream joint. |
Data Types
| [Menu] |
|
Description This is a library identifier that is uniquely defined in terms of time and space. Executing UUIDGEN.EXE or some similar function of Visual C++ yields a code; these codes are defined within each library for each of the following members.
Example
|
| [Menu] |
|
Description This handle is used to control the stream joint. |
| [Menu] |
|
Description Data structure is used for data streaming by SJ.
|
Functions
| [Menu] |
|
Format void SJ_Destroy(SJ sj); Inputs sj : Stream joint Outputs None Return Value None Description Deletes a stream joint. |
| [Menu] |
| [Menu] |
|
Format void SJ_GetChunk(SJ sj, Sint32 id, Sint32 nbyte, SJCK *ck); Inputs sj : Stream joint id : Chunk input/output ID (SJ_LIN_DATA / SJ_LIN_FREE) nbyte : Amount of data requested (unit: bytes) Outputs ck : Data chunk (data starting address/size) Return Value None Description This function gets the area (data chunk) that can be read or written from a stream joint when writing or reading a buffer. |
| [Menu] |
|
Format void SJ_UngetChunk(SJ sj, Sint32 id, SJCK *ck); Inputs sj : Stream joint id : Chunk input/output ID (SJ_LIN_DATA / SJ_LIN_FREE) ck : Data chunk (data starting address/size) Outputs None Return Value None Description When a data chunk that was gotten could not actually be written or read, this function returns the area (data chunk) that could not be read/written back to the stream joint. |
| [Menu] |
|
Format void SJ_PutChunk(SJ sj, Sint32 id, SJCK *ck); Inputs sj : Stream joint id : Chunk input/output ID (SJ_LIN_DATA / SJ_LIN_FREE) ck : Data chunk (data starting address/size) Outputs None Return Value None Description When a data chunk that was gotten was actually written or read, this function puts the area (data chunk) that was read/written back to the stream joint. |
| [Menu] |
|
Format Sint32 SJ_GetNumData(SJ sj, Sint32 id); Inputs sj : Stream joint id : Chunk input/output ID (SJ_LIN_DATA / SJ_LIN_FREE) Outputs None Return Value Amount of data that can be read/written (unit: bytes) - When writing: Amount of free space. - When reading: Amount of data. Description When writing data to a stream joint, this function gets the free space in the buffer; when reading data, this function gets the amount of data in the buffer. |
| [Menu] |
|
Format UUID *SJ_GetUuid(SJ sj); Inputs sj : Stream joint Outputs None Return Value Stream joint UUID Description This function gets the stream joint UUID. |
| [Menu] |
|
Format void SJ_EntryErrFunc(SJ sj, Sint32 id, void (*func)(void *obj, Sint32 ecode), void *obj); Inputs sj : Stream joint id : Chunk input/output ID (SJ_LIN_DATA / SJ_LIN_FREE) func : Function to be called when an error occurs obj : First parameter of "func" function Outputs None Return Value None Description This function registers which function is to be called when an error is generated. If "NULL" is set for "func", no error processing function is registered. |
| [Menu] |
|
Format void SJ_SplitChunk(SJCK *ck, Sint32 nbyte, SJCK *ck1, SJCK *ck2); Inputs ck : Data chunk to be split nbyte : Size of ck1 (unit: bytes) Outputs ck1 : First half of data chunk that was split ck2 : Second half of data chunk that was split Return Value Size of data chunk ck2 (unit: bytes) Description This function splits the data chunk ck into data chunks ck1 and ck2. ck1 has a length indicated by "nbyte". If the size of ck1 is less than the value of "nbyte", the chunk is not split and ck is substituted into ck1. The size of ck2 is then "0". The same value may be specified for ck1 and ck. To simply split a chunk, use the following description. Example
|
| [Menu] |
|
Format void SJRBF_Init(void); Inputs None Outputs None Return Value None Description This function initializes a ring buffer-type stream joint. |
| [Menu] |
|
Format SJ SJRBF_Create(Sint8 *buf, Sint32 bsize, Sint32 xsize); Inputs buf : Ring buffer bsize : Size of ring buffer (unit: bytes) xsize : Size of extra buffer (unit: bytes) Outputs None Return Value Stream joint Description
This function creates a ring buffer-type stream joint. The buffer allocated by 'bsize+xsize' is specified to 'buf'. |
| [Menu] |
|
Format void SJMEM_Init(void); Inputs None Outputs None Return Value None Description This function initializes a memory-type stream joint. |
| [Menu] |
|
Format SJ SJMEM_Create(Sint8 *data, Sint32 bsize); Inputs data : Data area bsize : Data size (unit: bytes) Outputs None Return Value Stream joint Description This function creates a memory-type stream joint. |
| [Menu] |
|
Format void SJUNI_Init(void); Inputs None Outputs None Return Value None Description This function initializes a general-purpose stream joint. |
| [Menu] |
|
Format SJ SJUNI_Create(Sint32 mode, Sint8 *work, Sint32 wksize); Inputs mode : Linking mode (SJUNI_MODE_SEPA, SJUNI_MODE_JOIN) work : Work area wksize : Size of work area Outputs None Return Value Stream joint Description This function creates a general-purpose stream joint. If this stream joint will handle separated data chunks, specify SJUNI_MODE_SEPA. If this stream joint will handle linked data chunks, specify SJUNI_MODE_JOIN. Allocate a work area that can accommodate the maximum number of data chunks that the stream joint will handle, and pass "work" and "wksize" as parameters. Example
|