Main Content
ssWriteOutputString
Write C string to output port
Since R2020b
Syntax
void ssWriteOutputString(SimStruct *S, int portIdx, const char_T* str)
Arguments
S
SimStruct that represents an S-Function block.
portIdx
Port to which to write string.
str
String to write to output port.
Description
ssWriteOutputString
writes a null-terminated C string to an
output port of string data type.
Limitations
Non-inlined S-functions that contain string SimStruct functions do not run with rapid accelerator mode.
Languages
C, C++
Examples
This example writes a string, str, to output port 0.
const char* str = "output string"; ssWriteOutputString(S, 0, str);
See Also
ssGetInputStringLength
, ssGetStringDataTypeMaxLength
, ssIsStringDataType
, ssReadInputString
, ssRegisterStringDataType
Version History
Introduced in R2020b