// perform the initial setup that may be done without a YoctoAPI object (hwd can be null) internal virtual void base_init(YFunction hwd, string instantiationName) { string errmsg = ""; _func = hwd; _instantiationName = instantiationName; InternalStuff.initYoctopuceLibrary(ref errmsg, true); if (_func != null) { try { _func.set_userData(this); _hwdid = _func.get_hardwareId(); //InternalStuff.log(" hwdID = " + _hwdid); } catch (Exception) { //InternalStuff.log("Failed to find out HwdID, device is probably offline "); } } }