-
Notifications
You must be signed in to change notification settings - Fork 0
Data Types
The high-level API (Adapter, Target, Commander, AemStream) returns typed values defined in pycommander_core.types. Exceptions live in pycommander_core.errors (see Error-Handling).
from pycommander_core.types import (
AdapterInfo, AdapterVoltageInfo, VcomHandshake, CtuneValue, TargetInfo, AemMeasurement,
)Unless noted otherwise, most fields default to None, since Commander does not always populate every field for every device.
Returned by Commander.getVersion().
| Field | Type |
|---|---|
simplicity_commander_version |
str |
jlink_dll_version |
str |
emdll_version |
str |
mbed_tls_version |
str |
qt_version |
str |
Returned (in a list) by Commander.listAvailableAdapters().
| Field | Type |
|---|---|
jlink_serial_number |
str | None |
ip_address |
str | None |
nickname |
str | None |
A board entry within AdapterInfo.board_list.
| Field | Type |
|---|---|
name |
str | None |
part_number |
str | None |
serial_number |
str | None |
target_device |
str | None |
Adapter firmware info within AdapterInfo.
| Field | Type |
|---|---|
current_version |
str | None |
latest_version |
str | None |
upgrade_available |
bool | None |
Returned by Adapter.info().
| Field | Type |
|---|---|
board_list |
list[AdapterBoardInfo] | None |
fw_info |
AdapterFwInfo | None |
jlink_serial_number |
int | None |
vcom_port |
str | None |
vcom_supported |
bool | None |
ip_supported |
bool | None |
ip_address |
str | None |
mac_address |
str | None |
nickname |
str | None |
kit_name |
str | None |
kit_part_number |
str | None |
aem_supported |
bool | None |
debug_mode |
str | None |
debug_part |
str | None |
Returned by Adapter.upgradeFirmware().
| Field | Type |
|---|---|
package_was_installed |
bool |
currently_installed_version |
str | None |
Returned by Adapter.getVoltage() — AdapterVoltageInfo.rails is a list of AdapterRailInfo.
AdapterRailInfo:
| Field | Type |
|---|---|
rail_index |
int | None |
configured_voltage_v |
float | None |
measured_voltage_v |
float | None |
rail_powered |
bool | None |
Returned by Target.info().
| Field | Type |
|---|---|
part_number |
str | None |
die_revision |
str | None |
production_version |
str | None |
flash_size_kb |
int | None |
sram_size_kb |
int | None |
unique_id |
str | None |
Returned by Target.getCTUNE().
| Field | Type | Source |
|---|---|---|
di |
int | None |
Device Info page |
board |
int | None |
board EEPROM |
token |
int | None |
MFG token |
Used by Adapter.setVcomConfig().
| Member | Value |
|---|---|
NONE |
"none" |
RTSCTS |
"rtscts" |
AUX |
"aux" |
| Member | Value |
|---|---|
ENCRYPTED_AND_AUTHENTICATED |
"encrypted_authenticated" |
ENCRYPTED |
"encrypted" |
NONE |
"none" |
| Field | Type |
|---|---|
index |
int |
size_kb |
int |
protection_mode |
CodeRegionProtectionMode |
closed |
bool |
| Field | Type |
|---|---|
location |
int |
size |
int |
Returned by Target.readRegionConfig().
| Field | Type |
|---|---|
code_regions |
list[CodeRegionConfig] |
data_region |
DataRegionConfig |
| Field | Type |
|---|---|
debug_lock_locked |
bool |
debug_port_locked |
bool |
nidlock_locked |
bool |
spidlock_locked |
bool |
spnidlock_locked |
bool |
| Field | Type |
|---|---|
debug_lock_locked |
bool |
nidlock_locked |
bool |
spidlock_locked |
bool |
spnidlock_locked |
bool |
Returned by Target.getSecurityStatus().
| Field | Type |
|---|---|
boot_status |
int |
boot_status_str |
str |
command_key_installed |
bool |
debug_lock_enabled |
bool |
device_erase_enabled |
bool |
se_firmware_version |
str |
secure_boot_enabled |
bool |
secure_debug_unlock_enabled |
bool |
serial_number |
str |
sign_key_installed |
bool |
tamper_ok |
bool |
trustzone_config |
TrustzoneConfig | None |
trustzone_state |
TrustzoneState | None |
Returned by Target.checkSeFirmwareUpgrade().
| Field | Type |
|---|---|
current_version |
str | None |
latest_version |
str | None |
upgrade_available |
bool | None |
Yielded by AemStream iteration.
| Field | Type | Notes |
|---|---|---|
timestamp_us |
int |
microseconds |
current_ma |
float |
milliamps |
voltage_v |
float |
volts |
power_mw |
float |
computed as current_ma * voltage_v
|
Returned by Adapter.analyzeEnergyUsage(). Container for the four analyses (each None unless requested):
| Field | Type |
|---|---|
distribution |
AemDistribution | None |
clustering |
AemClustering | None |
period_detection |
AemPeriodDetection | None |
signal_characteristics |
AemSignalCharacteristics | None |
| Field | Type |
|---|---|
average_voltage_v |
float | None |
dynamic_range_ratio |
float | None |
estimated_states |
int | None |
max_current_ma |
float | None |
min_current_ma |
float | None |
noise_level_mad_sigma_ma |
float | None |
bins: list[AemDistributionBin], configuration: AemDistributionConfiguration, summary: AemDistributionSummary, type: str.
-
AemDistributionBin:average_current,bin_max,bin_min,current_unit,num_samples,percentage,standard_deviation,time,time_unit. -
AemDistributionConfiguration:bins: int,logarithmic: bool. -
AemDistributionSummary:max_current,min_current,total_duration_ms,total_samples,unit.
blocks: list[AemClusterBlock], configuration: AemClusterConfiguration, method: str, total_blocks: int, type: str, unique_states: int.
-
AemClusterBlock:duration_ms,end_ms,level_mA,max_mA,min_mA,range_mA,samples,start_ms. -
AemClusterConfiguration:false_alarm_probability,max_points,min_segment_ms.
configuration: AemPeriodDetectionConfiguration, result: AemPeriodDetectionResult, type: str.
-
AemPeriodDetectionConfiguration:max_period_ms,min_period_ms. -
AemPeriodDetectionResult:confidence,frequency_hz,interval_summary,intervals,is_periodic,jitter_relative,method,method_results,num_cycles,period_ms. -
AemPeriodDetectionIntervalSummary:average_mean_current_ma,average_peak_current_ma,max_period_ms,min_period_ms. -
AemPeriodDetectionInterval:cycle,end_index,end_ms,mean_current_ma,peak_current_ma,period_ms,start_index,start_ms. -
AemPeriodDetectionMethodResult:method,detected,confidence,period_ms,relative_error.
A few namedtuples model raw command results:
-
CommanderResult(returncode, stdout, stderr)— returned byCommander.runCommand(..., json_formatted_output=False). Exported from the top-level package asCommanderResult. -
CommandResult(returncode, output)— internal result of a single command-suite call. -
RunnerResult(returncode, stdout, stderr)— internal result from the subprocessRunner.
PyCommander · GitHub · Simplicity Commander docs · Licensed under the Silicon Labs MSLA
Getting started
Using PyCommander
Topics
Command reference
- Overview
- adapter · aem · vcom · ctune
- device · flash · verify · readmem · extflash
- security
- tokens · nvm3 · littlefs
- convert · ebl · gbl3 · gbl4 · ota · rps · postbuild
- util · serial · mfg917
Contributing