Can you define a DEV array in a module?
Can you define a DEV array in a module?
I have a unit with two tuners built in, I want to decide witch tuner to talk to by witch virtual device channel is pulsed by using a get last and putting the two vdvs into an array. When i define the DEV array in the module i get a compiler error (not a constant) or some such. If you can answer a simple yes to the above question then I'm doing something wrong and can pursue it further.
If no is your answer then can i pass a DEV array into a module? This isnt a make or break situation for me, i can simply copy and paste my code change one number and it will work. I'm just trying to improve my programming abilities and copy/paste is usually the less elegant way of doing things... It may however be a more "efficient" use of my time
Thank you for any advice.
I have a unit with two tuners built in, I want to decide witch tuner to talk to by witch virtual device channel is pulsed by using a get last and putting the two vdvs into an array. When i define the DEV array in the module i get a compiler error (not a constant) or some such. If you can answer a simple yes to the above question then I'm doing something wrong and can pursue it further.
If no is your answer then can i pass a DEV array into a module? This isnt a make or break situation for me, i can simply copy and paste my code change one number and it will work. I'm just trying to improve my programming abilities and copy/paste is usually the less elegant way of doing things... It may however be a more "efficient" use of my time
Thank you for any advice.
Comments
dev dvTPs[] = device array of touch panels for controlling the tuner.
DEFINE_CONSTANT //COUNTS CHAR AVR_1 = 1 ; CHAR AVR_2 = 2 ; DEFINE_CONSTANT //ARRAYs DEV dvAVR_UIArry[NUM_UIs_IN_SYSTEM]= { dvTP_1_AVR,//FR dvTP_2_AVR,//STUDY dvTP_3_AVR,//MBED dvTP_4_AVR,//GUEST DMS dvTP_5_AVR,//NURSERY DMS dvTP_12_AVR } DEV dvAVR_Arry[AVR_NUM_AVRs] = { dvAVR_1 } DEV vAVRcomm_Arry[AVR_NUM_AVRs] = { vAVRcom_1 } INTEGER AVR_INSTANCE[AVR_NUM_AVRs] = { AVR_1 } CHAR AVR_IP_PORT[AVR_NUM_AVRs][24] = //if using a serial server or direct IP { '' //192.168.9.123:4670', } DEFINE_MODULE 'VAV_DEN_AVR2310_comm' TheaterAVR(vAVRcomm_Arry[AVR_1],dvAVR_Arry[AVR_1],AVR_IP_PORT[AVR_1],AVR_INSTANCE[AVR_1], nDeBug_AVR) //mediaThis will work but if you try to pass: You can't pass that SOME_CONSTANT in. I asked my instructor during P3 about this a few years ago and he didn't even know about it so we tested it and he went , hmmm, and that was that.