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

Public Member Functions

int getModuleNumber ()
 Returns the number of the module. More...
 
string getModuleNameAsString ()
 Returns the number of the module. More...
 
string getSlotPath ()
 Returns slot path. More...
 
ModuleType getModuleType ()
 Returns the module type. More...
 
int getPortCount ()
 Returns the port count. More...
 
Port getPortAt (int)
 Returns the port at the given index. More...
 
void addSlot (ModuleType)
 Adds a slot of the given type. More...
 
int getSlotCount ()
 Returns the total slot count. More...
 
ModuleType getSlotTypeAt (int)
 Returns the type of the module at the given index. More...
 
void removeModuleAt (int)
 Removes the module at the given index. More...
 
int getModuleCount ()
 Returns the number modules. More...
 
Module getModuleAt (int)
 Returns the module at the given index. More...
 
Device getOwnerDevice ()
 Returns owner device of the module. More...
 
ModuleDescriptor getDescriptor () const
 Returns the descriptor of the module. Descriptor contains device model, position, etc. More...
 
bool addModuleAt (string, int)
 Adds a module at the specified location. More...
 

Member Function Documentation

◆ addModuleAt()

bool Module::addModuleAt ( string  ,
int   
)

Adds a module at the specified location.

Parameters
moduleId,moduletype to add. Something like "NM-2W".
index,indexto add at.
Returns
bool, true if the module was added, false if not.

◆ addSlot()

void Module::addSlot ( ModuleType  )

Adds a slot of the given type.

Parameters
type,Slottype to add. Types: eLineCard = 0, eNetworkModule = 1, eInterfaceCard = 2, ePtRouterModule = 3, ePtSwitchModule = 4, ePtCloudModule = 5, ePtRepeaterModule = 6, ePtHostModule = 7,
ePtModemModule = 8, ePtLaptopModule = 9, ePtTVModule = 10, eIpPhonePowerAdapter = 11, ePtTabletPCModule = 12, ePtPdaModule = 13, ePtWirelessEndDeviceModule = 14, ePtWiredEndDeviceModule = 15, eTrs35 = 16, eUsb = 17, eNonRemovableModule = 18, eASAModule = 19, eASAPowerAdapter = 20, ePtCellTowerModule = 21, ePtIoeModule = 22, ePtIoeNetworkModule = 23, ePtIoeAnalogModule = 24, ePtIoeDigitalModule = 25, ePtIoeCustomIOModule = 26, ePtIoePowerAdapter = 27, ePtIoeMcuComponentPowerAdapter = 28, ePtRouterPowerAdapter = 29, eSfpModule = 30, eAccessPointPowerAdaptor = 31, eNonRemovableInterfaceCard = 32, eCustomModuleType = 2000

◆ getDescriptor()

ModuleDescriptor Module::getDescriptor ( ) const

Returns the descriptor of the module. Descriptor contains device model, position, etc.

Returns
ModuleDescriptor, the module descriptor.

◆ getModuleAt()

Module Module::getModuleAt ( int  )

Returns the module at the given index.

Parameters
index,indexof the module to get. Range (0, getModuleCount - 1).
Returns
Module, the module found at the given index.

◆ getModuleCount()

int Module::getModuleCount ( )

Returns the number modules.

Returns
int, the number of modules.

◆ getModuleNameAsString()

string Module::getModuleNameAsString ( )

Returns the number of the module.

Returns
string, the module name as a string. Seems to always be "None".

◆ getModuleNumber()

int Module::getModuleNumber ( )

Returns the number of the module.

Returns
int, the number of the module.

◆ getModuleType()

ModuleType Module::getModuleType ( )

Returns the module type.

Returns
enum<ModuleType>, the number of the module. Types: eLineCard = 0, eNetworkModule = 1, eInterfaceCard = 2, ePtRouterModule = 3, ePtSwitchModule = 4, ePtCloudModule = 5, ePtRepeaterModule = 6, ePtHostModule = 7,
ePtModemModule = 8, ePtLaptopModule = 9, ePtTVModule = 10, eIpPhonePowerAdapter = 11, ePtTabletPCModule = 12, ePtPdaModule = 13, ePtWirelessEndDeviceModule = 14, ePtWiredEndDeviceModule = 15, eTrs35 = 16, eUsb = 17, eNonRemovableModule = 18, eASAModule = 19, eASAPowerAdapter = 20, ePtCellTowerModule = 21, ePtIoeModule = 22, ePtIoeNetworkModule = 23, ePtIoeAnalogModule = 24, ePtIoeDigitalModule = 25, ePtIoeCustomIOModule = 26, ePtIoePowerAdapter = 27, ePtIoeMcuComponentPowerAdapter = 28, ePtRouterPowerAdapter = 29, eSfpModule = 30, eAccessPointPowerAdaptor = 31, eNonRemovableInterfaceCard = 32, eCustomModuleType = 2000

◆ getOwnerDevice()

Device Module::getOwnerDevice ( )

Returns owner device of the module.

Returns
Device, the device that owns the module.

◆ getPortAt()

Port Module::getPortAt ( int  )

Returns the port at the given index.

Parameters
index,indexof the port to retrive.
Returns
Port, port at the given index.

◆ getPortCount()

int Module::getPortCount ( )

Returns the port count.

Returns
int, the number of ports.

◆ getSlotCount()

int Module::getSlotCount ( )

Returns the total slot count.

Returns
int, the total slot count.

◆ getSlotPath()

string Module::getSlotPath ( )

Returns slot path.

Returns
string, the slot path. For example, "0/0" or "0/1".

◆ getSlotTypeAt()

ModuleType Module::getSlotTypeAt ( int  )

Returns the type of the module at the given index.

Parameters
index,indexof the module to find the type for.
Returns
enum<ModuleType>, the type of the module.

◆ removeModuleAt()

void Module::removeModuleAt ( int  )

Removes the module at the given index.

Parameters
index,indexof the module to remove. Range (0, getModuleCount - 1).

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