provides an API to the imaginary ABC modem (as an example how to write drivers)
More...
#include <goby/acomms/modemdriver/janus_driver.h>
|
| JanusDriver () |
|
| ~JanusDriver () override |
|
void | startup (const protobuf::DriverConfig &cfg) override |
| Starts the modem driver. Must be called before poll().
|
|
void | shutdown () override |
| Shuts down the modem driver.
|
|
void | do_work () override |
| Allows the modem driver to do its work.
|
|
void | handle_initiate_transmission (const protobuf::ModemTransmission &m) override |
| Virtual initiate_transmission method. Typically connected to MACManager::signal_initiate_transmission() using bind().
|
|
void | handle_ack_transmission (const protobuf::ModemTransmission &m) |
|
void | pad_message (std::vector< uint8_t > &vec) |
|
void | send_janus_packet (const protobuf::ModemTransmission &msg, std::vector< std::uint8_t > payload, bool ack=false) |
|
void | append_crc16 (std::vector< std::uint8_t > &vec) |
|
void | to_modem_transmission (janus_rx_msg_pkt packet, protobuf::ModemTransmission &msg) |
|
void | send_janus_packet_thread (const protobuf::ModemTransmission &msg, std::vector< std::uint8_t > payload, bool ack) |
|
void | send_ack (unsigned int src, unsigned int dest, unsigned int frame_number) |
|
void | DecodeGobyHeader (std::uint8_t header, protobuf::ModemTransmission &m) |
|
std::uint8_t | get_goby_header (const protobuf::ModemTransmission &msg) |
|
std::uint8_t | CreateGobyHeader (const protobuf::ModemTransmission &m) |
|
janus_rx_msg_pkt | parse_janus_packet (const janus_packet_t pkt, bool verbosity) |
|
unsigned int | get_frame_num (std::string cargo) |
|
janus_simple_tx_t | init_janus_tx () |
|
janus_simple_rx_t | init_janus_rx () |
|
janus_parameters_t | get_janus_params (const janus::protobuf::Config &config) |
|
virtual void | update_cfg (const protobuf::DriverConfig &cfg) |
| Update configuration while running (not required to be implemented)
|
|
virtual | ~ModemDriverBase () |
| Public Destructor.
|
|
virtual void | report (protobuf::ModemReport *report) |
| Returns report including modem availability and signal quality (if known)
|
|
int | driver_order () |
| Integer for the order in which this driver was started (first driver started is 1, second driver is 2, etc.)
|
|
provides an API to the imaginary ABC modem (as an example how to write drivers)
Definition at line 75 of file janus_driver.h.
◆ JanusDriver()
goby::acomms::JanusDriver::JanusDriver |
( |
| ) |
|
◆ ~JanusDriver()
goby::acomms::JanusDriver::~JanusDriver |
( |
| ) |
|
|
override |
◆ append_crc16()
void goby::acomms::JanusDriver::append_crc16 |
( |
std::vector< std::uint8_t > & |
vec | ) |
|
◆ CreateGobyHeader()
◆ DecodeGobyHeader()
◆ do_work()
void goby::acomms::JanusDriver::do_work |
( |
| ) |
|
|
overridevirtual |
Allows the modem driver to do its work.
Should be called regularly to perform the work of the driver as the driver does not run in its own thread. This allows us to guarantee that no signals are called except inside this method. Does not block.
Implements goby::acomms::ModemDriverBase.
◆ get_frame_num()
unsigned int goby::acomms::JanusDriver::get_frame_num |
( |
std::string |
cargo | ) |
|
◆ get_goby_header()
◆ get_janus_params()
◆ handle_ack_transmission()
◆ handle_initiate_transmission()
◆ init_janus_rx()
janus_simple_rx_t goby::acomms::JanusDriver::init_janus_rx |
( |
| ) |
|
◆ init_janus_tx()
janus_simple_tx_t goby::acomms::JanusDriver::init_janus_tx |
( |
| ) |
|
◆ pad_message()
void goby::acomms::JanusDriver::pad_message |
( |
std::vector< uint8_t > & |
vec | ) |
|
◆ parse_janus_packet()
janus_rx_msg_pkt goby::acomms::JanusDriver::parse_janus_packet |
( |
const janus_packet_t |
pkt, |
|
|
bool |
verbosity |
|
) |
| |
◆ send_ack()
void goby::acomms::JanusDriver::send_ack |
( |
unsigned int |
src, |
|
|
unsigned int |
dest, |
|
|
unsigned int |
frame_number |
|
) |
| |
◆ send_janus_packet()
◆ send_janus_packet_thread()
◆ shutdown()
void goby::acomms::JanusDriver::shutdown |
( |
| ) |
|
|
overridevirtual |
◆ startup()
◆ to_modem_transmission()
◆ acomms_id
unsigned int goby::acomms::JanusDriver::acomms_id |
◆ carrier_sensing
janus_carrier_sensing_t goby::acomms::JanusDriver::carrier_sensing |
◆ DEFAULT_MTU_BYTES
constexpr int goby::acomms::JanusDriver::DEFAULT_MTU_BYTES {1024} |
|
staticconstexpr |
◆ modem_msg
◆ next_frame_
std::uint32_t goby::acomms::JanusDriver::next_frame_ {0} |
◆ packet_rx
janus_packet_t goby::acomms::JanusDriver::packet_rx = 0 |
◆ params_rx
janus_parameters_t goby::acomms::JanusDriver::params_rx |
◆ params_tx
janus_parameters_t goby::acomms::JanusDriver::params_tx |
◆ queried_detection_time
unsigned goby::acomms::JanusDriver::queried_detection_time |
◆ rx_application_type
unsigned int goby::acomms::JanusDriver::rx_application_type |
◆ rx_class_id
unsigned int goby::acomms::JanusDriver::rx_class_id |
◆ simple_rx
janus_simple_rx_t goby::acomms::JanusDriver::simple_rx |
◆ simple_tx
janus_simple_tx_t goby::acomms::JanusDriver::simple_tx |
◆ state_rx
janus_rx_state_t goby::acomms::JanusDriver::state_rx = 0 |
◆ tx_application_type
unsigned int goby::acomms::JanusDriver::tx_application_type |
◆ tx_class_id
unsigned int goby::acomms::JanusDriver::tx_class_id |
The documentation for this class was generated from the following file: