basic vane ack handling

This commit is contained in:
Ted Blackman 2019-06-10 17:31:50 -07:00
parent 1c769b52e9
commit 34efa7f028

View File

@ -652,13 +652,13 @@
== ==
:: $message-still-task: job for |message-still :: $message-still-task: job for |message-still
:: ::
:: %hear: handle receiving a message fragment packet
:: %done: receive confirmation from vane of processing completion or :: %done: receive confirmation from vane of processing completion or
:: failure with diagnostic :: failure with diagnostic
:: %hear: handle receiving a message fragment packet
:: ::
+$ message-still-task +$ message-still-task
$% [%hear =lane =shut-packet] $% [%done error=(unit error)]
[%done =message-num error=(unit error)] [%hear =lane =shut-packet]
== ==
:: $message-still-gift: effect from |message-still :: $message-still-gift: effect from |message-still
:: ::
@ -1573,8 +1573,8 @@
=- [(flop gifts) state] =- [(flop gifts) state]
:: ::
?- -.task ?- -.task
%done (on-done error.task)
%hear (on-hear [lane shut-packet]:task) %hear (on-hear [lane shut-packet]:task)
%done (on-done [message-num error]:task)
== ==
:: ::
:: ::
@ -1686,13 +1686,20 @@
?. empty ?. empty
message-still message-still
(give %hear-message message) (give %hear-message message)
:: :: +on-done: handle confirmation of message processing from vane
:: ::
++ on-done ++ on-done
|= [=message-num error=(unit error)] |= error=(unit error)
^+ message-still ^+ message-still
:: ::
!! =^ pending pending-vane-ack.state ~(get to pending-vane-ack.state)
=. last-acked.state +(last-acked.state)
=/ =message-num message-num.p.pending
:: TODO nacks, naxplanations
::
?~ error
(give %send-ack message-num %| ok=%.y lag=`@dr`0)
(give %send-ack message-num %| ok=%.n lag=`@dr`0)
-- --
:: +assemble-fragments: concatenate fragments into a $message :: +assemble-fragments: concatenate fragments into a $message
:: ::