spinn_front_end_common.interface.ds package¶
Module contents¶
- class spinn_front_end_common.interface.ds.DataRowWriter(x, y, p, targets)[source]¶
Bases:
RawIOBase
- fileno()[source]¶
Returns underlying file descriptor if one exists.
OSError is raised if the IO object does not use a file descriptor.
- readable()[source]¶
Return whether object was opened for reading.
If False, read() will raise OSError.
- seekable()[source]¶
Return whether object supports random access.
If False, seek(), tell() and truncate() will raise OSError. This method may need to do a test seek().
- truncate(size=None)[source]¶
Truncate file to size bytes.
File pointer is left unchanged. Size defaults to the current IO position as reported by tell(). Returns the new size.
- class spinn_front_end_common.interface.ds.DsSqlliteDatabase(init_file=None)[source]¶
Bases:
SQLiteDB
A database for holding data specification details.
- Parameters:
init_file (bool) – Whether to initialise the DB from our DDL file. If not specified, this is guessed from whether we can read the file.
- app_items()[source]¶
Yields the keys and values for the data specification data for application cores.
Note
Do not use the database for anything else while iterating.
- create_data_spec(x, y, p)[source]¶
Get a stream that will write the data specification for a particular core to this database.
- Parameters:
- Returns:
the stream; the write only happens when the stream is closed
- Return type:
- ds_n_app_cores()[source]¶
Returns the number for application cores there is a data specification saved for.
- Return type:
- Raises:
- ds_n_cores()[source]¶
Returns the number for cores there is a data specification saved for.
- Return type:
- Raises:
- ds_n_system_cores()[source]¶
Returns the number for system cores there is a data specification saved for.
- Return type:
- Raises:
- info_iteritems()[source]¶
Yields the keys and values for the Info data.
Note
A DB transaction may be held while this iterator is processing. Reentrant use of this class is not supported.
- info_n_cores()[source]¶
Returns the number for cores there is a info saved for.
- Return type:
- Raises:
- items()[source]¶
Yields the keys and values for the data specification data.
Note
Do not use the database for anything else while iterating.
- mark_system_cores(core_subsets)[source]¶
Flags a set of processors as running system binaries.
- Parameters:
core_subsets (CoreSubsets) – Which cores to mark.
- set_app_id(app_id)[source]¶
Sets the same app_id for all rows that have data specification content.
- Parameters:
app_id (int) – value to set
- set_write_info(x, y, p, start, used, written)[source]¶
Sets the provenance returned by the data specification executor.
- system_items()[source]¶
Yields the keys and values for the data specification data for system cores.
Note
Do not use the database for anything else while iterating.