- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Attributes

# SCS::DataReference< T > Class Template Reference

Standard implementation of DataReference. More...

`#include <datareference.h>`

Inheritance diagram for SCS::DataReference< T >:
[legend]

List of all members.

## Public Types
typedef boost::function< void(const T &)> | func
## Public Member Functions
| DataReference (bool own, T *ptr)
| DataReference (bool own, func func_ptr)
| DataReference (bool own, func func_ptr, T *ptr)
void | update ()
virtual void | readFromCan (const CanAeroMetadata &meta, const can_t &can)
std::vector< can_t > | write (const CanAeroMetadata &meta)
bool | needRequest () const
void | requested ()
bool | hasChanged () const
bool | isSelfPublished () const
## Protected Attributes
unsigned long | m_number_of_losses
T | m_cached_value
T | m_history_value

## Detailed Description

### template<typename T>
class SCS::DataReference< T >

Standard implementation of DataReference.

Author:
  (c) 2009, 2010 by Philipp Münzel

Version:
  1.3

## Constructor & Destructor Documentation

template<typename T >

SCS::DataReference< T >::DataReference | ( | bool | own,
|  | T * | ptr
| ) |  |

Parameters:

  ptr | ptr to value in application that will be update when data arrives from the Bus.

template<typename T >

SCS::DataReference< T >::DataReference | ( | bool | own,
|  | func | func_ptr
| ) |  |

Parameters:

  func_ptr | function to be invoked when data arrives from the bus

template<typename T >

SCS::DataReference< T >::DataReference | ( | bool | own,
|  | func | func_ptr,
|  | T * | ptr
| ) |  |

Parameters:

  func_ptr | function to be invoked when data arrives from the bus
  ptr | ptr to value in application that will be update when data arrives from the Bus.

## Member Function Documentation

template<typename T >

bool SCS::DataReference< T >::hasChanged | ( |  | ) | const`[virtual]`

See also:
  TypelessDataReference::hasChanged

Implements SCS::TypelessDataReference.

template<typename T >

bool SCS::DataReference< T >::isSelfPublished | ( |  | ) | const`[inline, virtual]`

See also:
  TypelessDataReference::isSelfPublished

Implements SCS::TypelessDataReference.

template<typename T >

bool SCS::DataReference< T >::needRequest | ( |  | ) | const`[virtual]`

See also:
  TypelessDataReference::needRequest

Implements SCS::TypelessDataReference.

template<typename T >

virtual void SCS::DataReference< T >::readFromCan | ( | const CanAeroMetadata & | meta,
|  | const can_t & | can
| ) |  | `[virtual]`

See also:
  TypelessDataReference::readFromCan

Implements SCS::TypelessDataReference.

template<typename T >

void SCS::DataReference< T >::requested | ( |  | ) | `[virtual]`

See also:
  TypelessDataReference::requested

Implements SCS::TypelessDataReference.

template<typename T >

void SCS::DataReference< T >::update | ( |  | ) | `[virtual]`

See also:
  TypelessDataReference::update

Implements SCS::TypelessDataReference.

template<typename T >

std::vector<can_t> SCS::DataReference< T >::write | ( | const CanAeroMetadata & | meta | ) | `[virtual]`

See also:
  TypelessDataReference::write

Implements SCS::TypelessDataReference.

The documentation for this class was generated from the following file:

- datareference.h