ifw-core  5.0.0-pre2
Public Member Functions | List of all members
mudpi.mudpi.MudpiPacket Class Reference

Class to build or read mudpi packets. More...

Public Member Functions

def __init__ (self)
 Class constructor. More...
 
def __repr__ (self)
 
def set_topic_id (self, topic_id)
 Set the topicId field. More...
 
def set_component_id (self, comp_id)
 Set the componentId field. More...
 
def set_application_tag (self, app_tag)
 Set the applicationTag field. More...
 
def incr_sample_id (self)
 Set the sampleId field. More...
 
def set_timestamp (self, timestamp=None)
 Set the timestamp field. More...
 
def set_frame_id (self, frame_id)
 Set the frameId field. More...
 
def set_num_frames (self, num_frames)
 Set the numFrames field. More...
 
def set_payload (self, payload)
 Set the payload. More...
 
def set_checksum (self)
 Set the checksum. More...
 
def pack (self, compute_checksum=None, timestamp=None)
 Pack the frame and return it in network format. More...
 
def unpack (self, data)
 Unpack a frame from given data in network format. More...
 
def get_payload (self)
 Get the payload. More...
 
def get_sample_id (self)
 

Detailed Description

Class to build or read mudpi packets.

The MudpiPacket allows to build a mudpi packet or to unpack it and to extract the payload and all the metadata as specified by the MDUPI standard

@ingroup ifw mudpi

Constructor & Destructor Documentation

◆ __init__()

def mudpi.mudpi.MudpiPacket.__init__ (   self)

Class constructor.

Member Function Documentation

◆ __repr__()

def mudpi.mudpi.MudpiPacket.__repr__ (   self)

◆ get_payload()

def mudpi.mudpi.MudpiPacket.get_payload (   self)

Get the payload.

◆ get_sample_id()

def mudpi.mudpi.MudpiPacket.get_sample_id (   self)

◆ incr_sample_id()

def mudpi.mudpi.MudpiPacket.incr_sample_id (   self)

Set the sampleId field.

◆ pack()

def mudpi.mudpi.MudpiPacket.pack (   self,
  compute_checksum = None,
  timestamp = None 
)

Pack the frame and return it in network format.

◆ set_application_tag()

def mudpi.mudpi.MudpiPacket.set_application_tag (   self,
  app_tag 
)

Set the applicationTag field.

◆ set_checksum()

def mudpi.mudpi.MudpiPacket.set_checksum (   self)

Set the checksum.

(Based on MD5 message digest algorithm

◆ set_component_id()

def mudpi.mudpi.MudpiPacket.set_component_id (   self,
  comp_id 
)

Set the componentId field.

◆ set_frame_id()

def mudpi.mudpi.MudpiPacket.set_frame_id (   self,
  frame_id 
)

Set the frameId field.

◆ set_num_frames()

def mudpi.mudpi.MudpiPacket.set_num_frames (   self,
  num_frames 
)

Set the numFrames field.

◆ set_payload()

def mudpi.mudpi.MudpiPacket.set_payload (   self,
  payload 
)

Set the payload.

Parameters
payloadmessage payload provided as binary data.

◆ set_timestamp()

def mudpi.mudpi.MudpiPacket.set_timestamp (   self,
  timestamp = None 
)

Set the timestamp field.

◆ set_topic_id()

def mudpi.mudpi.MudpiPacket.set_topic_id (   self,
  topic_id 
)

Set the topicId field.

◆ unpack()

def mudpi.mudpi.MudpiPacket.unpack (   self,
  data 
)

Unpack a frame from given data in network format.


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