Jeff,

You are correct. The hal port operates at a lower level than hal_stream
calls. It is a byte stream, untyped and asynchronous in that a write or
read from the port can consume up to the buffer size of the port in a
single period.

So you could build a sampler, or hal stream on top of a hal port.

I will write up some manpages next. I've never done that before so I'll
have to bone up on them.

The place where ports are allocated is halcmd_commands.c line 687. That was
the easiest place I could find to do it. That code should probably be in
hal_lib.c and just be called by hal command.

On Sun, Jun 24, 2018 at 9:38 PM, Jeff Epler <[email protected]> wrote:

> This is exciting, thank you.
>
> Can you please mention how this compares/contrasts with
> streamer/sampler, which have been factored into hal_stream_XXX API calls
> in our master branch?
>
> From what I can see,
>  - hal "streams" are typed
>  - hal "streams" are agreed on by allocating small integers, not names
>  - hal "streams" storage are outside of the primary HAL shared memory area
>
> .. it looks like
>  - hal "ports" are untyped (byte oriented)
>  - hal "ports" are named
>  - hal "ports" storage are inside the primary HAL shared memory area
>
> I didn't actually spot the implementation of 'halcmd portsize', just the
> addition of it to halcmd's help message
> +    printf("  portsize            Get/Set the buffer size of a port
> signal\n");
>
> I would love it if there were manpages for these new functions.  You can
> write manpages in good old fashioned roff style in docs/man/man3/*.3hal or
> in more modern asciidoc style in docs/src/man/man3/*.txt.  Ask if you
> need help with markup or Makefiles, some (Sub)makefile might be needed
> for asciidoc pages.
>
> Jeff
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Emc-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to