<?php
namespace Models;

class Scales_php {
	public $f3, $sets, $config;
	
	function __construct($f3, $sets, $config) {
		$this->f3=$f3;
		$this->sets=$sets;
		$this->config=$config;
		//$this->config=parse_ini_file($sets['driver'].'/server.config'); // Настройки драйвера
	}

    // Узнать вес
    function weight() {
    	if(rand(0, 100)>$this->config['errorСhance']) $weight=rand(1, 1000)/1000;
    	else $weight=0;
        return array(
            'success'=>true,
            'weight'=>$weight
        );
    }
}
