From 037d7446f40310d83965987392c1851dacb3ac54 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Mon, 5 Jun 2023 21:51:58 +0200 Subject: Update to modelrepo --- Model Repositories/ModelRepo[2.0.1-3].xml | 3672 +++++++++++++++++++++++++++++ Model Repositories/ModelRepo[2.0.1].xml | 3672 ----------------------------- Model Repositories/manual_override.json | 6 +- Model Repositories/model_renamer.py | 1 + 4 files changed, 3678 insertions(+), 3673 deletions(-) create mode 100644 Model Repositories/ModelRepo[2.0.1-3].xml delete mode 100644 Model Repositories/ModelRepo[2.0.1].xml diff --git a/Model Repositories/ModelRepo[2.0.1-3].xml b/Model Repositories/ModelRepo[2.0.1-3].xml new file mode 100644 index 0000000..3411f51 --- /dev/null +++ b/Model Repositories/ModelRepo[2.0.1-3].xml @@ -0,0 +1,3672 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Model Repositories/ModelRepo[2.0.1].xml b/Model Repositories/ModelRepo[2.0.1].xml deleted file mode 100644 index 30980e5..0000000 --- a/Model Repositories/ModelRepo[2.0.1].xml +++ /dev/null @@ -1,3672 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Model Repositories/manual_override.json b/Model Repositories/manual_override.json index a8e19fc..c3bfeba 100644 --- a/Model Repositories/manual_override.json +++ b/Model Repositories/manual_override.json @@ -13,6 +13,10 @@ "1118": "EVH 5150 Blue 6L6", "1119": "EVH 5150 Red 6L6", "1148": "EVH 5150 III 100S Red EL34", - "1149": "EVH 5150 III 100S Blue EL34" + "1149": "EVH 5150 III 100S Blue EL34", + "2017": "Ampeg Heritage B15N 6464", + "2018": "Ampeg Heritage B15N 6466", + "2019": "Ampeg Heritage B15N 6664", + "2020": "Ampeg Heritage B15N 6666" } } \ No newline at end of file diff --git a/Model Repositories/model_renamer.py b/Model Repositories/model_renamer.py index 13d929d..f4d2394 100644 --- a/Model Repositories/model_renamer.py +++ b/Model Repositories/model_renamer.py @@ -1,4 +1,5 @@ # This script will take the ModelRepo.xml file and rename the models based on the trademark +# This is not supposed to be used on the QC, it's the script used to create the ModelRepo.xml file's in this repository import argparse import json -- cgit v1.2.3 From e0a8ce99712fe380d4aed9acefc88cbffd3af911 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Mon, 21 Aug 2023 20:31:50 +0200 Subject: Updated modelrepo for 2.1.0 --- CorOS-dev-environment/filesystems/README.md | 4 +- Model Repositories/ModelRepo[2.1.0].xml | 3672 ++++++++++++++++++ .../Originals/ModelRepo[2.1.0]_OG.xml | 3899 ++++++++++++++++++++ 3 files changed, 7574 insertions(+), 1 deletion(-) create mode 100644 Model Repositories/ModelRepo[2.1.0].xml create mode 100644 Model Repositories/Originals/ModelRepo[2.1.0]_OG.xml diff --git a/CorOS-dev-environment/filesystems/README.md b/CorOS-dev-environment/filesystems/README.md index fc4da30..c71c9e0 100644 --- a/CorOS-dev-environment/filesystems/README.md +++ b/CorOS-dev-environment/filesystems/README.md @@ -4,4 +4,6 @@ Update download files are found inside `/media/p4/update-.bin` **2.0.0:** update-vm44GCkrMujYR8o47OkF8UW.AdVYyu0U -**2.0.1:** update-cIR97IrfvF4fKfO5_KIm_j_aP2zGiHp_ \ No newline at end of file +**2.0.1:** update-cIR97IrfvF4fKfO5_KIm_j_aP2zGiHp_ + +**2.1.0:** update-uzqV8VTf_hDZolQyGOVVp_FC6Eu8GtW7 \ No newline at end of file diff --git a/Model Repositories/ModelRepo[2.1.0].xml b/Model Repositories/ModelRepo[2.1.0].xml new file mode 100644 index 0000000..3411f51 --- /dev/null +++ b/Model Repositories/ModelRepo[2.1.0].xml @@ -0,0 +1,3672 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Model Repositories/Originals/ModelRepo[2.1.0]_OG.xml b/Model Repositories/Originals/ModelRepo[2.1.0]_OG.xml new file mode 100644 index 0000000..bd0aa02 --- /dev/null +++ b/Model Repositories/Originals/ModelRepo[2.1.0]_OG.xml @@ -0,0 +1,3899 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 2b2e0395ab0a87fcfafefa4fc8b7cd02577b9946 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Tue, 22 Aug 2023 21:20:00 +0200 Subject: [Fix] Messed up modelrepo for 2.1.0. This is now fixed --- Model Repositories/ModelRepo[2.1.0].xml | 3401 +++++++++--------- .../Originals/ModelRepo[2.1.0]_OG.xml | 3775 ++++++++++---------- 2 files changed, 3721 insertions(+), 3455 deletions(-) diff --git a/Model Repositories/ModelRepo[2.1.0].xml b/Model Repositories/ModelRepo[2.1.0].xml index 3411f51..1de482e 100644 --- a/Model Repositories/ModelRepo[2.1.0].xml +++ b/Model Repositories/ModelRepo[2.1.0].xml @@ -2,12 +2,14 @@ + + @@ -15,23 +17,27 @@ + + + + @@ -42,6 +48,7 @@ + @@ -52,18 +59,21 @@ + + + @@ -72,6 +82,7 @@ + @@ -81,47 +92,55 @@ + + + + + + - + + - + + @@ -129,6 +148,7 @@ + @@ -136,6 +156,7 @@ + @@ -143,83 +164,99 @@ - + + - + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - - - - + + + + + - - - - - - + + + + + + + - - - - - - - - + + + + + + + + + + @@ -230,6 +267,7 @@ + @@ -240,6 +278,7 @@ + @@ -250,29 +289,32 @@ - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + @@ -282,6 +324,7 @@ + @@ -291,6 +334,7 @@ + @@ -301,6 +345,7 @@ + @@ -311,6 +356,7 @@ + @@ -321,36 +367,40 @@ - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + + @@ -360,6 +410,7 @@ + @@ -370,6 +421,7 @@ + @@ -379,38 +431,42 @@ - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + + - - - - - - + + + + + + + + @@ -421,6 +477,7 @@ + @@ -431,6 +488,7 @@ + @@ -440,6 +498,7 @@ + @@ -450,6 +509,7 @@ + @@ -459,6 +519,7 @@ + @@ -466,6 +527,7 @@ + @@ -473,636 +535,756 @@ - - - - - + + + + + + - - - - - - + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - + + + + + + + - - - - - - + + + + + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1112,6 +1294,7 @@ + @@ -1122,6 +1305,7 @@ + @@ -1131,71 +1315,76 @@ - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + @@ -1203,6 +1392,7 @@ + @@ -1210,6 +1400,7 @@ + @@ -1217,6 +1408,7 @@ + @@ -1224,23 +1416,25 @@ - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + @@ -1248,6 +1442,7 @@ + @@ -1257,6 +1452,7 @@ + @@ -1266,12 +1462,14 @@ + + @@ -1279,6 +1477,7 @@ + @@ -1290,69 +1489,72 @@ + - + - + - + - + - + - + - + - + + - + - + - + + @@ -1367,7 +1569,8 @@ - + + @@ -1380,37 +1583,38 @@ - + - + - + - + - + + + @@ -1418,9 +1622,10 @@ - + + @@ -1431,6 +1636,7 @@ + @@ -1438,19 +1644,21 @@ - + + - - + + + @@ -1459,6 +1667,7 @@ + @@ -1466,9 +1675,10 @@ - + + @@ -1479,6 +1689,7 @@ + @@ -1486,9 +1697,10 @@ - + + @@ -1496,20 +1708,22 @@ - + + - + + @@ -1517,76 +1731,118 @@ - + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + - + + + - + + + + + + + + + + + + - + + - - - - - - + @@ -1627,31 +1905,52 @@ - - - - - - + @@ -1659,36 +1958,117 @@ + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1701,6 +2081,7 @@ + @@ -1712,6 +2093,7 @@ + @@ -1723,6 +2105,7 @@ + @@ -1734,6 +2117,7 @@ + @@ -1749,6 +2133,7 @@ + @@ -1758,6 +2143,7 @@ + @@ -1769,6 +2155,7 @@ + @@ -1783,6 +2170,7 @@ + @@ -1797,6 +2185,7 @@ + @@ -1805,7 +2194,7 @@ - + @@ -1821,6 +2210,7 @@ + @@ -1829,7 +2219,7 @@ - + @@ -1842,6 +2232,7 @@ + @@ -1856,6 +2247,7 @@ + @@ -1866,6 +2258,7 @@ + @@ -1876,6 +2269,7 @@ + @@ -1887,6 +2281,7 @@ + @@ -1898,6 +2293,7 @@ + @@ -1908,6 +2304,7 @@ + @@ -1917,6 +2314,7 @@ + @@ -1927,6 +2325,7 @@ + @@ -1938,6 +2337,7 @@ + @@ -1947,6 +2347,7 @@ + @@ -1954,7 +2355,7 @@ - + @@ -1964,6 +2365,7 @@ + @@ -1973,6 +2375,7 @@ + @@ -1981,6 +2384,7 @@ + @@ -1989,6 +2393,7 @@ + @@ -2000,6 +2405,7 @@ + @@ -2009,6 +2415,7 @@ + @@ -2018,6 +2425,7 @@ + @@ -2028,6 +2436,7 @@ + @@ -2045,6 +2454,7 @@ + @@ -2054,7 +2464,8 @@ - + + @@ -2067,7 +2478,8 @@ - + + @@ -2080,7 +2492,8 @@ - + + @@ -2096,32 +2509,42 @@ - + + - + + - + + + + + + + + - + + - + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - + + + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + + + + + - - - - - - - - - + + + + - - - - - - - - + + + - - - - - - - - - + + + + - - - - - - - - + + + - + + + + + + - + @@ -3246,6 +3244,7 @@ + @@ -3261,10 +3260,12 @@ + + @@ -3273,17 +3274,23 @@ + - + + + + + + @@ -3292,12 +3299,14 @@ + + @@ -3306,6 +3315,7 @@ + @@ -3316,6 +3326,7 @@ + @@ -3375,6 +3386,7 @@ + @@ -3451,6 +3463,7 @@ + @@ -3465,6 +3478,7 @@ + @@ -3476,6 +3490,7 @@ + @@ -3495,21 +3510,22 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -3550,11 +3566,12 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Model Repositories/Originals/ModelRepo[2.1.0]_OG.xml b/Model Repositories/Originals/ModelRepo[2.1.0]_OG.xml index bd0aa02..1f13418 100644 --- a/Model Repositories/Originals/ModelRepo[2.1.0]_OG.xml +++ b/Model Repositories/Originals/ModelRepo[2.1.0]_OG.xml @@ -2,12 +2,14 @@ + + @@ -15,23 +17,27 @@ + + + + @@ -47,6 +53,7 @@ --> + @@ -57,18 +64,21 @@ + + + @@ -77,6 +87,7 @@ + @@ -86,47 +97,55 @@ + + + + + + - + + - + + @@ -134,6 +153,7 @@ + @@ -141,6 +161,7 @@ + @@ -148,83 +169,99 @@ - + + - + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - + + + + + + + - - - - + + + + + - - - - - - + + + + + + + - - - - - - - - + + + + + + + + + + @@ -235,6 +272,7 @@ + @@ -245,6 +283,7 @@ + @@ -255,29 +294,32 @@ - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + @@ -287,6 +329,7 @@ + @@ -296,6 +339,7 @@ + @@ -306,6 +350,7 @@ + @@ -316,6 +361,7 @@ + @@ -326,36 +372,40 @@ - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + + @@ -365,6 +415,7 @@ + @@ -375,6 +426,7 @@ + @@ -384,38 +436,42 @@ - - - - - - - - - - - + + + + + + + + + + + + - - - - - - + + + + + + + - - - - - - + + + + + + + + @@ -426,6 +482,7 @@ + @@ -436,6 +493,7 @@ + @@ -445,6 +503,7 @@ + @@ -455,6 +514,7 @@ + @@ -464,6 +524,7 @@ + @@ -471,6 +532,7 @@ + @@ -478,636 +540,756 @@ - - - - - + + + + + + - - - - - - + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - + + + + + + + - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1117,6 +1299,7 @@ + @@ -1127,6 +1310,7 @@ + @@ -1136,71 +1320,76 @@ - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + @@ -1208,6 +1397,7 @@ + @@ -1215,6 +1405,7 @@ + @@ -1222,6 +1413,7 @@ + @@ -1229,23 +1421,25 @@ - - - - - - - + + + + + + + + - - - - - - - + + + + + + + + @@ -1253,6 +1447,7 @@ + @@ -1262,6 +1457,7 @@ + @@ -1271,12 +1467,14 @@ + + @@ -1284,6 +1482,7 @@ + @@ -1295,69 +1494,72 @@ + - + - + - + - + - + - + - + - + + - + - + - + + @@ -1372,7 +1574,8 @@ - + + @@ -1385,37 +1588,38 @@ - + - + - + - + - + + + @@ -1423,9 +1627,10 @@ - + + @@ -1436,6 +1641,7 @@ + @@ -1443,19 +1649,21 @@ - + + - - + + + @@ -1464,6 +1672,7 @@ + @@ -1471,9 +1680,10 @@ - + + @@ -1484,6 +1694,7 @@ + @@ -1491,9 +1702,10 @@ - + + @@ -1501,20 +1713,22 @@ - + + - + + @@ -1522,76 +1736,118 @@ - + - + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + - + + + - + + + + + + + + + + + + - + + - - - - - - + @@ -1632,31 +1910,52 @@ - - - - - - + @@ -1664,36 +1963,117 @@ + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1706,6 +2086,7 @@ + @@ -1717,6 +2098,7 @@ + @@ -1728,6 +2110,7 @@ + @@ -1739,6 +2122,7 @@ + @@ -1754,6 +2138,7 @@ + @@ -1763,6 +2148,7 @@ + @@ -1774,6 +2160,7 @@ + @@ -1788,6 +2175,7 @@ + @@ -1878,6 +2266,7 @@ --> + @@ -1886,37 +2275,38 @@ - + - - + + - + + - - - - + + + + - - + + - + @@ -2039,6 +2429,7 @@ --> + @@ -2053,6 +2444,7 @@ + @@ -2063,6 +2455,7 @@ + @@ -2073,6 +2466,7 @@ + @@ -2084,6 +2478,7 @@ + @@ -2095,6 +2490,7 @@ + @@ -2105,6 +2501,7 @@ + @@ -2114,6 +2511,7 @@ + @@ -2124,6 +2522,7 @@ + @@ -2135,6 +2534,7 @@ + @@ -2144,6 +2544,7 @@ + @@ -2151,7 +2552,7 @@ - + @@ -2161,6 +2562,7 @@ + @@ -2170,6 +2572,7 @@ + @@ -2178,6 +2581,7 @@ + @@ -2186,6 +2590,7 @@ + @@ -2197,6 +2602,7 @@ + @@ -2206,6 +2612,7 @@ + @@ -2215,6 +2622,7 @@ + @@ -2225,6 +2633,7 @@ + @@ -2242,6 +2651,7 @@ + @@ -2251,7 +2661,8 @@ - + + @@ -2264,7 +2675,8 @@ - + + @@ -2277,7 +2689,8 @@ - + + @@ -2293,34 +2706,44 @@ - + + - + + - + + + + + + + + - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + + + + - - - - + + + - - - + + + + - - - + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3445,6 +3443,7 @@ + @@ -3464,10 +3463,12 @@ + + @@ -3476,6 +3477,7 @@ + @@ -3485,13 +3487,18 @@ --> - + + + + + + + @@ -3541,6 +3551,7 @@ + @@ -3600,6 +3611,7 @@ + @@ -3676,6 +3688,7 @@ + @@ -3690,6 +3703,7 @@ + @@ -3701,6 +3715,7 @@ + @@ -3720,21 +3735,22 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -3775,11 +3791,12 @@ + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From d9e72343d0e6feb83854dbca4dc780432b561062 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Thu, 7 Sep 2023 22:12:30 +0200 Subject: Added devcontainer for vscode --- .devcontainer/devcontainer.json | 14 ++++++++++++++ CorOS-dev-environment/CorOS-emulation/docker-compose.yaml | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..ac71510 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,14 @@ +// .devcontainer/devcontainer.json +{ + "name": "CorOS DevContainer", + "workspaceFolder": "/", + "dockerComposeFile": ["../CorOS-dev-environment/CorOS-emulation/docker-compose.yaml"], + "service": "coros-emu", + "containerEnv": { + "UPDATE_FILE": "update-dYOaOKRKVdwFYyN2bb4KCKkl5Wjc1hg6.bin.gz" + }, + "forwardPorts": [5900], + "postCreateCommand": "/bin/bash", + "shutdownAction": "stopCompose" + } + \ No newline at end of file diff --git a/CorOS-dev-environment/CorOS-emulation/docker-compose.yaml b/CorOS-dev-environment/CorOS-emulation/docker-compose.yaml index 743a1a0..edd22bf 100644 --- a/CorOS-dev-environment/CorOS-emulation/docker-compose.yaml +++ b/CorOS-dev-environment/CorOS-emulation/docker-compose.yaml @@ -15,7 +15,7 @@ services: environment: # Edit this to your needs. This should be just the file name, not the path. - - UPDATE_FILE=update-v6_MZO3_RudwwcoQAF3iLtPQ0ERwy4w6.bin.gz + - UPDATE_FILE=update-dYOaOKRKVdwFYyN2bb4KCKkl5Wjc1hg6.bin.gz # Port forward the VNC port ports: -- cgit v1.2.3 From fda485fc1ec3a3ff4075ff212f22a98218f8f009 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Mon, 11 Sep 2023 20:04:45 +0200 Subject: Dev container will auto run init_system + changed workdir to ARM sysroot --- .devcontainer/default/devcontainer.json | 14 ++++++++++++++ .devcontainer/devcontainer.json | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 .devcontainer/default/devcontainer.json delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/default/devcontainer.json b/.devcontainer/default/devcontainer.json new file mode 100644 index 0000000..2a95e8c --- /dev/null +++ b/.devcontainer/default/devcontainer.json @@ -0,0 +1,14 @@ +{ + "name": "CorOS Default", + "workspaceFolder": "/opt/ARM/sysroot", + "dockerComposeFile": ["../../CorOS-dev-environment/CorOS-emulation/docker-compose.yaml"], + "service": "coros-emu", + "containerEnv": { + "UPDATE_FILE": "update-dYOaOKRKVdwFYyN2bb4KCKkl5Wjc1hg6.bin.gz" + }, + "forwardPorts": [5900], + "postCreateCommand": "/bin/bash /init_system.sh", + "postStartCommand": "/bin/bash /init_system.sh", + "shutdownAction": "stopCompose" + } + \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index ac71510..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,14 +0,0 @@ -// .devcontainer/devcontainer.json -{ - "name": "CorOS DevContainer", - "workspaceFolder": "/", - "dockerComposeFile": ["../CorOS-dev-environment/CorOS-emulation/docker-compose.yaml"], - "service": "coros-emu", - "containerEnv": { - "UPDATE_FILE": "update-dYOaOKRKVdwFYyN2bb4KCKkl5Wjc1hg6.bin.gz" - }, - "forwardPorts": [5900], - "postCreateCommand": "/bin/bash", - "shutdownAction": "stopCompose" - } - \ No newline at end of file -- cgit v1.2.3 From 9a29489a29dc91ed08bd1d502cb2964570b36f63 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Wed, 13 Sep 2023 19:06:11 +0200 Subject: [Fix] Dev container should only run init_system once on build --- .devcontainer/default/devcontainer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.devcontainer/default/devcontainer.json b/.devcontainer/default/devcontainer.json index 2a95e8c..091e946 100644 --- a/.devcontainer/default/devcontainer.json +++ b/.devcontainer/default/devcontainer.json @@ -7,7 +7,6 @@ "UPDATE_FILE": "update-dYOaOKRKVdwFYyN2bb4KCKkl5Wjc1hg6.bin.gz" }, "forwardPorts": [5900], - "postCreateCommand": "/bin/bash /init_system.sh", "postStartCommand": "/bin/bash /init_system.sh", "shutdownAction": "stopCompose" } -- cgit v1.2.3 From 3f726f67f29ba78ae32bc726611e068c695962b8 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Wed, 13 Sep 2023 19:06:38 +0200 Subject: Small change to init_system directory mount --- CorOS-dev-environment/init_system.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CorOS-dev-environment/init_system.sh b/CorOS-dev-environment/init_system.sh index dfccf58..06b0c69 100644 --- a/CorOS-dev-environment/init_system.sh +++ b/CorOS-dev-environment/init_system.sh @@ -43,8 +43,8 @@ mount --bind /etc/resolv.conf $QEMU_LD_PREFIX/etc/resolv.conf echo "Creating /media/p4" mkdir -p $QEMU_LD_PREFIX/media/p4 -echo "Creating /media/ext and mounting host /mnt on it" -mkdir -p $QEMU_LD_PREFIX/media/ext && mount --bind /mnt $QEMU_LD_PREFIX/media/ext +echo "Creating /media/host and mounting host /mnt on it" +mkdir -p $QEMU_LD_PREFIX/media/host && mount --bind /mnt $QEMU_LD_PREFIX/media/host echo "" # Promt the user to install custom QT @@ -71,3 +71,4 @@ then chroot $QEMU_LD_PREFIX sh -c "uname -a" && chroot $QEMU_LD_PREFIX/ echo "" fi + -- cgit v1.2.3 From 16d990783c9b2367a4854cd539e8efa83668ef69 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Wed, 13 Sep 2023 19:07:14 +0200 Subject: Created basic script for reading stomp data traffic + stomp bytes explained --- Stomps/README.md | 34 ++++++++++++++++++++++++++++++++++ Stomps/read_stomp.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 Stomps/README.md create mode 100644 Stomps/read_stomp.py diff --git a/Stomps/README.md b/Stomps/README.md new file mode 100644 index 0000000..33e23e1 --- /dev/null +++ b/Stomps/README.md @@ -0,0 +1,34 @@ +## Stomp message byte examples: + +**Action: button | Value: pressed** +``` +9a e5 01 65 92 bf 0c 00 01 00 11 01 01 00 00 00 9a e5 01 65 92 bf 0c 00 00 00 00 00 00 00 00 00 +``` + +**Action: button | Value: released** +``` +9b e5 01 65 4b 74 0b 00 01 00 11 01 00 00 00 00 9b e5 01 65 4b 74 0b 00 00 00 00 00 00 00 00 00 +``` + +**Action: rotary | Value: clock wise** +``` +9d e5 01 65 ac 83 04 00 02 00 08 00 01 00 00 00 9d e5 01 65 ac 83 04 00 00 00 00 00 00 00 00 00 +``` + +**Action: rotary | Value: counter clock** +``` +9e e5 01 65 40 e8 05 00 02 00 08 00 ff 00 00 00 9e e5 01 65 40 e8 05 00 00 00 00 00 00 00 00 00 +``` + +It seems that a 32 bytes message is divided into 2 parts of 16 bytes. + +### Part 1 (First 16 bytes) +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | +|---|---|---|---|---|---|---|---|---|---|--------|--------|-------|---------|---------|---------| +| time | time | time | time | time | time | time | padding? | action | action | action | action | value | padding | padding | padding | + +### Part 1 (First 16 bytes) +- 0 -> 6 are duplicates +- 7 -> 15 are padding + +From first sight, this part look quite useless. Not sure why it's even there. \ No newline at end of file diff --git a/Stomps/read_stomp.py b/Stomps/read_stomp.py new file mode 100644 index 0000000..516db24 --- /dev/null +++ b/Stomps/read_stomp.py @@ -0,0 +1,50 @@ +class StompEvent: + def __init__(self, raw_bytes): + self.raw_bytes = raw_bytes + self.action = "unknown" + self.value = "unknown" + self.decode_bytes() + + def print_bytes(self): + bytes_str = "" + for i in range(len(self.raw_bytes)): + bytes_str = bytes_str + self.raw_bytes[i].encode('hex') + ' ' + print bytes_str + print '---'*32 + + def decode_bytes(self): + action_byte_1 = self.raw_bytes[10].encode('hex') + action_byte_2 = self.raw_bytes[11].encode('hex') + value_byte = self.raw_bytes[12].encode('hex') + + if(action_byte_1 == "11" and action_byte_2 == "01"): + self.action = "button" + elif(action_byte_1 == "08" and action_byte_2 == "00"): + self.action = "rotary" + + if(value_byte == "00"): + self.value = "released" + elif(value_byte == "01"): + if(self.action == "button"): + self.value = "pressed" + elif(self.action == "rotary"): + self.value = "clock wise" + elif(value_byte == "ff"): + self.value = "counter clock" + + def __str__(self): + return "Action: " + self.action + " | Value: " + self.value + +with open('/dev/zencoder/knob_stomp2', 'rb') as file: + byte_buffer = [] + while True: + byte = file.read(1) + if not byte: + break + + byte_buffer.append(byte) + if len(byte_buffer) is 32: + event = StompEvent(byte_buffer) + print event + event.print_bytes() + byte_buffer = [] \ No newline at end of file -- cgit v1.2.3 From c602895995e5ba88dd3f29c6a984b86bd9a4f140 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Wed, 13 Sep 2023 19:11:33 +0200 Subject: Fix typos in Stomps readme --- Stomps/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Stomps/README.md b/Stomps/README.md index 33e23e1..53e5d1b 100644 --- a/Stomps/README.md +++ b/Stomps/README.md @@ -22,12 +22,12 @@ It seems that a 32 bytes message is divided into 2 parts of 16 bytes. -### Part 1 (First 16 bytes) +### Part 1 (first 16 bytes) | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | |---|---|---|---|---|---|---|---|---|---|--------|--------|-------|---------|---------|---------| -| time | time | time | time | time | time | time | padding? | action | action | action | action | value | padding | padding | padding | +| time | time | time | time | time | time | time | padding? | action | action (not really used) | action | action | value | padding | padding | padding | -### Part 1 (First 16 bytes) +### Part 1 (last 16 bytes) - 0 -> 6 are duplicates - 7 -> 15 are padding -- cgit v1.2.3 From 8f20b973a8b0dbe5cfbe021548c9fb5d0787dd05 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Wed, 13 Sep 2023 21:04:35 +0200 Subject: Updated read_stomp and added write_stomp proof of concept --- Stomps/README.md | 2 +- Stomps/read_stomp.py | 28 +++++++++++++++++-- Stomps/write_stomp.py | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 4 deletions(-) create mode 100644 Stomps/write_stomp.py diff --git a/Stomps/README.md b/Stomps/README.md index 53e5d1b..da4fe92 100644 --- a/Stomps/README.md +++ b/Stomps/README.md @@ -25,7 +25,7 @@ It seems that a 32 bytes message is divided into 2 parts of 16 bytes. ### Part 1 (first 16 bytes) | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | |---|---|---|---|---|---|---|---|---|---|--------|--------|-------|---------|---------|---------| -| time | time | time | time | time | time | time | padding? | action | action (not really used) | action | action | value | padding | padding | padding | +| time | time | time | time | ? | ? | ? | padding? | action | action (not really used) | action | action | value | padding | padding | padding | ### Part 1 (last 16 bytes) - 0 -> 6 are duplicates diff --git a/Stomps/read_stomp.py b/Stomps/read_stomp.py index 516db24..65dcdae 100644 --- a/Stomps/read_stomp.py +++ b/Stomps/read_stomp.py @@ -1,8 +1,15 @@ +# Quick and simple Python 2 script to read the raw bytes, +# from a stomp device on the Quad Cortex. + +from datetime import datetime + class StompEvent: def __init__(self, raw_bytes): self.raw_bytes = raw_bytes self.action = "unknown" self.value = "unknown" + self.system_epoch = datetime.now().strftime("%s") + self.system_datetime = datetime.now() self.decode_bytes() def print_bytes(self): @@ -13,15 +20,20 @@ class StompEvent: print '---'*32 def decode_bytes(self): + self.decode_action() + self.decode_value() + self.decode_time() + + def decode_action(self): action_byte_1 = self.raw_bytes[10].encode('hex') action_byte_2 = self.raw_bytes[11].encode('hex') - value_byte = self.raw_bytes[12].encode('hex') - if(action_byte_1 == "11" and action_byte_2 == "01"): self.action = "button" elif(action_byte_1 == "08" and action_byte_2 == "00"): self.action = "rotary" + def decode_value(self): + value_byte = self.raw_bytes[12].encode('hex') if(value_byte == "00"): self.value = "released" elif(value_byte == "01"): @@ -32,8 +44,18 @@ class StompEvent: elif(value_byte == "ff"): self.value = "counter clock" + def decode_time(self): + # the first 4 bytes form the time + time_bytes = self.raw_bytes[0:4] + time_bytes.reverse() + time_hex = "" + for i in range(len(time_bytes)): + time_hex = time_hex + time_bytes[i].encode('hex') + self.epoch = int(time_hex, 16) + self.date_time = datetime.fromtimestamp(self.epoch) + def __str__(self): - return "Action: " + self.action + " | Value: " + self.value + return "Action: " + self.action + "\nValue: " + self.value + "\nEpoch: " + str(self.epoch) + "\nDatetime: " + str(self.date_time) with open('/dev/zencoder/knob_stomp2', 'rb') as file: byte_buffer = [] diff --git a/Stomps/write_stomp.py b/Stomps/write_stomp.py new file mode 100644 index 0000000..002acd4 --- /dev/null +++ b/Stomps/write_stomp.py @@ -0,0 +1,76 @@ +# Quick and simple Python 2 script to write the raw bytes, +# to a stomp device on the Quad Cortex. + +from datetime import datetime + +class StompCommand: + def __init__(self, action, value): + self.action = action + self.value = value + self.raw_bytes = bytearray(32) + self.encode_bytes() + + def encode_bytes(self): + self.encode_time() + self.encode_action() + self.encode_value() + self.build_last_16_bytes() + + def encode_time(self): + epoch = datetime.now().strftime("%s") + epoch_hex = hex(int(epoch))[2:] + epoch_bytes = bytearray.fromhex(epoch_hex) + epoch_bytes.reverse() + for i in range(4): + self.raw_bytes[i] = epoch_bytes[i] + + def encode_action(self): + self.raw_bytes[9] = 0x00 + if(self.action == "button"): + self.raw_bytes[8] = 0x01 + self.raw_bytes[10] = 0x11 + self.raw_bytes[11] = 0x01 + elif(self.action == "rotary"): + self.raw_bytes[8] = 0x01 + self.raw_bytes[10] = 0x08 + self.raw_bytes[11] = 0x00 + + def encode_value(self): + if(self.value == "pressed"): + self.raw_bytes[12] = 0x01 + elif(self.value == "released"): + self.raw_bytes[12] = 0x00 + elif(self.value == "clock wise"): + self.raw_bytes[12] = 0x01 + elif(self.value == "counter clock"): + self.raw_bytes[12] = 0xff + + def build_last_16_bytes(self): + # build the last 16 bytes + for i in range(6): + self.raw_bytes[16+i] = self.raw_bytes[i] + + def bytes_to_hex(self): + bytes_str = "" + for i in range(len(self.raw_bytes)): + bytes_str = bytes_str + str(self.raw_bytes[i]) + ' ' + return bytes_str + + def __str__(self): + return "Action: " + self.action + "\nValue: " + self.value + "\nBytes: " + self.bytes_to_hex() + + +with open('/dev/zencoder/knob_stomp2', 'wb') as file: + # write a button press + command = StompCommand("button", "pressed") + print command + file.write(command.raw_bytes) + + print '' + + # write a button release + command = StompCommand("button", "released") + print command + file.write(command.raw_bytes) + # close the file + file.close() \ No newline at end of file -- cgit v1.2.3 From 14fef5db770b3af8668d08524ae6fa19791b2cb3 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Wed, 13 Sep 2023 21:33:42 +0200 Subject: Created util that allows on the fly stomp control --- Stomps/stomp_control.py | 131 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 Stomps/stomp_control.py diff --git a/Stomps/stomp_control.py b/Stomps/stomp_control.py new file mode 100644 index 0000000..add3dd8 --- /dev/null +++ b/Stomps/stomp_control.py @@ -0,0 +1,131 @@ +# Code copied to be easy to use as one script + +from datetime import datetime + +class StompCommand: + def __init__(self, action, value): + self.action = action + self.value = value + self.raw_bytes = bytearray(32) + self.encode_bytes() + + def encode_bytes(self): + self.encode_time() + self.encode_action() + self.encode_value() + self.build_last_16_bytes() + + def encode_time(self): + epoch = datetime.now().strftime("%s") + epoch_hex = hex(int(epoch))[2:] + epoch_bytes = bytearray.fromhex(epoch_hex) + epoch_bytes.reverse() + for i in range(4): + self.raw_bytes[i] = epoch_bytes[i] + + def encode_action(self): + self.raw_bytes[9] = 0x00 + if(self.action == "button"): + self.raw_bytes[8] = 0x01 + self.raw_bytes[10] = 0x11 + self.raw_bytes[11] = 0x01 + elif(self.action == "rotary"): + self.raw_bytes[8] = 0x01 + self.raw_bytes[10] = 0x08 + self.raw_bytes[11] = 0x00 + + def encode_value(self): + if(self.value == "pressed"): + self.raw_bytes[12] = 0x01 + elif(self.value == "released"): + self.raw_bytes[12] = 0x00 + elif(self.value == "clock wise"): + self.raw_bytes[12] = 0x01 + elif(self.value == "counter clock"): + self.raw_bytes[12] = 0xff + + def build_last_16_bytes(self): + # build the last 16 bytes + for i in range(6): + self.raw_bytes[16+i] = self.raw_bytes[i] + + def bytes_to_hex(self): + bytes_str = "" + for i in range(len(self.raw_bytes)): + bytes_str = bytes_str + str(self.raw_bytes[i]) + ' ' + return bytes_str + + def __str__(self): + return "Action: " + self.action + "\nValue: " + self.value + "\nBytes: " + self.bytes_to_hex() + +class StompEvent: + def __init__(self, raw_bytes): + self.raw_bytes = raw_bytes + self.action = "unknown" + self.value = "unknown" + self.system_epoch = datetime.now().strftime("%s") + self.system_datetime = datetime.now() + self.decode_bytes() + + def print_bytes(self): + bytes_str = "" + for i in range(len(self.raw_bytes)): + bytes_str = bytes_str + self.raw_bytes[i].encode('hex') + ' ' + print bytes_str + print '---'*32 + + def decode_bytes(self): + self.decode_action() + self.decode_value() + self.decode_time() + + def decode_action(self): + action_byte_1 = self.raw_bytes[10].encode('hex') + action_byte_2 = self.raw_bytes[11].encode('hex') + if(action_byte_1 == "11" and action_byte_2 == "01"): + self.action = "button" + elif(action_byte_1 == "08" and action_byte_2 == "00"): + self.action = "rotary" + + def decode_value(self): + value_byte = self.raw_bytes[12].encode('hex') + if(value_byte == "00"): + self.value = "released" + elif(value_byte == "01"): + if(self.action == "button"): + self.value = "pressed" + elif(self.action == "rotary"): + self.value = "clock wise" + elif(value_byte == "ff"): + self.value = "counter clock" + + def decode_time(self): + # the first 4 bytes form the time + time_bytes = self.raw_bytes[0:4] + time_bytes.reverse() + time_hex = "" + for i in range(len(time_bytes)): + time_hex = time_hex + time_bytes[i].encode('hex') + self.epoch = int(time_hex, 16) + self.date_time = datetime.fromtimestamp(self.epoch) + + def __str__(self): + return "Action: " + self.action + "\nValue: " + self.value + "\nEpoch: " + str(self.epoch) + "\nDatetime: " + str(self.date_time) + +# Open knob_stomp1 to 11, listen for numeric input and switch on input +dev_file_names = [] +for i in range(1,12): + dev_file_names.append('/dev/zencoder/knob_stomp' + str(i)) + +def switch_stomp(selected_stomp): + with open(dev_file_names[selected_stomp-1], 'wb') as file: + press_command = StompCommand("button", "pressed") + file.write(press_command.raw_bytes) + release_command = StompCommand("button", "released") + file.write(release_command.raw_bytes) + +while True: + selected_stomp = int(input("Enter a stomp between 1 and 11: ")) + if(selected_stomp > 0 and selected_stomp < 12): + print "Switching stomp " + str(selected_stomp) + switch_stomp(selected_stomp) \ No newline at end of file -- cgit v1.2.3 From 3ba4308938bcab5a23ae96b0809895ef28d47720 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Thu, 14 Sep 2023 17:50:49 +0200 Subject: Refactored stomp code + added websocket server for stomp control --- Stomps/README.md | 14 + .../SimpleWebSocketServer/SimpleWebSocketServer.py | 735 +++++++++++++++++++++ Stomps/SimpleWebSocketServer/__init__.py | 3 + Stomps/read_stomp.py | 56 +- Stomps/stomp.py | 110 +++ Stomps/stomp_control.py | 131 +--- Stomps/stomp_scroll.py | 23 + Stomps/stomp_server.py | 98 +++ Stomps/write_stomp.py | 76 --- 9 files changed, 992 insertions(+), 254 deletions(-) create mode 100644 Stomps/SimpleWebSocketServer/SimpleWebSocketServer.py create mode 100644 Stomps/SimpleWebSocketServer/__init__.py create mode 100644 Stomps/stomp.py create mode 100644 Stomps/stomp_scroll.py create mode 100644 Stomps/stomp_server.py delete mode 100644 Stomps/write_stomp.py diff --git a/Stomps/README.md b/Stomps/README.md index da4fe92..9d995ec 100644 --- a/Stomps/README.md +++ b/Stomps/README.md @@ -1,3 +1,17 @@ +## Installation + +1) Take this folder `Stomps` and put it anywhere you like on the QC + +## Usage + +`cd` into the `Stomps` directory installed on the QC and run any of the Python scripts. + +There are a couple of fun things to play around with. +1) **read_stomp.py:** Allows you to decode and read stomp device traffic +2) **stomp_control.py:** CLI tool to activate stomps +3) **stomp_scroll.py:** Just a fun visual effect +4) **stomp_server.py:** Spawns a websocket server that allows you to control stomps over IP + ## Stomp message byte examples: **Action: button | Value: pressed** diff --git a/Stomps/SimpleWebSocketServer/SimpleWebSocketServer.py b/Stomps/SimpleWebSocketServer/SimpleWebSocketServer.py new file mode 100644 index 0000000..ea528ee --- /dev/null +++ b/Stomps/SimpleWebSocketServer/SimpleWebSocketServer.py @@ -0,0 +1,735 @@ +''' +The MIT License (MIT) +Copyright (c) 2013 Dave P. +''' +import sys +VER = sys.version_info[0] +if VER >= 3: + import socketserver + from http.server import BaseHTTPRequestHandler + from io import StringIO, BytesIO +else: + import SocketServer + from BaseHTTPServer import BaseHTTPRequestHandler + from StringIO import StringIO + +import hashlib +import base64 +import socket +import struct +import ssl +import errno +import codecs +from collections import deque +from select import select + +__all__ = ['WebSocket', + 'SimpleWebSocketServer', + 'SimpleSSLWebSocketServer'] + +def _check_unicode(val): + if VER >= 3: + return isinstance(val, str) + else: + return isinstance(val, basestring) + +class HTTPRequest(BaseHTTPRequestHandler): + def __init__(self, request_text): + if VER >= 3: + self.rfile = BytesIO(request_text) + else: + self.rfile = StringIO(request_text) + self.raw_requestline = self.rfile.readline() + self.error_code = self.error_message = None + self.parse_request() + +_VALID_STATUS_CODES = [1000, 1001, 1002, 1003, 1007, 1008, + 1009, 1010, 1011, 3000, 3999, 4000, 4999] + +HANDSHAKE_STR = ( + "HTTP/1.1 101 Switching Protocols\r\n" + "Upgrade: WebSocket\r\n" + "Connection: Upgrade\r\n" + "Sec-WebSocket-Accept: %(acceptstr)s\r\n\r\n" +) + +FAILED_HANDSHAKE_STR = ( + "HTTP/1.1 426 Upgrade Required\r\n" + "Upgrade: WebSocket\r\n" + "Connection: Upgrade\r\n" + "Sec-WebSocket-Version: 13\r\n" + "Content-Type: text/plain\r\n\r\n" + "This service requires use of the WebSocket protocol\r\n" +) + +GUID_STR = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' + +STREAM = 0x0 +TEXT = 0x1 +BINARY = 0x2 +CLOSE = 0x8 +PING = 0x9 +PONG = 0xA + +HEADERB1 = 1 +HEADERB2 = 3 +LENGTHSHORT = 4 +LENGTHLONG = 5 +MASK = 6 +PAYLOAD = 7 + +MAXHEADER = 65536 +MAXPAYLOAD = 33554432 + +class WebSocket(object): + + def __init__(self, server, sock, address): + self.server = server + self.client = sock + self.address = address + + self.handshaked = False + self.headerbuffer = bytearray() + self.headertoread = 2048 + + self.fin = 0 + self.data = bytearray() + self.opcode = 0 + self.hasmask = 0 + self.maskarray = None + self.length = 0 + self.lengtharray = None + self.index = 0 + self.request = None + self.usingssl = False + + self.frag_start = False + self.frag_type = BINARY + self.frag_buffer = None + self.frag_decoder = codecs.getincrementaldecoder('utf-8')(errors='strict') + self.closed = False + self.sendq = deque() + + self.state = HEADERB1 + + # restrict the size of header and payload for security reasons + self.maxheader = MAXHEADER + self.maxpayload = MAXPAYLOAD + + def handleMessage(self): + """ + Called when websocket frame is received. + To access the frame data call self.data. + + If the frame is Text then self.data is a unicode object. + If the frame is Binary then self.data is a bytearray object. + """ + pass + + def handleConnected(self): + """ + Called when a websocket client connects to the server. + """ + pass + + def handleClose(self): + """ + Called when a websocket server gets a Close frame from a client. + """ + pass + + def _handlePacket(self): + if self.opcode == CLOSE: + pass + elif self.opcode == STREAM: + pass + elif self.opcode == TEXT: + pass + elif self.opcode == BINARY: + pass + elif self.opcode == PONG or self.opcode == PING: + if len(self.data) > 125: + raise Exception('control frame length can not be > 125') + else: + # unknown or reserved opcode so just close + raise Exception('unknown opcode') + + if self.opcode == CLOSE: + status = 1000 + reason = u'' + length = len(self.data) + + if length == 0: + pass + elif length >= 2: + status = struct.unpack_from('!H', self.data[:2])[0] + reason = self.data[2:] + + if status not in _VALID_STATUS_CODES: + status = 1002 + + if len(reason) > 0: + try: + reason = reason.decode('utf8', errors='strict') + except: + status = 1002 + else: + status = 1002 + + self.close(status, reason) + return + + elif self.fin == 0: + if self.opcode != STREAM: + if self.opcode == PING or self.opcode == PONG: + raise Exception('control messages can not be fragmented') + + self.frag_type = self.opcode + self.frag_start = True + self.frag_decoder.reset() + + if self.frag_type == TEXT: + self.frag_buffer = [] + utf_str = self.frag_decoder.decode(self.data, final = False) + if utf_str: + self.frag_buffer.append(utf_str) + else: + self.frag_buffer = bytearray() + self.frag_buffer.extend(self.data) + + else: + if self.frag_start is False: + raise Exception('fragmentation protocol error') + + if self.frag_type == TEXT: + utf_str = self.frag_decoder.decode(self.data, final = False) + if utf_str: + self.frag_buffer.append(utf_str) + else: + self.frag_buffer.extend(self.data) + + else: + if self.opcode == STREAM: + if self.frag_start is False: + raise Exception('fragmentation protocol error') + + if self.frag_type == TEXT: + utf_str = self.frag_decoder.decode(self.data, final = True) + self.frag_buffer.append(utf_str) + self.data = u''.join(self.frag_buffer) + else: + self.frag_buffer.extend(self.data) + self.data = self.frag_buffer + + self.handleMessage() + + self.frag_decoder.reset() + self.frag_type = BINARY + self.frag_start = False + self.frag_buffer = None + + elif self.opcode == PING: + self._sendMessage(False, PONG, self.data) + + elif self.opcode == PONG: + pass + + else: + if self.frag_start is True: + raise Exception('fragmentation protocol error') + + if self.opcode == TEXT: + try: + self.data = self.data.decode('utf8', errors='strict') + except Exception as exp: + raise Exception('invalid utf-8 payload') + + self.handleMessage() + + + def _handleData(self): + # do the HTTP header and handshake + if self.handshaked is False: + + try: + data = self.client.recv(self.headertoread) + except (ssl.SSLWantReadError, ssl.SSLWantWriteError): + # SSL socket not ready to read yet, wait and try again + return + if not data: + raise Exception('remote socket closed') + + else: + # accumulate + self.headerbuffer.extend(data) + + if len(self.headerbuffer) >= self.maxheader: + raise Exception('header exceeded allowable size') + + # indicates end of HTTP header + if b'\r\n\r\n' in self.headerbuffer: + self.request = HTTPRequest(self.headerbuffer) + + # handshake rfc 6455 + try: + key = self.request.headers['Sec-WebSocket-Key'] + k = key.encode('ascii') + GUID_STR.encode('ascii') + k_s = base64.b64encode(hashlib.sha1(k).digest()).decode('ascii') + hStr = HANDSHAKE_STR % {'acceptstr': k_s} + self.sendq.append((BINARY, hStr.encode('ascii'))) + self.handshaked = True + self.handleConnected() + except Exception as e: + hStr = FAILED_HANDSHAKE_STR + self._sendBuffer(hStr.encode('ascii'), True) + self.client.close() + raise Exception('handshake failed: %s', str(e)) + + # else do normal data + else: + try: + data = self.client.recv(16384) + except (ssl.SSLWantReadError, ssl.SSLWantWriteError): + # SSL socket not ready to read yet, wait and try again + return + if not data: + raise Exception("remote socket closed") + + if VER >= 3: + for d in data: + self._parseMessage(d) + else: + for d in data: + self._parseMessage(ord(d)) + + def close(self, status = 1000, reason = u''): + """ + Send Close frame to the client. The underlying socket is only closed + when the client acknowledges the Close frame. + + status is the closing identifier. + reason is the reason for the close. + """ + try: + if self.closed is False: + close_msg = bytearray() + close_msg.extend(struct.pack("!H", status)) + if _check_unicode(reason): + close_msg.extend(reason.encode('utf-8')) + else: + close_msg.extend(reason) + + self._sendMessage(False, CLOSE, close_msg) + + finally: + self.closed = True + + + def _sendBuffer(self, buff, send_all = False): + size = len(buff) + tosend = size + already_sent = 0 + + while tosend > 0: + try: + # i should be able to send a bytearray + sent = self.client.send(buff[already_sent:]) + if sent == 0: + raise RuntimeError('socket connection broken') + + already_sent += sent + tosend -= sent + + except (ssl.SSLWantReadError, ssl.SSLWantWriteError): + # SSL socket not ready to send yet, wait and try again + if send_all: + continue + return buff[already_sent:] + + except socket.error as e: + # if we have full buffers then wait for them to drain and try again + if e.errno in [errno.EAGAIN, errno.EWOULDBLOCK]: + if send_all: + continue + return buff[already_sent:] + else: + raise e + + return None + + def sendFragmentStart(self, data): + """ + Send the start of a data fragment stream to a websocket client. + Subsequent data should be sent using sendFragment(). + A fragment stream is completed when sendFragmentEnd() is called. + + If data is a unicode object then the frame is sent as Text. + If the data is a bytearray object then the frame is sent as Binary. + """ + opcode = BINARY + if _check_unicode(data): + opcode = TEXT + self._sendMessage(True, opcode, data) + + def sendFragment(self, data): + """ + see sendFragmentStart() + + If data is a unicode object then the frame is sent as Text. + If the data is a bytearray object then the frame is sent as Binary. + """ + self._sendMessage(True, STREAM, data) + + def sendFragmentEnd(self, data): + """ + see sendFragmentEnd() + + If data is a unicode object then the frame is sent as Text. + If the data is a bytearray object then the frame is sent as Binary. + """ + self._sendMessage(False, STREAM, data) + + def sendMessage(self, data): + """ + Send websocket data frame to the client. + + If data is a unicode object then the frame is sent as Text. + If the data is a bytearray object then the frame is sent as Binary. + """ + opcode = BINARY + if _check_unicode(data): + opcode = TEXT + self._sendMessage(False, opcode, data) + + + def _sendMessage(self, fin, opcode, data): + + payload = bytearray() + + b1 = 0 + b2 = 0 + if fin is False: + b1 |= 0x80 + b1 |= opcode + + if _check_unicode(data): + data = data.encode('utf-8') + + length = len(data) + payload.append(b1) + + if length <= 125: + b2 |= length + payload.append(b2) + + elif length >= 126 and length <= 65535: + b2 |= 126 + payload.append(b2) + payload.extend(struct.pack("!H", length)) + + else: + b2 |= 127 + payload.append(b2) + payload.extend(struct.pack("!Q", length)) + + if length > 0: + payload.extend(data) + + self.sendq.append((opcode, payload)) + + + def _parseMessage(self, byte): + # read in the header + if self.state == HEADERB1: + + self.fin = byte & 0x80 + self.opcode = byte & 0x0F + self.state = HEADERB2 + + self.index = 0 + self.length = 0 + self.lengtharray = bytearray() + self.data = bytearray() + + rsv = byte & 0x70 + if rsv != 0: + raise Exception('RSV bit must be 0') + + elif self.state == HEADERB2: + mask = byte & 0x80 + length = byte & 0x7F + + if self.opcode == PING and length > 125: + raise Exception('ping packet is too large') + + if mask == 128: + self.hasmask = True + else: + self.hasmask = False + + if length <= 125: + self.length = length + + # if we have a mask we must read it + if self.hasmask is True: + self.maskarray = bytearray() + self.state = MASK + else: + # if there is no mask and no payload we are done + if self.length <= 0: + try: + self._handlePacket() + finally: + self.state = HEADERB1 + self.data = bytearray() + + # we have no mask and some payload + else: + #self.index = 0 + self.data = bytearray() + self.state = PAYLOAD + + elif length == 126: + self.lengtharray = bytearray() + self.state = LENGTHSHORT + + elif length == 127: + self.lengtharray = bytearray() + self.state = LENGTHLONG + + + elif self.state == LENGTHSHORT: + self.lengtharray.append(byte) + + if len(self.lengtharray) > 2: + raise Exception('short length exceeded allowable size') + + if len(self.lengtharray) == 2: + self.length = struct.unpack_from('!H', self.lengtharray)[0] + + if self.hasmask is True: + self.maskarray = bytearray() + self.state = MASK + else: + # if there is no mask and no payload we are done + if self.length <= 0: + try: + self._handlePacket() + finally: + self.state = HEADERB1 + self.data = bytearray() + + # we have no mask and some payload + else: + #self.index = 0 + self.data = bytearray() + self.state = PAYLOAD + + elif self.state == LENGTHLONG: + + self.lengtharray.append(byte) + + if len(self.lengtharray) > 8: + raise Exception('long length exceeded allowable size') + + if len(self.lengtharray) == 8: + self.length = struct.unpack_from('!Q', self.lengtharray)[0] + + if self.hasmask is True: + self.maskarray = bytearray() + self.state = MASK + else: + # if there is no mask and no payload we are done + if self.length <= 0: + try: + self._handlePacket() + finally: + self.state = HEADERB1 + self.data = bytearray() + + # we have no mask and some payload + else: + #self.index = 0 + self.data = bytearray() + self.state = PAYLOAD + + # MASK STATE + elif self.state == MASK: + self.maskarray.append(byte) + + if len(self.maskarray) > 4: + raise Exception('mask exceeded allowable size') + + if len(self.maskarray) == 4: + # if there is no mask and no payload we are done + if self.length <= 0: + try: + self._handlePacket() + finally: + self.state = HEADERB1 + self.data = bytearray() + + # we have no mask and some payload + else: + #self.index = 0 + self.data = bytearray() + self.state = PAYLOAD + + # PAYLOAD STATE + elif self.state == PAYLOAD: + if self.hasmask is True: + self.data.append( byte ^ self.maskarray[self.index % 4] ) + else: + self.data.append( byte ) + + # if length exceeds allowable size then we except and remove the connection + if len(self.data) >= self.maxpayload: + raise Exception('payload exceeded allowable size') + + # check if we have processed length bytes; if so we are done + if (self.index+1) == self.length: + try: + self._handlePacket() + finally: + #self.index = 0 + self.state = HEADERB1 + self.data = bytearray() + else: + self.index += 1 + + +class SimpleWebSocketServer(object): + def __init__(self, host, port, websocketclass, selectInterval = 0.1): + self.websocketclass = websocketclass + + if (host == ''): + host = None + + hostInfo = socket.getaddrinfo(host, port, socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP, socket.AI_PASSIVE) + self.serversocket = socket.socket(socket.AF_INET, hostInfo[0][1], hostInfo[0][2]) + self.serversocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + self.serversocket.bind(hostInfo[0][4]) + self.serversocket.listen(5) + self.selectInterval = selectInterval + self.connections = {} + self.listeners = [self.serversocket] + + def _decorateSocket(self, sock): + return sock + + def _constructWebSocket(self, sock, address): + return self.websocketclass(self, sock, address) + + def close(self): + self.serversocket.close() + + for desc, conn in self.connections.items(): + conn.close() + self._handleClose(conn) + + def _handleClose(self, client): + client.client.close() + # only call handleClose when we have a successful websocket connection + if client.handshaked: + try: + client.handleClose() + except: + pass + + def serveonce(self): + writers = [] + for fileno in self.listeners: + if fileno == self.serversocket: + continue + client = self.connections[fileno] + if client.sendq: + writers.append(fileno) + + rList, wList, xList = select(self.listeners, writers, self.listeners, self.selectInterval) + + for ready in wList: + client = self.connections[ready] + try: + while client.sendq: + opcode, payload = client.sendq.popleft() + remaining = client._sendBuffer(payload) + if remaining is not None: + client.sendq.appendleft((opcode, remaining)) + break + else: + if opcode == CLOSE: + raise Exception('received client close') + + except Exception as n: + self._handleClose(client) + del self.connections[ready] + self.listeners.remove(ready) + + for ready in rList: + if ready == self.serversocket: + sock = None + try: + sock, address = self.serversocket.accept() + newsock = self._decorateSocket(sock) + newsock.setblocking(0) + fileno = newsock.fileno() + self.connections[fileno] = self._constructWebSocket(newsock, address) + self.listeners.append(fileno) + except Exception as n: + if sock is not None: + sock.close() + else: + if ready not in self.connections: + continue + client = self.connections[ready] + try: + client._handleData() + except Exception as n: + self._handleClose(client) + del self.connections[ready] + self.listeners.remove(ready) + + for failed in xList: + if failed == self.serversocket: + self.close() + raise Exception('server socket failed') + else: + if failed not in self.connections: + continue + client = self.connections[failed] + self._handleClose(client) + del self.connections[failed] + self.listeners.remove(failed) + + def serveforever(self): + while True: + self.serveonce() + +class SimpleSSLWebSocketServer(SimpleWebSocketServer): + + def __init__(self, host, port, websocketclass, certfile = None, + keyfile = None, version = ssl.PROTOCOL_TLSv1_2, selectInterval = 0.1, ssl_context = None): + + SimpleWebSocketServer.__init__(self, host, port, + websocketclass, selectInterval) + + if ssl_context is None: + self.context = ssl.SSLContext(version) + self.context.load_cert_chain(certfile, keyfile) + else: + self.context = ssl_context + + def close(self): + super(SimpleSSLWebSocketServer, self).close() + + def _decorateSocket(self, sock): + sslsock = self.context.wrap_socket(sock, server_side=True) + return sslsock + + def _constructWebSocket(self, sock, address): + ws = self.websocketclass(self, sock, address) + ws.usingssl = True + return ws + + def serveforever(self): + super(SimpleSSLWebSocketServer, self).serveforever() diff --git a/Stomps/SimpleWebSocketServer/__init__.py b/Stomps/SimpleWebSocketServer/__init__.py new file mode 100644 index 0000000..c7e52b8 --- /dev/null +++ b/Stomps/SimpleWebSocketServer/__init__.py @@ -0,0 +1,3 @@ +from .SimpleWebSocketServer import * + +name="SimpleWebSocketServer" diff --git a/Stomps/read_stomp.py b/Stomps/read_stomp.py index 65dcdae..d1ff7f0 100644 --- a/Stomps/read_stomp.py +++ b/Stomps/read_stomp.py @@ -1,61 +1,7 @@ # Quick and simple Python 2 script to read the raw bytes, # from a stomp device on the Quad Cortex. -from datetime import datetime - -class StompEvent: - def __init__(self, raw_bytes): - self.raw_bytes = raw_bytes - self.action = "unknown" - self.value = "unknown" - self.system_epoch = datetime.now().strftime("%s") - self.system_datetime = datetime.now() - self.decode_bytes() - - def print_bytes(self): - bytes_str = "" - for i in range(len(self.raw_bytes)): - bytes_str = bytes_str + self.raw_bytes[i].encode('hex') + ' ' - print bytes_str - print '---'*32 - - def decode_bytes(self): - self.decode_action() - self.decode_value() - self.decode_time() - - def decode_action(self): - action_byte_1 = self.raw_bytes[10].encode('hex') - action_byte_2 = self.raw_bytes[11].encode('hex') - if(action_byte_1 == "11" and action_byte_2 == "01"): - self.action = "button" - elif(action_byte_1 == "08" and action_byte_2 == "00"): - self.action = "rotary" - - def decode_value(self): - value_byte = self.raw_bytes[12].encode('hex') - if(value_byte == "00"): - self.value = "released" - elif(value_byte == "01"): - if(self.action == "button"): - self.value = "pressed" - elif(self.action == "rotary"): - self.value = "clock wise" - elif(value_byte == "ff"): - self.value = "counter clock" - - def decode_time(self): - # the first 4 bytes form the time - time_bytes = self.raw_bytes[0:4] - time_bytes.reverse() - time_hex = "" - for i in range(len(time_bytes)): - time_hex = time_hex + time_bytes[i].encode('hex') - self.epoch = int(time_hex, 16) - self.date_time = datetime.fromtimestamp(self.epoch) - - def __str__(self): - return "Action: " + self.action + "\nValue: " + self.value + "\nEpoch: " + str(self.epoch) + "\nDatetime: " + str(self.date_time) +from stomp import StompEvent with open('/dev/zencoder/knob_stomp2', 'rb') as file: byte_buffer = [] diff --git a/Stomps/stomp.py b/Stomps/stomp.py new file mode 100644 index 0000000..e244ead --- /dev/null +++ b/Stomps/stomp.py @@ -0,0 +1,110 @@ +from datetime import datetime + +class StompCommand: + def __init__(self, action, value): + self.action = action + self.value = value + self.raw_bytes = bytearray(32) + self.encode_bytes() + + def encode_bytes(self): + self.encode_time() + self.encode_action() + self.encode_value() + self.build_last_16_bytes() + + def encode_time(self): + epoch = datetime.now().strftime("%s") + epoch_hex = hex(int(epoch))[2:] + epoch_bytes = bytearray.fromhex(epoch_hex) + epoch_bytes.reverse() + for i in range(4): + self.raw_bytes[i] = epoch_bytes[i] + + def encode_action(self): + self.raw_bytes[9] = 0x00 + if(self.action == "button"): + self.raw_bytes[8] = 0x01 + self.raw_bytes[10] = 0x11 + self.raw_bytes[11] = 0x01 + elif(self.action == "rotary"): + self.raw_bytes[8] = 0x01 + self.raw_bytes[10] = 0x08 + self.raw_bytes[11] = 0x00 + + def encode_value(self): + if(self.value == "pressed"): + self.raw_bytes[12] = 0x01 + elif(self.value == "released"): + self.raw_bytes[12] = 0x00 + elif(self.value == "clock wise"): + self.raw_bytes[12] = 0x01 + elif(self.value == "counter clock"): + self.raw_bytes[12] = 0xff + + def build_last_16_bytes(self): + # build the last 16 bytes + for i in range(6): + self.raw_bytes[16+i] = self.raw_bytes[i] + + def bytes_to_hex(self): + bytes_str = "" + for i in range(len(self.raw_bytes)): + bytes_str = bytes_str + str(self.raw_bytes[i]) + ' ' + return bytes_str + + def __str__(self): + return "Action: " + self.action + "\nValue: " + self.value + "\nBytes: " + self.bytes_to_hex() + + +class StompEvent: + def __init__(self, raw_bytes): + self.raw_bytes = raw_bytes + self.action = "unknown" + self.value = "unknown" + self.decode_bytes() + + def print_bytes(self): + bytes_str = "" + for i in range(len(self.raw_bytes)): + bytes_str = bytes_str + self.raw_bytes[i].encode('hex') + ' ' + print bytes_str + print '---'*32 + + def decode_bytes(self): + self.decode_action() + self.decode_value() + self.decode_time() + + def decode_action(self): + action_byte_1 = self.raw_bytes[10].encode('hex') + action_byte_2 = self.raw_bytes[11].encode('hex') + if(action_byte_1 == "11" and action_byte_2 == "01"): + self.action = "button" + elif(action_byte_1 == "08" and action_byte_2 == "00"): + self.action = "rotary" + + def decode_value(self): + value_byte = self.raw_bytes[12].encode('hex') + if(value_byte == "00"): + self.value = "released" + elif(value_byte == "01"): + if(self.action == "button"): + self.value = "pressed" + elif(self.action == "rotary"): + self.value = "clock wise" + elif(value_byte == "ff"): + self.value = "counter clock" + + def decode_time(self): + # the first 4 bytes form the time + time_bytes = self.raw_bytes[0:4] + time_bytes.reverse() + time_hex = "" + for i in range(len(time_bytes)): + time_hex = time_hex + time_bytes[i].encode('hex') + self.epoch = int(time_hex, 16) + self.date_time = datetime.fromtimestamp(self.epoch) + + def __str__(self): + return "Action: " + self.action + "\nValue: " + self.value + "\nEpoch: " + str(self.epoch) + "\nDatetime: " + str(self.date_time) diff --git a/Stomps/stomp_control.py b/Stomps/stomp_control.py index add3dd8..86aae20 100644 --- a/Stomps/stomp_control.py +++ b/Stomps/stomp_control.py @@ -1,131 +1,16 @@ # Code copied to be easy to use as one script - -from datetime import datetime - -class StompCommand: - def __init__(self, action, value): - self.action = action - self.value = value - self.raw_bytes = bytearray(32) - self.encode_bytes() - - def encode_bytes(self): - self.encode_time() - self.encode_action() - self.encode_value() - self.build_last_16_bytes() - - def encode_time(self): - epoch = datetime.now().strftime("%s") - epoch_hex = hex(int(epoch))[2:] - epoch_bytes = bytearray.fromhex(epoch_hex) - epoch_bytes.reverse() - for i in range(4): - self.raw_bytes[i] = epoch_bytes[i] - - def encode_action(self): - self.raw_bytes[9] = 0x00 - if(self.action == "button"): - self.raw_bytes[8] = 0x01 - self.raw_bytes[10] = 0x11 - self.raw_bytes[11] = 0x01 - elif(self.action == "rotary"): - self.raw_bytes[8] = 0x01 - self.raw_bytes[10] = 0x08 - self.raw_bytes[11] = 0x00 - - def encode_value(self): - if(self.value == "pressed"): - self.raw_bytes[12] = 0x01 - elif(self.value == "released"): - self.raw_bytes[12] = 0x00 - elif(self.value == "clock wise"): - self.raw_bytes[12] = 0x01 - elif(self.value == "counter clock"): - self.raw_bytes[12] = 0xff - - def build_last_16_bytes(self): - # build the last 16 bytes - for i in range(6): - self.raw_bytes[16+i] = self.raw_bytes[i] - - def bytes_to_hex(self): - bytes_str = "" - for i in range(len(self.raw_bytes)): - bytes_str = bytes_str + str(self.raw_bytes[i]) + ' ' - return bytes_str - - def __str__(self): - return "Action: " + self.action + "\nValue: " + self.value + "\nBytes: " + self.bytes_to_hex() +from stomp import StompCommand -class StompEvent: - def __init__(self, raw_bytes): - self.raw_bytes = raw_bytes - self.action = "unknown" - self.value = "unknown" - self.system_epoch = datetime.now().strftime("%s") - self.system_datetime = datetime.now() - self.decode_bytes() - - def print_bytes(self): - bytes_str = "" - for i in range(len(self.raw_bytes)): - bytes_str = bytes_str + self.raw_bytes[i].encode('hex') + ' ' - print bytes_str - print '---'*32 - - def decode_bytes(self): - self.decode_action() - self.decode_value() - self.decode_time() - - def decode_action(self): - action_byte_1 = self.raw_bytes[10].encode('hex') - action_byte_2 = self.raw_bytes[11].encode('hex') - if(action_byte_1 == "11" and action_byte_2 == "01"): - self.action = "button" - elif(action_byte_1 == "08" and action_byte_2 == "00"): - self.action = "rotary" - - def decode_value(self): - value_byte = self.raw_bytes[12].encode('hex') - if(value_byte == "00"): - self.value = "released" - elif(value_byte == "01"): - if(self.action == "button"): - self.value = "pressed" - elif(self.action == "rotary"): - self.value = "clock wise" - elif(value_byte == "ff"): - self.value = "counter clock" - - def decode_time(self): - # the first 4 bytes form the time - time_bytes = self.raw_bytes[0:4] - time_bytes.reverse() - time_hex = "" - for i in range(len(time_bytes)): - time_hex = time_hex + time_bytes[i].encode('hex') - self.epoch = int(time_hex, 16) - self.date_time = datetime.fromtimestamp(self.epoch) - - def __str__(self): - return "Action: " + self.action + "\nValue: " + self.value + "\nEpoch: " + str(self.epoch) + "\nDatetime: " + str(self.date_time) - -# Open knob_stomp1 to 11, listen for numeric input and switch on input -dev_file_names = [] -for i in range(1,12): - dev_file_names.append('/dev/zencoder/knob_stomp' + str(i)) - def switch_stomp(selected_stomp): - with open(dev_file_names[selected_stomp-1], 'wb') as file: + with open('/dev/zencoder/knob_stomp' + str(selected_stomp), 'wb') as file: press_command = StompCommand("button", "pressed") file.write(press_command.raw_bytes) release_command = StompCommand("button", "released") file.write(release_command.raw_bytes) -while True: - selected_stomp = int(input("Enter a stomp between 1 and 11: ")) - if(selected_stomp > 0 and selected_stomp < 12): - print "Switching stomp " + str(selected_stomp) - switch_stomp(selected_stomp) \ No newline at end of file +if __name__ == "__main__": + while True: + selected_stomp = int(input("Enter a stomp between 1 and 11: ")) + if(selected_stomp > 0 and selected_stomp < 12): + print "Switching stomp " + str(selected_stomp) + switch_stomp(selected_stomp) \ No newline at end of file diff --git a/Stomps/stomp_scroll.py b/Stomps/stomp_scroll.py new file mode 100644 index 0000000..c10ddd2 --- /dev/null +++ b/Stomps/stomp_scroll.py @@ -0,0 +1,23 @@ +from stomp import StompCommand + +# Open knob_stomp1 to 11, listen for numeric input and switch on input +dev_file_names = [] +for i in range(1,12): + dev_file_names.append('/dev/zencoder/knob_stomp' + str(i)) + +def switch_stomp(selected_stomp): + with open(dev_file_names[selected_stomp-1], 'wb') as file: + press_command = StompCommand("button", "pressed") + file.write(press_command.raw_bytes) + release_command = StompCommand("button", "released") + file.write(release_command.raw_bytes) + +selected_stomp = 1 +while True: + if(selected_stomp > 0 and selected_stomp < 10): + if selected_stomp != 5: + print "Switching stomp " + str(selected_stomp) + switch_stomp(selected_stomp) + selected_stomp = selected_stomp + 1 + else: + selected_stomp = 1 \ No newline at end of file diff --git a/Stomps/stomp_server.py b/Stomps/stomp_server.py new file mode 100644 index 0000000..9ef213b --- /dev/null +++ b/Stomps/stomp_server.py @@ -0,0 +1,98 @@ +''' +The MIT License (MIT) +Copyright (c) 2013 Dave P. +''' + +import signal +import sys +import ssl +from SimpleWebSocketServer import WebSocket, SimpleWebSocketServer, SimpleSSLWebSocketServer +from optparse import OptionParser +import json +from stomp_control import switch_stomp + +class StompServer(WebSocket): + + # Request is a JSON object with the following fields: + # { + # "type": "button", + # "action": "activate", + # "index": 1 + # } + + def handleMessage(self): + print "Received" + self.data + + try: + json_request = json.loads(self.data) + except ValueError: + self.sendMessage("Invalid request") + return + print "JSON request: " + str(json_request) + "\n Validating..." + + try: + type = json_request['type'] + action = json_request['action'] + index = json_request['index'] + except: + self.sendMessage("Invalid request") + return + + print "Type: " + type + ", action: " + action + ", index: " + str(index) + + if type == 'button': + if action == 'activate': + switch_stomp(int(index)) + + self.sendMessage("Success") + + def handleConnected(self): + print (self.address, 'connected') + + def handleClose(self): + print (self.address, 'closed') + + def validate_request(req): + if not req: + return False + if not req['type']: + return False + if not req['action']: + return False + if not req['index']: + return False + + if req['type'] != 'button' and req['type'] != 'rotary': + return False + if req['action'] != 'activate': + return False + if req['index'] < 1 or req['index'] > 11: + return False + return True + + +if __name__ == "__main__": + parser = OptionParser(usage="usage: %prog [options]", version="%prog 1.0") + parser.add_option("--host", default='', type='string', action="store", dest="host", help="hostname (localhost)") + parser.add_option("--port", default=8000, type='int', action="store", dest="port", help="port (8000)") + parser.add_option("--ssl", default=0, type='int', action="store", dest="ssl", help="ssl (1: on, 0: off (default))") + parser.add_option("--cert", default='./cert.pem', type='string', action="store", dest="cert", help="cert (./cert.pem)") + parser.add_option("--key", default='./key.pem', type='string', action="store", dest="key", help="key (./key.pem)") + parser.add_option("--ver", default=ssl.PROTOCOL_TLSv1, type=int, action="store", dest="ver", help="ssl version") + + (options, args) = parser.parse_args() + print "Starting server on port " + str(options.port) + cls = StompServer + + if options.ssl == 1: + server = SimpleSSLWebSocketServer(options.host, options.port, cls, options.cert, options.key, version=options.ver) + else: + server = SimpleWebSocketServer(options.host, options.port, cls) + + def close_sig_handler(signal, frame): + server.close() + sys.exit() + + signal.signal(signal.SIGINT, close_sig_handler) + + server.serveforever() diff --git a/Stomps/write_stomp.py b/Stomps/write_stomp.py deleted file mode 100644 index 002acd4..0000000 --- a/Stomps/write_stomp.py +++ /dev/null @@ -1,76 +0,0 @@ -# Quick and simple Python 2 script to write the raw bytes, -# to a stomp device on the Quad Cortex. - -from datetime import datetime - -class StompCommand: - def __init__(self, action, value): - self.action = action - self.value = value - self.raw_bytes = bytearray(32) - self.encode_bytes() - - def encode_bytes(self): - self.encode_time() - self.encode_action() - self.encode_value() - self.build_last_16_bytes() - - def encode_time(self): - epoch = datetime.now().strftime("%s") - epoch_hex = hex(int(epoch))[2:] - epoch_bytes = bytearray.fromhex(epoch_hex) - epoch_bytes.reverse() - for i in range(4): - self.raw_bytes[i] = epoch_bytes[i] - - def encode_action(self): - self.raw_bytes[9] = 0x00 - if(self.action == "button"): - self.raw_bytes[8] = 0x01 - self.raw_bytes[10] = 0x11 - self.raw_bytes[11] = 0x01 - elif(self.action == "rotary"): - self.raw_bytes[8] = 0x01 - self.raw_bytes[10] = 0x08 - self.raw_bytes[11] = 0x00 - - def encode_value(self): - if(self.value == "pressed"): - self.raw_bytes[12] = 0x01 - elif(self.value == "released"): - self.raw_bytes[12] = 0x00 - elif(self.value == "clock wise"): - self.raw_bytes[12] = 0x01 - elif(self.value == "counter clock"): - self.raw_bytes[12] = 0xff - - def build_last_16_bytes(self): - # build the last 16 bytes - for i in range(6): - self.raw_bytes[16+i] = self.raw_bytes[i] - - def bytes_to_hex(self): - bytes_str = "" - for i in range(len(self.raw_bytes)): - bytes_str = bytes_str + str(self.raw_bytes[i]) + ' ' - return bytes_str - - def __str__(self): - return "Action: " + self.action + "\nValue: " + self.value + "\nBytes: " + self.bytes_to_hex() - - -with open('/dev/zencoder/knob_stomp2', 'wb') as file: - # write a button press - command = StompCommand("button", "pressed") - print command - file.write(command.raw_bytes) - - print '' - - # write a button release - command = StompCommand("button", "released") - print command - file.write(command.raw_bytes) - # close the file - file.close() \ No newline at end of file -- cgit v1.2.3