|
| | ~DummyForCleanupCheck () override |
| |
| | ~DummyForCleanupCheck () override |
| |
| | ExceptionDummy (std::string const &mapFileName, const std::string &dataConsistencyKeyDescriptor="") |
| |
| | LogicalNameMappingBackend (std::string lmapFileName="") |
| |
| | ExceptionDummy (std::string const &mapFileName, const std::string &dataConsistencyKeyDescriptor="") |
| |
| | DEFINE_VIRTUAL_FUNCTION_OVERRIDE_VTABLE (DummyBackendBase, getRegisterAccessor_impl, boost::shared_ptr< NDRegisterAccessor< T > >(const RegisterPath &, size_t, size_t, AccessModeFlags)) |
| |
| void | open () override |
| | Open the device.
|
| |
| void | closeImpl () override |
| | This closes the device, clears all internal registers, read-only settings and callback functions.
|
| |
| void | read (uint64_t bar, uint64_t address, int32_t *data, size_t sizeInBytes) override |
| | Read function to be implemented by backends.
|
| |
| void | write (uint64_t bar, uint64_t address, int32_t const *data, size_t sizeInBytes) override |
| | Write function to be implemented by backends.
|
| |
| void | triggerPush (RegisterPath path, VersionNumber v={}) |
| | Function to trigger sending values for push-type variables.
|
| |
| size_t | getWriteOrder (const RegisterPath &path) |
| | Function to obtain the write order number of a register.
|
| |
| size_t | getWriteCount (const RegisterPath &path) |
| | Function to obtain the number of writes of a register since the creation of the backend.
|
| |
| void | activateAsyncRead () noexcept override |
| | Activate asyncronous read for all transfer elements where AccessMode::wait_for_new_data is set.
|
| |
| void | setExceptionImpl () noexcept override |
| | Function to be (optionally) implemented by backends if additional actions are needed when switching to the exception state.
|
| |
| bool | asyncReadActivated () |
| | Function to test whether async read transfers are activated.
|
| |
| void | setValidity (RegisterPath path, DataValidity val) |
| | Use decorator to overwrite returned data validity of individual (poll-type) variables.
|
| |
| DataValidity | getValidity (RegisterPath path) |
| | Query map for overwritten data validities.
|
| |
| | DummyBackend (const std::string &mapFileName, const std::string &dataConsistencyKeyDescriptor="") |
| |
| | ~DummyBackend () override=default |
| |
| std::string | readDeviceInfo () override |
| | Return a device information string containing hardware details like the firmware version number or the slot number used by the board.
|
| |
| DummyRegisterRawAccessor | getRawAccessor (const std::string &module, const std::string ®ister_name) |
| | Get a raw accessor to the underlying memory with the convenience of using register names.
|
| |
| VersionNumber | triggerInterrupt (uint32_t interruptNumber) override |
| | Simulate the arrival of an interrupt.
|
| |
| void | read (uint8_t bar, uint32_t address, int32_t *data, size_t sizeInBytes) final |
| | You cannot override the read version with 32 bit address any more.
|
| |
| void | write (uint8_t bar, uint32_t address, int32_t const *data, size_t sizeInBytes) final |
| | You cannot override the write version with 32 bit address any more.
|
| |
| | DummyBackendBase (std::string const &mapFileName, const std::string &dataConsistencyKeyDescriptor="") |
| |
| | ~DummyBackendBase () override=default |
| |
| size_t | minimumTransferAlignment (uint64_t bar) const override |
| | Determines the supported minimum alignment for any read/write requests.
|
| |
| | DEFINE_VIRTUAL_FUNCTION_OVERRIDE_VTABLE (NumericAddressedBackend, getRegisterAccessor_impl, boost::shared_ptr< NDRegisterAccessor< T > >(const RegisterPath &, size_t, size_t, AccessModeFlags)) |
| |
| void | read (uint8_t bar, uint32_t address, int32_t *data, size_t sizeInBytes) final |
| | You cannot override the read version with 32 bit address any more.
|
| |
| void | write (uint8_t bar, uint32_t address, int32_t const *data, size_t sizeInBytes) final |
| | You cannot override the write version with 32 bit address any more.
|
| |
| bool | barIndexValid (uint64_t bar) override |
| | All bars are valid in dummies.
|
| |
| std::map< uint64_t, size_t > | getBarSizesInBytesFromRegisterMapping () const |
| | Determines the size of each bar because the DummyBackends allocate memory per bar.
|
| |
| template<typename UserType > |
| boost::shared_ptr< NDRegisterAccessor< UserType > > | getRegisterAccessor_impl (const RegisterPath ®isterPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags) |
| | Specific override which allows to create "DUMMY_INTEERRUPT_X" accessors.
|
| |
| std::pair< bool, int > | extractControllerInterrupt (const RegisterPath ®isterPathName) const |
| |
| | NumericAddressedBackend (const std::string &mapFileName="", std::unique_ptr< NumericAddressedRegisterCatalogue > registerMapPointer=std::make_unique< NumericAddressedRegisterCatalogue >(), const std::string &dataConsistencyKeyDescriptor="") |
| |
| | ~NumericAddressedBackend () override=default |
| |
| virtual bool | canMergeRequests () const |
| | Determines whether the backend supports merging of requests (read or write)
|
| |
| RegisterCatalogue | getRegisterCatalogue () const override |
| | Return the register catalogue with detailed information on all registers.
|
| |
| MetadataCatalogue | getMetadataCatalogue () const override |
| | Return the device metadata catalogue.
|
| |
| NumericAddressedRegisterInfo | getRegisterInfo (const RegisterPath ®isterPathName) |
| | getRegisterInfo returns a NumericAddressedRegisterInfo object for the given register.
|
| |
| void | activateAsyncRead () noexcept override |
| | Activate asyncronous read for all transfer elements where AccessMode::wait_for_new_data is set.
|
| |
| void | close () final |
| | Deactivates all asynchronous accessors and calls closeImpl().
|
| |
| virtual std::future< void > | activateSubscription (uint32_t interruptNumber, boost::shared_ptr< async::DomainImpl< std::nullptr_t > > asyncDomain) |
| | Activate/create the subscription for a given interrupt (for instance by starting the according interrupt handling thread).
|
| |
| void | setExceptionImpl () noexcept override |
| | Turn off the internal variable which remembers that async is active.
|
| |
| template<typename BackendSpecificUserType > |
| std::pair< BackendSpecificUserType, VersionNumber > | getAsyncDomainInitialValue (size_t asyncDomainId) |
| | Get the initial value for a certain async::Domain.
|
| |
| bool | isOpen () override |
| | Return whether a device has been opened or not.
|
| |
| bool | isConnected () final |
| | Deprecated since 2022-03-03.
|
| |
| void | checkActiveException () final |
| | Function to be called by backends when needing to check for an active exception.
|
| |
| void | setException (const std::string &message) noexcept final |
| | Set the backend into an exception state.
|
| |
| bool | isFunctional () const noexcept final |
| | Return whether a device is working as intended, usually this means it is opened and does not have any errors.
|
| |
| std::string | getActiveExceptionMessage () noexcept |
| |
| virtual | ~DeviceBackend ()=default |
| | Every virtual class needs a virtual desctructor.
|
| |
| template<typename UserType > |
| boost::shared_ptr< NDRegisterAccessor< UserType > > | getRegisterAccessor (const RegisterPath ®isterPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags) |
| | Get a NDRegisterAccessor object from the register name.
|
| |
| | DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE (getRegisterAccessor_impl, boost::shared_ptr< NDRegisterAccessor< T > >(const RegisterPath &, size_t, size_t, AccessModeFlags)) |
| |
| BackendID | getBackendID () |
| | Get a unique ID for this backend instance.
|
| |
| | LogicalNameMappingBackend (std::string lmapFileName="") |
| |
| void | open () override |
| | Open the device.
|
| |
| void | close () override |
| | Close the device.
|
| |
| std::string | readDeviceInfo () override |
| | Return a device information string containing hardware details like the firmware version number or the slot number used by the board.
|
| |
| RegisterCatalogue | getRegisterCatalogue () const override |
| | Return the register catalogue with detailed information on all registers.
|
| |
| void | setExceptionImpl () noexcept override |
| | Function to be (optionally) implemented by backends if additional actions are needed when switching to the exception state.
|
| |
| void | activateAsyncRead () noexcept override |
| | Activate asyncronous read for all transfer elements where AccessMode::wait_for_new_data is set.
|
| |
| template<typename UserType > |
| boost::shared_ptr< NDRegisterAccessor< UserType > > | getRegisterAccessor_impl (const RegisterPath ®isterPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags, size_t omitPlugins=0) |
| |
| template<typename UserType > |
| boost::shared_ptr< NDRegisterAccessor< UserType > > | getRegisterAccessor_internal (const RegisterPath ®isterPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags) |
| |
| std::set< DeviceBackend::BackendID > | getInvolvedBackendIDs () override |
| | Get the backend IDs of all involved backends.
|
| |
| void | parse () const |
| | parse the logical map file, if not yet done
|
| |
| std::unordered_set< std::string > | getTargetDevices () const |
| | Obtain list of all target devices referenced in the catalogue.
|
| |
| ChimeraTK::VersionNumber | getVersionOnOpen () const |
| |
|
| using | BackendID = std::uintptr_t |
| |
| using | AccessorKey = std::pair< DeviceBackend *, RegisterPath > |
| | Map of target accessors which are potentially shared across our accessors.
|
| |
| template<typename UserType > |
| using | SharedAccessorMap = std::map< AccessorKey, SharedAccessor< UserType > > |
| |
| std::mutex | _pushDecoratorsMutex |
| | Mutex to protect data structures for push decorators.
|
| |
| std::map< RegisterPath, std::list< boost::weak_ptr< ExceptionDummyPushDecoratorBase > > > | _pushDecorators |
| | Map of active ExceptionDummyPushDecorator. Protected by _pushDecoratorMutex.
|
| |
| std::map< RegisterPath, VersionNumber > | _pushVersions |
| | Map of version numbers to use in push decorators. Protected by _pushDecoratorMutex.
|
| |
| bool | _activateNewPushAccessors {false} |
| | Flag is toggled by activateAsyncRead (true), setException (false) and close (false).
|
| |
| std::mutex | _registerValiditiesMutex |
| | mutex to protect map _registerValidities
|
| |
| std::map< RegisterPath, DataValidity > | _registerValidities |
| | This map is used for setting individual (poll-type) variables to DataValidity=faulty.
|
| |
| std::map< std::pair< uint64_t, uint64_t >, std::atomic< size_t > > | _writeOrderMap |
| | Map used allow determining order of writes by tests. Map key is pair of bar and address.
|
| |
| std::atomic< size_t > | _writeOrderCounter {0} |
| | Global counter for order numbers going into _writeOrderMap.
|
| |
| std::map< std::pair< uint64_t, uint64_t >, std::atomic< size_t > > | _writeCounterMap |
| | Map used allow determining number of writes of a specific register by tests. Map key is pair of bar and address.
|
| |
| std::atomic< bool > | throwExceptionOpen {false} |
| |
| std::atomic< bool > | throwExceptionRead {false} |
| |
| std::atomic< bool > | throwExceptionWrite {false} |
| |
| std::atomic< size_t > | throwExceptionCounter {0} |
| |
| bool | hasParsed |
| | flag if already parsed
|
| |
| std::string | _lmapFileName |
| | name of the logical map file
|
| |
| std::map< std::string, boost::shared_ptr< DeviceBackend > > | _devices |
| | map of target devices
|
| |
| std::map< std::string, std::string > | _parameters |
| | map of parameters passed through the CDD
|
| |
| BackendRegisterCatalogue< LNMBackendRegisterInfo > | _catalogue_mutable |
| | We need to make the catalogue mutable, since we fill it within getRegisterCatalogue()
|
| |
| bool | catalogueCompleted {false} |
| | Flag whether the catalogue has already been filled with extra information from the target backends.
|
| |
| TemplateUserTypeMap< SharedAccessorMap > | sharedAccessorMap |
| |
| std::mutex | sharedAccessorMap_mutex |
| | a mutex to be locked when sharedAccessorMap (the container) is changed
|
| |
| std::map< std::string, LNMVariable > | _variables |
| | Map of variables and constants.
|
| |
| std::atomic< bool > | _asyncReadActive {false} |
| | Flag storing whether asynchronous read has been activated.
|
| |
| void | resizeBarContents () |
| |
| void | runWriteCallbackFunctionsForAddressRange (AddressRange addressRange) |
| |
| std::list< boost::function< void(void)> > | findCallbackFunctionsForAddressRange (AddressRange addressRange) |
| |
| void | setReadOnly (uint64_t bar, uint64_t address, size_t sizeInWords) |
| |
| void | setReadOnly (AddressRange addressRange) |
| |
| bool | isReadOnly (uint64_t bar, uint64_t address) const |
| |
| void | setWriteCallbackFunction (AddressRange addressRange, boost::function< void(void)> const &writeCallbackFunction) |
| |
| bool | isWriteRangeOverlap (AddressRange firstRange, AddressRange secondRange) |
| | returns true if the ranges overlap and at least one of the overlapping registers can be written
|
| |
| void | writeRegisterWithoutCallback (uint64_t bar, uint64_t address, int32_t data) |
| | Not write-protected function for internal use only.
|
| |
| void | setOpenedAndClearException () noexcept |
| | Backends should call this function at the end of a (successful) open() call.
|
| |
| static std::string | convertPathRelativeToDmapToAbs (std::string const &mapfileName) |
| |
| std::string | _mapFile |
| | name of the map file
|
| |
| std::map< uint64_t, std::vector< int32_t > > | _barContents |
| |
| std::set< std::pair< uint64_t, uint64_t > > | _readOnlyAddresses |
| |
| std::multimap< AddressRange, boost::function< void(void)> > | _writeCallbackFunctions |
| |
| std::mutex | mutex |
| |
| std::unique_ptr< NumericAddressedRegisterCatalogue > | _registerMapPointer |
| |
| NumericAddressedRegisterCatalogue & | _registerMap |
| |
| MetadataCatalogue | _metadataCatalogue |
| | metadata catalogue
|
| |
| std::mutex | _unalignedAccess |
| | mutex for protecting unaligned access
|
| |
| friend | NumericAddressedLowLevelTransferElement |
| |
| friend | TriggeredPollDistributor |
| |
| std::atomic< bool > | _opened {false} |
| | flag if backend is opened
|
| |
| async::DomainsContainer | _asyncDomainsContainer |
| | Container for async::Domains to support wait_for_new_data.
|
| |