tablestore 4

writes and outputs 4 values to a table.
Author: robert schirmer
License: who cares
Github: rbrt/data/tablestore 4.axo

Inlets

frac32 v0

frac32 v1

frac32 v2

frac32 v3

int32 sets an offset for writing to the table

Outlets

frac32 v0

frac32 v1

frac32 v2

frac32 v3

Attributes

objref table

Declaration
uint32_t prev0;
uint32_t prev1;
uint32_t prev2;
uint32_t prev3;
Init
prev0 = 0;
prev1 = 0;
prev2 = 0;
prev3 = 0;
Control Rate
if (inlet_v0 != prev0) {
  attr_table.array[inlet_offset + 0] = __SSAT(inlet_v0, 28) >> attr_table.GAIN;
  outlet_v0 = attr_table.array[__USAT((inlet_offset + 0), attr_table.LENGTHPOW)]
              << attr_table.GAIN;
  prev0 = inlet_v0;
} else {
  outlet_v0 = attr_table.array[__USAT((inlet_offset + 0), attr_table.LENGTHPOW)]
              << attr_table.GAIN;
}

if (inlet_v1 != prev1) {
  attr_table.array[inlet_offset + 1] = __SSAT(inlet_v1, 28) >> attr_table.GAIN;
  outlet_v1 = attr_table.array[__USAT((inlet_offset + 1), attr_table.LENGTHPOW)]
              << attr_table.GAIN;
  prev1 = inlet_v1;
} else {
  outlet_v1 = attr_table.array[__USAT((inlet_offset + 1), attr_table.LENGTHPOW)]
              << attr_table.GAIN;
}

if (inlet_v2 != prev2) {
  attr_table.array[inlet_offset + 2] = __SSAT(inlet_v2, 28) >> attr_table.GAIN;
  outlet_v2 = attr_table.array[__USAT((inlet_offset + 2), attr_table.LENGTHPOW)]
              << attr_table.GAIN;
  prev2 = inlet_v2;
} else {
  outlet_v2 = attr_table.array[__USAT((inlet_offset + 2), attr_table.LENGTHPOW)]
              << attr_table.GAIN;
}

if (inlet_v3 != prev3) {
  attr_table.array[inlet_offset + 3] = __SSAT(inlet_v3, 28) >> attr_table.GAIN;
  outlet_v3 = attr_table.array[__USAT((inlet_offset + 3), attr_table.LENGTHPOW)]
              << attr_table.GAIN;
  prev3 = inlet_v3;
} else {
  outlet_v3 = attr_table.array[__USAT((inlet_offset + 3), attr_table.LENGTHPOW)]
              << attr_table.GAIN;
}

Privacy

© 2024 Zrna Research