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

CepInstance is the external process (ExApp and Script Module) that communicates with Packet Tracer through the IPC. More...

Inheritance diagram for CepInstance:
CScriptModule

Public Member Functions

uuid getInstanceId ()
 Returns the UUID of this external process. More...
 
Cep getCep ()
 
bool addExclusivePublisher (string)
 Returns true if the exclusive publisher with the specified certificate was added successfully, otherwise false. More...
 
void clearExclusivePublishers ()
 Clears all exclusive publishers. More...
 
bool removeExclusivePublisher (string)
 Returns true if the exclusive publisher with the specified certificate was removed successfully, otherwise false. More...
 
void removeExclusivePublisherAt (int)
 Removes the exclusive publisher at the specified index. More...
 
int getExclusivePublisherCount ()
 Returns the number of exclusive publishers. More...
 
string getExclusivePublisherAt (int)
 Returns the exclusive publisher at the specified index. More...
 
bool hasExclusivePublisher (string)
 Returns true if the specified certificate is an exclusive publisher, otherwise false. More...
 
QString getCommandLineArg ()
 Returns the command line argument for this external process (ExApp or Script Module) when launching PT. More...
 
void messageReceived (string, uuid, QString)
 This event is emitted when this external process receives a message from a local external process. More...
 
void remoteMessageReceived (string, uuid, QString)
 This event is emitted when this external process receives a message from a remote external process. More...
 
void registeredFileOpened (QString)
 This event is emitted when PT GUI or OS opens a file that is registered to this external process. More...
 

Detailed Description

CepInstance is the external process (ExApp and Script Module) that communicates with Packet Tracer through the IPC.

Member Function Documentation

◆ addExclusivePublisher()

bool CepInstance::addExclusivePublisher ( string  )

Returns true if the exclusive publisher with the specified certificate was added successfully, otherwise false.

Parameters
pem,thePEM base64-encoded DER certificate string.
Returns
bool, true if the exclusive publisher with the specified certificate was added successfully, otherwise false.

◆ clearExclusivePublishers()

void CepInstance::clearExclusivePublishers ( )

Clears all exclusive publishers.

◆ getCep()

Cep CepInstance::getCep ( )

◆ getCommandLineArg()

QString CepInstance::getCommandLineArg ( )

Returns the command line argument for this external process (ExApp or Script Module) when launching PT.

Returns
QString, the command line argument fort his external process

◆ getExclusivePublisherAt()

string CepInstance::getExclusivePublisherAt ( int  )

Returns the exclusive publisher at the specified index.

Parameters
index,theindex of the exclusive publisher.
Returns
string, the exclusive publisher at the specified index.

◆ getExclusivePublisherCount()

int CepInstance::getExclusivePublisherCount ( )

Returns the number of exclusive publishers.

Returns
int, the number of exclusive publishers.

◆ getInstanceId()

uuid CepInstance::getInstanceId ( )

Returns the UUID of this external process.

Returns
uuid, the UUID of this external process.

◆ hasExclusivePublisher()

bool CepInstance::hasExclusivePublisher ( string  )

Returns true if the specified certificate is an exclusive publisher, otherwise false.

Parameters
pem,thePEM base64-encoded DER certificate string.
Returns
bool, Returns true if the specified certificate is an exclusive publisher, otherwise false.

◆ messageReceived()

void CepInstance::messageReceived ( string  ,
uuid  ,
QString   
)

This event is emitted when this external process receives a message from a local external process.

  • srcCepId, the name of the external process source.
  • srcCepInstanceId, the UUID of the external process source.
  • message, the message from the external process source.

IPC event.

◆ registeredFileOpened()

void CepInstance::registeredFileOpened ( QString  )

This event is emitted when PT GUI or OS opens a file that is registered to this external process.

  • filePath, the path of the file opened.

IPC event.

◆ remoteMessageReceived()

void CepInstance::remoteMessageReceived ( string  ,
uuid  ,
QString   
)

This event is emitted when this external process receives a message from a remote external process.

  • srcCepId, the name of the external process source.
  • srcCepInstanceId, the UUID of the external process source.
  • message, the message from the external process source.

IPC event.

◆ removeExclusivePublisher()

bool CepInstance::removeExclusivePublisher ( string  )

Returns true if the exclusive publisher with the specified certificate was removed successfully, otherwise false.

Parameters
pem,thePEM base64-encoded DER certificate string.
Returns
bool, true if the exclusive publisher with the specified certificate was removed successfully, otherwise false.

◆ removeExclusivePublisherAt()

void CepInstance::removeExclusivePublisherAt ( int  )

Removes the exclusive publisher at the specified index.

Parameters
index,theindex of the exclusive publisher.

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