From f9cb60281a942499c5237420cf0574adf28b8848 Mon Sep 17 00:00:00 2001 From: Conrad Kreyling Date: Mon, 20 Nov 2023 13:26:32 -0500 Subject: [PATCH] Correct gpepIncomingMessageHandler data signature (#594) * Correct gpepIncomingMessageHandler data signature This assumes that it's the same across all versions. Of course, that's very difficult to validate given the state of EZSP documentation. However, on v8 this is absolutely correct, and I don't see a reason why it might be only v8 as opposed to everywhere else * Fix whitespace with pre-commit for CI --------- Co-authored-by: Conrad Kreyling --- bellows/ezsp/v10/commands.py | 25 ++++++++++++++----------- bellows/ezsp/v4/commands.py | 27 +++++++++++++++------------ bellows/ezsp/v5/commands.py | 27 +++++++++++++++------------ bellows/ezsp/v6/commands.py | 27 +++++++++++++++------------ bellows/ezsp/v7/commands.py | 27 +++++++++++++++------------ bellows/ezsp/v8/commands.py | 25 ++++++++++++++----------- bellows/ezsp/v9/commands.py | 25 ++++++++++++++----------- 7 files changed, 102 insertions(+), 81 deletions(-) diff --git a/bellows/ezsp/v10/commands.py b/bellows/ezsp/v10/commands.py index b1888b2c..726e5a41 100644 --- a/bellows/ezsp/v10/commands.py +++ b/bellows/ezsp/v10/commands.py @@ -628,19 +628,22 @@ 0x00C5, (), ( - t.EmberStatus, - t.uint8_t, - t.uint8_t, - t.EmberGpAddress, + t.EmberStatus, # status + t.uint8_t, # gpd link + t.uint8_t, # sequence number + t.uint8_t, # addrType + t.uint32_t, # address + t.uint32_t, # src ID + t.uint8_t, # endpoint t.EmberGpSecurityLevel, t.EmberGpKeyType, - t.Bool, - t.Bool, - t.uint32_t, - t.uint8_t, - t.uint32_t, - t.EmberGpSinkListEntry, - t.LVBytes, + t.Bool, # auto commissioning + t.Bool, # rx capable? + t.uint32_t, # security frame counter + t.uint8_t, # gpd command id + t.uint32_t, # MIC + t.uint8_t, # proxy table index + t.LVBytes, # optional payload ), ), "gpProxyTableGetEntry": ( diff --git a/bellows/ezsp/v4/commands.py b/bellows/ezsp/v4/commands.py index 23e4bda8..29074ea0 100644 --- a/bellows/ezsp/v4/commands.py +++ b/bellows/ezsp/v4/commands.py @@ -608,22 +608,25 @@ ), "dGpSentHandler": (0xC7, (), (t.EmberStatus, t.uint8_t)), "gpepIncomingMessageHandler": ( - 0xC5, + 0x00C5, (), ( - t.EmberStatus, - t.uint8_t, - t.uint8_t, - t.EmberGpAddress, + t.EmberStatus, # status + t.uint8_t, # gpd link + t.uint8_t, # sequence number + t.uint8_t, # addrType + t.uint32_t, # address + t.uint32_t, # src ID + t.uint8_t, # endpoint t.EmberGpSecurityLevel, t.EmberGpKeyType, - t.Bool, - t.Bool, - t.uint32_t, - t.uint8_t, - t.uint32_t, - t.EmberGpSinkListEntry, - t.LVBytes, + t.Bool, # auto commissioning + t.Bool, # rx capable? + t.uint32_t, # security frame counter + t.uint8_t, # gpd command id + t.uint32_t, # MIC + t.uint8_t, # proxy table index + t.LVBytes, # optional payload ), ), } diff --git a/bellows/ezsp/v5/commands.py b/bellows/ezsp/v5/commands.py index ed06fabf..e349233b 100644 --- a/bellows/ezsp/v5/commands.py +++ b/bellows/ezsp/v5/commands.py @@ -615,22 +615,25 @@ ), "dGpSentHandler": (0xC7, (), (t.EmberStatus, t.uint8_t)), "gpepIncomingMessageHandler": ( - 0xC5, + 0x00C5, (), ( - t.EmberStatus, - t.uint8_t, - t.uint8_t, - t.EmberGpAddress, + t.EmberStatus, # status + t.uint8_t, # gpd link + t.uint8_t, # sequence number + t.uint8_t, # addrType + t.uint32_t, # address + t.uint32_t, # src ID + t.uint8_t, # endpoint t.EmberGpSecurityLevel, t.EmberGpKeyType, - t.Bool, - t.Bool, - t.uint32_t, - t.uint8_t, - t.uint32_t, - t.EmberGpSinkListEntry, - t.LVBytes, + t.Bool, # auto commissioning + t.Bool, # rx capable? + t.uint32_t, # security frame counter + t.uint8_t, # gpd command id + t.uint32_t, # MIC + t.uint8_t, # proxy table index + t.LVBytes, # optional payload ), ), "setSecurityKey": ( diff --git a/bellows/ezsp/v6/commands.py b/bellows/ezsp/v6/commands.py index ad66b9f2..bf2c6701 100644 --- a/bellows/ezsp/v6/commands.py +++ b/bellows/ezsp/v6/commands.py @@ -561,22 +561,25 @@ ), "dGpSentHandler": (0xC7, (), (t.EmberStatus, t.uint8_t)), "gpepIncomingMessageHandler": ( - 0xC5, + 0x00C5, (), ( - t.EmberStatus, - t.uint8_t, - t.uint8_t, - t.EmberGpAddress, + t.EmberStatus, # status + t.uint8_t, # gpd link + t.uint8_t, # sequence number + t.uint8_t, # addrType + t.uint32_t, # address + t.uint32_t, # src ID + t.uint8_t, # endpoint t.EmberGpSecurityLevel, t.EmberGpKeyType, - t.Bool, - t.Bool, - t.uint32_t, - t.uint8_t, - t.uint32_t, - t.EmberGpSinkListEntry, - t.LVBytes, + t.Bool, # auto commissioning + t.Bool, # rx capable? + t.uint32_t, # security frame counter + t.uint8_t, # gpd command id + t.uint32_t, # MIC + t.uint8_t, # proxy table index + t.LVBytes, # optional payload ), ), "gpProxyTableGetEntry": ( diff --git a/bellows/ezsp/v7/commands.py b/bellows/ezsp/v7/commands.py index 4c0d89bd..dc9c901a 100644 --- a/bellows/ezsp/v7/commands.py +++ b/bellows/ezsp/v7/commands.py @@ -602,22 +602,25 @@ ), "dGpSentHandler": (0xC7, (), (t.EmberStatus, t.uint8_t)), "gpepIncomingMessageHandler": ( - 0xC5, + 0x00C5, (), ( - t.EmberStatus, - t.uint8_t, - t.uint8_t, - t.EmberGpAddress, + t.EmberStatus, # status + t.uint8_t, # gpd link + t.uint8_t, # sequence number + t.uint8_t, # addrType + t.uint32_t, # address + t.uint32_t, # src ID + t.uint8_t, # endpoint t.EmberGpSecurityLevel, t.EmberGpKeyType, - t.Bool, - t.Bool, - t.uint32_t, - t.uint8_t, - t.uint32_t, - t.EmberGpSinkListEntry, - t.LVBytes, + t.Bool, # auto commissioning + t.Bool, # rx capable? + t.uint32_t, # security frame counter + t.uint8_t, # gpd command id + t.uint32_t, # MIC + t.uint8_t, # proxy table index + t.LVBytes, # optional payload ), ), "gpProxyTableGetEntry": ( diff --git a/bellows/ezsp/v8/commands.py b/bellows/ezsp/v8/commands.py index ea2b07cc..25d0c295 100644 --- a/bellows/ezsp/v8/commands.py +++ b/bellows/ezsp/v8/commands.py @@ -628,19 +628,22 @@ 0x00C5, (), ( - t.EmberStatus, - t.uint8_t, - t.uint8_t, - t.EmberGpAddress, + t.EmberStatus, # status + t.uint8_t, # gpd link + t.uint8_t, # sequence number + t.uint8_t, # addrType + t.uint32_t, # address + t.uint32_t, # src ID + t.uint8_t, # endpoint t.EmberGpSecurityLevel, t.EmberGpKeyType, - t.Bool, - t.Bool, - t.uint32_t, - t.uint8_t, - t.uint32_t, - t.EmberGpSinkListEntry, - t.LVBytes, + t.Bool, # auto commissioning + t.Bool, # rx capable? + t.uint32_t, # security frame counter + t.uint8_t, # gpd command id + t.uint32_t, # MIC + t.uint8_t, # proxy table index + t.LVBytes, # optional payload ), ), "gpProxyTableGetEntry": ( diff --git a/bellows/ezsp/v9/commands.py b/bellows/ezsp/v9/commands.py index f668f994..4ecbdd2f 100644 --- a/bellows/ezsp/v9/commands.py +++ b/bellows/ezsp/v9/commands.py @@ -624,19 +624,22 @@ 0x00C5, (), ( - t.EmberStatus, - t.uint8_t, - t.uint8_t, - t.EmberGpAddress, + t.EmberStatus, # status + t.uint8_t, # gpd link + t.uint8_t, # sequence number + t.uint8_t, # addrType + t.uint32_t, # address + t.uint32_t, # src ID + t.uint8_t, # endpoint t.EmberGpSecurityLevel, t.EmberGpKeyType, - t.Bool, - t.Bool, - t.uint32_t, - t.uint8_t, - t.uint32_t, - t.EmberGpSinkListEntry, - t.LVBytes, + t.Bool, # auto commissioning + t.Bool, # rx capable? + t.uint32_t, # security frame counter + t.uint8_t, # gpd command id + t.uint32_t, # MIC + t.uint8_t, # proxy table index + t.LVBytes, # optional payload ), ), "gpProxyTableGetEntry": (