Contiki 2.5
Macros | Functions
storage_mmem.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "contiki.h"
#include "lib/mmem.h"
#include "lib/list.h"
#include "logging.h"
#include "bundle.h"
#include "sdnv.h"
#include "agent.h"
#include "statusreport.h"
#include "profiling.h"
#include "statistics.h"
#include "hash.h"
#include "storage.h"

Go to the source code of this file.

Macros

#define STORAGE_MMEM_FLAGS_LOCKED   0x1
 Flags for the storage.
 

Functions

void storage_mmem_prune ()
 "Internal" functions More...
 
void storage_mmem_reinit (void)
 Sets the storage to its initial state.
 
uint16_t storage_mmem_delete_bundle (uint32_t bundle_number, uint8_t reason)
 deletes a bundle from storage More...
 
void storage_mmem_update_statistics ()
 internal function to send statistics to statistics module
 
void storage_mmem_init (void)
 called by agent at startup
 
uint8_t storage_mmem_make_room (struct mmem *bundlemem)
 This function delete as many bundles from the storage as necessary to have at least one slot and the number of required of memory free. More...
 
uint8_t storage_mmem_save_bundle (struct mmem *bundlemem, uint32_t **bundle_number_ptr)
 saves a bundle in storage More...
 
struct mmem * storage_mmem_read_bundle (uint32_t bundle_num)
 reads a bundle from storage More...
 
uint16_t storage_mmem_get_free_space (struct mmem *bundlemem)
 checks if there is space for a bundle More...
 
uint16_t storage_mmem_get_bundle_numbers (void)
 Get the number of slots available in storage. More...
 
struct storage_entry_tstorage_mmem_get_bundles (void)
 Get the bundle list. More...
 
uint8_t storage_mmem_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_mmem_unlock_bundle (uint32_t bundle_num)
 Mark a bundle as unlocked after being locked previously.
 

Detailed Description

Author
Georg von Zengen vonze.nosp@m.ng@i.nosp@m.br.cs.nosp@m..tu-.nosp@m.bs.de
Daniel Willmann danie.nosp@m.l@to.nosp@m.talue.nosp@m.berw.nosp@m.achun.nosp@m.g.de
Wolf-Bastian Poettner poett.nosp@m.ner@.nosp@m.ibr.c.nosp@m.s.tu.nosp@m.-bs.d.nosp@m.e

Definition in file storage_mmem.c.