Home AMX User Forum AMX General Discussion

Can you make a Virtual TP go offline?

I have a off the wall question,

If you have in code this example
Define Device
vdevtp = 33001 (Virtual)
Tp1 =10001 (Wired)
Tp2=10002 (Wireless)
Tp3=10003 (Wireless)

Define Combine
(Tp1,vdevtp,Tp2,Tp3)

My understanding is if TP1 (wired) goes offline then all otthers will also be offline due to the above combine statement.

Question is will the vdevtp (virtual) also go offline and what, effect will it have on the master? Will there be error logging that can overload the buffer and lockup a master controller.

btw I know the Define Combine statement is wrong but this is currently running on a system i'm troubleshooting.

Thanks for any input

Comments

  • The problem in the Combines is that if the 1st device in the list goes offline, the master has no longer a reference to any of the devices in the list. The virtual device will not go offline (it never can because it will be created, gooes online and hold in memory from bootup), but it can't help here to hold the combine.

    In a combine, you also can't ever find what device really has done i.e. the Push, it's always the 1st in the list. You only can detect the Online and Offlen of the devices separately.
  • DHawthorneDHawthorne Posts: 4,584
    Just don't use DEFINE_COMBINE, use COMBINE_DEVICES, which is dynamic, not locked in at startup.
  • KouyaKouya Posts: 60
    Marc, Dave

    Thanks for your input, hopefully I can convince the programmer to correct his code.

    Regards

    Brian Lee
  • ericmedleyericmedley Posts: 4,177
    Kouya wrote: »
    Marc, Dave

    Thanks for your input, hopefully I can convince the programmer to correct his code.

    Regards

    Brian Lee

    I would further urge you and your programmer to use DEV arrays instead of combining/uncombining devices. They are way more flexible and reliable.
  • A little metaphor

    Dev Arrays are like having more than one woman you're dating and you get to choose who you want to take out or maybe you want to take out everyone and have an orgy.

    Define Combine is like being mormon
  • jazzwyld wrote: »
    Dev Arrays are like having more than one woman you're dating and you get to choose who you want to take out or maybe you want to take out everyone and have an orgy.

    Define Combine is like being mormon
    Great analogy *rofl*
Sign In or Register to comment.