Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
|
Descriptor for a device. More...
Public Member Functions | |
DeviceType | getType () |
Return device type. More... | |
string | getModel () |
Get device model. More... | |
void | addSupportedModuleType (ModuleType) |
Add supported module type to device descriptor. More... | |
void | removeSupportedModuleType (ModuleType) |
Remove supported module type to device descriptor. More... | |
bool | isModuleTypeSupported (ModuleType) |
Check if module type is supported. More... | |
int | getSupportedModuleTypeCount () |
Get the number of module type. More... | |
ModuleType | getSupportedModuleTypeAt (int) |
Get the supported module type at a specified index. More... | |
ModuleDescriptor | getRootModule () |
Get the root module descriptor. More... | |
bool | isModelSupported () |
Check if the descriptor is model supported. More... | |
int | getSpecifiedModelCount () |
Get specified model count. More... | |
string | getSpecifiedModelAt (int) |
Get specified model at a specified index. More... | |
bool | isExistSpecifiedModel (string) |
Check if the model exist. More... | |
void | addSpecifiedModel (string) |
Add module model to support. More... | |
void | removeSpecifiedModel (string) |
Remove model model to support. More... | |
void | setModelSupportedFlag (bool) |
Set supported flag to the device descriptor. More... | |
void | addRequiredScriptModule (string) |
Add required script module. More... | |
void | removeRequiredScriptModule (string) |
Removed required script module. More... | |
int | getRequiredScriptModuleCount () |
Get the number of required script module. More... | |
string | getRequiredScriptModuleAt (int) |
Get the name of the required script module at a specified index. More... | |
Descriptor for a device.
void DeviceDescriptor::addRequiredScriptModule | ( | string | ) |
Add required script module.
smId,script | module id |
void DeviceDescriptor::addSpecifiedModel | ( | string | ) |
Add module model to support.
model,specified | model |
void DeviceDescriptor::addSupportedModuleType | ( | ModuleType | ) |
Add supported module type to device descriptor.
type,module | type enum<ModuleType>, start with 0 and add 1 to subsequent module type eLineCard=0, // Line card eNetworkModule, // Network module eInterfaceCard, // Interface card ePtRouterModule, // Packet Tracer router module ePtSwitchModule, // Packet Tracer switch module ePtCloudModule, // Packet Tracer cloud module ePtRepeaterModule, // Packet Tracer repeater module ePtHostModule, // Packet Tracer host module ePtModemModule, ePtLaptopModule, ePtTVModule, eIpPhonePowerAdapter, ePtTabletPCModule, ePtPdaModule, ePtWirelessEndDeviceModule, ePtWiredEndDeviceModule, eTrs35, eUsb, eNonRemovableModule, // Non-removable module eASAModule, eASAPowerAdapter, ePtCellTowerModule, ePtIoeModule, ePtIoeNetworkModule, ePtIoeAnalogModule, ePtIoeDigitalModule, ePtIoeCustomIOModule, ePtIoePowerAdapter, ePtIoeMcuComponentPowerAdapter, ePtRouterPowerAdapter, eSfpModule, eAccessPointPowerAdaptor, eNonRemovableInterfaceCard, eCustomModuleType = 2000 |
string DeviceDescriptor::getModel | ( | ) |
Get device model.
string DeviceDescriptor::getRequiredScriptModuleAt | ( | int | ) |
Get the name of the required script module at a specified index.
index,specified | index |
int DeviceDescriptor::getRequiredScriptModuleCount | ( | ) |
Get the number of required script module.
ModuleDescriptor DeviceDescriptor::getRootModule | ( | ) |
Get the root module descriptor.
string DeviceDescriptor::getSpecifiedModelAt | ( | int | ) |
Get specified model at a specified index.
index,specified | index |
int DeviceDescriptor::getSpecifiedModelCount | ( | ) |
Get specified model count.
ModuleType DeviceDescriptor::getSupportedModuleTypeAt | ( | int | ) |
Get the supported module type at a specified index.
index,the | specified index |
int DeviceDescriptor::getSupportedModuleTypeCount | ( | ) |
Get the number of module type.
DeviceType DeviceDescriptor::getType | ( | ) |
Return device type.
bool DeviceDescriptor::isExistSpecifiedModel | ( | string | ) |
Check if the model exist.
model,specified | model |
bool DeviceDescriptor::isModelSupported | ( | ) |
Check if the descriptor is model supported.
bool DeviceDescriptor::isModuleTypeSupported | ( | ModuleType | ) |
Check if module type is supported.
type,enum<ModuleType> | |
type,module | type enum<ModuleType>, start with 0 and add 1 to subsequent module type eLineCard=0, // Line card eNetworkModule, // Network module eInterfaceCard, // Interface card ePtRouterModule, // Packet Tracer router module ePtSwitchModule, // Packet Tracer switch module ePtCloudModule, // Packet Tracer cloud module ePtRepeaterModule, // Packet Tracer repeater module ePtHostModule, // Packet Tracer host module ePtModemModule, ePtLaptopModule, ePtTVModule, eIpPhonePowerAdapter, ePtTabletPCModule, ePtPdaModule, ePtWirelessEndDeviceModule, ePtWiredEndDeviceModule, eTrs35, eUsb, eNonRemovableModule, // Non-removable module eASAModule, eASAPowerAdapter, ePtCellTowerModule, ePtIoeModule, ePtIoeNetworkModule, ePtIoeAnalogModule, ePtIoeDigitalModule, ePtIoeCustomIOModule, ePtIoePowerAdapter, ePtIoeMcuComponentPowerAdapter, ePtRouterPowerAdapter, eSfpModule, eAccessPointPowerAdaptor, eNonRemovableInterfaceCard, eCustomModuleType = 2000 |
void DeviceDescriptor::removeRequiredScriptModule | ( | string | ) |
Removed required script module.
smId,script | module id |
void DeviceDescriptor::removeSpecifiedModel | ( | string | ) |
Remove model model to support.
model,specified | model |
void DeviceDescriptor::removeSupportedModuleType | ( | ModuleType | ) |
Remove supported module type to device descriptor.
type,module | type enum<ModuleType>, same type as param for addSupportedModuleType(). |
void DeviceDescriptor::setModelSupportedFlag | ( | bool | ) |
Set supported flag to the device descriptor.
isSupported,true | if supported and false if not |