YBOS Bank Functions (ybk_xxx)
[The ybos.h & ybos.c]


Functions

void ybk_init (DWORD *plrl)
void ybk_create (DWORD *plrl, char *bkname, DWORD bktype, void *pbkdat)
INT ybk_close (DWORD *plrl, void *pbkdat)
INT ybk_size (DWORD *plrl)
INT ybk_list (DWORD *plrl, char *bklist)
INT ybk_find (DWORD *plrl, char *bkname, DWORD *bklen, DWORD *bktype, void **pbk)
INT ybk_locate (DWORD *plrl, char *bkname, void *pdata)
INT ybk_iterate (DWORD *plrl, YBOS_BANK_HEADER **pybkh, void **pdata)


Function Documentation

INT ybk_close DWORD *  plrl,
void *  pbkdat
 

Close the YBOS bank previously created by ybk_create().

The data pointer pdata must be obtained by ybk_create() and used as an address to fill a bank. It is incremented with every value written to the bank and finally points to a location just after the last byte of the bank. It is then passed to ybk_close() to finish the bank creation. YBOS is a 4 bytes bank aligned structure. Padding is performed at the closing of the bank with values of 0x0f or/and 0x0ffb. See YBOS bank examples.

Parameters:
plrl pointer to current composed event.
pbkdat pointer to the current data.
Returns:
number number of bytes contained in bank.

Definition at line 387 of file ybos.c.

void ybk_create DWORD *  plrl,
char *  bkname,
DWORD  bktype,
void *  pbkdat
 

Define the following memory area to be a YBOS bank with the given attribute. See YBOS bank examples.

Before banks can be created in an event, ybk_init(). has to be called first. YBOS does not support mixed bank type. i.e: all the data are expected to be of the same type. YBOS is a 4 bytes bank aligned structure. Padding is performed at the closing of the bank (see ybk_close) with values of 0x0f or/and 0x0ffb. See YBOS bank examples.

Parameters:
plrl pointer to the first DWORD of the event area.
bkname name to be assigned to the breated bank (max 4 char)
bktype YBOS Bank Types of the values for the entire created bank.
pbkdat return pointer to the first empty data location.
Returns:
void

Definition at line 274 of file ybos.c.

INT ybk_find DWORD *  plrl,
char *  bkname,
DWORD *  bklen,
DWORD *  bktype,
void **  pbk
 

Find the requested bank and return the infirmation if the bank as well as the pointer to the top of the data section.

Parameters:
plrl pointer to the area of event.
bkname name of the bank to be located.
bklen returned length in 4bytes unit of the bank.
bktype returned bank type.
pbk pointer to the first data of the found bank.
Returns:
YB_SUCCESS, YB_BANK_NOT_FOUND, YB_WRONG_BANK_TYPE

Definition at line 481 of file ybos.c.

void ybk_init DWORD *  plrl  ) 
 

Initializes an event for YBOS banks structure.

Before banks can be created in an event, ybk_init() has to be called first. See YBOS bank examples.

Parameters:
plrl pointer to the first DWORD of the event area of event
Returns:
void

Definition at line 244 of file ybos.c.

INT ybk_iterate DWORD *  plrl,
YBOS_BANK_HEADER **  pybkh,
void **  pdata
 

Returns the bank header pointer and data pointer of the given bank name.

Parameters:
plrl pointer to the area of event.
pybkh pointer to the YBOS bank header.
pdata pointer to the first data of the current bank.
Returns:
data length in 4 bytes unit. return -1 if no more bank found.

Definition at line 567 of file ybos.c.

Referenced by update_odb().

INT ybk_list DWORD *  plrl,
char *  bklist
 

Returns the size in bytes of the event composed of YBOS bank(s).

The bk_list() has to be a predefined string of max size of YB_STRING_BANKLIST_MAX.

Parameters:
plrl pointer to the area of event
bklist Filled character string of the YBOS bank names found in the event.
Returns:
number of banks found in this event.

Definition at line 432 of file ybos.c.

INT ybk_locate DWORD *  plrl,
char *  bkname,
void *  pdata
 

Locate the requested bank and return the pointer to the top of the data section.

Parameters:
plrl pointer to the area of event
bkname name of the bank to be located.
pdata pointer to the first data of the located bank.
Returns:
Number of DWORD in bank or YB_BANK_NOT_FOUND, YB_WRONG_BANK_TYPE (<0)

Definition at line 528 of file ybos.c.

INT ybk_size DWORD *  plrl  ) 
 

Returns the size in bytes of the event composed of YBOS bank(s).

Parameters:
plrl pointer to the area of event
Returns:
number of bytes contained in data area of the event

Definition at line 417 of file ybos.c.


Midas DOC Version 1.9.5 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel - Doxygen - Peter Green - Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Rudi Meier - Glenn Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou - Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk