A single ethernet packet, wrapper to convert between raw bytes from socket and packet from simulation  
 More...
#include <EthernetPacket.h>
A single ethernet packet, wrapper to convert between raw bytes from socket and packet from simulation 
 
◆ EthernetPacket() [1/2]
  
  
      
        
          | sim_interface::dut_connector::v2x::EthernetPacket::EthernetPacket  | 
          ( | 
          const std::string &  | 
          text_archive | ) | 
           | 
         
       
   | 
  
explicit   | 
  
 
Create an ethernet packet with already parsed data from map with required keys sourceMAC, destinationMAC, payload
- Parameters
 - 
  
    | text_archive | boost::archive string containing sourceMAC, destinationMAC, length of payload and payload  | 
  
   
 
 
◆ EthernetPacket() [2/2]
  
  
      
        
          | sim_interface::dut_connector::v2x::EthernetPacket::EthernetPacket  | 
          ( | 
          std::vector< unsigned char >  | 
          rawData | ) | 
           | 
         
       
   | 
  
explicit   | 
  
 
Create an ethernet packet from the raw received data (extract source and destination MAC)
- Parameters
 - 
  
  
 
 
 
◆ getPacketAsArchive()
      
        
          | std::string sim_interface::dut_connector::v2x::EthernetPacket::getPacketAsArchive  | 
          ( | 
           | ) | 
           | 
        
      
 
Encode bytes of payload as text archive (byte for byte)
- Returns
 - text archive of payload 
 
 
 
◆ toBytes()
      
        
          | std::vector< unsigned char > sim_interface::dut_connector::v2x::EthernetPacket::toBytes  | 
          ( | 
          unsigned short  | 
          ethernetFrameType | ) | 
           | 
        
      
 
Convert object to byte vector of the following structure: Byte 0-5: source MAC address Byte 6-11: destination MAC address Byte 12+13: Ethernet Frame Type Rest: Payload
- Parameters
 - 
  
    | ethernetFrameType | two bytes to set the ethernet frame type with  | 
  
   
- Returns
 - vector of bytes 
 
 
 
The documentation for this class was generated from the following files:
- Sim_To_DuT_Interface/DuT_Connectors/V2XConnector/EthernetPacket.h
 
- Sim_To_DuT_Interface/DuT_Connectors/V2XConnector/EthernetPacket.cpp