Stream Get Property End of trail navigation bar

Table of Contents

Stream Set Property

Sets the values of stream properties.

Library

QUARC Targets/Communications/Advanced

MATLAB Command Line

Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:

qc_open_library('quarc_library/Communications/Advanced')

Description

Stream Set Property

The Stream Set Property block allows properties of the stream to be set 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 take effect immediately.

Limitations

Protocols

Warning Communications protocols generally support only a few, if any, stream properties. Properties are provided to allow characteristics of the stream to be modified 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 Set Property block may also be used with the Intermediate stream blocks.

I2C Protocol - Combined Messages

Hint The boolean STREAM_PROPERTY_IS_EXCLUSIVE_ACCESS property may be used with the I2C protocol to gain exclusive access to the I2C bus and combine multiple operations into a single I2C combined message. This property is used internally by the Stream Write-Read block for that very purpose.

UDP Protocol - Peer Address

Hint The string STREAM_PROPERTY_PEER_ADDRESS property may be used with the UDP protocol to set the IP address and port to which to send the next datagram when the peer=manual option is specified in the URI. The string is usually retrieved by getting this property first to determine the peer from which a datagram was last received.

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.

value

This input is only available when the Source of property value(s) parameter is set to external. It is the value(s) to assign to the selected properties. It must be a vector of the same length as the Property code(s) parameter.

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.

err

An int32 value indicating whether the properties were set 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 Set Property block only supports signals consistent with the selected property type.

Parameters and Dialog Box

Stream Set Property

Type of property

The type of property to set. 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.

Source of property value(s)

This parameter determines whether the values for the properties will be taken from the dialog (internal) or from an input port (external) of the block. Setting this parameter to internal enables the Property value(s) field, where the property values should be entered.

Changing the option to external causes an external input port labelled values to be added to the block. In this case, the property values should be wired to the values port. The size of the input vector must match the number of property codes selected in the Property code(s) parameter.

Property value(s) (tunable offline)

This parameter is only enabled when the Source of property value(s) parameter is set to internal. It should be a vector the same size as the Property code(s) parameter containing the values of the corresponding properties.

Set property once per connection

Checking this option causes the property to only be set when the stream is first created, rather than every time the block executes.

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 Set Property block does nothing. Otherwise it sets the properties of the stream.

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

See Also

 

navigation bar