Protocol++® (Protocolpp®)
v5.7.0
|
Public Member Functions | |
jproducerbuf (ProtocolPP::platform_t platform, uint64_t seed, bool use_crypto, int responders, std::shared_ptr< jlogger > &logger, std::shared_ptr< ProtocolPP::jdata > &indata, std::shared_ptr< jring< ringflow >> &fring, std::shared_ptr< jring< ringin >> &iring, std::shared_ptr< jring< ringout >> &oring, std::shared_ptr< ProtocolPP::jbuffer< uint8_t, 256 >> &mem, std::string &burstlen, ProtocolPP::endian_t endianess=ProtocolPP::BIG) | |
virtual | ~jproducerbuf ()=default |
standard deconstructor | |
virtual std::pair< bool, uintptr_t > | get_mem (std::string packet, uint32_t length)=0 |
virtual void | write (uintptr_t address, uint32_t data)=0 |
virtual void | write (uintptr_t address, uint64_t data)=0 |
virtual void | write (std::string packet, uintptr_t bufptr, uint8_t *data, uint32_t length)=0 |
virtual std::pair< bool, uintptr_t > | write (std::string packet, uint8_t *data, uint32_t length)=0 |
virtual std::pair< bool, uintptr_t > | write (std::string packet, uint32_t *data, uint32_t length)=0 |
virtual uint32_t | read (uintptr_t address)=0 |
virtual void | read (uintptr_t address, uint8_t *data, uint32_t length)=0 |
virtual void | read (uintptr_t address, uint32_t *data, uint32_t length)=0 |
virtual void | free (uintptr_t address)=0 |
void | setup (ProtocolPP::jstream &stream) |
bool | issue (std::shared_ptr< ProtocolPP::jpacket > &packet) |
void | release (const std::string &stream) |
int | get_mode () |
void | run () |
run the testbench and issue packets | |
void | process () |
process the packets, status, post-processing | |
uint32_t | get_status (std::string &packet) |
uint64_t | get_field (ProtocolPP::field_t field) |
jproducerbuf ()=delete | |
don't use these | |
jproducerbuf (jproducerbuf &rhs)=delete | |
jproducerbuf (const jproducerbuf &rhs)=delete | |
Protected Attributes | |
std::shared_ptr< ProtocolPP::jbuffer< uint8_t, 256 > > | m_memory |
shared buffer memory | |
InterfacePP::jproducerbuf::jproducerbuf | ( | ProtocolPP::platform_t | platform, |
uint64_t | seed, | ||
bool | use_crypto, | ||
int | responders, | ||
std::shared_ptr< jlogger > & | logger, | ||
std::shared_ptr< ProtocolPP::jdata > & | indata, | ||
std::shared_ptr< jring< ringflow >> & | fring, | ||
std::shared_ptr< jring< ringin >> & | iring, | ||
std::shared_ptr< jring< ringout >> & | oring, | ||
std::shared_ptr< ProtocolPP::jbuffer< uint8_t, 256 >> & | mem, | ||
std::string & | burstlen, | ||
ProtocolPP::endian_t | endianess = ProtocolPP::BIG |
||
) |
jproducerbuf uses protocol++ to drive packets into a ring which can then be read by any device that supports a ring
platform | - Platform to connect testbench to (W.A.S.P or SEC) |
seed | - seed for the testbench |
use_crypto | - use cryptographic quality random numbers |
responders | - number of responders used |
logger | - object to print output |
indata | - JDATA object containing flows and packets |
fring | - Software ring for the flows |
iring | - Software ring for the input packets |
oring | - Software ring for the output packets |
mem | - shared buffer memory |
burstlen | - length of burst, can be range (i.e., "1..20") or single value |
endianess | - Endianess of the platform to support |
|
pure virtual |
Free buffers in memory
address | - Address to linked-list of buffers to free |
Implemented in InterfacePP::jtestbenchbuf.
uint64_t InterfacePP::jproducerbuf::get_field | ( | ProtocolPP::field_t | field | ) |
retrieve the field
|
pure virtual |
Get a chunk of memory
packet | - name of the packet to write data for |
length | - Length of memory in bytes |
Implemented in InterfacePP::jtestbenchbuf.
int InterfacePP::jproducerbuf::get_mode | ( | ) |
uint32_t InterfacePP::jproducerbuf::get_status | ( | std::string & | packet | ) |
retrieve the status word
bool InterfacePP::jproducerbuf::issue | ( | std::shared_ptr< ProtocolPP::jpacket > & | packet | ) |
Issues the packet into the testbench or system must be overloaded in user's code
packet | - packet to process |
|
pure virtual |
Read function to overload in your testbench
address | - Address to register |
Implemented in InterfacePP::jtestbenchbuf.
|
pure virtual |
Read function to overload in your testbench
address | - Address to read data from |
data | - Retrieved data |
length | - Length of data to read |
Implemented in InterfacePP::jtestbenchbuf.
|
pure virtual |
Read function to overload in your testbench
address | - Address to read data from |
data | - Retrieved data |
length | - Length of data to read |
Implemented in InterfacePP::jtestbenchbuf.
void InterfacePP::jproducerbuf::release | ( | const std::string & | stream | ) |
Stream is done, release the stream and deallocate
stream | - name of the stream to releasae |
void InterfacePP::jproducerbuf::setup | ( | ProtocolPP::jstream & | stream | ) |
Setup the stream to process descriptors. Using the security association, program your device to process the flow of packets The security association is accessed as a VOID pointer and must be recast to the correct association type based on the TYPE field in the JSTREAM object
stream | - Stream object to setup |
|
pure virtual |
Write function to overload in your testbench
packet | - name of the packet to write data for |
data | - Word oriented data to write |
length | - length of data to write |
Implemented in InterfacePP::jtestbenchbuf.
|
pure virtual |
Write function to overload in your testbench
packet | - name of the packet to write data for |
data | - Data to write to memory |
length | - length of data to write |
Implemented in InterfacePP::jtestbenchbuf.
|
pure virtual |
Write function to overload in your testbench
packet | - name of the packet to write data for |
bufptr | - Pointer to linked buffers |
data | - Data to write to memory |
length | - length of data to write |
Implemented in InterfacePP::jtestbenchbuf.
|
pure virtual |
Write function to overload in your testbench
address | - Address to write data to |
data | - Data to write to memory |
Implemented in InterfacePP::jtestbenchbuf.
|
pure virtual |
Write function to overload in your testbench
address | - Address to write data to |
data | - Data to write to memory |
Implemented in InterfacePP::jtestbenchbuf.