Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion to Improve Plugin
#1
Would it be possible to change the plugin to output something if it fails?

Currently if an id is wrong there is no output at all which makes it impossible to neatly hide meters or disable a measure.

There are some workarounds I've found but none are ideal. You can check if hwinfo is actually running which is useful but doesn't let you perform an action if the id is wrong.

The closest thing I've found is setting the ids using variables that are 0 by default then using ifmatch but this still doesn't help if the id is actually wrong.

My guess for a good output if it fails is -500 since thats lower than absolute zero in fahrenheit and shouldn't be a valid value for any correctly running sensor.
Reply
#2
Hi Jtmzac,

Rather than just returning a generic value for all errors, I'm thinking it may be better just to pass a specific error code back.  This would help you make a better decision based on the value, but will also narrow down the specific issue for the user.  What do you think of something like this?

Return integer code (-9xxx) for numeric returns.
Return string code (HWINFO_ERROR_NAME) for text returns
Value in quotes will be written the the Rainmeter log.


<< these codes have changed in the actual implementation - please see the details here >>
Code:
-9000  HWINFO_NOT_CONNECTED  "HWiNFO.dll: Could not connect to HWiNFO. Please ensure HWiNFO is running, sensors are active, and shared memory is enabled."
-9001  HWINFO_DEAD  "HWiNFO.dll: Connected to shared memory that is flagged as dead."
-9002  HWINFO_INVALID_SIGNATURE  "HWiNFO.dll: Connected to shared memory with an invalid signature."
-9003  HWINFO_INVALID_VERSION  "HWiNFO.dll: Connected to shared memory with an unsupported version."
-9100  HWINFO_INVALID_SENSOR_ID  "HWiNFO.dll: Invalid input Sensor ID received. Please check skin values."
-9101  HWINFO_INVALID_SENSOR_INSTANCE  "HWiNFO.dll: Invalid input Sensor Instance received. Please check skin values."
-9102  HWINFO_SENSOR_NOT_FOUND  "HWiNFO.dll: Unable to find specified sensor. Please check skin values."
-9200  HWINFO_INVALID_ENTRY_ID  "HWiNFO.dll: Invalid input Entry ID received. Please check skin values."
-9201  HWINFO_ENTRY_NOT_FOUND  "HWiNFO.dll: Unable to find specified entry for the sensor. Please check skin values."
-9300  HWINFO_INVALID_RETURN_TYPE  "HWiNFO.dll: Invalid return type specified."


Let me know your thoughts.

Thanks,
Nick
Reply
#3
Thanks for the response.

Sounds like a very good idea. It would do everything I need and more.

Much more flexible and powerful than my suggestion and will definitely make tracking down problems and suppporting users easier.
Reply
#4
I think this is a wonderful idea.

I would ask one thing if it is possible. Can we have an option in the plugin measure, something like:

SuppressLogErrors=0/1 (default 0)

That way if you have a skin that for instance is monitoring another PC on the local area network, you can watch and react to errors if that machine is unreachable for some reason, but not have it flood the Rainmeter log with errors.
Reply
#5
Thanks for the response.  I was giving this some thought for the same reason too.

Currently, the plugin only logs at skin load/reload.  I'll likely just do the same, but just include the additional details to help pinpoint the issue.  I don't see a need to log at all once its running, do you?  Just the direct output should be fine.  If something is wrong you can just reload the skin to get the log output at the time anyways.
Reply
#6
(02-10-2016, 12:51 AM)stangowner Wrote: Thanks for the response.  I was giving this some thought for the same reason too.

Currently, the plugin only logs at skin load/reload.  I'll likely just do the same, but just include the additional details to help pinpoint the issue.  I don't see a need to log at all once its running, do you?  Just the direct output should be fine.  If something is wrong you can just reload the skin to get the log output at the time anyways.

That sounds fine. I just didn't want a log message once a second... ;-)
Reply
#7
Hi,

This has been implemented.  Please see the details here, as well as the link to download the updated skin/plugin.

http://www.hwinfo.com/forum/Thread-Rainm...9#pid11089

Thanks,
Nick
Reply
#8
Thanks for the Update Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)