Pummpcomm v2.5.1 Pummpcomm.Session.Context View Source
The context around executing a Pummpcomm.Session.Command.t
Link to this section Summary
Functions
Adds error
to context
Adds response_packet
to context
’s response
Marks ack as received in context
Mark params from context
command
as sent
Link to this section Types
Link to this type
t()
View Source
t() :: %Pummpcomm.Session.Context{command: Pummpcomm.Session.Command.t, error: term, received_ack: boolean, response: Pummpcomm.Session.Response.t | nil, sent_params: boolean}
Link to this section Functions
Adds error
to context
Link to this function
add_response(context, response_packet)
View Source
add_response(%Pummpcomm.Session.Context{command: term, error: term, received_ack: term, response: Pummpcomm.Session.Response.t, sent_params: term}, Pummpcomm.Session.Packet.t) :: %Pummpcomm.Session.Context{command: term, error: term, received_ack: term, response: Pummpcomm.Session.Response.t, sent_params: term}
add_response(%Pummpcomm.Session.Context{command: term, error: term, received_ack: term, response: nil, sent_params: term}, Pummpcomm.Session.Packet.t) :: %Pummpcomm.Session.Context{command: term, error: term, received_ack: term, response: Pummpcomm.Session.Response.t, sent_params: term}
Adds response_packet
to context
’s response
.
If context
doesn’t have a response
yet, one will be added.
If there is an error adding response_packet
to the existing response
, then t
error
will be set with that
error.
Link to this function
received_ack(context)
View Source
received_ack(t) :: %Pummpcomm.Session.Context{command: term, error: term, received_ack: true, response: term, sent_params: term}
Marks ack as received in context
Link to this function
sent_params(context)
View Source
sent_params(t) :: %Pummpcomm.Session.Context{command: term, error: term, received_ack: term, response: term, sent_params: true}
Mark params from context
command
as sent