addEvent(interface,eventType,newEvent)
adds the user-defined event newEvent of type
eventType to the custom interface interface in
the MATLAB®
System object™ that models the behavior of an actor in RoadRunner Scenario.
MATLAB
System object interface, specified as a matlab.system.interface.*
object. The custom interface allows you to accept and process user-defined events
defined in RoadRunner Scenario.
Example: interface = ActorInterface();
Event type that the custom interface accepts for further processing, specified as
UserDefinedEvent.
User-defined event, specified as a
matlab.system.interface.UserDefinedEvent object. To define the input
types, use the command newEvent =
matlab.system.interface.UserDefinedEvent(eventName, eventElements).
eventName — Defines the name of the user-defined event. This
value is specified as a character array.
eventElements — Defines the elements of a user-defined event.
This value is specified as a structure that is initialized in the form s =
struct(field1,value1,...,fieldN,valueN), where fieldN
is the name of the Nth field, and valueN is
its corresponding value.