ex_modbus v0.1.6 ExModbus.Nerves.UART.Framing.Modbus
Modbus docs here!
Link to this section Summary
Functions
Add framing to the passed in data
This is called when the user invokes Nerves.UART.flush/2. Any partially
received frames should be dropped
If remove_framing/2 returned :in_frame and a user-specified timeout for
reassembling frames has elapsed, then this function is called. Depending on
the semantics of the framing, a partial frame may be returned or the
incomplete frame may be dropped
Initialize the state of the framer based on options passed to
Nerves.UART.open/3
Remove the framing off received data. If a partial frame is left over at the
end, then :in_frame should be returned. All of the frames received should
be returned in the second tuple
Link to this section Functions
add_framing(data, state)
Add framing to the passed in data.
The returned frame_data will be sent out the UART.
Callback implementation for Nerves.UART.Framing.add_framing/2.
buffer_empty?(state)
flush(direction, state)
This is called when the user invokes Nerves.UART.flush/2. Any partially
received frames should be dropped.
Callback implementation for Nerves.UART.Framing.flush/2.
frame_timeout(state)
If remove_framing/2 returned :in_frame and a user-specified timeout for
reassembling frames has elapsed, then this function is called. Depending on
the semantics of the framing, a partial frame may be returned or the
incomplete frame may be dropped.
Callback implementation for Nerves.UART.Framing.frame_timeout/1.
has_error?(state)
init(args)
Initialize the state of the framer based on options passed to
Nerves.UART.open/3.
This function should return the initial state for the framer or an error.
Callback implementation for Nerves.UART.Framing.init/1.
remove_framing(data, state)
Remove the framing off received data. If a partial frame is left over at the
end, then :in_frame should be returned. All of the frames received should
be returned in the second tuple.
Callback implementation for Nerves.UART.Framing.remove_framing/2.