Home AMX User Forum AMXForums Archive Threads AMX Applications and Solutions

COMBINE_DEVICES

Hi Guys,

Does anyone try this ?
DEFINE_DEVICE

dvTPBR 				= 10001: 1:0                          // Real Panel
vdvTPBR				= 34001: 1:0                          // Virtual Panel

DEFINE_COMBINE (vdvTP, dvTP)

DEFINE_FUNCTION fDoSomething_1()
{
	// Do Something 1
}

DEFINE_FUNCTION fDoSomething_2()
{
	// Do Something 2
}


DEFINE_EVENT

DATA_EVENT [vdvTP]
{
	ONLINE:
	{
		fDoSomething_1();
	}
	OFFLINE:
	{
		fDoSomething_2();
	}
}

Problem in above code is. when i put actual device 'dvTP' in DATA_EVENT i can detect ONLINE and OFFLINE events when I POWER ON and POWER OFF the touch panel and it execute fDoSomething_1() and fDoSomething_2(). But when I put a virtual device 'vdvTP', it never get in to ONLINE and OFFLINE event.

Can someone guide me how to detect ONLINE and OFFLINE event via virtual Touch Panel?

Thanks in Advance.

Comments

  • a_riot42a_riot42 Posts: 1,624
    You can't. A virtual is a fake device. Being fake it can't go offline like a real panel since there is no connection to be maintained, and thus is always online. Don't use combine_device.
    Paul
  • DHawthorneDHawthorne Posts: 4,584
    Make an array of your devices instead. Then create a data event with the array as a parameter and put your online/offline events in there.
Sign In or Register to comment.