ICanPort over a PipeHub.
More...
#include <PipePort.h>
|
| | PipePort (Options options) |
| |
| | ~PipePort () override |
| |
| | PipePort (const PipePort &)=delete |
| |
| PipePort & | operator= (const PipePort &)=delete |
| |
| bool | Open () |
| | Connect (starting a hub if allowed and needed) and start the I/O thread.
|
| |
| void | Close () |
| | Stop the I/O thread and disconnect (and stop a hub this port started).
|
| |
| bool | IsOpen () const noexcept |
| |
| bool | HostsHub () const noexcept |
| | True when this port started the hub it uses.
|
| |
| PortCaps | Caps () const override |
| | Static capabilities.
|
| |
| TxResult | Send (const CanFrame &frame) override |
| | Queue frame without blocking.
|
| |
| void | SetRxSink (RxSink sink, void *ctx) override |
| | Install the RX sink (nullptr detaches).
|
| |
| PortStatus | Status () const override |
| | Error counters and state.
|
| |
| bool | Recover () override |
| | Request bus-off recovery; false when not possible now.
|
| |
| void | SetTxDoneSink (TxDoneSink sink, void *ctx) override |
| | Install the TX-done sink. Ports without a TX-done event ignore it.
|
| |
| bool | RxBackpressure () const override |
| | The pipe bus never drops: a refused frame is held and offered again.
|
| |
| virtual | ~ICanPort ()=default |
| |
◆ PipePort() [1/2]
| hf::can::PipePort::PipePort |
( |
Options |
options | ) |
|
|
explicit |
◆ ~PipePort()
| hf::can::PipePort::~PipePort |
( |
| ) |
|
|
override |
◆ PipePort() [2/2]
| hf::can::PipePort::PipePort |
( |
const PipePort & |
| ) |
|
|
delete |
◆ Caps()
| PortCaps hf::can::PipePort::Caps |
( |
| ) |
const |
|
overridevirtual |
◆ Close()
| void hf::can::PipePort::Close |
( |
| ) |
|
Stop the I/O thread and disconnect (and stop a hub this port started).
◆ Connect()
| bool hf::can::PipePort::Connect |
( |
| ) |
|
|
private |
◆ Deliver()
| bool hf::can::PipePort::Deliver |
( |
const CanFrame & |
f | ) |
|
|
private |
◆ HostsHub()
| bool hf::can::PipePort::HostsHub |
( |
| ) |
const |
|
inlinenoexcept |
True when this port started the hub it uses.
◆ IoLoop()
| void hf::can::PipePort::IoLoop |
( |
| ) |
|
|
private |
◆ IsOpen()
| bool hf::can::PipePort::IsOpen |
( |
| ) |
const |
|
inlinenoexcept |
◆ Open()
| bool hf::can::PipePort::Open |
( |
| ) |
|
Connect (starting a hub if allowed and needed) and start the I/O thread.
◆ operator=()
◆ Recover()
| bool hf::can::PipePort::Recover |
( |
| ) |
|
|
overridevirtual |
◆ RxBackpressure()
| bool hf::can::PipePort::RxBackpressure |
( |
| ) |
const |
|
inlineoverridevirtual |
The pipe bus never drops: a refused frame is held and offered again.
Reimplemented from hf::can::ICanPort.
◆ Send()
◆ SetRxSink()
| void hf::can::PipePort::SetRxSink |
( |
RxSink |
sink, |
|
|
void * |
ctx |
|
) |
| |
|
overridevirtual |
◆ SetTxDoneSink()
| void hf::can::PipePort::SetTxDoneSink |
( |
TxDoneSink |
sink, |
|
|
void * |
ctx |
|
) |
| |
|
overridevirtual |
Install the TX-done sink. Ports without a TX-done event ignore it.
Reimplemented from hf::can::ICanPort.
◆ Status()
◆ Wake()
| void hf::can::PipePort::Wake |
( |
| ) |
const |
|
private |
◆ connected_
| std::atomic<bool> hf::can::PipePort::connected_ {false} |
|
private |
◆ epoch_
| uint32_t hf::can::PipePort::epoch_ {0} |
|
private |
◆ fd_
| int hf::can::PipePort::fd_ {-1} |
|
private |
◆ hub_
| std::unique_ptr<PipeHub> hf::can::PipePort::hub_ |
|
private |
◆ io_
| std::thread hf::can::PipePort::io_ |
|
private |
◆ opt_
◆ run_
| std::atomic<bool> hf::can::PipePort::run_ {false} |
|
private |
◆ rx_ctx_
| void* hf::can::PipePort::rx_ctx_ {nullptr} |
|
private |
◆ rx_sink_
| RxSink hf::can::PipePort::rx_sink_ {nullptr} |
|
private |
◆ seq_
| uint16_t hf::can::PipePort::seq_ {0} |
|
private |
◆ sink_mu_
| std::mutex hf::can::PipePort::sink_mu_ |
|
private |
◆ tx_count_
| std::size_t hf::can::PipePort::tx_count_ {0} |
|
private |
◆ tx_ctx_
| void* hf::can::PipePort::tx_ctx_ {nullptr} |
|
private |
◆ tx_head_
| std::size_t hf::can::PipePort::tx_head_ {0} |
|
private |
◆ tx_mu_
| std::mutex hf::can::PipePort::tx_mu_ |
|
private |
◆ tx_queue_full_
| std::atomic<uint32_t> hf::can::PipePort::tx_queue_full_ {0} |
|
private |
◆ tx_ring_
| std::vector<CanFrame> hf::can::PipePort::tx_ring_ |
|
private |
◆ tx_sink_
◆ tx_was_full_
| bool hf::can::PipePort::tx_was_full_ {false} |
|
private |
◆ wake_
| int hf::can::PipePort::wake_[2] {-1, -1} |
|
private |
The documentation for this class was generated from the following files: