anchor.diff:  get_value_by_offset(DB, SlotOffset) ->
       Index = (DB#rrd.current_index + SlotOffset) rem DB#rrd.count,
       array:get(Index, DB#rrd.data).
  +
  +%% @doc Gets all values as list from newest to oldest (desc) or from
  +%%      oldest to newest (asc). Values may be undefined.
  +-spec get_all_values(asc | desc, DB::rrd()) -> [undefined | data_type()].
  +get_all_values(desc, DB) ->
  +    [get_value_by_offset(DB, Offset) || Offset <- lists:seq(0, DB#rrd.count-1)];
  +get_all_values(asc, DB) ->
  +    [get_value_by_offset(DB, Offset) || Offset <- lists:seq(DB#rrd.count-1, 0, -1)].
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   %
  
positive.code: -spec get_type(DB::rrd()) -> timeseries_type().
  get_type(DB) -> DB#rrd.type.
  
  -spec get_current_time(DB::rrd()) -> internal_time().
  get_current_time(DB) ->
      DB#rrd.current_time.
  
negative.code: 
  % internal API for the monitor process
  -export([get_slot_start/2, reduce_timeslots/2, add_nonexisting_timeslots/2,
           get_type/1, get_count/1, get_slot_length/1, get_current_time/1,
           get_value/2, get_value_by_offset/2, get_all_values/2,
           add_with/4, timing_with_hist_merge_fun/3]).
  
  % misc
  