Raptor-Dev-Strings
Return to the main Raptor page
Return to the Essential Libraries page
The blocks in this subsystem are used to store and reference text data.
Blocks
Block | Description | Appearance |
---|---|---|
Raptor String |
This block is used to create a string which can be used to store text data. Strings behave differently from other native simulink data types in that they are always accessed by reference. This means that only one copy of the data exists. This means that if a string handle is run to two blocks and the first block modifies the string, the second block will see the modified string even if it is not connected to the output of the first block. This is due to the large memory requirement of most strings. The size of the string must be set before compiling. The size of the string represents the largest amount of data that it can hold. A string can have less data in it than its size. It is best to set the size to the longest string that will be stored. Setting the size significantly higher can lead to high memory use. |
|
Raptor Array to String |
This block copies the data in a uint8 array into a string. |
|
Raptor String Length |
This block outputs the current length of the string. The length is different from the size of the string defined in the raptor_string block. The length represents the length of data in the string. |
|
Raptor Printf |
This is used to format numerical or other types of data into a string according to the provided format string. The format string is a standard C format string. A format string can contain both text to be output to the string and format specifiers which are used to output data from another input port to the string. The input ports for this block will be created based on the format string entered in the parameter. To output a % to the output use %%. |
|
Raptor String Reference |
This block outputs a duplicate string handle for a string which was already defined with the raptor_string block. |
|
Raptor Scanf |
This is used to read numerical or other types out of a string according to the provided format string. The format string is a standard C format string. A format string can contain both text to be matched and format specifiers which are used to read data from the string. The output ports for this block will be created based on the format string entered in the parameter. To match a % to the string use %%. |
|
Raptor String to Array |
This block outputs a copy of string data in a uint8 array. |