Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmdResponseParse ¶
解析命令的响应报文 如果收到的不是所发命令对应的响应报文,且没有出错,返回false,nil 如果是对应的响应报文,且状态正确,返回true,nil 如果出错,返回error
func GenerateMoveCommand ¶
func GenerateMoveCommand(spi *pb.SinglePointInfo) (name, cmd string, uuid string)
func SubscribeResponseParse ¶
解析命令的响应报文 如果收到的不是callback消息订阅,或者不是robot_status主题,或者运动没有完成,返回false 如果是对应的响应报文,且指示移动命令已完成,返回true 如果出错,由于订阅消息的可重复性,直接忽略,返回false
Types ¶
type Server ¶
type Server struct {
pb.UnimplementedSinglePointMoveServer
}
func (*Server) Move ¶
func (s *Server) Move(ctx context.Context, in *pb.SinglePointInfo) (*pb.MoveResponse, error)
func (*Server) MoveAndWaitForArrival ¶
func (s *Server) MoveAndWaitForArrival(ctx context.Context, in *pb.SinglePointInfo) (*pb.MoveAndWaitForArrivalResponse, error)
type SingleMoveCommandResponse ¶
type SingleMoveCommandResponse struct { common.CommandResponse TaskID string `json:"task_id"` }
func (*SingleMoveCommandResponse) UnmarshalJSON ¶
func (smcr *SingleMoveCommandResponse) UnmarshalJSON(strJSON string) (err error)
Click to show internal directories.
Click to hide internal directories.