<filename>sensirion_shdlc_sfc5xxx/commands/device_reset.py
# -*- coding: utf-8 -*-
# (c) Copyright 2020 Sensirion AG, Switzerland

##############################################################################
##############################################################################
#                 _____         _    _ _______ _____ ____  _   _
#                / ____|   /\  | |  | |__   __|_   _/ __ \| \ | |
#               | |       /  \ | |  | |  | |    | || |  | |  \| |
#               | |      / /\ \| |  | |  | |    | || |  | | . ` |
#               | |____ / ____ \ |__| |  | |   _| || |__| | |\  |
#                \_____/_/    \_\____/   |_|  |_____\____/|_| \_|
#
#     THIS FILE IS AUTOMATICALLY GENERATED AND MUST NOT BE EDITED MANUALLY!
#
# Generator:    sensirion-shdlc-interface-generator 0.8.2
# Product:      SFC5xxx
# Version:      0.1.0
#
##############################################################################
##############################################################################

# flake8: noqa

from __future__ import absolute_import, division, print_function
from sensirion_shdlc_driver.command import ShdlcCommand
from struct import pack, unpack

import logging
log = logging.getLogger(__name__)


class Sfc5xxxCmdDeviceResetBase(ShdlcCommand):
    """
    SHDLC command 0xD3: "Device Reset".
    """

    def __init__(self, *args, **kwargs):
        """
        Constructor.
        """
        super(Sfc5xxxCmdDeviceResetBase, self).__init__(
            0xD3, *args, **kwargs)


class Sfc5xxxCmdDeviceReset(Sfc5xxxCmdDeviceResetBase):
    """
    Device Reset Command

    Resets the device. This command has the same effect as a power-reset.

    .. note:: The device will reply before executing the reset. After the
              response is sent, the device needs some time until it is ready
              for communication again (see post processing time). If the
              command is sent with broadcast, the reset is done directly after
              the reception of the command.
    """

    def __init__(self):
        """
        Constructor.
        """
        super(Sfc5xxxCmdDeviceReset, self).__init__(
            data=[],
            max_response_time=0.01,
            post_processing_time=0.5,
            min_response_length=0,
            max_response_length=0
        )
