#pragma once

#include <stdio.h>
#include "uartconnect.hpp"
#include "comm.hpp"

class VirtualCommSlave : public CommSlave, public UartConnect<37>
{
	virtual void addPoints(const uint8_t* xys, unsigned points)
	{
		printf("addPoints([%u]={", points);
		for (unsigned i=0; i<points; i++)
			printf("(%u,%u)%s", xys[2*i], xys[2*i+1], (i==points-1)?"}\n":",");
	}
	virtual void deletePoints()
	{
		printf("deletePoints()\n");
	}
	virtual void stopMove()
	{
		printf("stopMove()\n");
	}
	virtual void startMove()
	{
		printf("startMove()\n");
	}
	virtual void setParam()
	{
		printf("setParam()\n");
	}
	virtual void gotoXY(PosType x, PosType y)
	{
		printf("gotoXY(%d, %d)\n", x, y);
	}
	virtual void movedXdY(PosType dx, PosType dy)
	{
		printf("movedXdY(%d, %d)\n", dx, dy);
	}
	virtual void gotoNextPoint()
	{
		printf("gotoNextPoint()\n");
	}
	virtual void setNPoint(uint16_t nPoint)
	{
		printf("setNPoint(%u)\n", nPoint);
	}
	virtual void setPos(PosType x, PosType y)
	{
		printf("setPos(%d, %d)\n", x, y);
	}
	virtual void send(const uint8_t* buffer, unsigned len)
	{
	}
};
