
#include "system.h"

#define SYSTEM_POWERVU       0x0E00

#define SYSTEM_NAME          "PowerVU"
#define SYSTEM_PRI           -10
#define SYSTEM_CAN_HANDLE(x) ((x)==SYSTEM_POWERVU)

// -- cSystemPowerVU ---------------------------------------------------------------

class cSystemPowerVU : public cSystem {
public:
	cSystemPowerVU(void);
	virtual bool ProcessECM(const cEcmInfo *ecm, unsigned char *source);
};

cSystemPowerVU::cSystemPowerVU(void)
:cSystem(SYSTEM_NAME,SYSTEM_PRI)
{}

bool cSystemPowerVU::ProcessECM(const cEcmInfo *ecm, unsigned char *source)
{
	HexDump(source,source[2]+3);
	return true;
}

// -- cSystemLinkPowerVU --------------------------------------------------------

class cSystemLinkPowerVU : public cSystemLink {
public:
	cSystemLinkPowerVU(void):cSystemLink(SYSTEM_NAME,SYSTEM_PRI) {}
	virtual bool CanHandle(unsigned short SysId);
	virtual cSystem *Create(void) { return new cSystemPowerVU; }
};

static cSystemLinkPowerVU staticInit;

bool cSystemLinkPowerVU::CanHandle(unsigned short SysId)
{
  SysId&=SYSTEM_MASK;
  return SYSTEM_CAN_HANDLE(SysId);
}