-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from SCHUNK-SE-Co-KG/add-test-dummy
Add a minimalist dummy for simulating communication
- Loading branch information
Showing
45 changed files
with
5,162 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
#/usr/bin/bash | ||
cd $HOME | ||
apt-get install curl libcurl4-openssl-dev | ||
apt-get install -y curl libcurl4-openssl-dev | ||
|
||
# Python dependencies | ||
python_deps="fastapi uvicorn httpx requests coverage python-multipart" | ||
os_name=$(lsb_release -cs) | ||
|
||
case $os_name in | ||
jammy) # Ubuntu 22.04 | ||
pip install --user $python_deps | ||
;; | ||
kinetic) # Ubuntu 24.04 | ||
pip install --break-system-packages $python_deps | ||
;; | ||
*) # Newer | ||
pip install --break-system-packages $python_deps | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
/install/ | ||
/log/ | ||
/.vscode | ||
|
||
# Ignore test coverage artifacts | ||
*.coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Schunk EGU/EGK Dummy | ||
A minimalist protocol simulator for system tests. | ||
|
||
## Dependencies | ||
|
||
```bash | ||
pip install --user fastapi uvicorn | ||
``` | ||
|
||
## Getting started | ||
1. Start the dummy standalone with | ||
```bash | ||
uvicorn schunk_egu_egk_gripper_dummy.main:server --port 8000 --reload | ||
``` | ||
|
||
## Run tests locally | ||
|
||
```bash | ||
pip install --user pytest httpx coverage | ||
``` | ||
|
||
```bash | ||
coverage run -m pytest tests/ | ||
coverage report | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Reading system parameters from a gripper | ||
The system parameters are mentioned in the gripper's datasheet [Commissioning Instructions, Firmware 5.2 EGU with EtherNet/IP interface](https://stb.cloud.schunk.com/media/IM0046706.PDF). | ||
|
||
## Enums | ||
The easiest approach is reading enums from a web browser. | ||
Enums need to be accessed via the _DEC_ identifier. | ||
For instance, reading available error codes for the enum `HEX=0x0118` (`DEC=280`) would be | ||
```browser | ||
http://<gripper-ip>/adi/enum.json?inst=280 | ||
``` | ||
|
||
## Metadata | ||
|
||
```bash | ||
http://<gripper-ip>/adi/metadata.json?offset=0&count=300 | ||
``` | ||
|
||
## Data | ||
Use this script that reads the data directly from the gripper: | ||
```bash | ||
./read_system_parameters.py <gripper-ip> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
{ | ||
"0x0040": [ | ||
"800000800000A25800000000D90000EF" | ||
], | ||
"0x0048": [ | ||
"05000000000000000000000000000000" | ||
], | ||
"0x0100": [ | ||
"0000" | ||
], | ||
"0x0118": [ | ||
"EF" | ||
], | ||
"0x0120": [ | ||
"00" | ||
], | ||
"0x0128": [ | ||
"001F" | ||
], | ||
"0x0130": [ | ||
"3238343A32363A3532203C307846343E206D6F766520626C6F636B6564206F6363757272656420696E2063757272656E74207374617465203420286170706C69636174696F6E5F73746174655F6D616368696E652E683A3A313334392900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" | ||
], | ||
"0x0210": [ | ||
"00000000" | ||
], | ||
"0x0230": [ | ||
"42263D87" | ||
], | ||
"0x0238": [ | ||
"00000000" | ||
], | ||
"0x0380": [ | ||
"0000" | ||
], | ||
"0x03A8": [ | ||
"3F828F5C" | ||
], | ||
"0x03B0": [ | ||
"000000000000000042A70000000000000000000000000000" | ||
], | ||
"0x03B8": [ | ||
"BF251EB8BEAD844D423A7AE1448EC57E44E16CEE45066271" | ||
], | ||
"0x0500": [ | ||
"12" | ||
], | ||
"0x0528": [ | ||
"3F800000" | ||
], | ||
"0x0540": [ | ||
"40A00000" | ||
], | ||
"0x0580": [ | ||
"40000000" | ||
], | ||
"0x0588": [ | ||
"42A60000" | ||
], | ||
"0x05A8": [ | ||
"40A00000" | ||
], | ||
"0x0600": [ | ||
"00000000" | ||
], | ||
"0x0608": [ | ||
"42A60000" | ||
], | ||
"0x0610": [ | ||
"00000000" | ||
], | ||
"0x0628": [ | ||
"40B00000" | ||
], | ||
"0x0630": [ | ||
"42E60000" | ||
], | ||
"0x0650": [ | ||
"41B00000" | ||
], | ||
"0x0658": [ | ||
"42960000" | ||
], | ||
"0x0660": [ | ||
"43160000" | ||
], | ||
"0x06A8": [ | ||
"00000000" | ||
], | ||
"0x0800": [ | ||
"4199999A" | ||
], | ||
"0x0808": [ | ||
"41F00000" | ||
], | ||
"0x0810": [ | ||
"4199999A" | ||
], | ||
"0x0818": [ | ||
"41E66666" | ||
], | ||
"0x0820": [ | ||
"C0A00000" | ||
], | ||
"0x0828": [ | ||
"42AA0000" | ||
], | ||
"0x0840": [ | ||
"421EAE6D" | ||
], | ||
"0x0870": [ | ||
"41BA5871" | ||
], | ||
"0x0878": [ | ||
"41C04897" | ||
], | ||
"0x0880": [ | ||
"41ACCCCD" | ||
], | ||
"0x0888": [ | ||
"41D33333" | ||
], | ||
"0x0890": [ | ||
"41ACCCCD" | ||
], | ||
"0x0898": [ | ||
"41D33333" | ||
], | ||
"0x08A0": [ | ||
"40A00000" | ||
], | ||
"0x08A8": [ | ||
"42960000" | ||
], | ||
"0x1000": [ | ||
"4E534E53303731390000000000000000" | ||
], | ||
"0x1008": [ | ||
"31323334350000000000000000000000" | ||
], | ||
"0x1020": [ | ||
"3B036ECF" | ||
], | ||
"0x1100": [ | ||
"536570202034203230323300" | ||
], | ||
"0x1108": [ | ||
"31383A30343A313400" | ||
], | ||
"0x1110": [ | ||
"01F6" | ||
], | ||
"0x1118": [ | ||
"352E322E302E38313839360000000000000000000000" | ||
], | ||
"0x1120": [ | ||
"322E312E3100000000000000" | ||
], | ||
"0x1130": [ | ||
"01" | ||
], | ||
"0x1138": [ | ||
"0030114844C7" | ||
], | ||
"0x1330": [ | ||
"01" | ||
], | ||
"0x1400": [ | ||
"00000A69" | ||
] | ||
} |
Oops, something went wrong.