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

AccessorDecorators must not call doXxxTransferYyy any more #143

Closed
4 tasks done
killenb opened this issue Apr 6, 2020 · 3 comments
Closed
4 tasks done

AccessorDecorators must not call doXxxTransferYyy any more #143

killenb opened this issue Apr 6, 2020 · 3 comments
Assignees

Comments

@killenb
Copy link
Member

killenb commented Apr 6, 2020

Child of #123
Depends on ChimeraTK/DeviceAccess#117

All code which is executing the read and write sub-steps separately must not call doXxxTransferYyy directly any more, but call xxxTransferYyy (e.g. readTransferLatest() instead of doReadTransferLatest()).

This may concerns all decorator-like Accessor-Implementations, like (list not complete)

  • ArrayAccessor

  • ScalarAccessor

  • MetaDataProparatingRegisterAccessor

  • TestableModeAccessorDecorator

  • FeedingFanOut

  • ConstantAccessor

  • DebugPrintAccessorDecorator

  • ExceptionHandlingDecorator

  • Step 1: Make the code compile again. Merge into the master immediately, don't care about broken tests at this moment

  • Find all places in ApplicationCore where a doXxxTransferYyy function is used and replace it with xxxTransferYyy, if required.

  • List all the classes you found in this ticket

  • In all cases, check if is required to call doXxxTransferYyy. Inside of decorators for instance: If the code is delegating to the decorated class, you must call impl->xxxTransfer() (without 'do'). Inside the overloads where inherited functionality of the decorator base case class is used, you must call NDRegisterAccessorDecorator<USER_TYPE>::doXxxTransfer(). The latter is not delegating do another layer but calling inherited code as part of the doXxxTransfer() implementation.

@ckampm ckampm self-assigned this Apr 9, 2020
@killenb killenb assigned ckampm and unassigned ckampm Apr 9, 2020
@ckampm
Copy link
Contributor

ckampm commented Apr 9, 2020

List of Accessors modified in this ticket:

  • ArrayAccessor
  • ScalarAccessor
  • MetaDataProparatingRegisterAccessor
  • ExceptionHandlingDecorator
  • FeedingFanOut
  • TestableModeAccessorDecorator
  • ConstantAccessor
  • DebugPrintAccessorDecorator

Only FeedingFanOut and TestableModeAccessorDecorator required modification to now call xxxTransferYyy(). Most Accessors use the default implementation NDRegisterAccessorDecorator<USER_TYPE>::doXxxTransfer().

Note doReadTransfer has been completely removed from ScalarPollInput and ArrayPollInput, because it should not be provided on the interface side of the brigde. The implementation was faulty and probably did only compile because the template code was never used.

@ckampm ckampm closed this as completed Apr 9, 2020
@ckampm ckampm reopened this Apr 9, 2020
@killenb
Copy link
Member Author

killenb commented Apr 9, 2020

I checked all places where doReadTransferYyy and doWriteTransferYyy are called. They all have to be replaced. They all have to be replaced with the version without 'do'.

@killenb
Copy link
Member Author

killenb commented Apr 11, 2020

At the places where NDRegisterAccessorDecorator<USER_TYPE>::doXXX is called inside the overloaded doXXX the call must stay doXXX. This is not delegating to a decorated instance, but to inherited functionality inside of doXXX. I adapted the description.

@ckampm ckampm closed this as completed Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants