Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for services and improve memory managment and error handling #90

Merged
merged 18 commits into from
Apr 22, 2023

Commits on Apr 20, 2023

  1. Configuration menu
    Copy the full SHA
    a86b276 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    76296d5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    081554c View commit details
    Browse the repository at this point in the history
  4. Add service example

    hoffmann-stefan committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    21077bd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    317210b View commit details
    Browse the repository at this point in the history
  6. Add client example

    hoffmann-stefan committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    cee0f2e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ddbd879 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0062fe7 View commit details
    Browse the repository at this point in the history
  9. Remove Interfaces that expose internal implementation details

    Most importent the `IntPtr Handle` property from `ROS2.Interfaces.IDisposable`
    should not be public.
    `ROS2.Interfaces.IDisposable` was missleading as well.
    (`System.IDisposable` is the well kown one)
    Made appropriate memers internal as well and added some sealed and static modifiers.
    This was done in preperation for adding SafeHandles to avoid memory leaks,
    as this would change the implementation detail that was made public by the interfaces.
    
    Abstractions such as interfaces have to be designed for extensability.
    See https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/abstractions-abstract-types-and-interfaces
    hoffmann-stefan committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    f481f75 View commit details
    Browse the repository at this point in the history
  10. Add SafeHandles for Node and related types

    As of before this commit native recources for rcl_node_t, rcl_client_t,
    rcl_publisher_t, rcl_service_t and rcl_subscription_t didn't
    get released.
    
    Used a trick from dotnet/runtime to handle the requirement
    that node has to be released last.
    
    Also added some TODOs to check return values and for checks near
    allocations use the new throw helper.
    hoffmann-stefan committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    720b2d1 View commit details
    Browse the repository at this point in the history
  11. Add SafeHandles for request id and wait set

    - Refactored and renamed some methods to be more consistent.
    - Added some error handling.
    - Don't try to take things if the wait set did return a timeout.
    hoffmann-stefan committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    f67991d View commit details
    Browse the repository at this point in the history
  12. Add SafeHandles to generated message types

    - renamed IMessage to IRosMessage
    - moved interfaces for generated types to ROS2 namespace
    - renamed interface members
    - used `global::*` in some places to avoid name colisions
    - added editor browsable never to the members of the interfaces that
    schould not be used outside of rcldotnet
    hoffmann-stefan committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    e09f569 View commit details
    Browse the repository at this point in the history
  13. Add static member caches

    - Avoids doing reflection over and over.
    - If we can require static abstract interface members this could go away.
    hoffmann-stefan committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    a1710a5 View commit details
    Browse the repository at this point in the history
  14. Improve error handling

    - move RCLExeptionHelper from rcldotnet_common to rcldotnet for acces to rcl_get_error_string()
    - get error string using rcl_get_error_string() and add this to the exception message
    - change throw helper to avoid unrachable code
    - also some other cleanup
    hoffmann-stefan committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    cbf1725 View commit details
    Browse the repository at this point in the history
  15. Rename request variable to solve a CS0136 error:

    error CS0136: A local or parameter named 'request' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter
    LoyVanBeek authored and hoffmann-stefan committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    c1502ab View commit details
    Browse the repository at this point in the history
  16. Use const instead of static readonly for constants

    This allows them to be used in switch cases and other places.
    hoffmann-stefan committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    088793d View commit details
    Browse the repository at this point in the history
  17. Add licence headers

    hoffmann-stefan committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    489d114 View commit details
    Browse the repository at this point in the history
  18. Update README.md

    hoffmann-stefan committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    f824023 View commit details
    Browse the repository at this point in the history