Table Of Contents

Previous topic

OSC Block

Next topic

Built-In Generator Blocks

This Page

Serial Block


Declaration

SerialIn ()
SerialOut ()
LABEL:
  • definition : the label of the block
SIZE:
  • definition : the size of the block bundle

  • port type :
    • constant integer port (CIP)

Ports Table

TABLE GOES HERE.


Description

DESCRIPTION GOES HERE


Code Examples

# SerialInAddresses and SerialOutAddresses will be the default value for 'addressList' for SerialIn() and SerialOut()
# This will force the user to create them as constants
# There can be multiple serial devices

constant SerialInAddresses { value: [ '/LSE', '/LSF', '/LSG' ] }
constant SerialOutAddresses { value: [ '/RMS_Value' ] }

switch LowShelfEnable [2] {}                            # Type would be boolean
signal LowShelfFreq [2] { defaqult: 200 }       # Would listen to i
signal LowShelfGain { default: 1.0 }            # Would listen to i and f
signal RmsValue [2] { default: 0.0 }            # Would broadcast f 0.0

# Single target
SerialIn ( device: 1 addressList: SerialInAddresses address: '/LSE/1' ) >> LowShelfEnable[1];

# Multiple targets at same address
SerialIn ( device: 1 addressList: SerialInAddresses address: '/LSE' ) >> LowShelfEnable;

# Multiple targets at multiple addresses
SerialIn ( device: 1 addressList: SerialInAddresses address: [ '/LSF', '/LSG' ] ) >> [ LowShelfFreq, LowShelfGain ];


# Single target
RmsValue[1] >> SerialOut ( device: 1 addressList: SerialOutAddresses address: [ '/RMS_Value/1' ] );

# Multiple targets
RmsValue >> SerialOut ( device: 1 addressList: SerialOutAddresses address: [ '/RMS_Value' ] );

# Multiple targets on Multiple Devices
RmsValue >> SerialOut ( device: [ 1, 2 ] addressList: SerialOutAddresses address: [ '/RMS_Value' ] );