IP_CLIENT_OPEN gremlins
ProgressiveCode
Posts: 64
I've got a strange one I think. Short bit of boiled down code:
DEFINE_DEVICE
dev dvDEV = 0:5:0
DEFINE_CONSTANT
char sDEV_IP_ADDRESS[] = "'192.168.2.210'"
DEV_IP_PORT = 80
DEV_IP_MODE = 1
DEV_MAINLINE_TL = 71
TIMELINE_EVENT[DEV_MAINLINE_TL]
{
IP_CLIENT_OPEN(5,'192.168.2.210',80,1) // this works
// IP_CLIENT_OPEN(dvDEV.PORT,sDEV_IP_ADDRESS,DEV_IP_PORT,DEV_IP_MODE) // this doesn't work
}
I have not been able to figure out what is wrong with my line above that isn't working. Obviously I can work around it, but any ideas out there? Is it something about being inside a timeline_event that the compiler isn't pulling in the right values? Seems like that shouldn't be the problem to me. The fact that I am passing constants into the function? Again, doesn't seem like that shouldn't the problem either. And I'm 100% certain that I've used constants before and they've worked. I also thought maybe it was because I used dvDEV.PORT as one of the parameters. I think in the past I've just created a constant with the port value. But I've seen others use .PORT before. So that shouldn't be the problem. Maybe I'm missing something obvious.
DEFINE_DEVICE
dev dvDEV = 0:5:0
DEFINE_CONSTANT
char sDEV_IP_ADDRESS[] = "'192.168.2.210'"
DEV_IP_PORT = 80
DEV_IP_MODE = 1
DEV_MAINLINE_TL = 71
TIMELINE_EVENT[DEV_MAINLINE_TL]
{
IP_CLIENT_OPEN(5,'192.168.2.210',80,1) // this works
// IP_CLIENT_OPEN(dvDEV.PORT,sDEV_IP_ADDRESS,DEV_IP_PORT,DEV_IP_MODE) // this doesn't work
}
I have not been able to figure out what is wrong with my line above that isn't working. Obviously I can work around it, but any ideas out there? Is it something about being inside a timeline_event that the compiler isn't pulling in the right values? Seems like that shouldn't be the problem to me. The fact that I am passing constants into the function? Again, doesn't seem like that shouldn't the problem either. And I'm 100% certain that I've used constants before and they've worked. I also thought maybe it was because I used dvDEV.PORT as one of the parameters. I think in the past I've just created a constant with the port value. But I've seen others use .PORT before. So that shouldn't be the problem. Maybe I'm missing something obvious.
0
Comments
Actually that's what Paul just posted although I originaly thought he was just trying to get you to encase your code with code tags for the post but he removed the double quotes too.
sDEV_IP_ADDRESS[] = '192.168.2.210'
I'm not at my desk right now to try it myself or I would.
I agree with the assessment that this is a compiler bug, and it should not compile. Or it should compile and work.
char sDEV_IP_ADDRESS[] = '192.168.2.210'
That fixed it.