Stream Send Stream Set Property navigation bar

Table of Contents

Stream Get Property

Gets the values of stream properties.

Library

QUARC Targets/Communications/Advanced

Description

Stream Get Property

The Stream Get Property block gets properties of the stream after the stream is created. The operation of this block is not affected by the blocking mode of the stream connected to its input. Changes to stream properties are reflected immediately.

Limitations

Protocols

Warning Communications protocols generally support only a few, if any, stream properties. Properties are provided to retrieve characteristics of the stream after the stream is created.

Helpful Hints

Other uses of this block

Hint Although it is intended for use with the other Advanced stream blocks, the Stream Get Property block may also be used with the Intermediate stream blocks.

UDP Protocol - Peer Address

Hint The string STREAM_PROPERTY_PEER_ADDRESS property may be used with the UDP protocol to get the IP address and port of the socket's peer.

Input Ports

stm

A reference to the stream created by the Stream Connect or Stream Accept block. If the stream is closed or is otherwise invalid then the negative error code -QERR_INVALID_STREAM is returned by the err output.

Output Ports

stm

A reference to the stream. This output is merely a copy of the stm input. Providing this output makes it much easier to establish the execution order of Stream blocks in the diagram because Simulink generally executes daisy-chained blocks in sequence.

value

This output contains the value(s) of the selected properties. It will be a vector of the same length as the Property code(s) parameter for boolean, integer and double properties. For string properties, it will have a maximum length equal to the Maximum length parameter. If the Use variable-size output option is checked then it will be variable-sized.

err

An int32 value indicating whether the properties were retrieved successfully. It will be zero on success and a negative error code otherwise. See Error Codes for the different error codes and their values. Use the Compare to Error block rather than the error code itself to check for specific error codes. To check for errors in general use the Compare to Zero block to check whether the err output is less than zero.

Data Type Support

The Stream Get Property block only supports signals consistent with the selected property type.

Parameters and Dialog Box

Stream Get Property

Type of property

The type of property to retrieve. Each property type has its own set of property codes so boolean property "0" is not the same as integer property "0". This parameter should be set first as it affects the property codes that may be selected.

Property code(s) (tunable offline)

A vector of integers specifying the properties to set. Each property of a stream has an associated integer code to identify that property. To select properties based on their name, use the browse button (labelled "...") beside the Property code(s) edit field.

Maximum length

This parameter is only visible when the Type of property is set to string. It specifies the length of the output string. If the Use variable-size output option is checked then it is the maximum length of the output string.

Use variable-size output

This parameter is only visible when the Type of property is set to string. If it is checked then the value output will be a variable-size signal. Otherwise it will be a fixed dimension. The string output may be displayed using the String Display block.

Targets

Target Name

Compatible*

Model Referencing

Comments

QUARC Win32 Target

Yes

Yes

QUARC Win64 Target

Yes

Yes

QUARC Linux Nvidia Target

Yes

Yes

QUARC Linux QBot Platform Target

Yes

Yes

QUARC Linux QCar 2 Target

Yes

Yes

QUARC Linux QDrone 2 Target

Yes

Yes

QUARC Linux Raspberry Pi 3 Target

Yes

Yes

QUARC Linux Raspberry Pi 4 Target

Yes

Yes

QUARC Linux RT ARMv7 Target

Yes

Yes

QUARC Linux x64 Target

Yes

Yes

QUARC Linux DuoVero Target

Yes

Yes

QUARC Linux DuoVero 2016 Target

Yes

Yes

QUARC Linux Verdex Target

Yes

Yes

QUARC QNX x86 Target

Yes

Yes

Last fully supported in QUARC 2018.

Rapid Simulation (RSIM) Target

Yes

Yes

S-Function Target

No

N/A

Old technology. Use model referencing instead.

Normal simulation

Yes

Yes

If the block which created the stream is not active during normal simulation, then the Stream Get Property block does nothing. Otherwise it gets the properties of the stream.

* Compatible means that the block can be compiled for the target.

See Also

 

navigation bar