Changeset 90cd378 in ammosreader
- Timestamp:
- 05/28/23 15:46:54 (2 years ago)
- Branches:
- AmmosSource
- Children:
- 351c39d
- Parents:
- d6535bd
- Location:
- ammosreader
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ammosreader/AbstractAmmosReader.py
rd6535bd r90cd378 48 48 def resync(self): 49 49 """I try to resync, when reading from source was garbled.""" 50 logger.info("Resync") 50 51 self.source.resync() 51 52 -
ammosreader/AmmosSocketSource.py
rd6535bd r90cd378 25 25 logger.info("Start reading bytes from socket") 26 26 try: 27 while len(byte_array) < bytes_to_read:27 while bytes_to_read > len(byte_array): 28 28 logger.info("Remaining Bytes: %s", bytes_to_read - len(byte_array)) 29 29 self.source.settimeout(self.timeout) … … 37 37 logger.info("Timeout error while reading from socket") 38 38 return None 39 logger.info("All bytes read") 39 40 return b''.join(byte_array)
Note:
See TracChangeset
for help on using the changeset viewer.