off line event
Binu
Posts: 49
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'
}
}
0
Comments
I understand the reson from your replay, Thank you Dave.