Ejemplo n.º 1
0
 const rpc_method *RPCFunction::get_rpc_methods() {
    static const rpc_method rpc_methods[] = { 
     { "run", rpc_method_caller_run },                                                 //Run using custom caller, all characters accepted in string
     { "read", rpc_method_caller<char*, RPCFunction, &RPCFunction::read> },
     RPC_METHOD_SUPER(Base)
   };
   return rpc_methods;
 }       
Ejemplo n.º 2
0
const rpc_method *m3pi::get_rpc_methods() {
    static const rpc_method rpc_methods[] = {{ "forward", rpc_method_caller<m3pi, float, &m3pi::forward> },
        { "backward", rpc_method_caller<m3pi, float, &m3pi::backward> },
        { "left", rpc_method_caller<m3pi, float, &m3pi::left> },
        { "right", rpc_method_caller<m3pi, float, &m3pi::right> },
        { "stop", rpc_method_caller<m3pi, &m3pi::stop> },
        { "left_motor", rpc_method_caller<m3pi, float, &m3pi::left_motor> },
        { "right_motor", rpc_method_caller<m3pi, float, &m3pi::right_motor> },
        { "battery", rpc_method_caller<float, m3pi, &m3pi::battery> },
        { "line_position", rpc_method_caller<float, m3pi, &m3pi::line_position> },
        { "sensor_auto_calibrate", rpc_method_caller<char, m3pi, &m3pi::sensor_auto_calibrate> },


        RPC_METHOD_SUPER(Base)
    };
    return rpc_methods;
}