Protocol++® (Protocolpp®)  v5.6.2
ProtocolPP::jdata Class Reference

Public Member Functions

 jdata ()
 constructor for JDATA object
 
 jdata (std::map< std::string, jstream > &flows, std::map< std::string, std::list< jpacket >> &pkts)
 
virtual ~jdata ()=default
 Standard deconstructor.
 
void set_flow (std::shared_ptr< jstream > &newstream)
 
void set_packet (std::string &stream, std::shared_ptr< jpacket > &newpkt)
 
void get_flow (std::string &name, std::shared_ptr< jstream > &flow)
 
void get_packet (std::string &stream, std::shared_ptr< jpacket > &packet)
 
std::map< std::string, jstreamget_flows ()
 
std::map< std::string, std::list< jpacket > > get_packets ()
 
uint32_t get_flowcnt ()
 
uint32_t get_pktcnt ()
 
 jdata (jdata &rhs)=delete
 
 jdata (const jdata &rhs)=delete
 

Constructor & Destructor Documentation

◆ jdata()

ProtocolPP::jdata::jdata ( std::map< std::string, jstream > &  flows,
std::map< std::string, std::list< jpacket >> &  pkts 
)

constructor for JDATA object

Parameters
flows- std::map<std::string, std::shared_ptr<jstream>>
pkts- std::list<std::shared_ptr<jpacket>>

Member Function Documentation

◆ get_flow()

void ProtocolPP::jdata::get_flow ( std::string &  name,
std::shared_ptr< jstream > &  flow 
)

returns the specified flow

Parameters
name- name of the flow to return
flow- pointer to flow

◆ get_flowcnt()

uint32_t ProtocolPP::jdata::get_flowcnt ( )

returns the number of flows left

Returns
- number of flows in the data object

◆ get_flows()

std::map<std::string, jstream> ProtocolPP::jdata::get_flows ( )

returns the map with all flows

Returns
- map with all flows

◆ get_packet()

void ProtocolPP::jdata::get_packet ( std::string &  stream,
std::shared_ptr< jpacket > &  packet 
)

returns the next packet

Parameters
stream- Stream that contains the packet
packet- pointer to packet

◆ get_packets()

std::map<std::string, std::list<jpacket> > ProtocolPP::jdata::get_packets ( )

returns the map with all packets

Returns
- map with all packets

◆ get_pktcnt()

uint32_t ProtocolPP::jdata::get_pktcnt ( )

returns the number of packets left

Returns
- number of packets in the data object

◆ set_flow()

void ProtocolPP::jdata::set_flow ( std::shared_ptr< jstream > &  newstream)

adds the flow

Parameters
newstream- adds a flow to the jdata object

◆ set_packet()

void ProtocolPP::jdata::set_packet ( std::string &  stream,
std::shared_ptr< jpacket > &  newpkt 
)

adds the packet

Parameters
stream- name of the stream the packet belongs to
newpkt- adds a packet to the jdata object

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