Can I not declare a device array and pass it to a module?
Avophile
Posts: 70
Can I not declare a device array and pass it to a module?
The error I am getting is this:
When trying to create a module with just a single device, I get a different error:
Brings up this error:
PROGRAM_NAME='module' DEFINE_DEVICE dvTP1 = 10001:1:0 dvTP2 = 10002:1:0 DEFINE_VARIABLE DEV devTPs [ ] = {dvTP1, dvTP2} DEFINE_MODULE 'module1' ABC123 (devTPs)
The error I am getting is this:
ERROR: Dimension mismatch: [0] vs. [1]
ERROR:Type or dimension conflict for [ABC123]
When trying to create a module with just a single device, I get a different error:
PROGRAM_NAME='module' DEFINE_DEVICE dvDEV = 5001:1:0 DEFINE_MODULE 'module1' ABC123(dvDEV)
Brings up this error:
ERROR:Cannot convert type [DEV] to [INTEGER]
ERROR:Type or dimension conflict for [ABC123]
0
Comments
module_name ="MyModule" (dev tpArray[])
that should work for you.
MODULE_NAME='module1' (dev devtps [ ])
...solved my first problem.
Any idea about the second error I am getting when attempting to pass a single device as a parameter to the module?
Nevermind... similar deal.
The module wanted the device declared like so:
MODULE_NAME='module1'(dev dvDEV)