Method: RCSimCinterface.rcsim_write_index_fixnum_seq
- Defined in:
- ext/hruby_sim/hruby_rcsim_build.c
.rcsim_write_index_fixnum_seq(signalV, idxV, valR) ⇒ Object
Transmit a Ruby fixnum inside a C signal array at an index in a blocking fashion. NOTE: the simulator events are updated.
1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 |
# File 'ext/hruby_sim/hruby_rcsim_build.c', line 1737
VALUE rcsim_write_index_fixnum_seq(VALUE mod, VALUE signalV, VALUE idxV, VALUE valR) {
/* Get the C signal from the Ruby value. */
SignalI signal;
value_to_rcsim(SignalIS,signalV,signal);
// /* Get its base type.*/
// Type base = get_type_vector(get_type_bit(),signal->type->base);
/* Get the index. */
unsigned long long idx = FIX2LONG(idxV);
/* Compute the simulation value from valR. */
Value value = get_value();
value->type = signal->type;
value->numeric = 1;
value->data_int = FIX2LONG(valR);
/* Transmit it. */
transmit_to_signal_range_num_seq(value, signal, idx,idx);
/* End, return the transmitted expression. */
return valR;
}
|