//<Summary> //get value from a simulation //</Summary> public override void recvFromSim(sinter_Sim o_sim) { //this reads back the inputs // It's handy for default generation. // try // { if (!isSetting) { if (type == sinter_IOType.si_DY_DOUBLE_VEC) { o_sim.recvVectorFromSim <double>(addressStrings[0], get_vectorIndicies(o_sim), (double[])o_value); ((double[][])o_TimeSeriesValues)[o_TimeSeriesIndex] = (double[])o_value; //Store it properly in the timevalues } else if (type == sinter_IOType.si_DY_INTEGER_VEC) { o_sim.recvVectorFromSim <int>(addressStrings[0], get_vectorIndicies(o_sim), (int[])o_value); ((int[][])o_TimeSeriesValues)[o_TimeSeriesIndex] = (int[])o_value; //Store it properly in the timevalues } else if (type == sinter_IOType.si_DY_STRING_VEC) { o_sim.recvVectorFromSim <string>(addressStrings[0], get_vectorIndicies(o_sim), (string[])o_value); ((string[][])o_TimeSeriesValues)[o_TimeSeriesIndex] = (string[])o_value; //Store it properly in the timevalues } } }
//<Summary> //get value from a simulation //</Summary> public override void recvFromSim(sinter_Sim o_sim) { if (!isSetting) { if (type == sinter_IOType.si_DOUBLE_VEC) { o_sim.recvVectorFromSim <double>(addressStrings[0], get_vectorIndicies(o_sim), (double[])o_value); } else if (type == sinter_IOType.si_INTEGER_VEC) { o_sim.recvVectorFromSim <int>(addressStrings[0], get_vectorIndicies(o_sim), (int[])o_value); } else { o_sim.recvVectorFromSim <string>(addressStrings[0], get_vectorIndicies(o_sim), (string[])o_value); } } }