[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] two versions of DeviceTablePtrValue

From: Gaius Mulley
Subject: Re: [Gm2] two versions of DeviceTablePtrValue
Date: Sat, 05 Jun 2010 14:31:08 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Martin Kalbfuß <address@hidden> writes:

> Wow, that was fast. Thanks a lot. You forgot to update the desription
> comment of the procedure.


now updated, thanks!

> I still wonder how to implement your own channel the right way. There's
> no ISO conform way. to obtain the did out of the cid, because
> DeviceTablePtrValue needs the did as parameter.

It might be worth looking at gm2/gm2-libs-iso/SimpleCipher.mod which
is a module which inserts a Caesar cipher (rot13) on a text channel.  There
are also modules RTdata and RTio which allow you to obtain the device
id RTio.GetDeviceId and attaching data to a device and module.

> To implement an open/close pair for your custom stream like
> OpenMyChannel(VAR cid : IOChan.ChanId);
> CloseMyCannel(VAR cid : IOChan.ChanId);

> you have to store the did externally in an array or something similar.
> Do you think that's the right way to do it?

I attached the Caesar cipher key (say 13) to a device and module using
InitData (see SimpleCipher.mod:InsertCipherLayer).  The
RemoveCipherLayer is similar to a close.  Could this mechanism be used
in your situation?

hope this helps,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]