mostAsNtfFunctionEnable, mostAsNtfFunctionDisable, mostAsNtfFunctionIsEnabled
CAPL Functions » MOST » mostAsNtfFunctionEnable, mostAsNtfFunctionDisable, mostAsNtfFunctionIsEnabled Valid for: CANoe DEFunction Syntax
long mostAsNtfFunctionEnable(long functionID, char cbSendStatus[]);long mostAsNtfFunctionDisable(long functionID);long mostAsNtfFunctionIsEnabled(long functionID);
Description
mostAsNtfFunctionEnable() enables the notification service for a function. The notification service must be enabled with mostAsNtfEnable() for the function block beforehand.
The service must have the name of a CAPL function that generates and sends the status message of the properties. This is necessary so that the service can send the current value of the properties with the FBlock.Notification.Set(SetFunction/SetAll) message to the client when registering a client (see MOST Specification 2.3 Section 2.3.12).
The CAPL function must be defined by the user and display the following signature:
long <FunctionName>(long destAdr)- or
long <FunctionName>(long destAdr, long fblockID, long instID, long functionID)
mostAsNtfFunctionDisable() disables the notification service for the function.
mostAsNtfFunctionIsEnabled() returns 1 if the notification service is enabled for the function.
Database support:
The special value functionID=-1 triggers the execution of the CAPL function for all MOST functions from the function catalog meeting the following criteria:
- The MOST function must be of the “Property” type.
- A function with the name cbSendStatus+
<MOST function name>needs to be defined in the CAPL program to generate and send the status message.
Parameters
- functionID: Function ID or -1 for all functions of the function block from the database.
- cbSendStatus[]: Name of the CAPL function that generates and sends the status message. If functionID=-1, cbSendStatus designates the prefix of the CAPL send functions to be defined. If an empty character string is specified, the default prefix “SendStatus_” is used.