//sciprint("callf type=%d flag=%d\n",block->type,flagi);
switch (block->type)
{
- /*******************/
- /* function type 0 */
- /*******************/
+ /*******************/
+ /* function type 0 */
+ /*******************/
case 0 :
{
/* This is for compatibility */
return scicos_time;
}
/*--------------------------------------------------------------------------*/
+/*! \brief set the current simulation time before calling blocks
+ *
+ * As some of the blocks call get_scicos_time(), this is the only way to force
+ * a local time for these blocks. This call does not modify the Xcos solver
+ * time but is only used to step to a future point while calling blocks.
+ */
+void set_scicos_time(double t)
+{
+ scicos_time = t;
+}
+/*--------------------------------------------------------------------------*/
/* get_block_number : return the current
* block number
*/