Main Content

isCallbackEnabled

Determine whether custom callbacks are enabled

Since R2024a

Description

example

status = isCallbackEnabled(spreadsheet,callbacks) returns true for each custom callback in callbacks that is enabled.

Examples

collapse all

Create a new spreadsheet in the Safety Analysis Manager.

mySpreadsheet = safetyAnalysisMgr.newSpreadsheet;

Add custom callbacks named myCustomCallback1, myCustomCallback2, and myCustomCallback3 to the spreadsheet.

addCallback(mySpreadsheet,"myCallback1")
addCallback(mySpreadsheet,"myCallback2")
addCallback(mySpreadsheet,"myCallback3")

Enable the first two callbacks and disable the third.

sheetNames = ["myCallback1","myCallback2",...
"myCallback3"];
enableCallback(mySpreadsheet,sheetNames,[1,1,0])

Check that the first two callbacks are enabled and the last is disabled.

isCallbackEnabled(mySpreadsheet,sheetNames)
ans =

  1×3 logical array

   1   1   0

Input Arguments

collapse all

Spreadsheet in the Safety Analysis Manager, specified as a Spreadsheet object.

Custom callback names, specified as a string array or cell array of character vectors.

Data Types: char | string

Output Arguments

collapse all

Whether the callbacks are enabled, returned as a 1 or 0 of data type logical. Each value corresponds to the element with them same index in the callbacks input argument.

Version History

Introduced in R2024a