-module(rose). -export([decode/1, encode/3, dispatch/1]). -include("Remote-Operations-Generic-ROS-PDUs.hrl"). decode(Msg) -> 'Remote-Operations-Generic-ROS-PDUs':decode('ROS', Msg). encode(Id, Op, Msg) -> 'Remote-Operations-Generic-ROS-PDUs':encode('ROS', {returnResult, #'ReturnResult'{invokeId = Id, result = #'ReturnResult_result'{opcode = Op, result = Msg}}}). dispatch({invoke, #'Invoke'{invokeId = Id, opcode = Op}}) -> case Op of {local, 211} -> encode(Id, Op, <<5,0>>) end.