Source code for sensirion_shdlc_sfc5xxx.commands.factory_reset

# -*- 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__)


[docs]class Sfc5xxxCmdFactoryResetBase(ShdlcCommand): """ SHDLC command 0x92: "Factory Reset". """
[docs] def __init__(self, *args, **kwargs): """ Constructor. """ super(Sfc5xxxCmdFactoryResetBase, self).__init__( 0x92, *args, **kwargs)
[docs]class Sfc5xxxCmdFactoryReset(Sfc5xxxCmdFactoryResetBase): """ Factory Reset Command Perform a factory reset which will restore the off-the-shelf factory configuration. In addition, a device reset will be performed after restoring the factory configuration. .. note:: This resets any configuration done after leaving the factory! Keep in mind that this command might also change communication parameters (i.e. baudrate and slave address) and thus you might have to adjust the driver's parameters to allow further communication with the device. """
[docs] def __init__(self): """ Constructor. """ super(Sfc5xxxCmdFactoryReset, self).__init__( data=[], max_response_time=1.0, post_processing_time=0.5, min_response_length=0, max_response_length=0 )