pycomm3/clx.py
def read(self, *tags: str) -> ReturnType:
        """
        Read the value of tag(s).  Automatically will split tags into multiple requests by tracking the request and
        response size.  Will use the multi-service request to group many tags into a single packet and also will automatically
        use fragmented read requests if the response size will not fit in a single packet.  Supports arrays (specify element
        count in using curly braces (array{10}).  Also supports full structure reading (when possible), return value
        will be a dict of {attribute name: value}.

        :param tags: one or many tags to read
        :return: a single or list of ``Tag`` objects
        """

        parsed_requests = self._parse_requested_tags(tags)
        requests = self._read_build_requests(parsed_requests)
        read_results = self._send_requests(requests)

        results = []

        for tag in tags:
            try:
                request_data = parsed_requests[tag]
                result = read_results[(request_data['plc_tag'], request_data['elements'])]
                if request_data.get('bit') is None:
                    results.append(result)
                else:
                    if result:
                        typ, bit = request_data['bit']
                        val = bool(result.value & 1 << bit) if typ == 'bit' else result.value[bit % 32]
                        results.append(Tag(tag, val, 'BOOL', None))
                    else:
                        results.append(Tag(tag, None, None, result.error))
            except Exception as err:
                results.append(Tag(tag, None, None, f'Invalid tag request - {err}'))

        if len(tags) > 1:
            return results
        else:
            return results[0]

        Read the value of tag(s).  Automatically will split tags into multiple requests by tracking the request and
        response size.  Will use the multi-service request to group many tags into a single packet and also will automatically
        use fragmented read requests if the response size will not fit in a single packet.  Supports arrays (specify element
        count in using curly braces (array{10}).  Also supports full structure reading (when possible), return value
        will be a dict of {attribute name: value}.

        :param tags: one or many tags to read
        :return: a single or list of ``Tag`` objects
        
Read the value of tag(s).  Automatically will split tags into multiple requests by tracking the request and
response size.  Will use the multi-service request to group many tags into a single packet and also will automatically
use fragmented read requests if the response size will not fit in a single packet.  Supports arrays (specify element
count in using curly braces (array{10}).  Also supports full structure reading (when possible), return value
will be a dict of {attribute name: value}.
Read the value of tag ( s ) . Automatically will split tags into multiple requests by tracking the request and response size . Will use the multi - service request to group many tags into a single packet and also will automatically use fragmented read requests if the response size will not fit in a single packet . Supports arrays ( specify element count in using curly braces ( array { 10 } ) . Also supports full structure reading ( when possible ) return value will be a dict of { attribute name : value } .
def read(self, *tags: str) -> ReturnType:
        parsed_requests = self._parse_requested_tags(tags)
        requests = self._read_build_requests(parsed_requests)
        read_results = self._send_requests(requests)
        results = []
        for tag in tags:
            try:
                request_data = parsed_requests[tag]
                result = read_results[(request_data['plc_tag'], request_data['elements'])]
                if request_data.get('bit') is None:
                    results.append(result)
                else:
                    if result:
                        typ, bit = request_data['bit']
                        val = bool(result.value & 1 << bit) if typ == 'bit' else result.value[bit % 32]
                        results.append(Tag(tag, val, 'BOOL', None))
                    else:
                        results.append(Tag(tag, None, None, result.error))
            except Exception as err:
                results.append(Tag(tag, None, None, f'Invalid tag request - {err}'))
        if len(tags) > 1:
            return results
        else:
            return results[0]
def read ( self , * tags : str ) -> ReturnType : parsed_requests = self . _parse_requested_tags ( tags ) requests = self . _read_build_requests ( parsed_requests ) read_results = self . _send_requests ( requests ) results = [ ] for tag in tags : try : request_data = parsed_requests [ tag ] result = read_results [ ( request_data [ 'plc_tag' ] , request_data [ 'elements' ] ) ] if request_data . get ( 'bit' ) is None : results . append ( result ) else : if result : typ , bit = request_data [ 'bit' ] val = bool ( result . value & 1 << bit ) if typ == 'bit' else result . value [ bit % 32 ] results . append ( Tag ( tag , val , 'BOOL' , None ) ) else : results . append ( Tag ( tag , None , None , result . error ) ) except Exception as err : results . append ( Tag ( tag , None , None , f'Invalid tag request - {err}' ) ) if len ( tags ) > 1 : return results else : return results [ 0 ]
Read the value of tag(s).
Read the value of tag ( s ) .
"""
        Read the value of tag(s).  Automatically will split tags into multiple requests by tracking the request and
        response size.  Will use the multi-service request to group many tags into a single packet and also will automatically
        use fragmented read requests if the response size will not fit in a single packet.  Supports arrays (specify element
        count in using curly braces (array{10}).  Also supports full structure reading (when possible), return value
        will be a dict of {attribute name: value}.

        :param tags: one or many tags to read
        :return: a single or list of ``Tag`` objects
        """
a single or list of ``Tag`` objects
a single or list of ` ` Tag ` ` objects
self
tags
str
one or many tags to read
one or many tags to read