From: Jan Kiszka <jan.kiszka@domain.hid>
To: Bachman Kharazmi <bahkha@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] adding PCI support to 16550A.c
Date: Tue, 11 Sep 2007 21:54:56 +0200 [thread overview]
Message-ID: <46E6F290.9090901@domain.hid> (raw)
In-Reply-To: <1ce16a2c0709110837r52eedac7vcc970d5c3b4e2d53@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1989 bytes --]
Bachman Kharazmi wrote:
> Now I've a modified crosslink (attached) which take argument and write
> to rtser0.
> I know it's ugly. But it's working and that's always good ;)
>
> Anyhow. From what I've heard it will be inefficient if my java code
> would call "/usr/src/xenomai/example/crosslink string" even time a
> string should be written to serial.
Yes, it is better to avoid continuous process generations/destructions
for such kind of work, rather write a native Java binding to Xenomai in
order to talk to the serial port.
Hmm... Java... that makes me wonder again if your control loop is ought
to be closed over Java and where you got/will get the RT-capable Java
engine from. Could you tell us more about the architecture?
>
> And as it looks now I can't even run the binary as user else than root
> (since it starts a xenmai thread?).
There is a module parameter of the nucleus called xenomai_gid. Provide a
group ID, and all users of that group will gain "Xenomai-power" (means
also the power to toast the box by spawning a CPU hog etc.). That allows
you to do at least /some/ kind of privilege separation between RT users
and root, though not a strictly secure one.
Did we already document this feature outside the code? Can't remember
right now though I hacked it... :-/
>
> How can I as a 'user' open a device, write to it and close it without
> keeping starting processes or threads every time?
>
> I would like to be able to do something like:
> file = open("/dev/myTestSerialDevice");
> while (...)
> file.write(...)
> and finally close
> file.close() when there's no more to write.
You can copy this code almost unmodified into an application and compile
it against the Xenomai POSIX skin. The serial port configuration apart
(same under Linux, though), it will open "rtser<whatever>", even if
given like "/dev/rtser...", and work on that port as if it where a Linux
one. Life can be simple, sometimes.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2007-09-11 19:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-10 13:14 [Xenomai-help] adding PCI support to 16550A.c Bachman Kharazmi
2007-09-10 18:24 ` Jan Kiszka
2007-09-10 18:42 ` Bachman Kharazmi
2007-09-10 18:51 ` Jan Kiszka
2007-09-11 15:37 ` Bachman Kharazmi
2007-09-11 19:54 ` Jan Kiszka [this message]
2007-09-12 14:02 ` Bachman Kharazmi
2007-09-12 16:22 ` Bachman Kharazmi
2007-09-12 16:33 ` Gilles Chanteperdrix
2007-09-12 16:43 ` Gilles Chanteperdrix
2007-09-12 19:30 ` Bachman Kharazmi
2007-09-12 22:50 ` Gilles Chanteperdrix
2007-09-12 16:32 ` Gilles Chanteperdrix
2007-09-12 19:17 ` Bachman Kharazmi
2007-09-12 23:25 ` Jan Kiszka
2007-09-13 6:14 ` Jan Kiszka
2007-09-13 9:38 ` Bachman Kharazmi
2007-09-13 9:45 ` Gilles Chanteperdrix
2007-09-13 9:51 ` Bachman Kharazmi
2007-09-13 9:56 ` Gilles Chanteperdrix
[not found] ` <1ce16a2c0709130307k5e1955d4na694e90503084d0d@domain.hid>
2007-09-13 12:18 ` Gilles Chanteperdrix
2007-09-13 12:41 ` Bachman Kharazmi
2007-09-13 12:48 ` Gilles Chanteperdrix
-- strict thread matches above, loose matches on Subject: below --
2007-09-10 13:14 Bachman Kharazmi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46E6F290.9090901@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=bahkha@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.