Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SNMP Driver
#81
I think it's that you cannot write directly to those fields. They are only supposed to be accessed using the increment commands.
Dean Roddey
Software Geek Extraordinaire
Reply
#82
Dean Roddey Wrote:I think it's that you cannot write directly to those fields. They are only supposed to be accessed using the increment commands.

I'm not writing directly to that field, I am writing to the OutputStatus field with WriteStringFldByName and getting that exception for FailedWrite....
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#83
wuench Wrote:I'm not writing directly to that field, I am writing to the OutputStatus field with WriteStringFldByName and getting that exception for FailedWrite....

Oh, ok. It's probably a goober in the logged message but I'll check it. I'm guessing it tried to do a lookup, fails, then goes ahead and uses the index (that never got set) to get the name to log, and ends up getting that one.
Dean Roddey
Software Geek Extraordinaire
Reply
#84
OK, that's being logged at the CML level. It watches for a couple specific (common) underlying C++ errors that might occur on a field write and translates them to some more specific CML error.

In this case it's seeing a limit violation error and translating that to the LimitViolation CML level that the base driver class defines. I don't see anything wrong in that code really.

The driver itself doesn't automatically bump the counter fields, at least not the one you are seeing in that error message, so I don't think it could be that.

You sure you didn't somehow get that field name into that strName value that's being passed to the field write?
Dean Roddey
Software Geek Extraordinaire
Reply
#85
I don't see how that can be occurring. The log message

Code:
06/26/11 13:29:04.840 - Workstation-UPS-ProcessResponse: String Field Updated OutputStatus = 0
06/26/11 13:29:04.840 - Workstation-UPS-ProcessResponse: Unhandled Exception (MEng.System.CQC.Runtime.CQCDriverBase #7) - Value '0030 ' exceeds the limits for field $FailedWrite

Corresponds to:

Code:
Case CQCFldTypes.String:
   // Write String to Field and Return
   LogIt(LogMsgs.FldUpdate, "ProcessResponse", 3, "String",strName,strValue);
   WriteStringFldByName(strName, strValue);

I think the LogIt function is completing, the message is getting output. If the exception isn't in there somewhere, then that would point to the WriteStringFldByName call. But a hex 30 is the character 0 so somehow it must be stuffing that into the $FailedWrite field.

Sam, maybe keep it running and see if you can validate it is always a string field. If it is then go into the driver and comment out the LogIt line above in the ProcessResponse() method. Just put a // in front it, and restart the CQC service. Then see if it quits. That would tell us if it is LogIt or WriteStringFldByName.
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#86
Ok, I am seeing this exception now that I have upgraded to 3.4.29. The place in the code where this is occurring is definitely in the WriteStringFldByName.

For me the value of strName=BatteryCondition and strValue = '0'. I commented out the LogIt function so it is definitely the WriteStringFldByName function that is throwing the exception.

This is some kind of CQC bug introduced between 3.4.6 and 3.4.29. This call is working for other string fields so maybe it has something to do with the value of '0'.

EDIT: OK, it looks like it might be a "minor" bug. The exception is correct, in that I am exceeding the field limits I set in the config file, there error is just reporting the wrong field name. It should say the actual field name, not $FailedWrite.

My issue was with my SNMP config file. I only had values of 1 and 2 defined and I was getting a 0. So that didn't match my limits I had set.
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#87
Do you have the S20? Can you tell me which field it was?

Or, do i need to wait for Dean to fix the minor bug and then see which field it is?

Thanks for helping to track it down!
Reply
#88
I'll look at that. But it just looks like an error in reporting a field name in a failure scenario so nothing really that would prevent the driver from actually working.
Dean Roddey
Software Geek Extraordinaire
Reply
#89
Yeah, that's why I said minor error, just a reporting thing.

Sam, the field giving you issues in your case is "OutputStatus", it is getting a zero back which probably isn't defined in your limits.

First of all, if this is a read-only field you don't need limits on the field, unless you are needing to do a progress meter widget on it. Without limits, if the value is not defined in the XLAT it will just pass through and come out "0"
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#90
OK, I've fixed that. I actually had already 'fixed' it, but not actually, so it still wasn't doing what it was supposed to. So clearly I didn't get that change tested last time.
Dean Roddey
Software Geek Extraordinaire
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  RunTimer2 driver rbroders 15 4,198 2 hours ago
Last Post: rbroders
  LIFX Driver bobskie708 12 2,199 11-26-2018, 05:23 PM
Last Post: Dean Roddey
  Driver for Bigass Fan lleo 7 235 11-25-2018, 08:57 AM
Last Post: Dean Roddey
  Amazon Echo Hue Simulator Driver wuench 115 42,043 11-08-2018, 06:49 AM
Last Post: karenlee
  Generic Modbus Driver - Serial & IP znelbok 25 12,649 10-09-2018, 08:59 AM
Last Post: Ron Haley
  Issues debugging IP based driver jnolting 5 586 09-24-2018, 11:52 AM
Last Post: Dean Roddey
  Enhance Driver Test Harness Field Monitor rbroders 1 329 09-24-2018, 10:49 AM
Last Post: Dean Roddey
  Koyo Click PLC Driver rbroders 75 29,127 09-23-2018, 01:18 PM
Last Post: rbroders
  Carrier Infinity HVAC Driver beelzerob 34 13,990 09-07-2018, 01:15 PM
Last Post: lleo
  Sony TV IP driver dogman 10 1,389 08-01-2018, 03:53 PM
Last Post: znelbok

Forum Jump:


Users browsing this thread: 1 Guest(s)