|
PebbleOS
|
Backends reading the transferred objects. More...
Modules | |
| Core dump storage | |
| Backend reading the most recent core dump from flash. | |
| File storage | |
| Backend reading a PFS file. | |
| Flash storage | |
| Backend reading a raw flash region. | |
Data Structures | |
| struct | GetBytesStorage |
| Storage of an object being transferred. More... | |
| struct | GetBytesStorageInfo |
| Request parameters passed to the backend setup. More... | |
Typedefs | |
| typedef struct GetBytesStorageImplementation | GetBytesStorageImplementation |
| Backend operations, private to the get bytes service. | |
Enumerations | |
| enum | GetBytesStorageType { GetBytesStorageTypeUnknown , GetBytesStorageTypeCoredump , GetBytesStorageTypeFile , GetBytesStorageTypeFlash } |
| Storage backend type. More... | |
Functions | |
| bool | gb_storage_setup (GetBytesStorage *storage, GetBytesObjectType object_type, GetBytesStorageInfo *info) |
| Set up the storage of an object, e.g. | |
| GetBytesInfoErrorCode | gb_storage_get_size (GetBytesStorage *storage, uint32_t *size) |
| Get the size of the object. | |
| bool | gb_storage_read_next_chunk (GetBytesStorage *storage, uint8_t *buffer, uint32_t len) |
| Read the next chunk of the object. | |
| void | gb_storage_cleanup (GetBytesStorage *storage, bool successful) |
| Release the storage. | |
Backends reading the transferred objects.
Each GetBytesObjectType maps to a backend implementing setup, size, read and cleanup. File and flash backends are not built in release or recovery firmware.
| struct GetBytesStorage |
Storage of an object being transferred.
| Data Fields | ||
|---|---|---|
| uint32_t | current_offset | Offset of the next byte to read, advanced by gb_storage_read_next_chunk(). |
| const GetBytesStorageImplementation * | impl | Backend operations. |
| void * | impl_data | Backend private data. |
| struct GetBytesStorageInfo |
Request parameters passed to the backend setup.
| Data Fields | ||
|---|---|---|
| char * | filename | File name, for GetBytesStorageTypeFile. |
| uint32_t | flash_len | Length in bytes, for GetBytesStorageTypeFlash. |
| uint32_t | flash_start_addr | Start address, for GetBytesStorageTypeFlash. |
| bool | only_get_new_coredump | Only return a core dump not read yet, for GetBytesStorageTypeCoredump. |
| typedef struct GetBytesStorageImplementation GetBytesStorageImplementation |
Backend operations, private to the get bytes service.
| enum GetBytesStorageType |
| void gb_storage_cleanup | ( | GetBytesStorage * | storage, |
| bool | successful | ||
| ) |
Release the storage.
| storage | Storage. |
| successful | The whole object was sent. A sent core dump is marked as read. |
| GetBytesInfoErrorCode gb_storage_get_size | ( | GetBytesStorage * | storage, |
| uint32_t * | size | ||
| ) |
Get the size of the object.
| storage | Storage. | |
| [out] | size | Object size in bytes. |
| bool gb_storage_read_next_chunk | ( | GetBytesStorage * | storage, |
| uint8_t * | buffer, | ||
| uint32_t | len | ||
| ) |
Read the next chunk of the object.
| storage | Storage. | |
| [out] | buffer | Destination. |
| len | Number of bytes to read. |
| bool gb_storage_setup | ( | GetBytesStorage * | storage, |
| GetBytesObjectType | object_type, | ||
| GetBytesStorageInfo * | info | ||
| ) |
Set up the storage of an object, e.g.
allocate memory or open a file.
| [out] | storage | Storage. |
| object_type | Object type, selecting the backend. | |
| info | Request parameters. |