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.3

add serial receive bytes

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.4.tar.gz (9.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.4-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hard_connect-0.2.4.tar.gz
  • Upload date:
  • Size: 9.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.4.tar.gz
Algorithm Hash digest
SHA256 a8246ce896ca90dcb8af28d65cde94bb2b6ad357c80a4544c59b61d423028612
MD5 85751a38c8469ac1084f481be10a9464
BLAKE2b-256 78c185fd0937cc4b711b5f2fddbf4c3bdfd4b8f636d9d768e0fd7859014af9b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hard_connect-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 8.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 90c03e76752c2980e5c8b9223ffb7fd649890ca1cfffc83437854c9cffa994d1
MD5 e1e149423acbb0dc206d4029b846ddc5
BLAKE2b-256 88b46b4524a7a7c83bbbf44e6450cea5449b6757bd4b5795f4799148f69f09fb

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