libSDRForge
Loading...
Searching...
No Matches
preset_manager.PresetManager Class Reference

Provide preset manager behavior. More...

Public Member Functions

None __init__ (self, PresetRepositoryIf repository)
 Initialize the instance.
list[PresetCollection] list_collections (self, str owner_id)
 Return the available collections.
list[RadioPreset] list_presets (self, str owner_id, str|None collection_id=None)
 Return the available presets.
PresetCollection add_collection (self, str owner_id, str name)
 Add collection.
RadioPreset add_preset (self, str owner_id, str collection_id, str name, int frequency_hz, str modulation, int bandwidth_hz)
 Add preset.
bool delete_preset (self, str owner_id, str preset_id)
 Delete preset.
RadioPreset update_preset (self, str owner_id, str preset_id, *, str|None name=None, int|None frequency_hz=None, str|None modulation=None, int|None bandwidth_hz=None, str|None collection_id=None)
 Update preset.
PresetCollection rename_collection (self, str owner_id, str collection_id, str name)
 Rename collection.
bool delete_collection (self, str owner_id, str collection_id, *, bool delete_presets=False)
 Delete collection.

Public Attributes

 repository = repository

Detailed Description

Provide preset manager behavior.

Constructor & Destructor Documentation

◆ __init__()

None preset_manager.PresetManager.__init__ ( self,
PresetRepositoryIf repository )

Initialize the instance.

Parameters
selfThe current instance.
repositoryThe repository value.

Member Function Documentation

◆ add_collection()

PresetCollection preset_manager.PresetManager.add_collection ( self,
str owner_id,
str name )

Add collection.

Parameters
selfThe current instance.
owner_idThe preset owner identifier.
nameThe name value.
Returns
The operation result.

◆ add_preset()

RadioPreset preset_manager.PresetManager.add_preset ( self,
str owner_id,
str collection_id,
str name,
int frequency_hz,
str modulation,
int bandwidth_hz )

Add preset.

Parameters
selfThe current instance.
owner_idThe preset owner identifier.
collection_idThe collection_id value.
nameThe name value.
frequency_hzThe frequency in hertz.
modulationThe modulation value.
bandwidth_hzThe bandwidth_hz value.
Returns
The operation result.

◆ delete_collection()

bool preset_manager.PresetManager.delete_collection ( self,
str owner_id,
str collection_id,
* ,
bool delete_presets = False )

Delete collection.

Parameters
selfThe current instance.
owner_idThe preset owner identifier.
collection_idThe collection_id value.
delete_presetsThe delete_presets value.
Returns
The operation result.

◆ delete_preset()

bool preset_manager.PresetManager.delete_preset ( self,
str owner_id,
str preset_id )

Delete preset.

Parameters
selfThe current instance.
owner_idThe preset owner identifier.
preset_idThe preset_id value.
Returns
The operation result.

◆ list_collections()

list[PresetCollection] preset_manager.PresetManager.list_collections ( self,
str owner_id )

Return the available collections.

Parameters
selfThe current instance.
owner_idThe preset owner identifier.
Returns
The operation result.

◆ list_presets()

list[RadioPreset] preset_manager.PresetManager.list_presets ( self,
str owner_id,
str | None collection_id = None )

Return the available presets.

Parameters
selfThe current instance.
owner_idThe preset owner identifier.
collection_idThe collection_id value.
Returns
The operation result.

◆ rename_collection()

PresetCollection preset_manager.PresetManager.rename_collection ( self,
str owner_id,
str collection_id,
str name )

Rename collection.

Parameters
selfThe current instance.
owner_idThe preset owner identifier.
collection_idThe collection_id value.
nameThe name value.
Returns
The operation result.

◆ update_preset()

RadioPreset preset_manager.PresetManager.update_preset ( self,
str owner_id,
str preset_id,
* ,
str | None name = None,
int | None frequency_hz = None,
str | None modulation = None,
int | None bandwidth_hz = None,
str | None collection_id = None )

Update preset.

Parameters
selfThe current instance.
owner_idThe preset owner identifier.
preset_idThe preset_id value.
nameThe name value.
frequency_hzThe frequency in hertz.
modulationThe modulation value.
bandwidth_hzThe bandwidth_hz value.
collection_idThe collection_id value.
Returns
The operation result.

Member Data Documentation

◆ repository

preset_manager.PresetManager.repository = repository

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