mbed_lstools.platform_database.PlatformDatabase Class Reference
Inheritance diagram for mbed_lstools.platform_database.PlatformDatabase:

## Public Member Functions

def | __init__ (self, database_files, primary_database=None)
def | items (self, device_type='daplink')
def | all_ids (self, device_type='daplink')
def | get (self, index, default=None, device_type='daplink', verbose_data=False)
def | add (self, id, platform_name, permanent=False, device_type='daplink')
def | remove (self, id, permanent=False, device_type='daplink', verbose_data=False)

## Static Public Attributes

| target_id_pattern = re.compile(r'^[a-fA-F0-9]{4}$')

## Detailed Description

    Represents a union of multiple platform database files.
    Handles inter-process synchronization of database files.

Definition at line 396 of file platform_database.py.

## Constructor & Destructor Documentation

## __init__()

def mbed_lstools.platform_database.PlatformDatabase.__init__ | ( |  | self,
|  |  | database_files,
|  |  | primary_database = `None`
| ) |  |

    Construct a PlatformDatabase object from a series of platform database files

Definition at line 403 of file platform_database.py.

## Member Function Documentation

## add()

def mbed_lstools.platform_database.PlatformDatabase.add | ( |  | self,
|  |  | id,
|  |  | platform_name,
|  |  | permanent = `False`,
|  |  | device_type = `'daplink'`
| ) |  |

    Add a platform to this database, optionally updating an origin
    database

Definition at line 478 of file platform_database.py.

## all_ids()

def mbed_lstools.platform_database.PlatformDatabase.all_ids | ( |  | self,
|  |  | device_type = `'daplink'`
| ) |  |

Definition at line 440 of file platform_database.py.

## get()

def mbed_lstools.platform_database.PlatformDatabase.get | ( |  | self,
|  |  | index,
|  |  | default = `None`,
|  |  | device_type = `'daplink'`,
|  |  | verbose_data = `False`
| ) |  |

    Standard lookup function. Works exactly like a dict. If 'verbose_data'
    is True, all data for the platform is returned as a dict.

Definition at line 443 of file platform_database.py.

## items()

def mbed_lstools.platform_database.PlatformDatabase.items | ( |  | self,
|  |  | device_type = `'daplink'`
| ) |  |

Definition at line 435 of file platform_database.py.

## remove()

def mbed_lstools.platform_database.PlatformDatabase.remove | ( |  | self,
|  |  | id,
|  |  | permanent = `False`,
|  |  | device_type = `'daplink'`,
|  |  | verbose_data = `False`
| ) |  |

    Remove a platform from this database, optionally updating an origin
    database. If 'verbose_data' is True, all data for the platform is returned
    as a dict.

Definition at line 498 of file platform_database.py.

## Member Data Documentation

## target_id_pattern

mbed_lstools.platform_database.PlatformDatabase.target_id_pattern = re.compile(r'^[a-fA-F0-9]{4}$')

static

Definition at line 401 of file platform_database.py.

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

- mbed_lstools/platform_database.py