tablestore demux

writes and outputs values to a table at position 'i' + 'offset'.
Author: robert schirmer
License: BSD
Github: rbrt/data/tablestore demux.axo

Inlets

frac32 in

int32 i

int32 sets an offset for writing to the table

Outlets

frac32 v0

frac32 v1

frac32 v2

frac32 v3

Attributes

objref table

spinner offset

Declaration
uint32_t prev;
Init
prev = 0;
Control Rate
if ((inlet_i == 0) && (inlet_in != prev))
  attr_table.array[inlet_offset + 0 + attr_offset] =
      __SSAT(inlet_in, 28) >> attr_table.GAIN;
if ((inlet_i == 1) && (inlet_in != prev))
  attr_table.array[inlet_offset + 1 + attr_offset] =
      __SSAT(inlet_in, 28) >> attr_table.GAIN;
if ((inlet_i == 2) && (inlet_in != prev))
  attr_table.array[inlet_offset + 2 + attr_offset] =
      __SSAT(inlet_in, 28) >> attr_table.GAIN;
if ((inlet_i == 3) && (inlet_in != prev))
  attr_table.array[inlet_offset + 3 + attr_offset] =
      __SSAT(inlet_in, 28) >> attr_table.GAIN;

prev = inlet_in;

outlet_v0 =
    attr_table
        .array[__USAT((inlet_offset + 0 + attr_offset), attr_table.LENGTHPOW)]
    << attr_table.GAIN;
outlet_v1 =
    attr_table
        .array[__USAT((inlet_offset + 1 + attr_offset), attr_table.LENGTHPOW)]
    << attr_table.GAIN;
outlet_v2 =
    attr_table
        .array[__USAT((inlet_offset + 2 + attr_offset), attr_table.LENGTHPOW)]
    << attr_table.GAIN;
outlet_v3 =
    attr_table
        .array[__USAT((inlet_offset + 3 + attr_offset), attr_table.LENGTHPOW)]
    << attr_table.GAIN;

Privacy

© 2024 Zrna Research