Wiselib
Public Types | Public Member Functions | Protected Types | Protected Attributes
wiselib::DataUnit< OsModel_P, Radio_P > Class Template Reference

#include <data_unit.h>

List of all members.

Public Types

enum  state_t { VALID = 0, INVALID = 1, STALE = 2 }
typedef OsModel_P OsModel
typedef Radio_P Radio
typedef DataUnit< OsModel,
Radio_P > 
self_type
typedef Radio::block_data_t block_data_t
typedef uint8_t hashValue_t
typedef DataUnit< Os, Radiodu_t
typedef Radio::size_t size_t
typedef uint16_t hash_Value_t
typedef int32_t maxLifeTimeId_t

Public Member Functions

 DataUnit ()
 ~DataUnit ()
block_data_tgetPayload ()
hash_Value_t getHashValue ()
size_t payload_size ()
size_t buffer_size ()

Protected Types

enum  data_positions {
  TYPE_OF_DATA_UNIT = 0, NODE_ID_POS = TYPE_OF_DATA_UNIT + 1, HASH_VALUE_POS = NODE_ID_POS + 1, MAXLIFETIME_POS = HASH_VALUE_POS + sizeof(hash_Value_t),
  PAYLOAD_LENGTH_POS = MAXLIFETIME_POS + sizeof(maxLifeTimeId_t), PAYLOAD_POS = PAYLOAD_LENGTH_POS + sizeof(size_t)
}

Protected Attributes

block_data_t buffer [PAYLOAD_POS+MAX_PAYLOAD_SIZE]

template<typename OsModel_P, typename Radio_P>
class wiselib::DataUnit< OsModel_P, Radio_P >


Member Typedef Documentation

template<typename OsModel_P , typename Radio_P >
typedef Radio::block_data_t wiselib::DataUnit< OsModel_P, Radio_P >::block_data_t
template<typename OsModel_P , typename Radio_P >
typedef DataUnit<Os, Radio> wiselib::DataUnit< OsModel_P, Radio_P >::du_t
template<typename OsModel_P , typename Radio_P >
typedef uint16_t wiselib::DataUnit< OsModel_P, Radio_P >::hash_Value_t
template<typename OsModel_P , typename Radio_P >
typedef uint8_t wiselib::DataUnit< OsModel_P, Radio_P >::hashValue_t
template<typename OsModel_P , typename Radio_P >
typedef int32_t wiselib::DataUnit< OsModel_P, Radio_P >::maxLifeTimeId_t
template<typename OsModel_P , typename Radio_P >
typedef OsModel_P wiselib::DataUnit< OsModel_P, Radio_P >::OsModel
template<typename OsModel_P , typename Radio_P >
typedef Radio_P wiselib::DataUnit< OsModel_P, Radio_P >::Radio
template<typename OsModel_P , typename Radio_P >
typedef DataUnit<OsModel, Radio_P> wiselib::DataUnit< OsModel_P, Radio_P >::self_type
template<typename OsModel_P , typename Radio_P >
typedef Radio::size_t wiselib::DataUnit< OsModel_P, Radio_P >::size_t

Member Enumeration Documentation

template<typename OsModel_P , typename Radio_P >
enum wiselib::DataUnit::data_positions [protected]
Enumerator:
TYPE_OF_DATA_UNIT 
NODE_ID_POS 
HASH_VALUE_POS 
MAXLIFETIME_POS 
PAYLOAD_LENGTH_POS 
PAYLOAD_POS 
template<typename OsModel_P , typename Radio_P >
enum wiselib::DataUnit::state_t
Enumerator:
VALID 
INVALID 
STALE 

Constructor & Destructor Documentation

template<typename OsModel_P , typename Radio_P >
wiselib::DataUnit< OsModel_P, Radio_P >::DataUnit ( )
template<typename OsModel_P , typename Radio_P >
wiselib::DataUnit< OsModel_P, Radio_P >::~DataUnit ( )

Member Function Documentation

template<typename OsModel_P , typename Radio_P >
size_t wiselib::DataUnit< OsModel_P, Radio_P >::buffer_size ( void  ) [inline]
template<typename OsModel_P , typename Radio_P >
hash_Value_t wiselib::DataUnit< OsModel_P, Radio_P >::getHashValue ( ) [inline]
template<typename OsModel_P , typename Radio_P >
block_data_t* wiselib::DataUnit< OsModel_P, Radio_P >::getPayload ( ) [inline]
template<typename OsModel_P , typename Radio_P >
size_t wiselib::DataUnit< OsModel_P, Radio_P >::payload_size ( ) [inline]

Member Data Documentation

template<typename OsModel_P , typename Radio_P >
block_data_t wiselib::DataUnit< OsModel_P, Radio_P >::buffer[PAYLOAD_POS+MAX_PAYLOAD_SIZE] [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines