-
Notifications
You must be signed in to change notification settings - Fork 16
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
Improvements and cleanup of signals and ports #33
Improvements and cleanup of signals and ports #33
Conversation
For the time being it only stores port information
The signal size must be stored in the BlockInformation implementation, and callers of get{In,Out}putSignal should not need to specify the size of the signal they are accessing.
- Use the new core::Port class - Updated to the new core::BlockInformation method names
- Use the new core::Port class - Updated to the new core::BlockInformation method names
Now the size must be specified while passing the buffer, being also a more intuitive usage for the users since it does not require remembering to call setWidth in order to have a valid Signal object. This approach is more consistent to a possible switch to std::span.
Adapted the class to the new core::Port class and the updated core::BlockInformation methods
Set a higher priority to rtwtypes.h header. This is necessary because the order or Simulink / Simulink Coder headers matters. Previously the headers were sorted alphabetically, and the build was failing.
b2eb639
to
899ec2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack.
One thing to note (even if not directly related to this PR) is that there is no documentation on where to install the blockfactory plugins in the install prefix. As a superbuild mantainer, I would like that all the projects in the superbuild just install their blockfactory plugins in the same install directory, so I just need to define BLOCKFACTORY_PLUGIN_PATH
once.
Additionally, w.r.t. to debian packaging, it would be good if the default installation prefix was in the search path even without the need to define BLOCKFACTORY_PLUGIN_PATH
, so that if in the future we have deb package of BlockFactory + WB-Toolbox, they will just work out of the box without the need to define any env variable.
I tried to handle it with the blockfactory/cmake/BlockFactoryPlugin.cmake Lines 93 to 100 in 39b3d44
And there is a message displayed when configuring the project (in addition to the website): blockfactory/cmake/BlockFactoryPlugin.cmake Lines 85 to 91 in 39b3d44
This is more complicated. If we install plugins in one of the default linker folder, we get the same problems due to |
@traversaro I would keep this discussion going in a new issue, feel free to open it. In the meantime, I proceed merging this PR. |
You are right, sorry for missing it! |
Ok, new issue open in #34 . |
Merged, thanks! |
After robotology/blockfactory#33 some datatypes and interface methods changed
After robotology/blockfactory#33 some datatypes and interface methods changed
After robotology/blockfactory#33 some datatypes and interface methods changed
After robotology/blockfactory#33 some datatypes and interface methods changed
Since the time of
wb-toolbox
there was some confusion between properties and information assigned to signals and ports. Sometimes things related to one were used on the other.This PR:
core::Port
class that collects most of the information about ports, and removes it fromcore::Signal
andcore::BlockInformation
.Signal
object fromBlockInformation
implementations. This should never be the case since this information should be stored inside theBlockInformation
object in the configuration phase and the blocks should not have the power of asking a signal with a size that might mismatch with the right one.core::Signal
class. Now the size of the buffer is specified when the buffer pointer is stored. This should provide more robust APIs since there won't be anymore the need to remember to callSignal::setWidth
in order to have a valid object.