Method: RCSimCinterface.rcsim_transmit_fixnum_to_signal_seq

Defined in:
ext/hruby_sim/hruby_rcsim_build.c

.rcsim_transmit_fixnum_to_signal_seq(signalV, valR) ⇒ Object

Transmit a Ruby fixnum to a signal in a non-blocking fashion. NOTE: the simulator events are updated.



1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
# File 'ext/hruby_sim/hruby_rcsim_build.c', line 1698

VALUE rcsim_transmit_fixnum_to_signal_seq(VALUE mod, VALUE signalV, VALUE valR) {
    /* Get the C signal from the Ruby value. */
    SignalI signal;
    value_to_rcsim(SignalIS,signalV,signal);
    /* Compute the simualtion value from valR. */
    Value value = get_value();
    value->type = signal->type;
    value->numeric = 1;
    value->data_int = FIX2LONG(valR);
    /* Transmit it. */
    transmit_to_signal_seq(value, signal);
    /* End, return the transmitted expression. */
    return valR;
}