Table of Contents
quanser.communications.stream.get_character_format
Returns the character format of the stream.
[format, err] = stream.get_character_format
Returns the character format used by the functions that send and receive characters. The result of this function may change after the first receive operation has been performed on the stream since the character format is determined automatically by default from the byte order mark, if present, at the beginning of the stream.
The FORMAT output will be one of the t_stream_format enumeration values:
STREAM_FORMAT_AUTO |
= character format is determined from byte order mark (if present) read from the stream. |
STREAM_FORMAT_UTF8 |
= using the Unicode UTF8 character set (8-bit Unicode) |
STREAM_FORMAT_UTF16 |
= using the Unicode UTF16 character set (16-bit Unicode) |
STREAM_FORMAT_UTF32 |
= using the Unicode UTF32 character set (32-bit Unicode) |
STREAM_FORMAT_MULTIBYTE |
= using a multibyte character set |
This operation is not valid on listening streams created using quanser.communications.stream.listen.
If no err output is provided then it throws an exception if an error occurs. In generated code it prints the error message. Use qc_get_error_message to get the message associated with an error code.
stream
Stream handle returned by quanser.communications.stream.connect or accept.
This function has no outputs.
fmt = stream.get_character_format; % Gets the character format of the specified stream.
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.