carmen v0.1.2 Carmen.Interface behaviour

Link to this section Summary

Link to this section Types

Link to this type closed_geo()
closed_geo() ::
  %Geo.Polygon{coordinates: term(), srid: term()}
  | %Geo.MultiPolygon{coordinates: term(), srid: term()}
Link to this type geo()
geo() ::
  %Geo.Point{coordinates: term(), srid: term()}
  | %Geo.MultiPoint{coordinates: term(), srid: term()}
  | %Geo.LineString{coordinates: term(), srid: term()}
  | %Geo.MultiLineString{coordinates: term(), srid: term()}
  | %Geo.Polygon{coordinates: term(), srid: term()}
  | %Geo.MultiPolygon{coordinates: term(), srid: term()}
Link to this type id()
id() :: <<_::288>> | pos_integer()
Link to this type state()
state() :: {geo(), [id()], term()}

Link to this section Callbacks

Link to this callback die_after_ms()
die_after_ms() :: non_neg_integer()
Link to this callback events(object_id, triggering_shape, list, list, new_meta, meta)
events(
  object_id :: id(),
  triggering_shape :: geo(),
  [enters :: id()],
  [exits :: id()],
  new_meta :: term(),
  meta :: term()
) :: {:ok, term()}
Link to this callback handle_msg(arg0, message, state)
handle_msg(
  {:call, from :: reference()} | :cast | :info,
  message :: term(),
  state :: term()
) :: term()
Link to this callback load_object_state(object_id)
load_object_state(object_id :: id()) :: state()
Link to this callback load_zones()
load_zones() :: [{id(), closed_geo()}]
Link to this callback lookup(object_id)
lookup(object_id :: id()) :: pid() | :undefined
Link to this callback register(object_id)
register(object_id :: id()) ::
  {:ok, pid()} | {:error, {:already_registered, pid()}}
Link to this callback save_object_state(id, geo, list, term)
save_object_state(id(), geo(), [id()], term()) :: :ok | :error
Link to this callback start_storage()
start_storage() :: :ok
Link to this callback sync_after_count()
sync_after_count() :: non_neg_integer() | :every
Link to this callback sync_after_ms()
sync_after_ms() :: non_neg_integer()
Link to this callback valid?(new_meta, meta)
valid?(new_meta :: term(), meta :: term()) :: boolean()