Author Topic: About DCERouter  (Read 1435 times)

willfly

  • Newbie
  • *
  • Posts: 11
    • View Profile
About DCERouter
« on: July 23, 2009, 04:21:10 pm »
All,

I manually built the DCERouter and related lib, and imported pluto_main database.
When I ran DCERouter, it turns out below errors.
Do you have any clue? Thanks.

root@localhost:/usr/pluto/bin# ./DCERouter -h localhost
Copyright (C) 2004 Pluto, Inc., a Florida Corporation
www.plutohome.com
Phone: +1 (877) 758-8648
This program is distributed according to the terms of the Pluto Public License, available at:
http://plutohome.com/index.php?section=public_license
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the Pluto Public License for more details.
---------------

01      07/23/09 9:46:12.937            Cannot determine my device ID automatically.  # of records in DB: 286
Sorry...   I cannot figure out what my device ID is automatically.  To do this there must be only
1 record in the database for a device with the device template of 1 (DCE Router).  There are 286
You will need to specify the device id or the installation id on the command line.

Will

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: About DCERouter
« Reply #1 on: July 23, 2009, 04:55:54 pm »
so do what it is suggesting, look in the db to see what its screwed up.

willfly

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: About DCERouter
« Reply #2 on: July 25, 2009, 12:59:20 am »
I import the pluto_main database from the main_sqlcvs.sql downloaded in the import-databases.sh, there are many rows have DCE Router.
I looked into the one in the LinuxMCE installed, the table content seems changed a lot, and only one DCE Router as the 2nd PK_Device.

Now I am confused how the Device table generated, is it generated at run-time? or installation time?
Maybe your simple answer will save me a lot time on codebase search.
Appreciate your help.

Will

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5505
  • DOES work for LinuxMCE.
    • View Profile
Re: About DCERouter
« Reply #3 on: July 25, 2009, 11:02:24 am »
The device table holds instances of device templates.

It should be modified when devices are added to the system. If you look at the devce tree of a running system, you'll see:

CORE
    DCERouter
       File Grids Plugin
       Media Plugin
       Security Plugin
    Core/Hybrid
        On-Screen Orbiter
             MythTV Player
             Xine Player
....
etc.

Each of these are devices referenced in the DeviceTemplate table and its surrounding connective tables...and are connected together in a tree structure.

You need to understand:

any time you see a name by itself, it's a simple table
any time you see two or more names joined by a _, it's a join table.

PK_foo = primary key column
FK_foo = foreign key column
EK_foo = external key column.

Knowing this, you should be able to map out the schema for the database.

If you're trying to do this from scratch, without a working system for reference.....sorry to say... you're retarded, and you should bash your skull against the wall a few times to get rid of that frame of mind. Please use a working system for reference.

-Thom

willfly

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: About DCERouter
« Reply #4 on: July 25, 2009, 11:37:41 am »
Thom,

Thanks for your reply as always.
Actually I have two systems, one is just Kubuntu810, the other with LMCE810 and build env in chroot.
What I am doing is to reproduce how the LMCE works by porting DCERouter to the first system.
Maybe a small system is easy to study how the things are going, right?

I found at the build time, there is one script named import-databases.sh, it downloads several databases, in which there is one named main_sqlcvs.sql, as my understanding is the base one.

After the build is done. I use the build result to setup one LMCE810. In the installation script, there are also many databases changed statements in script mce-install.sh.

When LMCE boots up, I read the logs and find there is one log named device.2009-****, in which it says if Device table exists, drop it and recreate one. So the Device table is recreated based on which table? also depends on the current loaded plugin and device?

In the above 3 steps(build, install, and running time), I am a little lost track how the db import and changed.
Could you help to make it clear? Thanks in advance.

Will