Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
Public Member Functions | List of all members
CustomUdpProcess Class Reference

CustomUdpProcess is the process that manipulates the custom UDP process. More...

Inheritance diagram for CustomUdpProcess:
Process

Public Member Functions

bool start (int)
 Starts the custom UDP process on the specified port number. More...
 
bool stop ()
 Stops the custom UDP process. More...
 
bool isStarted ()
 Returns true if the custom UDP process was started, otherwise false. More...
 
int getPortNumber ()
 Returns the port number of this custom UDP process. More...
 
bool sendData (QString, QString, int, FrameInstance, Port)
 Sends data over this custom UDP process to the specified destination IP address and port number. More...
 
bool sendDataWithPduInfo (QString, QString, int, FrameInstance, Port, QString, QString, QString)
 Sends data over this custom UDP process to the specified destination IP address and port number, along with PDU info. More...
 
bool processData (QString, ip, int, FrameInstance, Port)
 This delegate processes the incoming data and returns true if successful, otherwise false. More...
 
FrameInstance createFrameInstance (int, QString)
 Creates a frame instance. More...
 
void finalizeFrameInstance (FrameInstance)
 Finalizes a frame instance. More...
 
- Public Member Functions inherited from Process
Device getOwnerDevice ()
 Returns the device for this process. More...
 

Detailed Description

CustomUdpProcess is the process that manipulates the custom UDP process.

Member Function Documentation

◆ createFrameInstance()

FrameInstance CustomUdpProcess::createFrameInstance ( int  ,
QString   
)

Creates a frame instance.

Parameters
color,thecolor for this frame instance.
dstStr,thedestination IP address for this frame instance.
Returns
FrameInstance, a FrameInstance object.

◆ finalizeFrameInstance()

void CustomUdpProcess::finalizeFrameInstance ( FrameInstance  )

Finalizes a frame instance.

Parameters
frameInstance,theframe instance of interest to finalize.

◆ getPortNumber()

int CustomUdpProcess::getPortNumber ( )

Returns the port number of this custom UDP process.

Returns
int, the port number of this custom UDP process.

◆ isStarted()

bool CustomUdpProcess::isStarted ( )

Returns true if the custom UDP process was started, otherwise false.

Returns
bool, true if the custom UDP process was started, otherwise false.

◆ processData()

bool CustomUdpProcess::processData ( QString  ,
ip  ,
int  ,
FrameInstance  ,
Port   
)

This delegate processes the incoming data and returns true if successful, otherwise false.

  • data, the data that was processed.
  • srcIp, the source IP address.
  • srcPort, the source port number.
  • frameInstance, the FrameInstance object.
  • inPort, the incoming Port object.
Returns
bool, true if successful, otherwise false.

◆ sendData()

bool CustomUdpProcess::sendData ( QString  ,
QString  ,
int  ,
FrameInstance  ,
Port   
)

Sends data over this custom UDP process to the specified destination IP address and port number.

Parameters
data,thedata to send to the destination.
dstIp,theIP address of the destination.
dstPort,theport number of the destination.
frameInstance,theFrameInstance object. Use createFrameInstance() to create the FrameInstance object.
outPort,thePort object where this data will be sent out of from the source device.
Returns
bool, true if successful, otherwise false.

◆ sendDataWithPduInfo()

bool CustomUdpProcess::sendDataWithPduInfo ( QString  ,
QString  ,
int  ,
FrameInstance  ,
Port  ,
QString  ,
QString  ,
QString   
)

Sends data over this custom UDP process to the specified destination IP address and port number, along with PDU info.

Parameters
data,thedata to send to the destination.
dstIp,theIP address of the destination.
dstPort,theport number of the destination.
frameInstance,theFrameInstance object. Use createFrameInstance() to create the FrameInstance object.
outPort,thePort object where this data will be sent out of from the source device.
customProtocol,thecustom protocol name
customPduType,thecustom PDU type
jsonFields,thefields in JSON string representation:
Returns
bool, true if successful, otherwise false.

◆ start()

bool CustomUdpProcess::start ( int  )

Starts the custom UDP process on the specified port number.

Parameters
int,theport number.
Returns
bool, true if successful, otherwise false.

◆ stop()

bool CustomUdpProcess::stop ( )

Stops the custom UDP process.

Returns
bool, true if successful, otherwise false.

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