static protected void _UpdateValueCallbackList(YFunction func, Boolean add)
 {
   if (add)
   {
     func.isOnline();
     if (!_ValueCallbackList.Contains(func))
     {
       _ValueCallbackList.Add(func);
     }
   }
   else
   {
     _ValueCallbackList.Remove(func);
   }
 }
 /**
  * <summary>
  *   Retrieves a function for a given identifier.
  * <para>
  *   The identifier can be specified using several formats:
  * </para>
  * <para>
  * </para>
  * <para>
  *   - FunctionLogicalName
  * </para>
  * <para>
  *   - ModuleSerialNumber.FunctionIdentifier
  * </para>
  * <para>
  *   - ModuleSerialNumber.FunctionLogicalName
  * </para>
  * <para>
  *   - ModuleLogicalName.FunctionIdentifier
  * </para>
  * <para>
  *   - ModuleLogicalName.FunctionLogicalName
  * </para>
  * <para>
  * </para>
  * <para>
  *   This function does not require that the function is online at the time
  *   it is invoked. The returned object is nevertheless valid.
  *   Use the method <c>YFunction.isOnline()</c> to test if the function is
  *   indeed online at a given time. In case of ambiguity when looking for
  *   a function by logical name, no error is notified: the first instance
  *   found is returned. The search is performed first by hardware name,
  *   then by logical name.
  * </para>
  * </summary>
  * <param name="func">
  *   a string that uniquely characterizes the function
  * </param>
  * <returns>
  *   a <c>YFunction</c> object allowing you to drive the function.
  * </returns>
  */
 public static YFunction FindFunction(string func)
 {
   YFunction obj;
   obj = (YFunction)YFunction._FindFromCache("Function", func);
   if (obj == null)
   {
     obj = new YFunction(func);
     YFunction._AddToCache("Function", func, obj);
   }
   return obj;
 }
 // YDataSet constructor for the new datalogger
 public YDataSet(YFunction parent, string data)
 {
   //--- (generated code: YDataSet attributes initialization)
   //--- (end of generated code: YDataSet attributes initialization)
   this._parent = parent;
   this._startTime = 0;
   this._endTime = 0;
   this._summary = new YMeasure();
   this._parse(data);
 }
 static protected void _AddToCache(string classname, string func, YFunction obj)
 {
   _cache[classname + "_" + func] = obj;
 }
    //--- (end of generated code: YDataSet definitions)

    // YDataSet constructor, when instantiated directly by a function
    public YDataSet(YFunction parent, string functionId, string unit, long startTime, long endTime)
    {
      //--- (generated code: YDataSet attributes initialization)
      //--- (end of generated code: YDataSet attributes initialization)
      this._parent = parent;
      this._functionId = functionId;
      this._unit = unit;
      this._startTime = startTime;
      this._endTime = endTime;
      this._progress = -1;
      this._summary = new YMeasure();
    }
    public YDataStream(YFunction parent, YDataSet dataset, List<int> encoded)
    {
      this._parent = parent;
      //--- (generated code: YDataStream attributes initialization)
      //--- (end of generated code: YDataStream attributes initialization)
      this._initFromDataSet(dataset, encoded);

    }
 public YDataStream(YFunction parent)
 {
   this._parent = parent;
   //--- (generated code: YDataStream attributes initialization)
   //--- (end of generated code: YDataStream attributes initialization)
 }
 public DataEvent(YSensor sensor, double timestamp, List<int> report)
 {
   _fun = null;
   _sensor = sensor;
   _value = null;
   _timestamp = timestamp;
   _report = report;
 }
 public DataEvent(YFunction fun, String value)
 {
   _fun = fun;
   _sensor = null;
   _value = value;
   _report = null;
   _timestamp = 0;
 }