HAN-FUN API  1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
HF::Common Namespace Reference

This namespace contains helper classes to be used though out the HAN-FUN implementation. More...

Data Structures

struct  ByteArray
 This class represents a byte array. More...
 
struct  Cloneable
 This class represents the interface that cloneable objects need to implement. More...
 
struct  IEntries
 Basic API for persistent storage implementations. More...
 
struct  Interface
 Interface UID. More...
 
class  Pointer
 Simple raw pointer wrapper. More...
 
struct  Serializable
 This represents the common interface for message serialization. More...
 
struct  SerializableHelper
 Wrapper for classes that implement the Serializable concept. More...
 
struct  SerializableHelper< Common::ByteArray >
 Wrapper for Common::ByteArray implementing the Serializable API. More...
 
struct  SerializableHelper< std::string >
 Wrapper for std::string implementing the Serializable API. More...
 
struct  SerializableHelper< std::vector< uint8_t > >
 Wrapper for std::vector implementing the Serializable API. More...
 
struct  SerializableHelper< T, EnableIf(IsClassPointer(T))>
 Wrapper to pointers for classes that implement the Serializable concept. More...
 
struct  SerializableHelper< T, EnableIf(IsIntegral(T))>
 Wrapper for base integer types implementing the Serializable API. More...
 

Enumerations

enum  Precision {
  BASE = 0x00, MILI = 0x10, MICRO = 0x11, NANO = 0x12,
  PICO = 0x13, KILO = 0x20, MEGA = 0x21, GIGA = 0x22,
  TERA = 0x23
}
 These constants represent precisions that a measurement can be in. More...
 
enum  Time { UPTIME = 0x00, UTC = 0x01 }
 This represents the type of time that is associated with a time measurement. More...
 
enum  Result {
  OK = 0x00, FAIL_AUTH = 0x01, FAIL_ARG = 0x02, FAIL_SUPPORT = 0x03,
  FAIL_RO_ATTR = 0x04, FAIL_READ_SESSION = 0x20, FAIL_MODIFIED = 0x21, FAIL_RESOURCES = 0xFE,
  FAIL_UNKNOWN = 0xFF
}
 Commands result codes. More...
 

Functions

template<typename T , typename P = float>
from_percent (P value)
 Convert a percentage value into the [0,std::numeric_limits<T>::max()] range. More...
 
template<typename T , typename P = float>
to_percent (T value)
 Convert a value in the [0,std::numeric_limits<T>::max()] range into a percentage. More...
 

Detailed Description

This namespace contains helper classes to be used though out the HAN-FUN implementation.