Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Datanab Driver v1.0+ Updates
#21
It's a driver. Both are CML based, but a macro is just plain CML code, whereas drivers have special environmental concerns wrt to debugging and whatnot. So that IDE is still separate.
Dean Roddey
Software Geek Extraordinaire
Reply
#22
so this driver uses a config file which it stores in the directory MacroRootFile\Drivers\... then when i run it in the driver harness it fails because it can't find the file. it is looking in \Drivers\... i am guessing when running in the harness the default directory is different and since the path is not fully qualified it isn't looking in MacroRootFile?

greg
Reply
#23
When running in the IDE it can't write to that location, so it uses the C:\ProgramData\CQCData directory, which sort of mirrors the CQCData directory for GUI apps. Under there will be a directory based on your system's id (install key), so go into there and you should find the equivalent directrories where you can put the files. It's kind of useful actually since you can test without affecting the running driver.
Dean Roddey
Software Geek Extraordinaire
Reply
#24
under the cqc directory i only have two subdirectories - bin and CQCData. could it be because i have not licensed this install yet? (i am going to have to get a separate license for this master server if i continue with cqc for this new project).

greg
Reply
#25
That's what you should have under the regular CQCData directory. If you look in CQCData, that's where all of the storage stuff is. However, that's only accessible to the background services. The GUI programs, when they access CQCData they really get something like:

C:\ProgramData\CQCData\xxxxx\

where xxxx is the system id of your CQC system. You might have more than one in there if the id has changed over time. You can find out which one is the real one by just looking at the license info in the Admin Interface. It's your system's install key. If you have others you can remove them.

Under there you can create the same directories as under the regular CQCData directory, such as MacroFileRoot, and put files in there and they will be seen by the GUI applications.

For the most part there isn't any reason to do this. The GUI programs generally just use that to store things like last window positions and stuff like that. But, in a few special cases, like when developing CML drivers, which normally run in the background service, but during development in the IDE run in the foreground GUI context, those MacroFileRoot based files will be seen over in ProgramData when you are running the driver in the GUI.

So you should copy the file over there (to the same relative position under MacroFileRoot) and the GUI will see it. This will let you test out the driver without messing with the real file (which is over in Program Files (x86) where the background services see CQCData to be.
Dean Roddey
Software Geek Extraordinaire
Reply
#26
so do i get a new key when i shutdown cqc? i restarted and now everything broke and i had to go create the files in the new xxxxx directory again.

also, this driver imports another file that is in the drivers directory.

MEng.System.CQC.Drivers.DataNab.Sensor;

if i change it to user.cqc.drivers... it fails. so to edit that file i need to move that entire directory structure under xxxxxx as well? so then i am editing the source for the driver in the user directory and i edit the source for the imported file over in xxxxx?

this driver is painfully slow but it is polling the datanab one register at a time. i have it reading the entire set of registers in a gulp now which is much faster but some other stuff needs work.

greg
Reply
#27
No, you shouldn't get a new key. If that happened, your system would have gone into trial mode and you'd have to get a new license. Assuming you aren't seeing that, then it shouldn't have created a new directory.

You don't put the macros themselves in there, only any data files that it accesses. You need to take the whole DataNab directory and move it to the User section (in the CQC directory, not over in ProgramData.) Do it via the Admin Interface, don't try to copy the files via the Windows explorer. Right click on the DataNab directory under System/CQC/Drivers and select Copy. Then right click on User/CQC/Drivers/ and paste that whole scope there. Change the paths in the macro files to reflect that.
Dean Roddey
Software Geek Extraordinaire
Reply
#28
as i said in post 24 above i am in trial mode. you may remember i told you i will need a second cqc master and you said my unobtainium license won't cover that. so before i buy another license i want to be sure this datanab/cqc solution can be made to work for my second cqc server.

ok, i copied the whole directory using file explorer rather than cqc. must be why i can't find the supporting files

greg
Reply
#29
The data server does extensive caching to keep thing fast. Once it has looked at the contents of the scope, it won't see any changes unless you make them via CQC itself.
Dean Roddey
Software Geek Extraordinaire
Reply
#30
well i made the driver a lot more efficient but i am not sure how much it buys. i get all the updates in a single gulp so now i can poll the device 10x faster but it appears that when you close a dry contact it takes the device several seconds to respond. the dry contact input value slowly climbs from 0 to 1000 or so as if it is averaging the last n samples.

it always seems like a really simple and handy driver for cqc would be one that reads a serial port for 3 input values - dsr, cd and cts shorted to dtr like this guy did. https://ece.uwaterloo.ca/~drayside/altinput/

greg
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Monoprice Blackbird 4x4 HDMI Switcher - Driver request batwater 9 4,073 10-14-2017, 05:30 PM
Last Post: rtarver
  XBMC Driver wuench 419 110,340 07-02-2017, 11:04 AM
Last Post: Dean Roddey
  IMAP Email Driver whozeawhat 11 1,719 06-14-2017, 11:53 AM
Last Post: whozeawhat
  Which JVC Projector Driver indygreg 29 5,167 05-12-2017, 08:29 AM
Last Post: Dean Roddey
  Amazon Echo Hue Simulator Driver wuench 101 20,448 05-02-2017, 09:38 AM
Last Post: Dean Roddey
  SageTV Player V2 Driver chmilar 6 1,366 04-14-2017, 03:36 PM
Last Post: chmilar
  SageTV Driver George M 16 2,580 02-16-2017, 07:10 PM
Last Post: Dean Roddey
  ADA Suite 16 driver assistance zane 3 1,166 01-17-2017, 06:27 AM
Last Post: zane
  Sage Media Server driver (beta) Fonceur 696 116,448 01-06-2017, 05:34 PM
Last Post: Dean Roddey
  Need some help with developing a driver adamalli 11 2,211 01-02-2017, 07:00 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)