<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: rs485.proto

namespace OS\PB;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Generated from protobuf message <code>OS.PB.RS485Metric</code>
 */
class RS485Metric extends \Google\Protobuf\Internal\Message
{
    /**
     * Data metrics
     *
     * Generated from protobuf field <code>uint32 BytesTransmitted = 1;</code>
     */
    protected $BytesTransmitted = 0;
    /**
     * Number of bytes received in this metric interval
     *
     * Generated from protobuf field <code>uint32 BytesReceived = 2;</code>
     */
    protected $BytesReceived = 0;
    /**
     * Number of bytes received exclusively for this device
     *
     * Generated from protobuf field <code>uint32 BytesReceivedExclusive = 3;</code>
     */
    protected $BytesReceivedExclusive = 0;
    /**
     * Receive error metrics
     *
     * Generated from protobuf field <code>uint32 ReceiveOverrunErrors = 4;</code>
     */
    protected $ReceiveOverrunErrors = 0;
    /**
     * Did not see a clear start or stop bit.
     *
     * Generated from protobuf field <code>uint32 ReceiveFramingErrors = 5;</code>
     */
    protected $ReceiveFramingErrors = 0;
    /**
     * When receiving data is held longer than the time it takes to normally transmit start, data bits and stop bits
     *
     * Generated from protobuf field <code>uint32 ReceiveBreakErrors = 6;</code>
     */
    protected $ReceiveBreakErrors = 0;
    /**
     * Packet Metrics
     *
     * Generated from protobuf field <code>uint32 PacketsTransmitted = 7;</code>
     */
    protected $PacketsTransmitted = 0;
    /**
     * Number of packets received
     *
     * Generated from protobuf field <code>uint32 PacketsReceived = 8;</code>
     */
    protected $PacketsReceived = 0;
    /**
     * Number of packets received exclusively for this device
     *
     * Generated from protobuf field <code>uint32 PacketsReceivedExclusive = 9;</code>
     */
    protected $PacketsReceivedExclusive = 0;
    /**
     * Number of packets acked
     *
     * Generated from protobuf field <code>uint32 PacketsACKed = 10;</code>
     */
    protected $PacketsACKed = 0;
    /**
     * Number of packets negatively acknowledged where CRC failed but the header could be at least decoded
     *
     * Generated from protobuf field <code>uint32 PacketsNACKed = 11;</code>
     */
    protected $PacketsNACKed = 0;
    /**
     * Number of packets discarded where the CRC failed and the header was too mangled to decode
     *
     * Generated from protobuf field <code>uint32 PacketsCorrupted = 12;</code>
     */
    protected $PacketsCorrupted = 0;
    /**
     * Number of packets where no response to the packet was received
     *
     * Generated from protobuf field <code>uint32 PacketsTimedout = 13;</code>
     */
    protected $PacketsTimedout = 0;
    /**
     * Optional: Number of packets ignored due to spam filtering (duplicate OSDP RawCode, ANPR plates, etc)
     *
     * Generated from protobuf field <code>uint32 PacketsIgnoredSpam = 14;</code>
     */
    protected $PacketsIgnoredSpam = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $BytesTransmitted
     *           Data metrics
     *     @type int $BytesReceived
     *           Number of bytes received in this metric interval
     *     @type int $BytesReceivedExclusive
     *           Number of bytes received exclusively for this device
     *     @type int $ReceiveOverrunErrors
     *           Receive error metrics
     *     @type int $ReceiveFramingErrors
     *           Did not see a clear start or stop bit.
     *     @type int $ReceiveBreakErrors
     *           When receiving data is held longer than the time it takes to normally transmit start, data bits and stop bits
     *     @type int $PacketsTransmitted
     *           Packet Metrics
     *     @type int $PacketsReceived
     *           Number of packets received
     *     @type int $PacketsReceivedExclusive
     *           Number of packets received exclusively for this device
     *     @type int $PacketsACKed
     *           Number of packets acked
     *     @type int $PacketsNACKed
     *           Number of packets negatively acknowledged where CRC failed but the header could be at least decoded
     *     @type int $PacketsCorrupted
     *           Number of packets discarded where the CRC failed and the header was too mangled to decode
     *     @type int $PacketsTimedout
     *           Number of packets where no response to the packet was received
     *     @type int $PacketsIgnoredSpam
     *           Optional: Number of packets ignored due to spam filtering (duplicate OSDP RawCode, ANPR plates, etc)
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Rs485::initOnce();
        parent::__construct($data);
    }

    /**
     * Data metrics
     *
     * Generated from protobuf field <code>uint32 BytesTransmitted = 1;</code>
     * @return int
     */
    public function getBytesTransmitted()
    {
        return $this->BytesTransmitted;
    }

    /**
     * Data metrics
     *
     * Generated from protobuf field <code>uint32 BytesTransmitted = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setBytesTransmitted($var)
    {
        GPBUtil::checkUint32($var);
        $this->BytesTransmitted = $var;

        return $this;
    }

    /**
     * Number of bytes received in this metric interval
     *
     * Generated from protobuf field <code>uint32 BytesReceived = 2;</code>
     * @return int
     */
    public function getBytesReceived()
    {
        return $this->BytesReceived;
    }

    /**
     * Number of bytes received in this metric interval
     *
     * Generated from protobuf field <code>uint32 BytesReceived = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setBytesReceived($var)
    {
        GPBUtil::checkUint32($var);
        $this->BytesReceived = $var;

        return $this;
    }

    /**
     * Number of bytes received exclusively for this device
     *
     * Generated from protobuf field <code>uint32 BytesReceivedExclusive = 3;</code>
     * @return int
     */
    public function getBytesReceivedExclusive()
    {
        return $this->BytesReceivedExclusive;
    }

    /**
     * Number of bytes received exclusively for this device
     *
     * Generated from protobuf field <code>uint32 BytesReceivedExclusive = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setBytesReceivedExclusive($var)
    {
        GPBUtil::checkUint32($var);
        $this->BytesReceivedExclusive = $var;

        return $this;
    }

    /**
     * Receive error metrics
     *
     * Generated from protobuf field <code>uint32 ReceiveOverrunErrors = 4;</code>
     * @return int
     */
    public function getReceiveOverrunErrors()
    {
        return $this->ReceiveOverrunErrors;
    }

    /**
     * Receive error metrics
     *
     * Generated from protobuf field <code>uint32 ReceiveOverrunErrors = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setReceiveOverrunErrors($var)
    {
        GPBUtil::checkUint32($var);
        $this->ReceiveOverrunErrors = $var;

        return $this;
    }

    /**
     * Did not see a clear start or stop bit.
     *
     * Generated from protobuf field <code>uint32 ReceiveFramingErrors = 5;</code>
     * @return int
     */
    public function getReceiveFramingErrors()
    {
        return $this->ReceiveFramingErrors;
    }

    /**
     * Did not see a clear start or stop bit.
     *
     * Generated from protobuf field <code>uint32 ReceiveFramingErrors = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setReceiveFramingErrors($var)
    {
        GPBUtil::checkUint32($var);
        $this->ReceiveFramingErrors = $var;

        return $this;
    }

    /**
     * When receiving data is held longer than the time it takes to normally transmit start, data bits and stop bits
     *
     * Generated from protobuf field <code>uint32 ReceiveBreakErrors = 6;</code>
     * @return int
     */
    public function getReceiveBreakErrors()
    {
        return $this->ReceiveBreakErrors;
    }

    /**
     * When receiving data is held longer than the time it takes to normally transmit start, data bits and stop bits
     *
     * Generated from protobuf field <code>uint32 ReceiveBreakErrors = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setReceiveBreakErrors($var)
    {
        GPBUtil::checkUint32($var);
        $this->ReceiveBreakErrors = $var;

        return $this;
    }

    /**
     * Packet Metrics
     *
     * Generated from protobuf field <code>uint32 PacketsTransmitted = 7;</code>
     * @return int
     */
    public function getPacketsTransmitted()
    {
        return $this->PacketsTransmitted;
    }

    /**
     * Packet Metrics
     *
     * Generated from protobuf field <code>uint32 PacketsTransmitted = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setPacketsTransmitted($var)
    {
        GPBUtil::checkUint32($var);
        $this->PacketsTransmitted = $var;

        return $this;
    }

    /**
     * Number of packets received
     *
     * Generated from protobuf field <code>uint32 PacketsReceived = 8;</code>
     * @return int
     */
    public function getPacketsReceived()
    {
        return $this->PacketsReceived;
    }

    /**
     * Number of packets received
     *
     * Generated from protobuf field <code>uint32 PacketsReceived = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setPacketsReceived($var)
    {
        GPBUtil::checkUint32($var);
        $this->PacketsReceived = $var;

        return $this;
    }

    /**
     * Number of packets received exclusively for this device
     *
     * Generated from protobuf field <code>uint32 PacketsReceivedExclusive = 9;</code>
     * @return int
     */
    public function getPacketsReceivedExclusive()
    {
        return $this->PacketsReceivedExclusive;
    }

    /**
     * Number of packets received exclusively for this device
     *
     * Generated from protobuf field <code>uint32 PacketsReceivedExclusive = 9;</code>
     * @param int $var
     * @return $this
     */
    public function setPacketsReceivedExclusive($var)
    {
        GPBUtil::checkUint32($var);
        $this->PacketsReceivedExclusive = $var;

        return $this;
    }

    /**
     * Number of packets acked
     *
     * Generated from protobuf field <code>uint32 PacketsACKed = 10;</code>
     * @return int
     */
    public function getPacketsACKed()
    {
        return $this->PacketsACKed;
    }

    /**
     * Number of packets acked
     *
     * Generated from protobuf field <code>uint32 PacketsACKed = 10;</code>
     * @param int $var
     * @return $this
     */
    public function setPacketsACKed($var)
    {
        GPBUtil::checkUint32($var);
        $this->PacketsACKed = $var;

        return $this;
    }

    /**
     * Number of packets negatively acknowledged where CRC failed but the header could be at least decoded
     *
     * Generated from protobuf field <code>uint32 PacketsNACKed = 11;</code>
     * @return int
     */
    public function getPacketsNACKed()
    {
        return $this->PacketsNACKed;
    }

    /**
     * Number of packets negatively acknowledged where CRC failed but the header could be at least decoded
     *
     * Generated from protobuf field <code>uint32 PacketsNACKed = 11;</code>
     * @param int $var
     * @return $this
     */
    public function setPacketsNACKed($var)
    {
        GPBUtil::checkUint32($var);
        $this->PacketsNACKed = $var;

        return $this;
    }

    /**
     * Number of packets discarded where the CRC failed and the header was too mangled to decode
     *
     * Generated from protobuf field <code>uint32 PacketsCorrupted = 12;</code>
     * @return int
     */
    public function getPacketsCorrupted()
    {
        return $this->PacketsCorrupted;
    }

    /**
     * Number of packets discarded where the CRC failed and the header was too mangled to decode
     *
     * Generated from protobuf field <code>uint32 PacketsCorrupted = 12;</code>
     * @param int $var
     * @return $this
     */
    public function setPacketsCorrupted($var)
    {
        GPBUtil::checkUint32($var);
        $this->PacketsCorrupted = $var;

        return $this;
    }

    /**
     * Number of packets where no response to the packet was received
     *
     * Generated from protobuf field <code>uint32 PacketsTimedout = 13;</code>
     * @return int
     */
    public function getPacketsTimedout()
    {
        return $this->PacketsTimedout;
    }

    /**
     * Number of packets where no response to the packet was received
     *
     * Generated from protobuf field <code>uint32 PacketsTimedout = 13;</code>
     * @param int $var
     * @return $this
     */
    public function setPacketsTimedout($var)
    {
        GPBUtil::checkUint32($var);
        $this->PacketsTimedout = $var;

        return $this;
    }

    /**
     * Optional: Number of packets ignored due to spam filtering (duplicate OSDP RawCode, ANPR plates, etc)
     *
     * Generated from protobuf field <code>uint32 PacketsIgnoredSpam = 14;</code>
     * @return int
     */
    public function getPacketsIgnoredSpam()
    {
        return $this->PacketsIgnoredSpam;
    }

    /**
     * Optional: Number of packets ignored due to spam filtering (duplicate OSDP RawCode, ANPR plates, etc)
     *
     * Generated from protobuf field <code>uint32 PacketsIgnoredSpam = 14;</code>
     * @param int $var
     * @return $this
     */
    public function setPacketsIgnoredSpam($var)
    {
        GPBUtil::checkUint32($var);
        $this->PacketsIgnoredSpam = $var;

        return $this;
    }

}

