4.4.2 LISA+ protocol behavior prototype syntax

The syntax of behavior prototypes is similar to the syntax of behaviors in components. The main differences are that behavior prototypes can have specific attributes, and do not require a body.

attributes behavior name[(formal_args)][:return_type];
attributes behavior name[(formal_args)][:return_type]
{
    // Default implementation. Can be empty
}
attributes
a combination of optional, master, and slave. There are restrictions.
name
the name of the protocol behavior, any C identifier. Each name can only occur once in the protocol definition. Overloaded behavior prototypes are not permitted.
formal_args

the formal arguments of the behavior. The syntax is the same as for C++ function declarations. If you define types, define them in a header file that you include in the includes section.

You can use the native C/C++ types and the native LISA+ types without an include statement. Behaviors can optionally mark one argument as an address parameter by placing the ADDRESS keyword before the type of the formal argument.

If the argument list is empty, you can omit the opening and closing parentheses. You can also omit the names of the formal arguments. Variable number of arguments and default values are not permitted.

return_type
the type of the return value of that behavior. You can omit the return type if it is void. In this case, also omit the colon, :.
Non-ConfidentialPDF file icon PDF version101092_0100_04_en
Copyright © 2014–2018 Arm Limited or its affiliates. All rights reserved.