LinuxMCE Forums

General => Developers => Topic started by: ddamron on January 26, 2008, 06:04:46 PM

Title: Question for the Community re: sending DCE Commands to SELF in PLCBUS
Post by: ddamron on January 26, 2008, 06:04:46 PM
The PLCBUS is coming along nicely.

I have a question to pose to the community.  A scenario exists where I need to send myself a command.
I would like to serialize the command.  Now, Because I'm sending the command to ME, it really doesn't mattter what devdata I stick the serial number in (as long as it's not used by the command itself)

Question is:  Any preference on a devdata ID I should use for my serial number?

Here's the command, with example shown:

Ruby:
mycmd = Command.new(self, self, 1, 1, 184) #184 is the command in question - SetLevel
mycmd.params_[76] = '50' # Level = 50
mycmd.params_[999] = serialnumber  # 999 is arbitrary number

Then when I receive the command, I can check params_[999] for serialnumber.

Here's the example in MessageSend:

./MessageSend dcerouter 117 117 1 184 76 20 999 12345
where 117 is my device ID

Any thoughts?

Thanks,

Dan
Title: Re: Question for the Community re: sending DCE Commands to SELF in PLCBUS
Post by: gdorchie on January 30, 2008, 10:42:25 AM
Hello

The link http://rafb.net/p/f80h1p14.html is not good.

Where I can find your code please ?

Thank you
Title: Re: Question for the Community re: sending DCE Commands to SELF in PLCBUS
Post by: ddamron on January 30, 2008, 09:05:38 PM
I've started a wiki on Threaded Ruby.  The code is available there.
http://wiki.linuxmce.org/index.php/Category:ThreadedRuby
Regards,

Dan