orocos-toolchain / ocl

Orocos Component Library
Other
16 stars 33 forks source link

Fix to the problem with displaying service intreface with `unknown_t` #69

Closed disRecord closed 6 years ago

disRecord commented 7 years ago

These changes fixes the following problem. If in lua console user tries to display Service interface and one of Operations contains unknown_t as parameter then lua exception occurs.

TaskContext interfaces are displayed properly so I modified service2str accordingly.

disRecord commented 6 years ago

I added getOperationInfo() to TaskContext. getOpInfo() is preserved as alias.

Also note that TaskContext interface still contains getOps() instead of getOperationNames()

disRecord commented 6 years ago

Are there any other comments? This functionality allows to implement lua completion for operations in services: https://github.com/orocos-toolchain/rttlua_completion/pull/6 .

meyerj commented 6 years ago

Looks good to me.

slavanap commented 6 years ago

Few side comments:

disRecord commented 6 years ago

Well... These comments concerns not only provided code fragment but the entire file. If we want to preserve the same code style in entire file a major refactoring is needed. I do not think it should be performed in this pull request.

slavanap commented 6 years ago

@disRecord I advise to consider these notes at least in the code chunk you suggested to add. It's up to you and organization members to decide whether introduce them in other places.

slavanap commented 6 years ago

@meyerj Are you going to merge this PR?