Main Content

NNG Send

Send data through nanomsg next gen (NNG) using publish/subscribe protocol

Since R2023a

Add-On Required: This feature requires the Simulink Support Package for Raspberry Pi Hardware add-on.

  • Raspberry Pi NNG Send

Libraries:
Simulink Support Package for Raspberry Pi Hardware / Communication

Description

Use the NNG Send block to broadcast data to all applications subscribing to the same uniform resource locator (URL). The block uses a publish/subscribe protocol for all inter process communications. In the publish/subscribe protocol, each publisher that wants to send data publishes them on a certain URL while, each subscriber that wants to receive data subscribes to the same URL.

Ports

Input

expand all

The block accepts the input data to be published to the server, specified as a vector.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean

Output

expand all

The block outputs the status code issued by the publisher in response to the publish request. If the publisher accepts the message for publishing, the port outputs 0. Any nonzero output indicates that the publisher has rejected the message.

Data Types: int8

Parameters

expand all

Enter the name of the inter process communication (IPC). This IPC name reflects in the URL.

A URL is a service address used by the publisher to identify rightful subscribers for delivering data. This URL is used by the publisher to receive data sent on the same URL. The IPC name reflects in the URL.

Note

You cannot edit this parameter.

Select this option to save the response from the publisher to a log file each time the data is sent to subscribers. The name of the log file is the Simulink® model name followed by .log.

Version History

Introduced in R2023a