public void reloadConfig(YModule Source)
        {
            _name       = _sourceSensor.get_friendlyName();;
            _serial     = _sourceSensor.get_module().get_module().get_serialNumber();
            _unit       = _sourceSensor.get_unit();
            _datalogger = YDataLogger.FindDataLogger(_serial + ".dataLogger");
            _tempSensor = YTemperature.FindTemperature(_serial + ".temperature");
            string tt = _sourceSensor.get_hardwareId().Replace("weighScale", "genericSensor");

            _genSensor = YGenericSensor.FindGenericSensor(tt);
        }
 public CustomSensor(YWeighScale sourceSensor)
 {
     _sourceSensor = sourceSensor;
     reloadConfig(null);
     _sourceSensor.get_module().registerConfigChangeCallback(reloadConfig);
 }