Main Content

getHandlesToBlockStorages

Class: simevents.SimulationObserver
Namespace: simevents

Return storage handles of specified block

Syntax

getHandlesToBlockStorages(obj,blkPath)

Description

getHandlesToBlockStorages(obj,blkPath) returns the storage handles for the block specified by blkPath. If the block does not store entities, this method returns a 0x0 array of simevents.Storage objects.

Input Arguments

expand all

Object of class SimulationObserver

Full path to the block that stores entities

Output Arguments

expand all

Array of storage handles of the block. If the block does not store entities, output is a 0x0 array of storage.

Examples

expand all

Get handles for all block storage elements in the model.

function postEntry(obj,evSrc,evData)
   % Number of entities in server;
   storage=getHandlesToBlockStorages(obj,[this.mModel '/Have Dinner']);
   disp(length(storage.Entity));
end

Version History

Introduced in R2016a