mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-10 01:05:42 +00:00
added further examples for decoder test
This commit is contained in:
parent
e41facca1d
commit
19fbeec864
1 changed files with 9 additions and 1 deletions
|
@ -203,6 +203,7 @@ def testByteArrayConversion(s):
|
||||||
|
|
||||||
def testDecoder(strHex, pre="DH", comment=""):
|
def testDecoder(strHex, pre="DH", comment=""):
|
||||||
global nFail
|
global nFail
|
||||||
|
strHex = strHex.replace(" ", "") # remove blanks
|
||||||
print("Decoder test for " + comment + " with data " + strHex)
|
print("Decoder test for " + comment + " with data " + strHex)
|
||||||
decoded=exiDecode(strHex, pre)
|
decoded=exiDecode(strHex, pre)
|
||||||
print(decoded)
|
print(decoded)
|
||||||
|
@ -240,12 +241,19 @@ if __name__ == "__main__":
|
||||||
testDecoder("809a001150400000c80006400000", pre="DD", comment="PreChargeReq")
|
testDecoder("809a001150400000c80006400000", pre="DD", comment="PreChargeReq")
|
||||||
testDecoder("809a00116002000000320000", pre="DD", comment="PreChargeRes")
|
testDecoder("809a00116002000000320000", pre="DD", comment="PreChargeRes")
|
||||||
|
|
||||||
if (True):
|
if (False):
|
||||||
print("The request from the Ioniq after the EVSE sent ServicePaymentSelectionRes:")
|
print("The request from the Ioniq after the EVSE sent ServicePaymentSelectionRes:")
|
||||||
testDecoder("809A00113020000A00000000", pre="DD", comment="PowerDeliveryReq")
|
testDecoder("809A00113020000A00000000", pre="DD", comment="PowerDeliveryReq")
|
||||||
if (True):
|
if (True):
|
||||||
print("The session setup request of the Ioniq:")
|
print("The session setup request of the Ioniq:")
|
||||||
testDecoder("809A02000000000000000011D01811959401930C00", pre="DD", comment="SessionSetupReq")
|
testDecoder("809A02000000000000000011D01811959401930C00", pre="DD", comment="SessionSetupReq")
|
||||||
|
testDecoder("80 9A 02 00 40 80 C1 01 41 81 C2 11 E0 00 00 80", pre="DD", comment="SessionSetupRes")
|
||||||
|
testDecoder("80 9A 02 00 40 80 C1 01 41 81 C2 11 94 00", pre="DD", comment="ServiceDiscoveryReq")
|
||||||
|
testDecoder("80 9A 02 00 40 80 C1 01 41 81 C2 11 A0 01 20 02 41 00 84", pre="DD", comment="ServiceDiscoveryRes")
|
||||||
|
testDecoder("80 9A 02 00 40 80 C1 01 41 81 C2 11 B2 00 12 80", pre="DD", comment="ServicePaymentSelectionReq")
|
||||||
|
testDecoder("80 9A 02 00 40 80 C1 01 41 81 C2 11 C0 00", pre="DD", comment="ServicePaymentSelectionRes")
|
||||||
|
print("The error response of the Ioniq with FAILED_ChargingSystemIncompatibility")
|
||||||
|
testDecoder("80 9A 02 00 40 80 C1 01 41 81 C2 11 30 20 00 0A 00 00 00 00", pre="DD", comment="PowerDeliveryReq")
|
||||||
|
|
||||||
if (False):
|
if (False):
|
||||||
testDecoder("809a00113060", pre="DD", comment="PowerDeliveryReq")
|
testDecoder("809a00113060", pre="DD", comment="PowerDeliveryReq")
|
||||||
|
|
Loading…
Reference in a new issue