Vanetza
Loading...
Searching...
No Matches
vanetza::rpc::LinkLayerClient Class Reference

Classes

struct  Identity
struct  Indication

Public Types

enum class  ErrorCode { Ok , InvalidArgument , Unsupported , InternalError }
enum class  Technology { Unspecified , ITS_G5 , LTE_V2X }
using IndicationCallback = std::function<void(Indication)>
using ChannelLoadReportCallback = std::function<void(dcc::ChannelLoad)>

Public Member Functions

 LinkLayerClient (kj::Timer &, kj::AsyncIoStream &, Logger *=nullptr)
kj::Promise< Identityidentify ()
void request (const access::DataRequest &, std::unique_ptr< ChunkPacket >)
void indicate (IndicationCallback callback)
void report_channel_load (ChannelLoadReportCallback callback)
kj::Promise< ErrorCode > set_source_address (const MacAddress &)
void configure (Technology)
void add_task (kj::Promise< void > &&)

Private Member Functions

void do_indicate (Indication)
void do_report (dcc::ChannelLoad)

Private Attributes

std::unique_ptr< Context > context_
std::mutex callback_mutex_
IndicationCallback indication_callback_
ChannelLoadReportCallback cbr_callback_
Technology technology_ = Technology::Unspecified

Detailed Description

Definition at line 23 of file link_layer_client.hpp.

Member Typedef Documentation

◆ ChannelLoadReportCallback

using vanetza::rpc::LinkLayerClient::ChannelLoadReportCallback = std::function<void(dcc::ChannelLoad)>

Definition at line 59 of file link_layer_client.hpp.

◆ IndicationCallback

using vanetza::rpc::LinkLayerClient::IndicationCallback = std::function<void(Indication)>

Definition at line 58 of file link_layer_client.hpp.

Member Enumeration Documentation

◆ ErrorCode

enum class vanetza::rpc::LinkLayerClient::ErrorCode
strong

Definition at line 26 of file link_layer_client.hpp.

◆ Technology

enum class vanetza::rpc::LinkLayerClient::Technology
strong

Definition at line 34 of file link_layer_client.hpp.

Constructor & Destructor Documentation

◆ LinkLayerClient()

vanetza::rpc::LinkLayerClient::LinkLayerClient ( kj::Timer & timer,
kj::AsyncIoStream & connection,
Logger * logger = nullptr )

Definition at line 151 of file link_layer_client.cpp.

◆ ~LinkLayerClient()

vanetza::rpc::LinkLayerClient::~LinkLayerClient ( )

Definition at line 163 of file link_layer_client.cpp.

Member Function Documentation

◆ add_task()

void vanetza::rpc::LinkLayerClient::add_task ( kj::Promise< void > && promise)

Definition at line 173 of file link_layer_client.cpp.

◆ configure()

void vanetza::rpc::LinkLayerClient::configure ( Technology technology)

Definition at line 167 of file link_layer_client.cpp.

◆ do_indicate()

void vanetza::rpc::LinkLayerClient::do_indicate ( Indication indication)
private

Definition at line 226 of file link_layer_client.cpp.

◆ do_report()

void vanetza::rpc::LinkLayerClient::do_report ( dcc::ChannelLoad cl)
private

Definition at line 235 of file link_layer_client.cpp.

◆ identify()

kj::Promise< LinkLayerClient::Identity > vanetza::rpc::LinkLayerClient::identify ( )

Definition at line 179 of file link_layer_client.cpp.

◆ indicate()

void vanetza::rpc::LinkLayerClient::indicate ( IndicationCallback callback)

Definition at line 243 of file link_layer_client.cpp.

◆ report_channel_load()

void vanetza::rpc::LinkLayerClient::report_channel_load ( ChannelLoadReportCallback callback)

Definition at line 249 of file link_layer_client.cpp.

◆ request()

void vanetza::rpc::LinkLayerClient::request ( const access::DataRequest & request,
std::unique_ptr< ChunkPacket > packet )

Definition at line 195 of file link_layer_client.cpp.

◆ set_source_address()

kj::Promise< LinkLayerClient::ErrorCode > vanetza::rpc::LinkLayerClient::set_source_address ( const MacAddress & addr)

Definition at line 255 of file link_layer_client.cpp.

Member Data Documentation

◆ callback_mutex_

std::mutex vanetza::rpc::LinkLayerClient::callback_mutex_
private

Definition at line 80 of file link_layer_client.hpp.

◆ cbr_callback_

ChannelLoadReportCallback vanetza::rpc::LinkLayerClient::cbr_callback_
private

Definition at line 82 of file link_layer_client.hpp.

◆ context_

std::unique_ptr<Context> vanetza::rpc::LinkLayerClient::context_
private

Definition at line 79 of file link_layer_client.hpp.

◆ indication_callback_

IndicationCallback vanetza::rpc::LinkLayerClient::indication_callback_
private

Definition at line 81 of file link_layer_client.hpp.

◆ technology_

Technology vanetza::rpc::LinkLayerClient::technology_ = Technology::Unspecified
private

Definition at line 83 of file link_layer_client.hpp.


The documentation for this class was generated from the following files: