View Source Rclex.MsgProt protocol (Rclex v0.9.0)

Defines protocol which supports arbitrary message types. Modules implementing this protocol should define relationships between Elixir structure data and C structure data.

Summary

Functions

Should return reference to C struct instance.

Should return Elixir struct loaded with data from C struct instance.

Should set Elixir struct to C struct instance.

Should return typesupport reference.

Types

Functions

@spec initialize(msg_type :: struct()) :: Rclex.Nifs.ros_message()

Should return reference to C struct instance.

@spec read(msg_type :: struct(), msg :: Rclex.Nifs.ros_message()) :: struct()

Should return Elixir struct loaded with data from C struct instance.

@spec set(data :: struct(), msg :: Rclex.Nifs.ros_message()) :: :ok

Should set Elixir struct to C struct instance.

@spec typesupport(msg_type :: struct()) :: Rclex.Nifs.rosidl_message_type_support()

Should return typesupport reference.