Advanced Blocks Continuous Blocks navigation bar

Table of Contents > QUARC > Blocks > Blocks - By Category > Block Categories

Communications Blocks

The communications blocks provide a generic set of blocks which may be used with any of the QUARC communications protocols. The communication protocol and protocol parameters are specified with a Universal Resource Identifier or URI. Refer to QUARC Communications Protocols for a discussion of the different communications protocols available.

For using the QUARC communications protocols and other features in external applications, such as C/C++, .NET, or Java refer to the QUARC External Interfaces documentation.

For performing communications from a MATLAB script, refer to the QUARC MATLAB functions for communications.

Basic Communications Blocks

The basic communication blocks are the easiest to use but do not provide the full flexibility of the QUARC communications architecture. However, for most applications they are more than adequate and greatly simplify communications.

Stream Client

Connects to a remote host and sends and/or receives data from that host.

Stream Server

Listens for and accepts a connection from a remote host and sends and/or receives data from that host.

Stream State Constant

Outputs the value of a persistent stream state.

Stream State Comparison

Compares a signal to a persistent stream state.

Intermediate Communications Blocks

The intermediate communication blocks are more advanced than the basic blocks and provide more flexibility. They are intended to be used in the main diagram. Therefore, they only support non-blocking mode for communications where the blocks always return immediately.

Stream Call

Connects to a remote host.

Stream Answer

Listens for and accepts a connection from a remote host.

Stream Write

Sends data over a stream.

Stream Read

Receives data over a stream.

Stream Formatted Write

Sends formatted text over a stream.

Stream Formatted Read

Scans formatted data received over a stream.

Stream Write-Read

Sends and receives data atomically over a stream. This block is intended for use in the main diagram.

Stream Answer State Constant

Outputs the value of a particular Stream Answer block connection state.

Stream Answer State Comparison

Compares the connection state of a Stream Answer block to a particular state.

Stream Call State Constant

Outputs the value of a particular Stream Call block connection state.

Stream Call State Comparison

Compares the connection state of a Stream Call block to a particular state.

Advanced Communications Blocks

The advanced communication blocks provide the full flexibility of the QUARC communications framework but are lower-level blocks that require a more sophisticated knowledge of communications to be used. The advanced blocks support two modes: blocking and non-blocking.

In blocking mode, the blocks do not return until the operation requested is complete. As such, blocking mode is typically used in an asynchronous thread running at a lower priority so that the blocking I/O does not interfere with the sample time performance of the main diagram.

In non-blocking mode, the blocks always return immediately and may therefore be used in the main diagram without compromising sample time performance. However, a simple state machine is generally required to keep track of when a connection is established and data may be transmitted or received.

Invalid Stream

Outputs an invalid stream.

Stream Accept

Accepts a connection from a remote host.

Stream Close

Closes a stream.

Stream Connect

Connects to a remote host.

Stream Flush

Flushes data from the stream buffer to the underlying communication channel.

Stream Listen

Creates a stream that listens for connections from remote hosts.

Stream Poll

Polls for events associated with the stream.

Stream Print

Prints formatted data over a stream.

Stream Receive

Receives data over a stream.

Stream Scan

Scans formatted data received over a stream.

Stream Send

Sends data over a stream.

Stream Get Property

Gets the values of stream properties.

Stream Set Property

Sets the values of stream properties.

The Mavlink block set is designed to enable QUARC Simulink models to communicate with auto-pilots using the Mavlink protocol.

Mavlink Enumeration

Outputs the value of a Mavlink enumeration constant.

Mavlink Initialize

Establishes connections to Mavlink-based flight controllers.

Mavlink Receive

Receives data over a Mavlink connection.

Mavlink Send

Sends data over a Mavlink connection.

Multiwii Communication Blocks

The Multiwii block set is designed to enable QUARC Simulink models to communicate with auto-pilots using the Multiwii Serial protocol (MSP).

Multiwii Altitude

Reads the altitude of the aircraft.

Multiwii Analog

Reads the analog sensors, such as voltages and currents.

Multiwii Attitude

Reads the attitude of the aircraft.

Multiwii Bind

Binds to satellites.

Multiwii Box Identifiers

Gets the box identifiers used by the auto-pilot.

Multiwii Calibration

Calibrates auto-pilot sensors.

Multiwii Computed GPS

Gets the GPS coordinates relative to the home location.

Multiwii Connect

Connects to an auto-pilot. This block is intended for use in the main diagram.

Multiwii Debug

Gets debug values from the auto-pilot.

Multiwii EEPROM Write

Writes the settings to the auto-pilot EEPROM.

Multiwii Heading Lock

Sets a new heading lock reference.

Multiwii Identity

Gets information about the auto-pilot.

Multiwii IMU

Gets raw IMU sensor data from the auto-pilot.

Multiwii Motor Pins

Gets the motor pin indications from the auto-pilot.

Multiwii Names

Gets the names of the boxes or PID items from the auto-pilot.

Multiwii Read Actuators

Reads the commands for the servos or motors from the auto-pilot.

Multiwii Read Boxes

Reads the box items. Each word in the output array is a bitmask of activation switches.

Multiwii Read GPS

Reads the raw GPS data.

Multiwii Read Miscellaneous

Reads miscellaneous information from the auto-pilot, such as thresholds, triggers and counters.

Multiwii Read PID

Reads PID gains from the auto-pilot.

Multiwii Read RC

Reads RC values from the auto-pilot.

Multiwii Read RC Tuning

Reads RC tuning parameters from the auto-pilot.

Multiwii Read Servo Configuration

Reads the servo configuration from the auto-pilot.

Multiwii Read Waypoint

Reads the current waypoint from the auto-pilot.

Multiwii Reset Configuration

Resets all parameters to defaults in the auto-pilot.

Multiwii Select Setting

Select the setting configuration for the auto-pilot.

Multiwii Status

Gets the status of the auto-pilot.

Multiwii Write Actuators

Writes the commands for the motors to the auto-pilot.

Multiwii Write Boxes

Writes box items to the auto-pilot. Each word in the input array is a bitmask of activation switches.

Multiwii Write GPS

Writes raw GPS data to the auto-pilot. The data is injected into the GPS stream.

Multiwii Write Miscellaneous

Writes miscellaneous information from the auto-pilot, such as thresholds, triggers and counters.

Multiwii Write PID

Writes PID gains to the auto-pilot.

Multiwii Write RC

Writes raw RC values to the auto-pilot.

Multiwii Write RC Tuning

Writes RC tuning parameters to the auto-pilot.

Multiwii Write Servo Configuration

Writes the servo configuration to the auto-pilot.

Multiwii Write Waypoint

Writes a new waypoint to the auto-pilot.

NEES Communication Blocks

Deprecated The NEES communication blocks have been deprecated.

The NEES block set is designed to enable QUARC Simulink models to communicate with Quanser NEES Daemon. This set consists of blocks to connect to the daemon, and send/receive signals to/from it.

NEES Get Signals

Receives signals from the Quanser NEES Daemon.

NEES Initialize

Initializes a connection between the Simulink model and the Quanser NEES Daemon.

NEES Set Signals

Sends signals to Quanser NEES Daemon.

S.BUS Communication Blocks

The S.BUS block set is designed to enable QUARC Simulink models to communicate with and emulate S.BUS receivers.

SBus Read block

Reads an S.BUS frame and outputs its constituent parts.

SBus Write block

Writes an S.BUS frame to the given stream.

Serial Receiver Communication Blocks

The Serial Receiver block set is designed to enable QUARC Simulink models to communicate with and emulate serial receivers.

Serial Receiver Read block

Receives RC commands from a serial receiver.

Serial Receiver Write block

Emulates RC commands sent from a serial receiver.

 

navigation bar