FUNBEMSG(3)

NAME

beh_addbemsg , beh_delbemsg , beh_rmvbemsg , beh_frebemsg

SYNOPSYS

struct bemsg *beh_addbemsg (list, label, level, message, abl, bdd)
struct bemsg *list;
char *label;
char level;
char *message;
struct chain *abl;
struct node *bdd;
struct bemsg *beh_delbemsg (list, pnt, mode)
struct bemsg *list;
struct bemsg *pnt;
char mode;
struct bemsg *beh_rmvbemsg (list, label, mode)
struct bemsg *list;
char *label;
char mode;
void beh_frebemsg (list)
struct bemsg *list;

PARAMETERS

list
    pointer of a list of bemsg structures

label
    label of the assert instruction

level
    the severity level of the assert :

    E   for an assert with severity level ERROR

    W   for an assert with severity level WARNING

message
    a string representing the message printed in case of assert violation

abl the abl representing the expression specified in the assert's condition

bdd the bdd representing the expression specified in the assert's condition

pnt pointer of the bemsg structure to be removed from the list

mode
    recursive mode (Y or N)

DESCRIPTION

A bemsg structure represents a VHDL concurrent assert instruction.

beh_addbemsg() adds a bemsg structure at the top of a list of bemsg structures. The label registred in the bemsg structure is produced by namealloc(). The function returns the pointer of the new list. No checks are made by this function.

beh_delbemsg() deletes a bemsg structure (pointed by pnt) from a list of bemsg structures. The function returns the pointer of the new list. No action is made if the structure pointed by pnt doesn't belong to the list. If mode is set to 'Y' all objects (abl) pointed by the bemsg will also be deleted. If mode is set to 'N' and there is any object (abl) pointed by the bemsg a warning message is printed on the standard error output.

beh_rmvbemsg() deletes a bemsg structure (labeled label) from a list of bemsg structures. label is supposed to be produced by namealloc(). The function returns the pointer of the new list. No action is made if no structure labeled label has been found in the list. If mode is set to 'Y' all objects (abl) pointed by the bemsg will also be deleted. If mode is set to 'N' and there is any object (abl) pointed by the bemsg a warning message is printed on the standard error output.

beh_frebemsg() deletes a list of bemsg structures (pointed by list) and all objects (abl) pointed by any bemsg structure of the list. No action is made if list is an empty list (NULL pointer). No checks are made by this function.

EXAMPLE

#include <beh108.h>
struct bemsg *list;
char *label;
label = namealloc ("power_supply_check");
list = beh_addbemsg (list, label, 'E', "conflict on bus", NULL, NULL);
list = beh_rmvbemsg (list, label);

SEE ALSO

beh(3), log(1), bemsg(3), namealloc(3)