Skip to main content

Connect hard device, socket or serial

Project description

功能说明:

封装串口和网口连接硬件 1.实现统一的发送和接收接口 2.使用工厂类生成统一的实例 3.数据通过子线程放入到FIFO队列中

文件说明

  • utils.py: 工具类, BaseConn和DequeWithMaxLen
    • BaseConn 数据入队列和取数
    • DequeWithMaxLen 实现队列
  • base_serial
    • BaseSerial 实现连接和断开
    • SerialConn 实现数据接收和发送
  • base_socket
    • BaseSocket 实现连接和断开
    • SocketConn 实现数据接收和发送
  • hard_conn
    • HardConnSock 线程方式实现数据接收
    • HardConnSerial 线程方式实现数据接收
    • hard_conn 工厂方法生成实例 在使用中使用该方法就可以

V0.2.2

add socket receive length

V0.2.1

add socket timout

V0.2.0

add send_receive Don't use sub thread receive data. main thread send command wait for server response socket add send bytes type. so users can continue to send data as needed.

V0.1.0

socket & serial connect/disconnect/send/receive Use thread to receive separately, Send use main thread, receive use sub thread

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hard_connect-0.2.2.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hard_connect-0.2.2-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file hard_connect-0.2.2.tar.gz.

File metadata

  • Download URL: hard_connect-0.2.2.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.18

File hashes

Hashes for hard_connect-0.2.2.tar.gz
Algorithm Hash digest
SHA256 ce0ff4f3a43cbf5baab617653e24987b0df12df4d824be2508516b14995dc9bc
MD5 421c630c76402ceec3350eb6b360b307
BLAKE2b-256 78b27d63b3470585bd3ce623dce114c20c4ce8b3417a7aeb60fb9301519c481a

See more details on using hashes here.

File details

Details for the file hard_connect-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: hard_connect-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.18

File hashes

Hashes for hard_connect-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8bfd73033375355f44f833416658b088c18f73bd99a6363cac8d5938ae23eed2
MD5 0166890b3a515a058539032ef837081f
BLAKE2b-256 96dbbf4c67434b92210495effeec26bdb895938ec964c2c5751f6114cd9f18a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page