Author Topic: Additional parameters to analog_camera  (Read 5589 times)

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Additional parameters to analog_camera
« on: March 20, 2005, 09:14:30 am »
Hi,

I've studied generic_analog_capture_card and analog_camera sources and would like to add some more parameters to templates and change source a little bit:
- I'd like to determine input and norm via parameters (not just default 8 and 0 as it is now)
- with this changes support for usb camera would be achieved.

I wonder what is easiest way to do this:
- change template, regereate and merge with previous sources
- maybe some other way - like changing c++ sources and template

If we make changes, can we add some more parameters that are most needed now (letting user to specify texts on screens, filters) ? I guess this would be convenient way to enhance security devices a little bit...

Regards,

Rob.

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Additional parameters to analog_camera
« Reply #1 on: March 21, 2005, 07:40:03 pm »
Yes, the best solution is that you check out all the source code on your local box.  Then go into the device template, adding whatever extra data parameters you want.  Then in your /usr/pluto/src/bin directory, run the program DCEGen.  You want to run it from that directory, not from /usr/pluto/bin, because it outputs the merged device to the ../[device name] directory.  Run DCEGen with -d and the device template

You should see a message prompting 'leave', 'replace', 'merge' because it detects the project already exists.  Hit 'm', and it will merge the code in.

You can look at the .h file for the device.  You should see DATA_[your new data parms]_get() functions added to it.

When your system does it's regular update to our released version, sqlCVS will see that you have made local modifications to the records in the database, and will merge in our changes.  Once your changes are ready, then we do a simultaneous svn ci for the code, and sqlCVS ci for the database.

One other tip...  Pluto is heavily dependent on teh database.  Even all our #define constants are being pulled from the database.  You'll see in the directory /usr/pluto/src/pluto_main, a whole bunch of Define_[table name].h files.  These are generated by sql2cpp--a completely separate utility having nothing to do with sqlCVS.

sql2cpp creates a Database_pluto_main class which represents the database, and classes for the tables and rows.  You'll see we use it everywhere.  Whenever it sees a table with columns for Define and Description, then it puts in the Define_Tablename.h file an entry #define TABLENAME_Define_CONST VALUE
where Define is the value of the Define field, or the Description field if it's NULL, and VALUE is the primary key.

So, let's say you create a new data parameter -- USB version.  That adds an entry in the database DeviceData, with the primary key of, let's say 299, and a description of "USB Version".  Now in your code somewhere you need that value (299) for some reason.  You can just use DEVICEDATA_USB_Version_CONST instead of hardcoding it.  However, if you added the device data recently, but the file with the define's (Define_DeviceData.h) hasn't been updated, then switch to /usr/pluto/src/bin and run sql2cpp -D pluto_main -h localhost.  That will regenerate all the files, and put them in ../pluto_main.

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Additional parameters to analog_camera
« Reply #2 on: March 21, 2005, 11:10:07 pm »
Hi,

quickie:

where is DCEGen (what package do I have to install) ?

I remember I disabled when it asked me, but now I want it back :-) ...

Will follow your instructions....

Regards,

Rob.

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Additional parameters to analog_camera
« Reply #3 on: March 22, 2005, 02:38:35 pm »
It appears we don't have a package for DCEGen, which sort of makes sense since you only use it if you're building from source code.

What you should do is first build PlutoUtils, then DCE, then pluto_main, and then DCEGen.  In all 4 directories, just run 'make'.