Skip to content

Future Work

Peter Corke edited this page Sep 19, 2018 · 5 revisions

STL has been developed using MATLAB 2018bPRE under MacOS High Sierra. Limited testing under Linux (raspberian), no testing under Windows.

General

  1. Deployment to Raspberry Pi is still a mess. PackNGo doesn't include the source files from the stl folder. examples/threads has a Makefile that works once all the files are in place, see comments in that file.
  2. PackNGo puts a critical include file tmwtypes.h in a folder whose name is host OS specific, for MacOS, that's MATLAB_R2018b.app. Makes it hard to create a generic Makefile.
  3. Get this to work under Windows. The webserver seems to have support for WIN32.

Webserver

Shorter term fixes needed:

  1. Need to implement error return and 404 error if not response is generated by the users handler.
  2. Put the webserver into its own thread called 'WEB'
  3. Add JSON support
  4. Free web template resources

STL

Shorter term fixes needed:

  1. The timer code compiles under Linux now but hasn't been tested.
  2. Can't make dlsym work to find the address of entry points under Linux. Surprisingly it works simply for MacOS. Have to popen a call to nm which is pretty horrible.
  3. Put all the individual STL functions into a single class as static methods. That gives what looks like a package namespace, eg. stl.log(). This is already done for webserver API. Packages are not supported by Coder.

Future development possibilities include:

  1. Thread priority
  2. Better handling of globals, ideally could pass structs as arguments to threads
  3. Passing more complex arguments to threads, eg. structs
  4. Add condition variables as an additional synchronization mechanism
  5. Support thread cancelation points
  6. Support thread exit, and getting that return value to the output of thread_join
  7. Deallocate semaphores and mutexes
  8. Log file redirection to a file or a system logger
  9. Specify log file format
  10. Function to control error action, exit or carry on.
  11. Bound checking on all passed parameters, create/use an ASSERT macro
  12. Turn off warnings about infinite loops
  13. Put multiple thread definitions in the one file
  14. Functions to control debug level

Some of these will likely bang up against limitations in MATLAB Coder and will not be achievable, eg. JSON functions do not (yet) support code generation.

Clone this wiki locally