|
| jdirectdrive (bool listen, int port, ProtocolPP::protocol_t prot, ProtocolPP::iana_t lvl3, ProtocolPP::protocol_t lvl2, bool lvl3_sec, std::string &host, unsigned long iquesize, unsigned long oquesize, uint64_t seed, ProtocolPP::endian_t endianess, std::shared_ptr< InterfacePP::jmmu > &mmu, std::shared_ptr< InterfacePP::jlogger > &logger) |
|
virtual | ~jdirectdrive ()=default |
| standard deconstructor
|
|
uint64_t | write_mem (uint8_t *data, uint32_t length) |
|
uint32_t | avail () |
|
uint32_t | push (uint8_t *packet, uint32_t size) |
|
uint32_t | push (std::shared_ptr< ProtocolPP::jarray< uint8_t >> &input) |
|
void | runsnd () |
|
uint32_t | pop (uint8_t *output, uint32_t size) |
|
uint32_t | pop (std::shared_ptr< ProtocolPP::jarray< uint8_t >> &output) |
|
void | runrcv () |
|
uint32_t | get_size () |
|
void | teardown () |
| terminate the driver
|
|
| jdirectdrive (jdirectdrive &rhs)=delete |
|
| jdirectdrive (const jdirectdrive &rhs)=delete |
|
◆ jdirectdrive()
DriverPP::jdirectdrive::jdirectdrive |
( |
bool |
listen, |
|
|
int |
port, |
|
|
ProtocolPP::protocol_t |
prot, |
|
|
ProtocolPP::iana_t |
lvl3, |
|
|
ProtocolPP::protocol_t |
lvl2, |
|
|
bool |
lvl3_sec, |
|
|
std::string & |
host, |
|
|
unsigned long |
iquesize, |
|
|
unsigned long |
oquesize, |
|
|
uint64_t |
seed, |
|
|
ProtocolPP::endian_t |
endianess, |
|
|
std::shared_ptr< InterfacePP::jmmu > & |
mmu, |
|
|
std::shared_ptr< InterfacePP::jlogger > & |
logger |
|
) |
| |
jdirectdrive uses protocol++ to drive packets into a socket which can then be read by any device. Application layer protocols supported are TLS, SRTP, TCP, and UDP
- Parameters
-
listen | - if set to true, configures to listen on the port specified |
port | - port number |
prot | - transport or application level protocol (TCP, UDP, TLS, SRTP) |
lvl3 | - network layer protocol (IPV4, IPV6) |
lvl2 | - data-link layer protocol (MACSEC, WIFI, WIMAX, LTE) |
lvl3_sec | - Enable ESP for network level |
host | - string of the host name (or IP Address in standard byte format XX.XX.XX...) |
iquesize | - Size of the send queue |
oquesize | - Size of the receive queue |
seed | - seed for the randomizer |
endianess | - Endianess of the platform to support |
mmu | - tracks dynamic memory |
logger | - object for writing |
◆ avail()
uint32_t DriverPP::jdirectdrive::avail |
( |
| ) |
|
- Returns
- Number of slots available in input queue
◆ get_size()
uint32_t DriverPP::jdirectdrive::get_size |
( |
| ) |
|
Returns the size of the next output packet
- Returns
- - size of the next output packet
◆ pop() [1/2]
uint32_t DriverPP::jdirectdrive::pop |
( |
std::shared_ptr< ProtocolPP::jarray< uint8_t >> & |
output | ) |
|
Returns the next packet in the receive queue
- Parameters
-
output | - payload from decapsulated packet |
◆ pop() [2/2]
uint32_t DriverPP::jdirectdrive::pop |
( |
uint8_t * |
output, |
|
|
uint32_t |
size |
|
) |
| |
Returns the next packet in the receive queue
- Parameters
-
output | - payload from decapsulated packet |
size | - size of the output pointer |
◆ push() [1/2]
uint32_t DriverPP::jdirectdrive::push |
( |
std::shared_ptr< ProtocolPP::jarray< uint8_t >> & |
input | ) |
|
Issues the packet into the send queue
- Parameters
-
input | - byte array for the input payload |
- Returns
- - status of push command
◆ push() [2/2]
uint32_t DriverPP::jdirectdrive::push |
( |
uint8_t * |
packet, |
|
|
uint32_t |
size |
|
) |
| |
Issues the packet into the send queue
- Parameters
-
packet | - byte array for the input payload |
size | - length of the input data |
- Returns
- - status of push command
◆ runrcv()
void DriverPP::jdirectdrive::runrcv |
( |
| ) |
|
should be called in a separate thread, constantly checks the receive socket for new packets, processes them, and places the processed packet into the receive queue
◆ runsnd()
void DriverPP::jdirectdrive::runsnd |
( |
| ) |
|
should be called in a separate thread, constantly send any packets found in the input queue through the send socket
◆ write_mem()
uint64_t DriverPP::jdirectdrive::write_mem |
( |
uint8_t * |
data, |
|
|
uint32_t |
length |
|
) |
| |
Write data to memory
- Parameters
-
data | - Data to write to memory |
length | - length of data to write |
- Returns
- address - Address data written to
The documentation for this class was generated from the following file:
- drivers/include/jdirectdrive.h