Aruna
comm.cpp File Reference
#include "aruna/comm.h"
#include "aruna/log.h"
#include <math.h>
#include <aruna/comm/Link.h>
#include <pthread.h>
#include <queue>
#include <set>
#include <aruna/comm/commTypes.h>
Include dependency graph for comm.cpp:

Go to the source code of this file.

Namespaces

 aruna
 
 aruna::comm
 
 aruna::comm::anonymous_namespace{comm.cpp}
 

Functions

void aruna::comm::anonymous_namespace{comm.cpp}::set_status (status_t status)
 set the comm status More...
 
err_t aruna::comm::anonymous_namespace{comm.cpp}::transmit (transmitpackage_t transmitpackage)
 Transmit a package. More...
 
void * aruna::comm::anonymous_namespace{comm.cpp}::transmissionQueueHandeler (void *)
 Tramsmission handeler. More...
 
Link * aruna::comm::anonymous_namespace{comm.cpp}::getDriver ()
 get the driver More...
 
std::tuple< Link *, err_t > aruna::comm::anonymous_namespace{comm.cpp}::pickDriver ()
 pick the best available driver More...
 
void aruna::comm::anonymous_namespace{comm.cpp}::setDriver (Link &driver)
 set the driver More...
 
unsigned int aruna::comm::anonymous_namespace{comm.cpp}::rateDriver (Link &driver)
 rate the driver on speed, errors, active connection, realtime, connection type etc. More...
 
void * aruna::comm::anonymous_namespace{comm.cpp}::_selectDriverTask (void *)
 pick a new best driver, dont call directly will delete your process. More...
 
void aruna::comm::anonymous_namespace{comm.cpp}::selectDriverTask ()
 start a task to select a driver, does not block. More...
 
void * aruna::comm::anonymous_namespace{comm.cpp}::receiveHandeler (void *)
 Task to handle incomming connections. More...
 
bool aruna::comm::anonymous_namespace{comm.cpp}::register_log ()
 
err_t aruna::comm::start ()
 Start new communication. More...
 
err_t aruna::comm::start (Link *driver)
 Start new communication. More...
 
err_t aruna::comm::stop ()
 Stop the communication, free all queue's, channels and buffers. More...
 
err_t aruna::comm::pause ()
 pause all communication. More...
 
err_t aruna::comm::resume ()
 resume all communication. More...
 
err_t aruna::comm::register_channel (channel_t *channel)
 Register a new communication endpoint. More...
 
err_t aruna::comm::unregister_channel (channel_t &channel)
 unregister an endpoint More...
 
err_t aruna::comm::send (channel_t *channel, port_t to_port, uint8_t *data, size_t data_size, bool wait_for_ack=false)
 Send data. More...
 
bool aruna::comm::is_connected ()
 Get the status of the comm link. More...
 
status_t aruna::comm::get_status ()
 Get the running status of com. More...
 
err_t aruna::comm::get_channels (char *buffer)
 get all names of the channels currently registered More...
 
unsigned int aruna::comm::get_speed ()
 Get the speed of the link to the other hosts in bits per second. More...
 
err_t aruna::comm::incoming_connection (uint8_t *package, uint8_t package_size)
 Interrupt incomming connection handeler. More...
 
err_t aruna::comm::register_candidate_driver (Link *driver)
 register a driver to be a comm driver candidate. More...
 
err_t aruna::comm::unregister_candidate_driver (Link *driver)
 unregister a driver to be a comdiver candidate More...
 

Variables

static log::channel_t * aruna::comm::anonymous_namespace{comm.cpp}::log
 
pthread_t aruna::comm::anonymous_namespace{comm.cpp}::transmissionQueueHandeler_thread_handeler
 
pthread_t aruna::comm::anonymous_namespace{comm.cpp}::receiveHandeler_thread_handeler
 
pthread_cond_t aruna::comm::anonymous_namespace{comm.cpp}::out_buffer_not_empty
 
pthread_mutex_t aruna::comm::anonymous_namespace{comm.cpp}::out_buffer_critical
 
std::queue< transmitpackage_t > aruna::comm::anonymous_namespace{comm.cpp}::out_buffer
 
std::set< Link * > aruna::comm::anonymous_namespace{comm.cpp}::driverCandidates
 
std::set< channel_t *, channel_t::compare_refrence > aruna::comm::anonymous_namespace{comm.cpp}::channels
 all endpoints More...
 
status_t aruna::comm::anonymous_namespace{comm.cpp}::status = status_t::STOPPED
 stores the comm status More...
 
Link * aruna::comm::anonymous_namespace{comm.cpp}::driver
 stores the driver. More...