namespace portdefs {
portctrl::controller port_tmp_0 = {"(system)", "(system)", {
	{portctrl::button::TYPE_BUTTON,70, "framesync", 1, 0, 0, 0, "F", 70},
	{portctrl::button::TYPE_BUTTON,82, "reset", 1, 0, 0, 0, "R", 82},
	{portctrl::button::TYPE_AXIS,0, "rhigh", 1, -32768, 32767, 0, "", 0},
	{portctrl::button::TYPE_AXIS,0, "rlow", 1, -32768, 32767, 0, "", 0},
	{portctrl::button::TYPE_BUTTON,72, "hard", 1, 0, 0, 0, "H", 72},
}};
portctrl::controller_set port_tmp_1 = {
	"system", "system", "psystem",{port_tmp_0, },{0, }
};
}
struct _psystem : public portctrl::type
{
	_psystem() : type("system", "system", 5)
	{
		write = [](const portctrl::type* _this, unsigned char* buffer, unsigned idx, unsigned ctrl, short x) -> void {
			switch(idx) {
			case 0:
				switch(ctrl) {
				case 0:
					if(x) buffer[0]|=1; else buffer[0]&=254;
					break;
				case 1:
					if(x) buffer[0]|=2; else buffer[0]&=253;
					break;
				case 2:
					buffer[1]=(unsigned short)x;
					buffer[2]=((unsigned short)x >> 8);
					break;
				case 3:
					buffer[3]=(unsigned short)x;
					buffer[4]=((unsigned short)x >> 8);
					break;
				case 4:
					if(x) buffer[0]|=4; else buffer[0]&=251;
					break;
				}
				break;
			}
		};
		read = [](const portctrl::type* _this, const unsigned char* buffer, unsigned idx, unsigned ctrl) -> short {
			switch(idx) {
			case 0:
				switch(ctrl) {
				case 0:
					return (buffer[0]&1) ? 1 : 0;
				case 1:
					return (buffer[0]&2) ? 1 : 0;
				case 2:
					return (short)((unsigned short)buffer[1] + ((unsigned short)buffer[2] << 8));
				case 3:
					return (short)((unsigned short)buffer[3] + ((unsigned short)buffer[4] << 8));
				case 4:
					return (buffer[0]&4) ? 1 : 0;
				}
			return 0;
			return 0;
			}
			return 0;
		};
		serialize = [](const portctrl::type* _this, const unsigned char* buffer, char* textbuf) -> size_t {
			size_t ptr = 0;
			short tmp;
			textbuf[ptr++] = (buffer[0] & 1) ? (char)70 : '.';
			textbuf[ptr++] = (buffer[0] & 2) ? (char)82 : '.';
			textbuf[ptr++] = (buffer[0] & 4) ? (char)72 : '.';
			tmp = (short)((unsigned short)buffer[1] + ((unsigned short)buffer[2] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			tmp = (short)((unsigned short)buffer[3] + ((unsigned short)buffer[4] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			return ptr;
		};
		deserialize = [](const portctrl::type* _this, unsigned char* buffer, const char* textbuf) -> size_t {
			memset(buffer, 0, 5);
			size_t ptr = 0;
			short tmp;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=1;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=2;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=4;
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[1] = (unsigned short)tmp;
			buffer[2] = ((unsigned short)tmp >> 8);
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[3] = (unsigned short)tmp;
			buffer[4] = ((unsigned short)tmp >> 8);
			portctrl::skip_rest_of_field(textbuf, ptr, false);
			return ptr;
		};
		controller_info = &portdefs::port_tmp_1;
	}
} psystem;
namespace portdefs {
portctrl::controller port_tmp_2 = {"test", "test1", {
	{portctrl::button::TYPE_AXIS,0, "xlstick", 0, -32768, 32767, 1, "", 0},
	{portctrl::button::TYPE_AXIS,0, "ylstick", 0, -32768, 32767, 1, "", 0},
	{portctrl::button::TYPE_TAXIS,0, "ltrigger", 0, 0, 255, 0, "", 0},
	{portctrl::button::TYPE_AXIS,0, "xrstick", 0, -32768, 32767, 1, "", 0},
	{portctrl::button::TYPE_AXIS,0, "yrstick", 0, -32768, 32767, 1, "", 0},
	{portctrl::button::TYPE_TAXIS,0, "rtrigger", 0, 0, 255, 0, "", 0},
	{portctrl::button::TYPE_BUTTON,65, "A", 0, 0, 0, 0, "A", 65},
	{portctrl::button::TYPE_BUTTON,66, "B", 0, 0, 0, 0, "B", 66},
	{portctrl::button::TYPE_BUTTON,88, "X", 0, 0, 0, 0, "X", 88},
	{portctrl::button::TYPE_BUTTON,89, "Y", 0, 0, 0, 0, "Y", 89},
	{portctrl::button::TYPE_BUTTON,76, "L", 0, 0, 0, 0, "L", 76},
	{portctrl::button::TYPE_BUTTON,82, "R", 0, 0, 0, 0, "R", 82},
	{portctrl::button::TYPE_BUTTON,115, "back", 0, 0, 0, 0, "s", 115},
	{portctrl::button::TYPE_BUTTON,83, "start", 0, 0, 0, 0, "S", 83},
	{portctrl::button::TYPE_BUTTON,113, "lstick", 0, 0, 0, 0, "q", 113},
	{portctrl::button::TYPE_BUTTON,81, "rstick", 0, 0, 0, 0, "Q", 81},
	{portctrl::button::TYPE_BUTTON,79, "ybox", 0, 0, 0, 0, "O", 79},
	{portctrl::button::TYPE_BUTTON,108, "left", 0, 0, 0, 0, "l", 108},
	{portctrl::button::TYPE_BUTTON,114, "right", 0, 0, 0, 0, "r", 114},
	{portctrl::button::TYPE_BUTTON,117, "up", 0, 0, 0, 0, "u", 117},
	{portctrl::button::TYPE_BUTTON,100, "down", 0, 0, 0, 0, "d", 100},
}};
portctrl::controller_set port_tmp_3 = {
	"ptype1", "ptype1", "ptype1",{port_tmp_2, },{1, }
};
}
struct _ptype1 : public portctrl::type
{
	_ptype1() : type("ptype1", "ptype1", 14)
	{
		write = [](const portctrl::type* _this, unsigned char* buffer, unsigned idx, unsigned ctrl, short x) -> void {
			switch(idx) {
			case 0:
				switch(ctrl) {
				case 0:
					buffer[2]=(unsigned short)x;
					buffer[3]=((unsigned short)x >> 8);
					break;
				case 1:
					buffer[4]=(unsigned short)x;
					buffer[5]=((unsigned short)x >> 8);
					break;
				case 2:
					buffer[6]=(unsigned short)x;
					buffer[7]=((unsigned short)x >> 8);
					break;
				case 3:
					buffer[8]=(unsigned short)x;
					buffer[9]=((unsigned short)x >> 8);
					break;
				case 4:
					buffer[10]=(unsigned short)x;
					buffer[11]=((unsigned short)x >> 8);
					break;
				case 5:
					buffer[12]=(unsigned short)x;
					buffer[13]=((unsigned short)x >> 8);
					break;
				case 6:
					if(x) buffer[0]|=1; else buffer[0]&=254;
					break;
				case 7:
					if(x) buffer[0]|=2; else buffer[0]&=253;
					break;
				case 8:
					if(x) buffer[0]|=4; else buffer[0]&=251;
					break;
				case 9:
					if(x) buffer[0]|=8; else buffer[0]&=247;
					break;
				case 10:
					if(x) buffer[0]|=16; else buffer[0]&=239;
					break;
				case 11:
					if(x) buffer[0]|=32; else buffer[0]&=223;
					break;
				case 12:
					if(x) buffer[0]|=64; else buffer[0]&=191;
					break;
				case 13:
					if(x) buffer[0]|=128; else buffer[0]&=127;
					break;
				case 14:
					if(x) buffer[1]|=1; else buffer[1]&=254;
					break;
				case 15:
					if(x) buffer[1]|=2; else buffer[1]&=253;
					break;
				case 16:
					if(x) buffer[1]|=4; else buffer[1]&=251;
					break;
				case 17:
					if(x) buffer[1]|=8; else buffer[1]&=247;
					break;
				case 18:
					if(x) buffer[1]|=16; else buffer[1]&=239;
					break;
				case 19:
					if(x) buffer[1]|=32; else buffer[1]&=223;
					break;
				case 20:
					if(x) buffer[1]|=64; else buffer[1]&=191;
					break;
				}
				break;
			}
		};
		read = [](const portctrl::type* _this, const unsigned char* buffer, unsigned idx, unsigned ctrl) -> short {
			switch(idx) {
			case 0:
				switch(ctrl) {
				case 0:
					return (short)((unsigned short)buffer[2] + ((unsigned short)buffer[3] << 8));
				case 1:
					return (short)((unsigned short)buffer[4] + ((unsigned short)buffer[5] << 8));
				case 2:
					return (short)((unsigned short)buffer[6] + ((unsigned short)buffer[7] << 8));
				case 3:
					return (short)((unsigned short)buffer[8] + ((unsigned short)buffer[9] << 8));
				case 4:
					return (short)((unsigned short)buffer[10] + ((unsigned short)buffer[11] << 8));
				case 5:
					return (short)((unsigned short)buffer[12] + ((unsigned short)buffer[13] << 8));
				case 6:
					return (buffer[0]&1) ? 1 : 0;
				case 7:
					return (buffer[0]&2) ? 1 : 0;
				case 8:
					return (buffer[0]&4) ? 1 : 0;
				case 9:
					return (buffer[0]&8) ? 1 : 0;
				case 10:
					return (buffer[0]&16) ? 1 : 0;
				case 11:
					return (buffer[0]&32) ? 1 : 0;
				case 12:
					return (buffer[0]&64) ? 1 : 0;
				case 13:
					return (buffer[0]&128) ? 1 : 0;
				case 14:
					return (buffer[1]&1) ? 1 : 0;
				case 15:
					return (buffer[1]&2) ? 1 : 0;
				case 16:
					return (buffer[1]&4) ? 1 : 0;
				case 17:
					return (buffer[1]&8) ? 1 : 0;
				case 18:
					return (buffer[1]&16) ? 1 : 0;
				case 19:
					return (buffer[1]&32) ? 1 : 0;
				case 20:
					return (buffer[1]&64) ? 1 : 0;
				}
			return 0;
			return 0;
			}
			return 0;
		};
		serialize = [](const portctrl::type* _this, const unsigned char* buffer, char* textbuf) -> size_t {
			size_t ptr = 0;
			short tmp;
			textbuf[ptr++] = '|';
			textbuf[ptr++] = (buffer[0] & 1) ? (char)65 : '.';
			textbuf[ptr++] = (buffer[0] & 2) ? (char)66 : '.';
			textbuf[ptr++] = (buffer[0] & 4) ? (char)88 : '.';
			textbuf[ptr++] = (buffer[0] & 8) ? (char)89 : '.';
			textbuf[ptr++] = (buffer[0] & 16) ? (char)76 : '.';
			textbuf[ptr++] = (buffer[0] & 32) ? (char)82 : '.';
			textbuf[ptr++] = (buffer[0] & 64) ? (char)115 : '.';
			textbuf[ptr++] = (buffer[0] & 128) ? (char)83 : '.';
			textbuf[ptr++] = (buffer[1] & 1) ? (char)113 : '.';
			textbuf[ptr++] = (buffer[1] & 2) ? (char)81 : '.';
			textbuf[ptr++] = (buffer[1] & 4) ? (char)79 : '.';
			textbuf[ptr++] = (buffer[1] & 8) ? (char)108 : '.';
			textbuf[ptr++] = (buffer[1] & 16) ? (char)114 : '.';
			textbuf[ptr++] = (buffer[1] & 32) ? (char)117 : '.';
			textbuf[ptr++] = (buffer[1] & 64) ? (char)100 : '.';
			tmp = (short)((unsigned short)buffer[2] + ((unsigned short)buffer[3] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			tmp = (short)((unsigned short)buffer[4] + ((unsigned short)buffer[5] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			tmp = (short)((unsigned short)buffer[6] + ((unsigned short)buffer[7] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			tmp = (short)((unsigned short)buffer[8] + ((unsigned short)buffer[9] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			tmp = (short)((unsigned short)buffer[10] + ((unsigned short)buffer[11] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			tmp = (short)((unsigned short)buffer[12] + ((unsigned short)buffer[13] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			return ptr;
		};
		deserialize = [](const portctrl::type* _this, unsigned char* buffer, const char* textbuf) -> size_t {
			memset(buffer, 0, 14);
			size_t ptr = 0;
			short tmp;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=1;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=2;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=4;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=8;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=16;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=32;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=64;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=128;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=1;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=2;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=4;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=8;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=16;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=32;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=64;
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[2] = (unsigned short)tmp;
			buffer[3] = ((unsigned short)tmp >> 8);
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[4] = (unsigned short)tmp;
			buffer[5] = ((unsigned short)tmp >> 8);
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[6] = (unsigned short)tmp;
			buffer[7] = ((unsigned short)tmp >> 8);
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[8] = (unsigned short)tmp;
			buffer[9] = ((unsigned short)tmp >> 8);
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[10] = (unsigned short)tmp;
			buffer[11] = ((unsigned short)tmp >> 8);
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[12] = (unsigned short)tmp;
			buffer[13] = ((unsigned short)tmp >> 8);
			portctrl::skip_rest_of_field(textbuf, ptr, false);
			return ptr;
		};
		controller_info = &portdefs::port_tmp_3;
	}
} ptype1;
namespace portdefs {
portctrl::controller port_tmp_4 = {"test", "test2", {
	{portctrl::button::TYPE_AXIS,0, "xlstick", 0, -32768, 32767, 1, "", 0},
	{portctrl::button::TYPE_AXIS,0, "ylstick", 0, -32768, 32767, 1, "", 0},
	{portctrl::button::TYPE_TAXIS,0, "ltrigger", 0, 0, 255, 0, "", 0},
	{portctrl::button::TYPE_AXIS,0, "xrstick", 0, -32768, 32767, 1, "", 0},
	{portctrl::button::TYPE_AXIS,0, "yrstick", 0, -32768, 32767, 1, "", 0},
	{portctrl::button::TYPE_TAXIS,0, "rtrigger", 0, 0, 255, 0, "", 0},
	{portctrl::button::TYPE_BUTTON,65, "A", 0, 0, 0, 0, "A", 65},
	{portctrl::button::TYPE_BUTTON,66, "B", 0, 0, 0, 0, "B", 66},
	{portctrl::button::TYPE_BUTTON,88, "X", 0, 0, 0, 0, "X", 88},
	{portctrl::button::TYPE_BUTTON,89, "Y", 0, 0, 0, 0, "Y", 89},
	{portctrl::button::TYPE_BUTTON,76, "L", 0, 0, 0, 0, "L", 76},
	{portctrl::button::TYPE_BUTTON,82, "R", 0, 0, 0, 0, "R", 82},
	{portctrl::button::TYPE_BUTTON,115, "back", 0, 0, 0, 0, "s", 115},
	{portctrl::button::TYPE_BUTTON,83, "start", 0, 0, 0, 0, "S", 83},
	{portctrl::button::TYPE_BUTTON,113, "lstick", 0, 0, 0, 0, "q", 113},
	{portctrl::button::TYPE_BUTTON,81, "rstick", 0, 0, 0, 0, "Q", 81},
	{portctrl::button::TYPE_BUTTON,79, "ybox", 0, 0, 0, 0, "O", 79},
	{portctrl::button::TYPE_BUTTON,108, "left", 0, 0, 0, 0, "l", 108},
	{portctrl::button::TYPE_BUTTON,114, "right", 0, 0, 0, 0, "r", 114},
	{portctrl::button::TYPE_BUTTON,117, "up", 0, 0, 0, 0, "u", 117},
	{portctrl::button::TYPE_BUTTON,100, "down", 0, 0, 0, 0, "d", 100},
}};
portctrl::controller_set port_tmp_5 = {
	"ptype2", "ptype2", "ptype2",{port_tmp_4, },{2, }
};
}
struct _ptype2 : public portctrl::type
{
	_ptype2() : type("ptype2", "ptype2", 14)
	{
		write = [](const portctrl::type* _this, unsigned char* buffer, unsigned idx, unsigned ctrl, short x) -> void {
			switch(idx) {
			case 0:
				switch(ctrl) {
				case 0:
					buffer[2]=(unsigned short)x;
					buffer[3]=((unsigned short)x >> 8);
					break;
				case 1:
					buffer[4]=(unsigned short)x;
					buffer[5]=((unsigned short)x >> 8);
					break;
				case 2:
					buffer[6]=(unsigned short)x;
					buffer[7]=((unsigned short)x >> 8);
					break;
				case 3:
					buffer[8]=(unsigned short)x;
					buffer[9]=((unsigned short)x >> 8);
					break;
				case 4:
					buffer[10]=(unsigned short)x;
					buffer[11]=((unsigned short)x >> 8);
					break;
				case 5:
					buffer[12]=(unsigned short)x;
					buffer[13]=((unsigned short)x >> 8);
					break;
				case 6:
					if(x) buffer[0]|=1; else buffer[0]&=254;
					break;
				case 7:
					if(x) buffer[0]|=2; else buffer[0]&=253;
					break;
				case 8:
					if(x) buffer[0]|=4; else buffer[0]&=251;
					break;
				case 9:
					if(x) buffer[0]|=8; else buffer[0]&=247;
					break;
				case 10:
					if(x) buffer[0]|=16; else buffer[0]&=239;
					break;
				case 11:
					if(x) buffer[0]|=32; else buffer[0]&=223;
					break;
				case 12:
					if(x) buffer[0]|=64; else buffer[0]&=191;
					break;
				case 13:
					if(x) buffer[0]|=128; else buffer[0]&=127;
					break;
				case 14:
					if(x) buffer[1]|=1; else buffer[1]&=254;
					break;
				case 15:
					if(x) buffer[1]|=2; else buffer[1]&=253;
					break;
				case 16:
					if(x) buffer[1]|=4; else buffer[1]&=251;
					break;
				case 17:
					if(x) buffer[1]|=8; else buffer[1]&=247;
					break;
				case 18:
					if(x) buffer[1]|=16; else buffer[1]&=239;
					break;
				case 19:
					if(x) buffer[1]|=32; else buffer[1]&=223;
					break;
				case 20:
					if(x) buffer[1]|=64; else buffer[1]&=191;
					break;
				}
				break;
			}
		};
		read = [](const portctrl::type* _this, const unsigned char* buffer, unsigned idx, unsigned ctrl) -> short {
			switch(idx) {
			case 0:
				switch(ctrl) {
				case 0:
					return (short)((unsigned short)buffer[2] + ((unsigned short)buffer[3] << 8));
				case 1:
					return (short)((unsigned short)buffer[4] + ((unsigned short)buffer[5] << 8));
				case 2:
					return (short)((unsigned short)buffer[6] + ((unsigned short)buffer[7] << 8));
				case 3:
					return (short)((unsigned short)buffer[8] + ((unsigned short)buffer[9] << 8));
				case 4:
					return (short)((unsigned short)buffer[10] + ((unsigned short)buffer[11] << 8));
				case 5:
					return (short)((unsigned short)buffer[12] + ((unsigned short)buffer[13] << 8));
				case 6:
					return (buffer[0]&1) ? 1 : 0;
				case 7:
					return (buffer[0]&2) ? 1 : 0;
				case 8:
					return (buffer[0]&4) ? 1 : 0;
				case 9:
					return (buffer[0]&8) ? 1 : 0;
				case 10:
					return (buffer[0]&16) ? 1 : 0;
				case 11:
					return (buffer[0]&32) ? 1 : 0;
				case 12:
					return (buffer[0]&64) ? 1 : 0;
				case 13:
					return (buffer[0]&128) ? 1 : 0;
				case 14:
					return (buffer[1]&1) ? 1 : 0;
				case 15:
					return (buffer[1]&2) ? 1 : 0;
				case 16:
					return (buffer[1]&4) ? 1 : 0;
				case 17:
					return (buffer[1]&8) ? 1 : 0;
				case 18:
					return (buffer[1]&16) ? 1 : 0;
				case 19:
					return (buffer[1]&32) ? 1 : 0;
				case 20:
					return (buffer[1]&64) ? 1 : 0;
				}
			return 0;
			return 0;
			}
			return 0;
		};
		serialize = [](const portctrl::type* _this, const unsigned char* buffer, char* textbuf) -> size_t {
			size_t ptr = 0;
			short tmp;
			textbuf[ptr++] = '|';
			textbuf[ptr++] = (buffer[0] & 1) ? (char)65 : '.';
			textbuf[ptr++] = (buffer[0] & 2) ? (char)66 : '.';
			textbuf[ptr++] = (buffer[0] & 4) ? (char)88 : '.';
			textbuf[ptr++] = (buffer[0] & 8) ? (char)89 : '.';
			textbuf[ptr++] = (buffer[0] & 16) ? (char)76 : '.';
			textbuf[ptr++] = (buffer[0] & 32) ? (char)82 : '.';
			textbuf[ptr++] = (buffer[0] & 64) ? (char)115 : '.';
			textbuf[ptr++] = (buffer[0] & 128) ? (char)83 : '.';
			textbuf[ptr++] = (buffer[1] & 1) ? (char)113 : '.';
			textbuf[ptr++] = (buffer[1] & 2) ? (char)81 : '.';
			textbuf[ptr++] = (buffer[1] & 4) ? (char)79 : '.';
			textbuf[ptr++] = (buffer[1] & 8) ? (char)108 : '.';
			textbuf[ptr++] = (buffer[1] & 16) ? (char)114 : '.';
			textbuf[ptr++] = (buffer[1] & 32) ? (char)117 : '.';
			textbuf[ptr++] = (buffer[1] & 64) ? (char)100 : '.';
			tmp = (short)((unsigned short)buffer[2] + ((unsigned short)buffer[3] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			tmp = (short)((unsigned short)buffer[4] + ((unsigned short)buffer[5] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			tmp = (short)((unsigned short)buffer[6] + ((unsigned short)buffer[7] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			tmp = (short)((unsigned short)buffer[8] + ((unsigned short)buffer[9] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			tmp = (short)((unsigned short)buffer[10] + ((unsigned short)buffer[11] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			tmp = (short)((unsigned short)buffer[12] + ((unsigned short)buffer[13] << 8));
			ptr += sprintf(textbuf + ptr, " %i", tmp);
			return ptr;
		};
		deserialize = [](const portctrl::type* _this, unsigned char* buffer, const char* textbuf) -> size_t {
			memset(buffer, 0, 14);
			size_t ptr = 0;
			short tmp;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=1;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=2;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=4;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=8;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=16;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=32;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=64;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[0]|=128;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=1;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=2;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=4;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=8;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=16;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=32;
			if(portctrl::read_button_value(textbuf, ptr)) buffer[1]|=64;
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[2] = (unsigned short)tmp;
			buffer[3] = ((unsigned short)tmp >> 8);
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[4] = (unsigned short)tmp;
			buffer[5] = ((unsigned short)tmp >> 8);
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[6] = (unsigned short)tmp;
			buffer[7] = ((unsigned short)tmp >> 8);
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[8] = (unsigned short)tmp;
			buffer[9] = ((unsigned short)tmp >> 8);
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[10] = (unsigned short)tmp;
			buffer[11] = ((unsigned short)tmp >> 8);
			tmp = portctrl::read_axis_value(textbuf, ptr);
			buffer[12] = (unsigned short)tmp;
			buffer[13] = ((unsigned short)tmp >> 8);
			portctrl::skip_rest_of_field(textbuf, ptr, false);
			return ptr;
		};
		controller_info = &portdefs::port_tmp_5;
	}
} ptype2;
std::vector<portctrl::type*> _port_types{&psystem, &ptype1, &ptype2, };
