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
CustomTcpProcess Class Reference

CustomTcpProcess is the process that manipulates the custom TCP process. More...

Inheritance diagram for CustomTcpProcess:
Process

Public Member Functions

TcpConnection getConnection ()
 
void connectionChanged (TcpConnection, TcpEvent)
 IPC event. More...
 
bool sendData (QString, TcpConnection, FrameInstance)
 Sends data over this custom TCP process to the specified TCP connection. More...
 
bool sendDataWithPduInfo (QString, TcpConnection, FrameInstance, QString, QString, QString)
 Sends data over this custom TCP process to the specified TCP connection. More...
 
bool processData (QString, TcpConnection, FrameInstance)
 This delegate processes the incoming data and returns true if successful, otherwise false. More...
 
- Public Member Functions inherited from Process
Device getOwnerDevice ()
 Returns the device for this process. More...
 

Detailed Description

CustomTcpProcess is the process that manipulates the custom TCP process.

Member Function Documentation

◆ connectionChanged()

void CustomTcpProcess::connectionChanged ( TcpConnection  ,
TcpEvent   
)

IPC event.

eConnectionActive = 0, eConnectionTimeout = 1, eConnectionRequest = 2, ePeerClose = 3, ePeerReset = 4, eSendUserTraffic = 5

◆ getConnection()

TcpConnection CustomTcpProcess::getConnection ( )

◆ processData()

bool CustomTcpProcess::processData ( QString  ,
TcpConnection  ,
FrameInstance   
)

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

  • data, the data that was processed.
  • connection, the TCP connection.
  • frameInstance, the FrameInstance object.
Returns
bool, true if successful, otherwise false.

◆ sendData()

bool CustomTcpProcess::sendData ( QString  ,
TcpConnection  ,
FrameInstance   
)

Sends data over this custom TCP process to the specified TCP connection.

Parameters
data,thedata to send to the destination.
  • connection, the TCP connection.
frameInstance,theFrameInstance object. Use createFrameInstance() to create the FrameInstance object.
Returns
bool, true if successful, otherwise false.

◆ sendDataWithPduInfo()

bool CustomTcpProcess::sendDataWithPduInfo ( QString  ,
TcpConnection  ,
FrameInstance  ,
QString  ,
QString  ,
QString   
)

Sends data over this custom TCP process to the specified TCP connection.

Parameters
data,thedata to send to the destination.
  • connection, the TCP connection.
frameInstance,theFrameInstance object. Use createFrameInstance() to create the FrameInstance object.
customProtocol,thecustom protocol name
customPduType,thecustom PDU type
jsonFields,thefields in JSON string representation:
Returns
bool, true if successful, otherwise false.

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