Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CML IDE Tools V2 Validation
#1
I'm working on my first V2 driver and I'm curious what this menu item does.

My driver is a Brultech 1240 update so I am implementing the RESMON DevClass.

Most of my fields are RESMON#XXX~Watts, etc.. 

.jpg   V2Fields.jpg (Size: 64.91 KB / Downloads: 2)


 I have also implemented the QueryResInfo/ResourceList QueryTextVal.
Code:
"CH1 Power Direction (Boolean)", "CH1 Mean Current (Amps)", "CH1 Instantaneous Power (Watts)", "CH1 Daily Power (WHrs)", "CH2 Power Direction (Boolean)", "CH2 Mean Current (Amps)", "CH2 Instantaneous Power (Watts)", "CH2 Daily Power (WHrs)", "AUX1 Instantaneous Power (Watts)", "AUX1 Daily Power (WHrs)", "AUX2 Instantaneous Power (Watts)", "AUX2 Daily Power (WHrs)", "AUX3 Instantaneous Power (Watts)", "AUX3 Daily Power (WHrs)", "AUX4 Instantaneous Power (Watts)", "AUX4 Daily Power (WHrs)", "AUX5 Instantaneous Power (Watts)", "AUX5 Daily Power (WHrs)"
"RESMON#CH1~Positive", "RESMON#CH1~Amps", "RESMON#CH1~Watts", "RESMON#CH1~WHrs24Hrs", "RESMON#CH2~Positive", "RESMON#CH2~Amps", "RESMON#CH2~Watts", "RESMON#CH2~WHrs24Hrs", "RESMON#AUX1~Watts", "RESMON#AUX1~WHrs24Hrs", "RESMON#AUX2~Watts", "RESMON#AUX2~WHrs24Hrs", "RESMON#AUX3~Watts", "RESMON#AUX3~WHrs24Hrs", "RESMON#AUX4~Watts", "RESMON#AUX4~WHrs24Hrs", "RESMON#AUX5~Watts", "RESMON#AUX5~WHrs24Hrs"
When I try the validation I get this error:

.jpg   V2Validation.jpg (Size: 61.36 KB / Downloads: 3)

Maybe its mad because Positive is a Boolean field (which indicates the direction of power flow)…  No need to complain about the same two fields seven times though eh?

--Bob
Reply
#2
It insures that your driver's fields match the restraints of any V2 device classes it claims to implement. So you definitely want to use if it doing a V2 driver. Don't ship until you get no errors there.

They can't be boolean. As per the Resource Monitor device class they have to be a numeric value. You can always just make it an Card with a range of 0 to 1 or something. If it's a read only field you could always make it an Int and set the range from -1 to 1, and just never report a value of 0. Or say zero means you can't get the information or no net power flow.

Not sure why you are getting that set of errors necessarily. We can look into that later once I'm done with my current stuff. Presumably it wouldn't be too hard to replicate again if necessary.
Dean Roddey
Explorans limites defectum
Reply
#3
Okay, I converted Positive (Boolean) to Direction (Int Range:-1,1).

I also moved Voltage to RESMON#Voltage (seems voltage is something you would monitor).  I have other fields that are not RESMON# (like serial number).

Now it is complaining that RESMON - "All fields must be multi-unit or not".

For this driver the interesting resources we are monitoring are the Panel Voltage, and also the power usage of different channels, so it seems to make sense to use both types of fields.  Also the main channels and the aux channels have different sub-fields, so it seems unreasonable to insist on all sub fields or all not subfields.

It goes on to complain
[OTHER] - Field (all of them) was not processed by any class.

Okay, so I take Voltage out of RESMON# and run again.

Now it complains about my Direction field again, but the window is too small and I can't tell what it is mad about now.  Grr.


.jpg   V2Validation.jpg (Size: 61.26 KB / Downloads: 2)
Reply
#4
Okay I removed the Limits on Direction and now there are no validation errors.
Reply
#5
Just make the main ones have Main (or something appropriate, Panel maybe, as their sub-unit.
Dean Roddey
Explorans limites defectum
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)