Contiki 2.5
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "contiki.h"
#include "netstack.h"
#include "cfs/cfs.h"
#include "mmem.h"
#include "memb.h"
#include "cfs-coffee.h"
#include "watchdog.h"
#include "list.h"
#include "logging.h"
#include "bundle.h"
#include "sdnv.h"
#include "statusreport.h"
#include "agent.h"
#include "hash.h"
#include "storage.h"
Go to the source code of this file.
Macros | |
#define | STORAGE_FILE_NAME_LENGTH 15 |
How long can a filename possibly be? | |
#define | STORAGE_COFFEE_FLAGS_LOCKED 0x1 |
Flags for the storage. | |
#define | RADIO_SAFE_STATE_ON() NETSTACK_MAC.off(0) |
COFFEE is so slow, that we are loosing radio packets while using the flash. More... | |
Functions | |
void | storage_coffee_prune () |
"Internal" functions More... | |
uint16_t | storage_coffee_delete_bundle (uint32_t bundle_number, uint8_t reason) |
deletes a bundle form storage More... | |
struct mmem * | storage_coffee_read_bundle (uint32_t bundle_number) |
reads a bundle from storage More... | |
void | storage_coffee_reconstruct_bundles () |
Restore bundles stored in CFS. | |
void | storage_coffee_init (void) |
called by agent at startup | |
void | storage_coffee_reinit (void) |
Sets the storage to its initial state. | |
uint8_t | storage_coffee_make_room (struct mmem *bundlemem) |
This function delete as many bundles from the storage as necessary to have at least one slot free. More... | |
uint8_t | storage_coffee_save_bundle (struct mmem *bundlemem, uint32_t **bundle_number_ptr) |
saves a bundle in storage More... | |
uint16_t | storage_coffee_get_free_space (struct mmem *bundlemem) |
checks if there is space for a bundle More... | |
uint16_t | storage_coffee_get_bundle_numbers (void) |
Get the number of slots available in storage. More... | |
struct storage_entry_t * | storage_coffee_get_bundles (void) |
Get the bundle list. More... | |
uint8_t | storage_coffee_lock_bundle (uint32_t bundle_num) |
Mark a bundle as locked so that it will not be deleted even if we are running out of space. More... | |
void | storage_coffee_unlock_bundle (uint32_t bundle_num) |
Mark a bundle as unlocked after being locked previously. | |
Definition in file storage_coffee.c.