off line event
Binu
Junior Member
Dear all,
Here I am had a problem with an off line event.
I am controlling a winamp Player from a NI3000 . When I close the player from the system. My off line event is detecting it. But if I remove the network cable from the computer or shut down the system. My off line event for the player is not detecting.
Who to fix this?
The code is as flows
DEFINE_DEVICE
WINAMP = 0:3:0
DATA_EVENT[WINAMP]
{
ONLINE:
{
SEND_STRING 0, 'WINAMP ON LINE'
WINAMP_STAT = 1
CANCEL_WAIT 'ON_LINE_WAIT'
}
OFFLINE:
{
SEND_STRING 0, 'WINAMP OFF LINE'
WINAMP_STAT = 0
}
}
DEFINE_PROGRAM
IF(WINAMP_STAT = 0)
{
WAIT 100 'ON_LINE_WAIT'
{
IP_CLIENT_CLOSE(WINAMP.PORT)
WAIT 5
IP_CLIENT_OPEN(WINAMP.PORT,'10.1.4.7',3200,1)
SEND_COMMAND TP1,'ABEEP'
}
}
Here I am had a problem with an off line event.
I am controlling a winamp Player from a NI3000 . When I close the player from the system. My off line event is detecting it. But if I remove the network cable from the computer or shut down the system. My off line event for the player is not detecting.
Who to fix this?
The code is as flows
DEFINE_DEVICE
WINAMP = 0:3:0
DATA_EVENT[WINAMP]
{
ONLINE:
{
SEND_STRING 0, 'WINAMP ON LINE'
WINAMP_STAT = 1
CANCEL_WAIT 'ON_LINE_WAIT'
}
OFFLINE:
{
SEND_STRING 0, 'WINAMP OFF LINE'
WINAMP_STAT = 0
}
}
DEFINE_PROGRAM
IF(WINAMP_STAT = 0)
{
WAIT 100 'ON_LINE_WAIT'
{
IP_CLIENT_CLOSE(WINAMP.PORT)
WAIT 5
IP_CLIENT_OPEN(WINAMP.PORT,'10.1.4.7',3200,1)
SEND_COMMAND TP1,'ABEEP'
}
}
Comments
-
The system needs some way of determining it went off line. When you close it, it is sending the message out "I am shutting down," so you get an offline event. When you unplug it, no message goes out (and how could it, it's unplugged!). If the device itself does not periodically check in and broadcast it's on the network, it has to be polled periodically. Most network devices broadcast some kind of "I'm still here" message, which is why sometimes a device can go down, and you don't get the offline event until a minute or two later ... it took that long for the system to realize the messages stopped. If no provision is made in the hardware on the network for this, your only choice is to poll it yourself and close the connection if there is no response, forcing the event.
-
off line event
I understand the reson from your replay, Thank you Dave.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums