|
Aruna
|
Namespaces | |
| anonymous_namespace{comm.cpp} | |
Classes | |
| struct | channel_t |
| endpoint type of a comm channel More... | |
| class | Link |
| struct | transmitpackage_t |
| transmit ready package. More... | |
Typedefs | |
| typedef uint8_t | port_t |
Enumerations | |
| enum | link_t { link_t::RADIO, link_t::WIRED, link_t::NONE } |
| enum | status_t { status_t::RUNNING, status_t::STOPPED, status_t::PAUSED } |
Functions | |
| err_t | start () |
| Start new communication. More... | |
| err_t | start (Link *driver) |
| Start new communication. More... | |
| err_t | stop () |
| Stop the communication, free all queue's, channels and buffers. More... | |
| err_t | pause () |
| pause all communication. More... | |
| err_t | resume () |
| resume all communication. More... | |
| err_t | register_channel (channel_t *channel) |
| Register a new communication endpoint. More... | |
| err_t | unregister_channel (channel_t &channel) |
| unregister an endpoint More... | |
| err_t | send (channel_t *channel, port_t to_port, uint8_t *data, size_t data_size, bool wait_for_ack=false) |
| Send data. More... | |
| bool | is_connected () |
| Get the status of the comm link. More... | |
| status_t | get_status () |
| Get the running status of com. More... | |
| err_t | get_channels (char *buffer) |
| get all names of the channels currently registered More... | |
| unsigned int | get_speed () |
| Get the speed of the link to the other hosts in bits per second. More... | |
| err_t | incoming_connection (uint8_t *package, uint8_t package_size) |
| Interrupt incomming connection handeler. More... | |
| err_t | register_candidate_driver (Link *driver) |
| register a driver to be a comm driver candidate. More... | |
| err_t | unregister_candidate_driver (Link *driver) |
| unregister a driver to be a comdiver candidate More... | |
| link_t | get_link_type () |
| Get connection hardware type. More... | |
| void | get_candidate_drivers (char *buffer[]) |
| get all the comm driver candidates More... | |
Variables | |
| static constexpr size_t | MAX_DATA_SIZE = 150 |
| typedef uint8_t aruna::comm::port_t |
Definition at line 30 of file commTypes.h.
|
strong |
|
strong |
| Enumerator | |
|---|---|
| RUNNING | |
| STOPPED | |
| PAUSED | |
Definition at line 24 of file commTypes.h.
| void aruna::comm::get_candidate_drivers | ( | char * | buffer[] | ) |
get all the comm driver candidates
| err_t aruna::comm::get_channels | ( | char * | buffer | ) |
get all names of the channels currently registered
| buffer | to write the names into. |
OK if it was a successBUFFER_OVERFLOW if the suplied buffer is to small,| link_t aruna::comm::get_link_type | ( | ) |
Get connection hardware type.
| link_t |
| unsigned int aruna::comm::get_speed | ( | ) |
Get the speed of the link to the other hosts in bits per second.
| int,speed |
Definition at line 449 of file comm.cpp.

| status_t aruna::comm::get_status | ( | ) |
Get the running status of com.
status_t (RUNNING, PAUSED, STOPPED) Definition at line 440 of file comm.cpp.

| err_t aruna::comm::incoming_connection | ( | uint8_t * | package, |
| uint8_t | package_size | ||
| ) |
Interrupt incomming connection handeler.
| package | that needs to be handeled. |
| err_t | NOT_STARTED comm is not started OK handeled NO_CHANNEL there is no channel to handle it |
Definition at line 453 of file comm.cpp.


| bool aruna::comm::is_connected | ( | ) |
Get the status of the comm link.
| 1 | is connected, 0 if not. |
Definition at line 436 of file comm.cpp.


| err_t aruna::comm::pause | ( | ) |
pause all communication.
buffers, channels and queue's will be saved
OK if it was a success,NOT_STARTED if the comm was not started. Definition at line 335 of file comm.cpp.

register a driver to be a comm driver candidate.
| driver | ComDriver object |
DRIVER_EXISTS if driver already exists.BUFFER_OVERFLOW driver buffer overflowOK all is well :). Definition at line 479 of file comm.cpp.

Register a new communication endpoint.
| channel | channel_t object |
| err_t |
|
Definition at line 362 of file comm.cpp.

| err_t aruna::comm::resume | ( | ) |
resume all communication.
OK if it was a success,NOT_STARTED if the comm was not started.NOT_PAUSED if it was not paused. Definition at line 348 of file comm.cpp.


| 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.
| channel | channel handler that is sending the data |
| to_port | to which port to send de data to. |
| data | Data to send. |
| data_size | length of the data |
| wait_for_ack | if set to thrue, thread will block until ack is received or until timeout is reached |
| err_t |
|
Definition at line 386 of file comm.cpp.


| err_t aruna::comm::start | ( | ) |
Start new communication.
start SIS report watcher thread
start reporter to report all SIS activiry to the watcher over comm channels
Using LINK_HARDWARE to define hardware
| err_t |
|
Definition at line 251 of file comm.cpp.

Start new communication.
Using LINK_HARDWARE to define hardware
| driver | force to use specific driver. |
| err_t |
|
Definition at line 262 of file comm.cpp.

| err_t aruna::comm::stop | ( | ) |
Stop the communication, free all queue's, channels and buffers.
| err_t |
|
Definition at line 309 of file comm.cpp.


unregister a driver to be a comdiver candidate
| driver | ComDriver to be deleted |
OK great success!NO_DRIVER driver does'nt exists. Definition at line 497 of file comm.cpp.

unregister an endpoint
| channel | endpoint to be removed |
| err_t |
|
Definition at line 378 of file comm.cpp.

|
static |
Definition at line 34 of file commTypes.h.