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

Factory for modules. More...

Public Member Functions

ModuleDescriptor getDescriptor (ModuleType, string)
 Gets the module descriptor that matches the given types. More...
 
int getAvailableModuleCount ()
 Gets the number of module descriptors stored in the factory. More...
 
ModuleDescriptor getAvailableModuleAt (int)
 Gets the module descriptor at the given index. More...
 
int getAvailableModuleForTypeCount (ModuleType)
 Gets the number of module descriptors stored in the factory of the given type. More...
 
ModuleDescriptor getAvailableModuleForTypeAt (ModuleType, int)
 Gets the module descriptor stored for the given type and index. More...
 
ModuleDescriptor addModuleModel (ModuleType, string)
 Adds a module descriptor of the given types. More...
 

Detailed Description

Factory for modules.

Member Function Documentation

◆ addModuleModel()

ModuleDescriptor ModuleFactory::addModuleModel ( ModuleType  ,
string   
)

Adds a module descriptor of the given types.

Parameters
type,moduletype to add.
model,thestring type of for the module. Something like "PT-ROUTER-NM-1CFE".
Returns
ModuleDescriptor, the module descriptor added.

◆ getAvailableModuleAt()

ModuleDescriptor ModuleFactory::getAvailableModuleAt ( int  )

Gets the module descriptor at the given index.

Parameters
int,indexto get the descriptor from. Range (0, getAvailableModuleCount()-1)
Returns
ModuleDescriptor, the descriptor at the given index.

◆ getAvailableModuleCount()

int ModuleFactory::getAvailableModuleCount ( )

Gets the number of module descriptors stored in the factory.

Returns
int, the number of module descriptors stored in the factory.

◆ getAvailableModuleForTypeAt()

ModuleDescriptor ModuleFactory::getAvailableModuleForTypeAt ( ModuleType  ,
int   
)

Gets the module descriptor stored for the given type and index.

Parameters
type,moduletype to check for.
index,indexin they type to get the descriptor for.
Returns
ModuleDescriptor, the module descriptor stored for the given type and index.

◆ getAvailableModuleForTypeCount()

int ModuleFactory::getAvailableModuleForTypeCount ( ModuleType  )

Gets the number of module descriptors stored in the factory of the given type.

Parameters
type,moduletype to check for.
Returns
int, the number of module descriptors stored in the factory of the given type.

◆ getDescriptor()

ModuleDescriptor ModuleFactory::getDescriptor ( ModuleType  ,
string   
)

Gets the module descriptor that matches the given types.

Parameters
moduleTypeenum<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
model,modelname. Something like "PT-ROUTER-NM-1CFE".
Returns
ModuleDescriptor, the descriptor that matches the given types.

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