FormattedString

This block emulates the snprintf functionality of C/C++.

    FormattedString

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

FormattedString_0

NameLabelDescriptionData TypeValid 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
1

Ports

NameTypeDescriptionIO TypeNumber

Port 1

explicit

input

nin

Port 2

explicit

output

1

Port 3

activation

input

externalActivation