mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-20 01:13:58 +00:00
added handling of Authorization
This commit is contained in:
parent
e679123413
commit
e9fd6c3068
3 changed files with 1240 additions and 3 deletions
|
@ -231,8 +231,8 @@ def testReadExiFromFile():
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
nFail=0
|
nFail=0
|
||||||
print("Testing exiConnector...")
|
print("Testing exiConnector...")
|
||||||
testReadExiFromFile()
|
#testReadExiFromFile()
|
||||||
exit()
|
#exit()
|
||||||
#testByteArrayConversion("123456")
|
#testByteArrayConversion("123456")
|
||||||
#testByteArrayConversion("1234567")
|
#testByteArrayConversion("1234567")
|
||||||
#testByteArrayConversion("ABCDEF")
|
#testByteArrayConversion("ABCDEF")
|
||||||
|
@ -269,6 +269,10 @@ if __name__ == "__main__":
|
||||||
testDecoder("80 9A 02 00 40 80 C1 01 41 81 C2 11 C0 00", pre="DD", comment="ServicePaymentSelectionRes")
|
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")
|
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")
|
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")
|
||||||
|
|
||||||
|
print("The request of the Ioniq after ServicePaymentSelectionResponse")
|
||||||
|
testDecoder("80 9A 02 00 40 80 C1 01 41 81 C2 10 B8", pre="DD", comment="ContractAuthenticationReq")
|
||||||
|
|
||||||
|
|
||||||
if (False):
|
if (False):
|
||||||
testDecoder("809a00113060", pre="DD", comment="PowerDeliveryReq")
|
testDecoder("809a00113060", pre="DD", comment="PowerDeliveryReq")
|
||||||
|
|
11
fsmEvse.py
11
fsmEvse.py
|
@ -124,7 +124,16 @@ class fsmEvse():
|
||||||
msg = addV2GTPHeader(exiEncode("EDg")) # EDg for Encode, Din, PreChargeResponse
|
msg = addV2GTPHeader(exiEncode("EDg")) # EDg for Encode, Din, PreChargeResponse
|
||||||
print("responding " + prettyHexMessage(msg))
|
print("responding " + prettyHexMessage(msg))
|
||||||
self.Tcp.transmit(msg)
|
self.Tcp.transmit(msg)
|
||||||
self.enterState(stateWaitForFlexibleRequest) # todo: not clear, what is specified in DIN
|
self.enterState(stateWaitForFlexibleRequest) # todo: not clear, what is specified in DIN
|
||||||
|
if (strConverterResult.find("ContractAuthenticationReq")>0):
|
||||||
|
# todo: check the request content, and fill response parameters
|
||||||
|
msg = addV2GTPHeader(exiEncode("EDl")) # EDl for Encode, Din, ContractAuthenticationResponse
|
||||||
|
print("responding " + prettyHexMessage(msg))
|
||||||
|
self.Tcp.transmit(msg)
|
||||||
|
self.enterState(stateWaitForFlexibleRequest) # todo: not clear, what is specified in DIN
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (self.isTooLong()):
|
if (self.isTooLong()):
|
||||||
self.enterState(0)
|
self.enterState(0)
|
||||||
|
|
||||||
|
|
1224
results/2022-11-11_until_start_of_precharge.txt
Normal file
1224
results/2022-11-11_until_start_of_precharge.txt
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue