コード例 #1
0
    def __init__(self, values, **kwargs):
        ''' Initializes a new instance

        :param values: The values to write to
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.registers = values or []
コード例 #2
0
    def __init__(self, status=0x00, **kwargs):
        ''' Initializes a new instance

        :param status: The status response to report
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.status = status
コード例 #3
0
ファイル: file_message.py プロジェクト: vincsdev/pymodbus
    def __init__(self, records=None, **kwargs):
        ''' Initializes a new instance

        :param records: The file record requests to be read
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.records = records or []
コード例 #4
0
ファイル: file_message.py プロジェクト: semyont/pymodbus
    def __init__(self, records=None, **kwargs):
        ''' Initializes a new instance

        :param records: The file record requests to be read
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.records  = records or []
コード例 #5
0
ファイル: file_message.py プロジェクト: thom-nic/pymodbus
    def __init__(self, records=None):
        ''' Initializes a new instance

        :param records: The requested file records
        '''
        ModbusResponse.__init__(self)
        self.records = records or []
コード例 #6
0
ファイル: bit_read_message.py プロジェクト: D3f0/txscada
    def __init__(self, values):
        ''' Initializes a new instance

        :param values: The requested values to be returned
        '''
        ModbusResponse.__init__(self)
        self.bits = [] if values == None else values
コード例 #7
0
ファイル: file_message.py プロジェクト: vincsdev/pymodbus
    def __init__(self, values=None, **kwargs):
        ''' Initializes a new instance

        :param values: The list of values of the fifo to return
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.values = values or []
コード例 #8
0
    def __init__(self, values, **kwargs):
        ''' Initializes a new instance

        :param values: The values to write to
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.registers = values if values != None else []
コード例 #9
0
ファイル: bit_read_message.py プロジェクト: 4rc4n4/pymodbus
    def __init__(self, values, **kwargs):
        ''' Initializes a new instance

        :param values: The requested values to be returned
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.bits = values or []
コード例 #10
0
    def __init__(self, values=None, **kwargs):
        ''' Initializes a new instance

        :param values: The register values to write
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.registers = values or []
コード例 #11
0
    def __init__(self, values, **kwargs):
        ''' Initializes a new instance

        :param values: The requested values to be returned
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.bits = values or []
コード例 #12
0
    def __init__(self, records=None):
        ''' Initializes a new instance

        :param records: The requested file records
        '''
        ModbusResponse.__init__(self)
        self.records = records or []
コード例 #13
0
ファイル: register_read_message.py プロジェクト: D3f0/txscada
    def __init__(self, values):
        ''' Initializes a new instance

        :param values: The values to write to
        '''
        ModbusResponse.__init__(self)
        self.registers = values if values != None else []
コード例 #14
0
    def __init__(self, values=None):
        ''' Initializes a new instance

        :param values: The register values to write
        '''
        ModbusResponse.__init__(self)
        self.registers = values if values != None else []
コード例 #15
0
    def __init__(self, values=None, **kwargs):
        ''' Initializes a new instance

        :param values: The register values to write
        '''
        ModbusResponse.__init__(self, **kwargs)
        RegisterResponseMixin.__init__(self, values)
コード例 #16
0
    def __init__(self, values):
        ''' Initializes a new instance

        :param values: The requested values to be returned
        '''
        ModbusResponse.__init__(self)
        self.bits = [] if values == None else values
コード例 #17
0
ファイル: file_message.py プロジェクト: semyont/pymodbus
    def __init__(self, values=None, **kwargs):
        ''' Initializes a new instance

        :param values: The list of values of the fifo to return
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.values = values or []
コード例 #18
0
    def __init__(self, count=0x0000, **kwargs):
        ''' Initializes a new instance

        :param count: The current event counter value
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.count = count
        self.status = True  # this means we are ready, not waiting
コード例 #19
0
    def __init__(self, address=None, count=None, **kwargs):
        ''' Initializes a new instance

        :param address: The starting variable address written to
        :param count: The number of values written
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.address = address
        self.count = count
コード例 #20
0
    def __init__(self, address=None, value=None, **kwargs):
        ''' Initializes a new instance

        :param address: The variable address written to
        :param value: The value written at address
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.address = address
        self.value = value
コード例 #21
0
    def __init__(self, address=None, value=None, **kwargs):
        ''' Initializes a new instance

        :param address: The address to start writing add
        :param value: The values to write
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.address = address
        self.value = value
コード例 #22
0
    def __init__(self, address=None, count=None, **kwargs):
        ''' Initializes a new instance

        :param address: The address to start writing to
        :param count: The number of registers to write to
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.address = address
        self.count = count
コード例 #23
0
ファイル: other_message.py プロジェクト: mahongquan/pymodbus
    def __init__(self, identifier='\x00', status=True, **kwargs):
        ''' Initializes a new instance

        :param identifier: The identifier of the slave
        :param status: The status response to report
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.identifier = identifier
        self.status = status
コード例 #24
0
ファイル: bit_write_message.py プロジェクト: D3f0/txscada
    def __init__(self, address=None, count=None):
        ''' Initializes a new instance

        :param address: The starting variable address written to
        :param count: The number of values written
        '''
        ModbusResponse.__init__(self)
        self.address = address
        self.count = count
コード例 #25
0
ファイル: bit_write_message.py プロジェクト: D3f0/txscada
    def __init__(self, address=None, value=None):
        ''' Initializes a new instance

        :param address: The variable address written to
        :param value: The value written at address
        '''
        ModbusResponse.__init__(self)
        self.address = address
        self.value = value
コード例 #26
0
    def __init__(self, address=None, count=None):
        ''' Initializes a new instance

        :param address: The address to start writing to
        :param count: The number of registers to write to
        '''
        ModbusResponse.__init__(self)
        self.address = address
        self.count = count
コード例 #27
0
ファイル: other_message.py プロジェクト: yeahnoob/pymodbus
    def __init__(self, identifier='\x00', status=True, **kwargs):
        ''' Initializes a new instance

        :param identifier: The identifier of the slave
        :param status: The status response to report
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.identifier = identifier
        self.status = status
コード例 #28
0
    def __init__(self, address=None, value=None):
        ''' Initializes a new instance

        :param address: The address to start writing add
        :param value: The values to write
        '''
        self.address = address
        self.value = value
        ModbusResponse.__init__(self)
コード例 #29
0
ファイル: file_message.py プロジェクト: semyont/pymodbus
    def __init__(self, address=0x0000, and_mask=0xffff, or_mask=0x0000, **kwargs):
        ''' Initializes a new instance

        :param address: The mask pointer address (0x0000 to 0xffff)
        :param and_mask: The and bitmask applied to the register address
        :param or_mask: The or bitmask applied to the register address
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.address  = address
        self.and_mask = and_mask
        self.or_mask  = or_mask
コード例 #30
0
    def __init__(self, address=0x0000, and_mask=0xffff, or_mask=0x0000):
        ''' Initializes a new instance

        :param address: The mask pointer address (0x0000 to 0xffff)
        :param and_mask: The and bitmask applied to the register address
        :param or_mask: The or bitmask applied to the register address
        '''
        ModbusResponse.__init__(self)
        self.address = address
        self.and_mask = and_mask
        self.or_mask = or_mask
コード例 #31
0
    def __init__(self, **kwargs):
        ''' Initializes a new instance

        :param status: The status response to report
        :param message_count: The current message count
        :param event_count: The current event count
        :param events: The collection of events to send
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.status = kwargs.get('status', True)
        self.message_count = kwargs.get('message_count', 0)
        self.event_count = kwargs.get('event_count', 0)
        self.events = kwargs.get('events', [])
コード例 #32
0
ファイル: mei_message.py プロジェクト: Biondoap/pymodbus
    def __init__(self, read_code=None, information=None, **kwargs):
        ''' Initializes a new instance

        :param read_code: The device information read code
        :param information: The requested information request
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.read_code = read_code or DeviceInformation.Basic
        self.information = information or {}
        self.number_of_objects = 0
        self.conformity = 0x83  # I support everything right now
        self.next_object_id = 0x00
        self.more_follows = MoreData.Nothing
        self.space_left = None
コード例 #33
0
 def __init__(self, **kwargs):
     ModbusResponse.__init__(self, **kwargs)
     self.block = kwargs.get('block', 0)
     self.slice = kwargs.get('slice', 0)
     # Init response fields
     self.frame_length = 0
     self.state = 0
     self.block_subfunction = 0
     self.slice_number = 0
     self.slice_amount = 0
     self.block_length = 0
     self.header_crc = 0
     self.slice_length = 0
     self.data = 0
コード例 #34
0
ファイル: mei_message.py プロジェクト: semyont/pymodbus
    def __init__(self, read_code=None, information=None, **kwargs):
        ''' Initializes a new instance

        :param read_code: The device information read code
        :param information: The requested information request
        '''
        ModbusResponse.__init__(self, **kwargs)
        self.read_code = read_code or DeviceInformation.Basic
        self.information = information or {}
        self.number_of_objects = len(self.information)
        self.conformity = 0x83 # I support everything right now

        # TODO calculate
        self.next_object_id = 0x00 # self.information[-1](0)
        self.more_follows = MoreData.Nothing
コード例 #35
0
ファイル: mei_message.py プロジェクト: demntor/pymodbus
    def __init__(self, read_code=None, information=None):
        ''' Initializes a new instance

        :param read_code: The device information read code
        :param information: The requested information request
        '''
        ModbusResponse.__init__(self)
        self.read_code = read_code or DeviceInformation.Basic
        self.information = information or {}
        self.number_of_objects = len(self.information)
        self.conformity = 0x83 # I support everything right now

        # TODO calculate
        self.next_object_id = 0x00 # self.information[-1](0)
        self.more_follows = MoreData.Nothing
コード例 #36
0
 def __init__(self, **kwargs):
     ModbusResponse.__init__(self, **kwargs)
     self.block = kwargs.get('block', 0)
     self.slice = kwargs.get('slice', 0)
コード例 #37
0
 def __init__(self, values=None, **kwargs):
     ModbusResponse.__init__(self, **kwargs)
     self.values = values or []
コード例 #38
0
ファイル: diag_message.py プロジェクト: scroix/nodel-recipes
 def __init__(self):
     '''
     Base initializer for a diagnostic response
     '''
     self.message = None
     ModbusResponse.__init__(self)
コード例 #39
0
 def __init__(self, values=None, **kwargs):
     ModbusResponse.__init__(self, **kwargs)
     self.values = values or []
コード例 #40
0
 def __init__(self, **kwargs):
     '''
     Base initializer for a diagnostic response
     '''
     ModbusResponse.__init__(self, **kwargs)
     self.message = None
コード例 #41
0
ファイル: custom-message.py プロジェクト: krtk30/pymodbus
 def __init__(self, address):
     ModbusResponse.__init__(self)
     self.address = address
     self.count = 16
コード例 #42
0
ファイル: diag_message.py プロジェクト: D3f0/txscada
 def __init__(self):
     '''
     Base initializer for a diagnostic response
     '''
     ModbusResponse.__init__(self)
コード例 #43
0
ファイル: diag_message.py プロジェクト: thom-nic/pymodbus
 def __init__(self):
     '''
     Base initializer for a diagnostic response
     '''
     self.message = None
     ModbusResponse.__init__(self)
コード例 #44
0
 def __init__(self, values=None, **kwargs):
     ModbusResponse.__init__(self, **kwargs)
     print "init custom modbus response"
     self.values = values or []
コード例 #45
0
 def __init__(self):
     '''
     Base initializer for a diagnostic response
     '''
     ModbusResponse.__init__(self)
コード例 #46
0
ファイル: diag_message.py プロジェクト: bashwork/pymodbus
 def __init__(self, **kwargs):
     '''
     Base initializer for a diagnostic response
     '''
     ModbusResponse.__init__(self, **kwargs)
     self.message = None