From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,cc65ab136f46904d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Alex Mentis" Newsgroups: comp.lang.ada Subject: Re: GNAT.Serial_Communications Date: Fri, 22 Apr 2011 13:55:23 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <31dd80b2-3fd3-4078-8774-c396a52c94a0@r6g2000vbz.googlegroups.com> <0d509f1c-4ca7-4595-a026-65c108558d76@bl1g2000vbb.googlegroups.com> <35515c03-f565-4fc4-ac1c-e9b7268123b3@dn9g2000vbb.googlegroups.com> <1144e8e4-4193-4ffd-a8d2-145c38993eb2@p16g2000vbi.googlegroups.com> <6301289c-f450-4d7f-8391-01e17d2555b9@z27g2000prz.googlegroups.com> <6a7a2083-c659-48f0-9559-0d591c37e24b@e8g2000vbz.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 22 Apr 2011 13:55:23 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="VpjkF+4qjaUJ9ov9jy6FWg"; logging-data="17370"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ONclWbcsKu2+6sePjJzp54Btlv0aVvfs=" User-Agent: XanaNews/1.19.1.320 Cancel-Lock: sha1:dzW3krOoacSwfBmCDBEttQ6/cUI= Xref: g2news2.google.com comp.lang.ada:19952 Date: 2011-04-22T13:55:23+00:00 List-Id: tonyg wrote: > On Apr 20, 3:22�pm, "Alex Mentis" wrote: > > tonyg wrote: > > > > > I don't think this would work because the port's settings need to > > > be overwritten after it is opened, as Gnat sercom will open it > > > with control flow enabled. > > > > So open the port before calling this code. I don't see why that > > wouldn't work. > > Yes that would work. I think I am going to mod the gnat-sercom package > though for elegance's sake. Many thanks for taking the time, looking > at it has improved my knowledge of Ada. For what it's worth, it may even be more elegant to just extend GNAT.Serial_Communications by writing a child package (e.g.: GNAT.Serial_Communications.Flow_Control) that defines any necessary types and overloads the Set procedure, adding a flow control parameter. As a child package, your extension would have visibility of all the types and subprograms in the parent, but you wouldn't have to hack up GNAT.Serial_Communications or recompile it, in case you have some other code that uses it as-written, or if you ever want to use the unmodified version in the future.