# Path: pyads/commands/adsresponse.py
# class AdsResponse:
# 
#     def __init__(self, responseAmsPacket):
#         self.Error = struct.unpack_from('I', responseAmsPacket.Data)[0]
# 
#         if (self.Error > 0):
#             raise AdsException(self.Error)
# 
# 
#     Error = 0


import struct
from .adsresponse import AdsResponse

class ReadStateResponse(AdsResponse):

    def __init__(self, responseAmsPacket):
        AdsResponse.__init__(self, responseAmsPacket)

        self.AdsState = struct.unpack_from('H', responseAmsPacket.Data, 4)[0]
        self.DeviceState = struct.unpack_from('H', responseAmsPacket.Data, 6)[0]



# Path: pyads/commands/adsresponse.py
# class AdsResponse:
# 
#     def __init__(self, responseAmsPacket):
#         self.Error = struct.unpack_from('I', responseAmsPacket.Data)[0]
# 
#         if (self.Error > 0):
#             raise AdsException(self.Error)
# 
# 
#     Error = 0


# Path: pyads/commands/readstateresponse.py
import struct
from .adsresponse import AdsResponse


class ReadStateResponse(AdsResponse):

    def __init__(self, responseAmsPacket):
        AdsResponse.__init__(self, responseAmsPacket)

        self.AdsState = struct.unpack_from('H', responseAmsPacket.Data, 4)[0]
        self.DeviceState = struct.unpack_from('H', responseAmsPacket.Data, 6)[0]



    AdsState = 0