FormattedString
This block emulates the snprintf functionality of C/C++.
Library
SignalConversions
Description
The snprintf() function in C/C++ formats and stores a string and it may use the "n" argument to specify the maximum number of characters.
If the resulting string is longer than "n-1" characters, the remaining ones are discarded.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
fmt | Format | Defines the format of the formatted string. The format supports all the C/C++ specifiers, but does not support the * width and precision. You can refer to the C/C++ printf documentation for more information. | String | |
nin | Number of inputs | Defines the number of inputs of the block. | Number | |
externalActivation | External activation | Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected. | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | input | nin | |
Port 2 | explicit | output | 1 | |
Port 3 | activation | input | externalActivation |