Is it correct to assume the PIM's ACK/NAK response if being ignored instead of triggering a retry? Since an outgoing UPB packet determines the PIM response ACK/NAK behavior it appears that these responses are not taken into account? Just wanted to validate, but it would be nice to issue a retry in the event that an ACK was expected but a NAK was received.
async def _handle_pim_command(self, pim_command: str, pim_data: str) -> None:
def _handled_response(done_with_message=True):
if done_with_message:
self._write_queue.popleft()
self._handled_response_event.set() # enables write stream to start again
# Ignore PimResponse ACK and NACK
if pim_command == PimResponse.UPDATE.value:
reply_from, msg = decode(pim_data)
if self._is_repeated_message(msg):
LOG.debug("Repeated message; discarded.")
else:
if reply_from == self._awaiting_response_command:
_handled_response()
self._notifier.notify(msg.msg_id, {"msg": msg})
elif pim_command == PimResponse.ACCEPT.value:
if not self._awaiting_response_command:
_handled_response()
elif pim_command == PimResponse.REGISTER_REPORT.value:
_handled_response()
elif pim_command == PimResponse.BUSY.value:
await asyncio.sleep(PIM_BUSY_TIMEOUT)
_handled_response(False)
elif pim_command == PimResponse.ERROR.value:
_handled_response()
Is it correct to assume the PIM's ACK/NAK response if being ignored instead of triggering a retry? Since an outgoing UPB packet determines the PIM response ACK/NAK behavior it appears that these responses are not taken into account? Just wanted to validate, but it would be nice to issue a retry in the event that an ACK was expected but a NAK was received.