Rclex.Generators.TypeHash (Rclex (Experimental) v0.12.9)

Copy Markdown View Source

Reads REP-2011 type hashes from ROS-generated type description JSON files.

The JSON contains the canonical hash generated by ROS. Reading it is intentional: hashing the source text directly is not REP-2011 compatible.

Summary

Functions

calculate_type_hash(type_description)

@spec calculate_type_hash(struct()) :: {:ok, String.t()} | {:error, term()}

type_hash(type_name, share_path)

@spec type_hash(String.t(), String.t()) ::
  {:ok, String.t()} | {:error, atom() | tuple()}

type_hash!(type_name, share_path)

@spec type_hash!(String.t(), String.t()) :: String.t()