# 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 DeviceInfoResponse(AdsResponse):

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

        self.MajorVersion = struct.unpack_from('B', responseAmsPacket.Data, 4)[0]
        self.MinorVersion = struct.unpack_from('B', responseAmsPacket.Data, 5)[0]
        self.Build = struct.unpack_from('H', responseAmsPacket.Data, 6)[0]

        deviceNameEnd = 16

# 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/deviceinforesponse.py
import struct
from .adsresponse import AdsResponse


class DeviceInfoResponse(AdsResponse):

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

        self.MajorVersion = struct.unpack_from('B', responseAmsPacket.Data, 4)[0]
        self.MinorVersion = struct.unpack_from('B', responseAmsPacket.Data, 5)[0]
        self.Build = struct.unpack_from('H', responseAmsPacket.Data, 6)[0]

        deviceNameEnd = 16

        for i in range(8, 24):