Beispiel #1
0
 /// <summary>
 /// Retrieves the private field value from the current simulator object
 /// </summary>
 /// <param name="memberName"></param>
 /// <returns></returns>
 public static object GetCyDfbAsmPrivateFieldCurr(string memberName)
 {
     if (cyDfbAsm == null)
     {
         return(null);
     }
     else
     {
         return(PrivateValueAccessor.GetPrivateFieldValue(typeof(CyDfbAsm), memberName, Wrapper.DfbAsm));
     }
 }
Beispiel #2
0
        /// <summary>
        /// Retrieves the private field value from the current simulator object
        /// </summary>
        /// <param name="cycle">Simulator cycle number for which to retrieve value
        /// <param name="memberName">Private field to retrieve</param>
        /// <returns></returns>
        public static T GetCySimulatorPrivateField <T>(int cycle, string memberName)
        {
            var simulator = dfbSimulatorWrapper.GetSimulatorAtCycle(cycle);

            if (simulator == null)
            {
                return(default(T));
            }

            var val = PrivateValueAccessor.GetPrivateFieldValue(typeof(CySimulator), memberName, simulator);

            if (val == null)
            {
                return(default(T));
            }

            return((T)val);
        }