I want to dig into the RCS Thermostat Driver again and make a few changes, but want to do it the right way....Last time I was editing the stock Driver and when I made a mistake...I had to reinstall CQC to get things back to normal.
I am trying to follow the instructions in the documentation, but, since I am relatively new to some of the terminology, I want to make sure that I am doing it correctly. The instructions read:
I am trying to follow the instructions in the documentation, but, since I am relatively new to some of the terminology, I want to make sure that I am doing it correctly. The instructions read:
- Grab the current manifest, from the Master Server directory indicated above and copy it somewhere local. (This was the Easy Part)
- Change the Make and/or Model in the manifest so that it doesn't conflict with the deployed driver. The make/model in the manifest is the unique key for a driver. So you cannot have two drivers with the same make/model. If you are doing a temporary working version of an existing driver, the convention is to add -Dev to the model name to distinguish it. ( Did this by using a text editor on the XML Manifest File)
- Change the short description. Either for the new device; or, if doing a temp working version of an existing driver, to also indicate a -Dev or some other change to make it clear when reading through the available drivers which one is the deployed one and which is the development one. (Text Editor on the XML File)
- Change the CML class path. If you are creating a copy of a system driver, just change System to User. If it's one of your own, you are already in User, so create another scope to put it in. Follow the existing convention of a Make/Model based hierarchy. I.e. all of the Denon drivers are under a Denon scope and individual models are under that.
a. I changed: ClassPath MEng.System.CQC.Drivers.RCS.SerialRS485V2.DriverImpl;b. To : ClassPath MEng.User.CQC.Drivers.RCS.SerialRS485V2.DriverImpl;
- Open your manifest file in the IDE. It will say the class doesn't exist, do you want to create it. Say yes and it will create an empty class.
- I did this...I did not expect that I had to go to the driver configuration before I would get the message...So I did it several times before I think I got it right.
- Do Ctrl-R to open for read only and navigate to the existing driver and open it. Select and copy the whole thing.
- Go back to your new copy and paste the contents in, overwriting the temporary content that was created above.
- Copy and paste any helper classes files that are part of the driver and that you are going to modify, to create your new versions of those.
- I am unsure how helper classes are defined in the code.....
- Update any Import and ClassPath lines to reflect the new locations. Be careful to get this done or you'll be referring still to the original files.
-This is where I am really unsure. It seems that some of these are system classes that won't be present in the User directory...so should I change the paths?
Initial Driver Code:
Class=[NonFinal]
ClassPath MEng.System.CQC.Drivers.RCS.SerialRS485V2.DriverImpl;
ParentClass MEng.System.CQC.Runtime.CQCDriverBase;
EndClass;
Imports= MEng.System.Runtime.CommCfg;
MEng.System.Runtime.CommPort;
MEng.System.Runtime.MemBuf;
MEng.System.Runtime.StringTokenizer;
MEng.System.CQC.Runtime.CQCFldDef;
MEng.System.CQC.Runtime.V2Helper;
#BeginDebug
MEng.System.Runtime.ConsoleOutStream;
#EndDebugEndImports;
I Changed the working copy to (But unsure if it is correct):
Class=[NonFinal]
ClassPath MEng.User.CQC.Drivers.RCS.SerialRS485V2.DriverImpl;
ParentClass MEng.System.CQC.Runtime.CQCDriverBase;
EndClass;
Imports= MEng.User.Runtime.CommCfg;
MEng.User.Runtime.CommPort;
MEng.User.Runtime.MemBuf;
MEng.user.Runtime.StringTokenizer;
MEng.User.CQC.Runtime.CQCFldDef;
MEng.User.CQC.Runtime.V2Helper;
#BeginDebug
MEng.User.Runtime.ConsoleOutStream;
#EndDebugEndImports;
It honestly seems like I am changing paths to some classes that do not to be changed...but my interpretation of the documentation appears to indicate otherwise....
I don't want to continue until I get it right...since I don't want to have to reinstall CQC if I screw a driver up....
Thanks for any thoughts...I apologize for my earlier formatting nightmare on the code segment.