MicroOcpp
MicroOcpp copied to clipboard
AuthorizeRemoteTxRequests key functional implementation
Hello Matth,
We are considering the functional implementation of AuthorizeRemoteTxRequests key in the library. Could you provide any guidance on how to get started?
Thank you in advance for your assistance.
Regards,
Imanol
Hi @imanolmc,
The relevant point in the code is here:
https://github.com/matth-x/MicroOcpp/blob/8b1f0fdbae8785c49453f0b2d54a1a8db2fbe3ed/src/MicroOcpp/Operations/RemoteStartTransaction.cpp#L100
beginTransaction_authorized assumes that the given idTag is already successfully authorized. In constrast, beginTransaction would try authorizing it again, including sending an Authorize request.
You can alter the configuration mutability here: https://github.com/matth-x/MicroOcpp/blob/8b1f0fdbae8785c49453f0b2d54a1a8db2fbe3ed/src/MicroOcpp/Model/ConnectorBase/ConnectorsCommon.cpp#L39
The parameters for R/W configs look like this:
https://github.com/matth-x/MicroOcpp/blob/8b1f0fdbae8785c49453f0b2d54a1a8db2fbe3ed/src/MicroOcpp/Model/ConnectorBase/Connector.cpp#L50
Again back to RemoteStartTransaction, you can read the configuration value by declaring it there and using the getBool() function similar to here:
https://github.com/matth-x/MicroOcpp/blob/8b1f0fdbae8785c49453f0b2d54a1a8db2fbe3ed/src/MicroOcpp/Model/ConnectorBase/Connector.cpp#L264