Python wrapper for the Agito AAComm .NET communication library
Project description
AACommPy
Python wrapper for the Agito AAComm .NET communication library. Provides full access to AAComm's motion controller API with IDE IntelliSense support.
Requirements
- Python >= 3.10
- Windows (Linux support planned)
- .NET Framework 4.8 and/or .NET 6.0/8.0 runtime
Installation
pip install aacommpy
The AAComm NuGet package is downloaded automatically on first import.
To install a specific AAComm version manually:
aacommpy install --version 11.1.0
Quick Start
from aacommpy import CommAPI, Services, Shared, AACOMM_SERVER_EXE_PATH
# Start server
CommAPI.StartAACommServer(AACOMM_SERVER_EXE_PATH)
# Configure connection
api = CommAPI()
cData = Services.ConnectionData()
cData.ControllerType = Shared.ProductTypes.AGM800_ID
cData.CommChannelType = Shared.ChannelType.Ethernet
cData.ET_IP_1 = 172
cData.ET_IP_2 = 1
cData.ET_IP_3 = 1
cData.ET_IP_4 = 101
cData.ET_Port = 50000
# Connect
result = api.Connect(cData)
print(f"Connected: {api.IsConnected}")
# Communicate
msg = Services.AACommMessage()
msg.MessageStr = "ASpeed"
reply = api.SendReceive(msg)
print(f"Speed: {reply.ReplyStr}")
# Disconnect
api.Disconnect()
api.CloseAACommServer(False)
.NET Framework Selection
AAComm supports multiple .NET targets. Switch with:
aacommpy dotnetfw --netfw net48 # .NET Framework 4.8 (default)
aacommpy dotnetfw --netfw net6.0 # .NET 6.0
aacommpy dotnetfw --netfw net8.0 # .NET 8.0
The runtime (netfx or coreclr) is configured automatically based on your selection.
Check installed .NET versions:
aacommpy dotnetfw --check
CLI Commands
| Command | Description |
|---|---|
aacommpy install [--version X.Y.Z] |
Download and install AAComm NuGet package |
aacommpy version |
Show installed AAComm version |
aacommpy update |
Update to latest AAComm version |
aacommpy dotnetfw --netfw {net48,net6.0,net8.0} |
Switch .NET target framework |
aacommpy dotnetfw --check |
List installed .NET runtimes |
IntelliSense
AACommPy ships with type stubs (.pyi) for full IDE autocomplete and type checking. Supported in VS Code (Pylance), Visual Studio, and PyCharm.
To regenerate stubs after updating AAComm:
python generate_stubs.py
API Reference
The package exposes these AAComm namespaces:
| Import | Contents |
|---|---|
CommAPI |
Main communication API (connect, send, receive, disconnect) |
CommAPIWrapper |
Singleton wrapper for single-client usage |
Services |
ConnectionData, AACommMessage, AllStatInterpreter, ControllerMessagesContainer, ... |
Shared |
ChannelType, ProductTypes, ConnectResult, MessageType, ... |
Extensions |
AACommDownloadFW, AACommDownloadUP, AACommDownloadFPGA, data recording, ... |
All types are .NET objects accessed via pythonnet. See the AAComm documentation for full API details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aacommpy-1.0.0.tar.gz.
File metadata
- Download URL: aacommpy-1.0.0.tar.gz
- Upload date:
- Size: 39.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80f1a1258072be09fbfd9ad4081a3e123d1875bc6d52e2fb488476e2d00795c2
|
|
| MD5 |
1aea1e0d0b460277531de1ddecff2ff7
|
|
| BLAKE2b-256 |
5e484db0237d9dba412f25c31a695ae82294c30691721541973c52463ca3c293
|
File details
Details for the file aacommpy-1.0.0-py3-none-any.whl.
File metadata
- Download URL: aacommpy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 41.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
837a313939c6682d8354c9c73e3a5da8c09f27474d0703601149a9a27fbfd07e
|
|
| MD5 |
a35be42b2d9043144a3d6bcfd2130551
|
|
| BLAKE2b-256 |
9d92890067012c433fc9d1bbda3c954865b7dfc82a9fe06ba7f8553227670720
|