Loading ...
Sorry, an error occurred while loading the content.

RE: [ASCOM] HID helpers available?

Expand Messages
  • Tim Long
    OK, you re outside my area of expertise but I think I see where you are coming from. My approach to this type of problem is to use layers of abstraction. I d
    Message 1 of 6 , May 6, 2009
    • 0 Attachment
      OK, you're outside my area of expertise but I think I see where you are
      coming from.

      My approach to this type of problem is to use layers of abstraction. I'd
      produce a 'Device Layer' that deals with all the device specific stuff
      and exposes an interface to manipulate the device in its own terms and
      units ("GetRawEncoderTicks", "Connect", "Disconnect",
      "WriteCommandString", "GetResponse", and stuff like that). I generally
      write a little test harness application that lets me exercise the device
      layer. This is where you'd put you HID code.

      Once that's done, I write an ASCOM Layer, which implements the standard
      ASCOM interface and just makes calls into the device layer as needed.
      The ASCOM Layer can be tested using Conform.

      The advantage of the technique is that you can easily bolt on other
      'front ends' instead of ASCOM or you can easily write a control panel
      application that uses the device layer directly.

      --Tim

      -----Original Message-----
      From: ASCOM-Talk@yahoogroups.com [mailto:ASCOM-Talk@yahoogroups.com] On
      Behalf Of lynol1000
      Sent: 06 May 2009 22:57
      To: ASCOM-Talk@yahoogroups.com
      Subject: Re: [ASCOM] HID helpers available?

      Ok, I can take no for an answer :-)

      What I was think is something along the lines of Open, Close, Read,
      Write.

      The HID interface is a simple interface to implement inside periphs, one
      of the reason why keyboards and mice use it. It has a small firmware
      footprint and gets the 'bytes' across.

      In Windows, HID requires no loading of device drivers, all support is in
      the OS as compared with USB 'CDC' serial interface emulator. Yes, usbser
      service is in windows but there is no high level abstraction for it,
      each one requires an inf file to access enumeration and kick in usbser.

      The CDC has quite a large firmware footprint compared to HID, hence the
      question, keeping costs down as more flash/rom is required.

      There are astro gadgets out there that run on HID, specifically in the
      guider line.

      So I have a choice, countinue with the CDC implementation with inherent
      support via serial in ASCOM or go with HID and deal with it inside a
      supplied 'scope' driver supplying pulseguide as pretty much its one and
      only function.

      Gene

      --- In ASCOM-Talk@yahoogroups.com, "Tim Long" <Tim@...> wrote:
      >
      > Short answer: no.
      > Asumption: HID = Human Interface Device
      >
      > Slightly longer answer: HID devices are usually not surfaced directly
      at
      > the level of abstraction that an ASCOM driver works at. For example,
      > keyboard input is handled by functions like Console.ReadLine() and
      mouse
      > input is typically exposed as events on Windows and Controls. ASCOM
      > drivers are not true device drivers in the literal meaning used in
      > Windows, as they do not generally interface directly to hardware, but
      > use operating system services to do that for them. For this reason, it
      > would be inappropriate for ASCOM to provide HID helpers.
      >
      > If you're looking to write low level device drivers for a HID then you
      > should probably be looking at the Windows DDK or somewhere like
      USB.org
      > - that sort of device driver is well below the level of abstraction
      that
      > ASCOM drivers are at.
      >
      > http://lmgtfy.com/?q=Human+Interface+Devices
      >
      > --Tim Long
      >
      > -----Original Message-----
      > From: ASCOM-Talk@yahoogroups.com [mailto:ASCOM-Talk@yahoogroups.com]
      On
      > Behalf Of lynol1000
      > Sent: 06 May 2009 12:49
      > To: ASCOM-Talk@yahoogroups.com
      > Subject: [ASCOM] HID helpers available?
      >
      > Are there any helpers for HID devices in ASCOM libraries? Comparable
      to
      > apigid32 ?
      >
      > Thanks,
      >
      > Gene
      >
      >
      >
      > ------------------------------------
      >
      > For more information see http://ASCOM-Standards.org/.
      >
      > To unsubscribe from this group, send an email FROM THE ACCOUNT YOU
      USED
      > TO SUBSCRIBE(!) to:
      > ASCOM-Talk-unsubscribe@yahoogroups.com
      >
      > Yahoo! Groups Links
      >




      ------------------------------------

      For more information see http://ASCOM-Standards.org/.

      To unsubscribe from this group, send an email FROM THE ACCOUNT YOU USED
      TO SUBSCRIBE(!) to:
      ASCOM-Talk-unsubscribe@yahoogroups.com

      Yahoo! Groups Links
    • lynol1000
      Chris, The hope was for a future helper: Are there any helpers for HID devices in ASCOM libraries? I have an ASCOM driver supporting one unit I put together
      Message 2 of 6 , May 6, 2009
      • 0 Attachment
        Chris,

        The hope was for a future helper:
        "Are there any helpers for HID devices in ASCOM libraries?"

        I have an ASCOM driver supporting one unit I put together using the serial helper, path of least resistance would be to keep CDC in the new unit, just the HID has such a smaller footprint, leaving options for cheaper devices or more features in the same device.

        I have the HID unit running on the bench but did not want to have to supply extension dll's with the 'driver', defeats the purpose all around and way heavier than needing a simple inf file for CDC.

        Gene

        --- In ASCOM-Talk@yahoogroups.com, "Chris Peterson" <cpeterson@...> wrote:
        >
        > I think saying that ASCOM has "inherent support via serial" is a bit off the
        > mark. There is a helper module that ASCOM developers can optionally use to
        > access serial devices, but it isn't a part of the ASCOM specs at all. None
        > of the methods or properties have any concept of physical device interfaces.
        > There's no reason that a scope driver writer couldn't use HID, or any other
        > interface, to attach to the device. In other words, if you're thinking of
        > creating some sort of hardware device, use whatever interface makes the most
        > sense. It will still need an ASCOM driver written for it, and that can be
        > designed around the same interface.
        >
        > There are existing ASCOM drivers that don't use serial interfaces.
        >
        > Chris
        >
        > *****************************************
        > Chris L Peterson
        > Cloudbait Observatory
        > http://www.cloudbait.com
        >
        >
        > ----- Original Message -----
        > From: "lynol1000" <lynol1000@...>
        > To: <ASCOM-Talk@yahoogroups.com>
        > Sent: Wednesday, May 06, 2009 3:57 PM
        > Subject: Re: [ASCOM] HID helpers available?
        >
        >
        > > Ok, I can take no for an answer :-)
        > >
        > > What I was think is something along the lines of Open, Close, Read, Write.
        > >
        > > The HID interface is a simple interface to implement inside periphs, one
        > > of the reason why keyboards and mice use it. It has a small firmware
        > > footprint and gets the 'bytes' across.
        > >
        > > In Windows, HID requires no loading of device drivers, all support is in
        > > the OS as compared with USB 'CDC' serial interface emulator. Yes, usbser
        > > service is in windows but there is no high level abstraction for it, each
        > > one requires an inf file to access enumeration and kick in usbser.
        > >
        > > The CDC has quite a large firmware footprint compared to HID, hence the
        > > question, keeping costs down as more flash/rom is required.
        > >
        > > There are astro gadgets out there that run on HID, specifically in the
        > > guider line.
        > >
        > > So I have a choice, countinue with the CDC implementation with inherent
        > > support via serial in ASCOM or go with HID and deal with it inside a
        > > supplied 'scope' driver supplying pulseguide as pretty much its one and
        > > only function.
        > >
        > > Gene
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.