<?php
namespace App\Entity\Gauge;
use Doctrine\ORM\Mapping as ORM;
use phpDocumentor\Reflection\Types\Nullable;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity()
* @ORM\Table(name="gauge_remote_properties")
*/
class GaugeRemoteProperties
{
/**
* typ zapojení dálkových odečtů: PŘÍMÉ/OPTOČLEN/VYSÍLAČ/JINÝ
*/
public const CONNECTION_DIRECT = 1; // PŘÍMÉ
public const CONNECTION_OPTOCOUPLER = 2; // OPTOČLEN
public const CONNECTION_TRANSMITTER = 3; // VYSÍLAČ
public const CONNECTION_OTHER = 4; // JINÝ
/**
* způsob zasílání dat: KABEL / WIFI / GSM / IOT / JINÝ
*/
public const SENDING_DATA_WAY_CABLE = 1;
public const SENDING_DATA_WAY_WIFI = 2;
public const SENDING_DATA_WAY_GSM = 3;
public const SENDING_DATA_WAY_IOT = 4;
public const SENDING_DATA_WAY_OTHER = 5;
/**
* výstup: PULZNÍ / M-BUS / MAGNETICKYÝ / JINÝ
*/
public const OUTPUT_PULSE = 1;
public const OUTPUT_M_BUS = 2;
public const OUTPUT_MAGNETIC = 3;
public const OUTPUT_OTHER = 4;
public const POWER_INPUT_MAINS = 1; // napájení ze sítě
public const POWER_INPUT_BATTERY = 2; // napájení z baterie
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private int $id;
/**
* @var Gauge
* @ORM\OneToOne(targetEntity="App\Entity\Gauge\Gauge", inversedBy="remoteProperties")
* @ORM\JoinColumn(name="gauge_id", referencedColumnName="id", nullable=false)
*/
private Gauge $gauge;
/**
* @var \DateTime|null
*
* @ORM\Column(type="datetime", nullable=true)
*/
private ?\DateTime $initDate = null;
/**
* values are defined above self::CONNECTION_...
* @var int|null
* @ORM\Column(type="smallint", nullable=true)
*/
private ?int $connectionType = null;
/**
* @var string|null
* @ORM\Column(type="string", nullable=true)
*/
private ?string $deviceType = null;
/**
* values are defined above self::SENDING_DATA_WAY_...
* @var int|null
* @ORM\Column(type="smallint", nullable=true)
*/
private ?int $dataSendingWay = null;
/**
* @var string|null
* @ORM\Column(type="string", nullable=true)
*/
private ?string $simNumber = null;
/**
* values are defined above self::OUTPUT_...
* @var int|null
* @ORM\Column(type="smallint", nullable=true)
*/
private ?int $output = null;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
private ?int $pulseQuantity = null;
/**
* @var string|null
* @ORM\Column(type="string", nullable=true)
*/
private ?string $digitalInput = null;
/**
* values are defined above self::POWER_INPUT...
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
private ?int $powerInput = null;
/**
* @var \DateTime|null
*
* @ORM\Column(type="datetime", nullable=true)
*/
private ?\DateTime $lastBatteryExchange = null;
/**
* @var string|null
* @ORM\Column(type="text", nullable=true)
*/
private ?string $otherInfo;
/**
* GaugeRemoteProperties constructor.
* @param Gauge $gauge
*/
public function __construct(Gauge $gauge)
{
$this->gauge = $gauge;
}
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
* @return GaugeRemoteProperties
*/
public function setId(int $id): GaugeRemoteProperties
{
$this->id = $id;
return $this;
}
/**
* @return Gauge
*/
public function getGauge(): Gauge
{
return $this->gauge;
}
/**
* @param Gauge $gauge
* @return GaugeRemoteProperties
*/
public function setGauge(Gauge $gauge): GaugeRemoteProperties
{
$this->gauge = $gauge;
return $this;
}
/**
* @return \DateTime|null
*/
public function getInitDate(): ?\DateTime
{
return $this->initDate;
}
/**
* @param \DateTime|null $initDate
* @return GaugeRemoteProperties
*/
public function setInitDate(?\DateTime $initDate): GaugeRemoteProperties
{
$this->initDate = $initDate;
return $this;
}
/**
* @return int|null
*/
public function getConnectionType(): ?int
{
return $this->connectionType;
}
/**
* @param int|null $connectionType
* @return GaugeRemoteProperties
*/
public function setConnectionType(?int $connectionType): GaugeRemoteProperties
{
$this->connectionType = $connectionType;
return $this;
}
/**
* @return string|null
*/
public function getDeviceType(): ?string
{
return $this->deviceType;
}
/**
* @param string|null $deviceType
* @return GaugeRemoteProperties
*/
public function setDeviceType(?string $deviceType): GaugeRemoteProperties
{
$this->deviceType = $deviceType;
return $this;
}
/**
* @return int|null
*/
public function getDataSendingWay(): ?int
{
return $this->dataSendingWay;
}
/**
* @param int|null $dataSendingWay
* @return GaugeRemoteProperties
*/
public function setDataSendingWay(?int $dataSendingWay): GaugeRemoteProperties
{
$this->dataSendingWay = $dataSendingWay;
return $this;
}
/**
* @return string|null
*/
public function getSimNumber(): ?string
{
return $this->simNumber;
}
/**
* @param string|null $simNumber
* @return GaugeRemoteProperties
*/
public function setSimNumber(?string $simNumber): GaugeRemoteProperties
{
$this->simNumber = $simNumber;
return $this;
}
/**
* @return int|null
*/
public function getOutput(): ?int
{
return $this->output;
}
/**
* @param int|null $output
* @return GaugeRemoteProperties
*/
public function setOutput(?int $output): GaugeRemoteProperties
{
$this->output = $output;
return $this;
}
/**
* @return int|null
*/
public function getPulseQuantity(): ?int
{
return $this->pulseQuantity;
}
/**
* @param int|null $pulseQuantity
* @return GaugeRemoteProperties
*/
public function setPulseQuantity(?int $pulseQuantity): GaugeRemoteProperties
{
$this->pulseQuantity = $pulseQuantity;
return $this;
}
/**
* @return string|null
*/
public function getDigitalInput(): ?string
{
return $this->digitalInput;
}
/**
* @param string|null $digitalInput
* @return GaugeRemoteProperties
*/
public function setDigitalInput(?string $digitalInput): GaugeRemoteProperties
{
$this->digitalInput = $digitalInput;
return $this;
}
/**
* @return int|null
*/
public function getPowerInput(): ?int
{
return $this->powerInput;
}
/**
* @param int|null $powerInput
* @return GaugeRemoteProperties
*/
public function setPowerInput(?int $powerInput): GaugeRemoteProperties
{
$this->powerInput = $powerInput;
return $this;
}
/**
* @return \DateTime|null
*/
public function getLastBatteryExchange(): ?\DateTime
{
return $this->lastBatteryExchange;
}
/**
* @param \DateTime|null $lastBatteryExchange
* @return GaugeRemoteProperties
*/
public function setLastBatteryExchange(?\DateTime $lastBatteryExchange): GaugeRemoteProperties
{
$this->lastBatteryExchange = $lastBatteryExchange;
return $this;
}
/**
* @return string|null
*/
public function getOtherInfo(): ?string
{
return $this->otherInfo;
}
/**
* @param string|null $otherInfo
* @return GaugeRemoteProperties
*/
public function setOtherInfo(?string $otherInfo): GaugeRemoteProperties
{
$this->otherInfo = $otherInfo;
return $this;
}
}