Skip to main content

A package for communication protocol handling

Project description

Communications Protocol

这是一个用于处理通信协议的Python包,提供了一些常用的通信命令和帧创建功能。

功能

  • 握手请求
  • 数据请求
  • 设置速度
  • 停止运动
  • 设置零位
  • 单轴运动

安装

你可以通过以下命令安装此包: pip install communications_protocol-0.1.0-py3-none-any.whl

使用示例

以下是如何使用CommunicationsProtocol类的示例:

from communications_protocol import CommunicationsProtocol

创建协议实例

protocol = CommunicationsProtocol()

生成握手请求帧

handshake_frame = protocol.handshake() print("Handshake Frame:", handshake_frame)

请求数据

data_request_frame = protocol.request_data() print("Data Request Frame:", data_request_frame)

设置速度

speed_frame = protocol.set_speed(1.5) print("Set Speed Frame:", speed_frame)

停止运动

stop_frame = protocol.stop_motion(0x01) print("Stop Motion Frame:", stop_frame)

设置零位

zero_position_frame = protocol.zero_position() print("Zero Position Frame:", zero_position_frame)

单轴运动

single_axis_frame = protocol.single_axis_motion(1000) print("Single Axis Motion Frame:", single_axis_frame)

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

communications_protocol-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

communications_protocol-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file communications_protocol-0.1.0.tar.gz.

File metadata

  • Download URL: communications_protocol-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.10

File hashes

Hashes for communications_protocol-0.1.0.tar.gz
Algorithm Hash digest
SHA256 12f6c1ce58a095f16ba096b61137c28204d6ff4fc4ec4ca6888553292666a215
MD5 ad7b69a7b9904ed538b7c8efc58fb8aa
BLAKE2b-256 6a69b56f313e6ab0263db6d1f575dda5ca309ab1ba8e90f0373252c982000611

See more details on using hashes here.

File details

Details for the file communications_protocol-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for communications_protocol-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98b436cee68752b3397aae38cbefe5188cb4c006a41157952d7762a33e258734
MD5 40cfb108ad22a20ce508206f468af576
BLAKE2b-256 f3f03f2a2de5630cd97247bc9d7b6995e7621a4a1a7da305fb0f38b47b266651

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