Well, it turns out that pthreads are dead easy to use. I now have a
fully working Modbus component that can access any number of devices on
any number of serial or Ethernet channels. It works much faster than
ClassicLadder's Modbus implementation with a tiny fraction of the CPU
load. It is
Is it acceptable to load multiple instances of user space HAL modules? e.g:
loadusr mymodule name=copy1
loadusr mymodule name=copy2
The other alternative is to make my module multi-threaded so I only need
one instance:
loadusr mymodule names=copy1,copy2
The would have to be multi-threaded as it
You want 'mymodule' to use a different name to hal_init for each
distinct instance. Furthermore, you want to use that component name in
the loadusr command, so that processing of hal commands doesn't continue
until the component has created all its pins.
Assuming that you want to use the
Hi Jeff,
loadusr -Wn copy1 mymodule name1=copy1
loadusr -Wn copy2 mymodule name2=copy2
Hmm, that is starting to look a little ugly and doesn't really fit in
with the way most modules are loaded. Perhaps I would be better off
keeping it all in one multi-threaded module. I'll have a