Event Button
Overview
If you want to add Data Events (markers) to signals, then insert the Event Button operator symbol in a channel bus: connect the original source to the left input of the Event Trigger and the output to the next operator.The event is put to the sample that is streaming through the Event Button operator, at the moment the button goes down.
Operator ports
Input S: Any sample type. The connection is not limited to one type of signal.Output S: Any sample type. The connection is not limited to one type of signal.
Paired User Interface Object
This operator is loaded simultaneously with a user interface object. The user interface object can be moved to another page, and would normally be displayed in the end-user application. The operator and this user interface object can never be separated. If you delete the operator, the user interface is deleted automatically as well. Note that you cannot delete the user interface, only the operator symbol!Properties
Find more information about changing properties here: linkEventCode
type: See descriptionA free-format code that will be added as Data Event to the signal when the button is pressed. The code may contain variables, and the special variable $IN[n]$.
Read more about variables here: link. Please note that variables are not always updated synchronously with data processing. This means that in some cases a variable may not yet contain the value that you expect it to have, at the time you trigger an event.
You may use the special variable $IN[n]$, where n is the channel number (1..N), meaning the value of the nth channel of the regular input signal at the moment of triggering. If you specify a channel that does not exist, or you don't have a floating point signal connected to the input (but another kind of signal), then $IN[n]$ will be substituted by xxxxx.
If you make an error in the syntax of the variable, you will see ?????. Please note that n must be a value, and cannot be a variable itself.
You may use the special variable $IN[n]$, where n is the channel number (1..N), meaning the value of the nth channel of the regular input signal at the moment of triggering. If you specify a channel that does not exist, or you don't have a floating point signal connected to the input (but another kind of signal), then $IN[n]$ will be substituted by xxxxx.
If you make an error in the syntax of the variable, you will see ?????. Please note that n must be a value, and cannot be a variable itself.
ButtonText
type: See descriptionThe text on the button.
ButtonFormat
type: Known button type nameThe name of the button format in the Button Repository, used to draw this button.
This property selects a button layout from the Button Repository. For more information about the use of buttons in a project, refer to link
Caption
type: Word or phraseThe name of the object in the project. This name must not contain '.' or '$' characters.
Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.
Documentation
type: See descriptionOptional documentation of this object.
It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.
Variable Parameters
Find more information about Variable Parameters here: linkEventCode
type: See descriptionA free-format code that will be added as Data Event to the signal when the button is pressed.
ButtonText
type: See descriptionThe text on the button.
EventCodeAndButtonText
type: See descriptionA free-format code that will be added as Data Event to the signal when the button is pressed. The button will automatically show the same code as button text.
If the Event Code and the button text are not equal, then this variable shows the Event Code. If a new code is set, then the button text changes to that same code.
Functions
Find more information about Functions here: linkEnable
Sets the button to Enabled, so that it accepts user input.Disable
Sets the button to Disabled, so that it does not accept any user input.
Details
For more information about Data Event, see link.The EventCode can be changed in the properties dialog, but also using the Variable Parameter EventCode, so that you can change the EventCode from within an application. If you require the button to show the same code, then you could also choose to use the parameter EventCodeAndButtonText.