ChimeraTK-DeviceAccess
03.18.00
|
This page is answering questions which users have asked when working with the DeviceAccess Library.
We decided to explicitly disable the assignmet of one accessor to another because it is ambiguous what the excpected behaviour is:
Use explicit conversion and replace() (defined in the NDRegisterAccessorBridge base class) to disctinguish which functionalitily you want:
The original implementation had the default assignment operator which would replace the whole accessor, incl. the register it points to. This is what you need in the constructor of a class to initialise its member accessors:
In addition the Accessors have operators which let you treat it like the primitive data type it represents (or the std::vector of it):
With the assignment operator, however, this leads to unexpected behaviour:
If we would have designed the assignment operator to only replace the value, the initialisation of the variable would behave unintuitively:
Hence, we decided that there is no intuitive implementation for the assigment operator and explicitly deactivated it. The last example assigning to d
will already fail at compile time.
The entries SEQUENCE_DMA_0 etc. in the map file are a crutch to implement multiplexed 2D registers, together with the according AREA_MULTIPLEXED_SEQUENCE register. You cannot directly read them. The entry in the register catalogue only exists for historical implementation reasons. However, QtHardMon in versions 0.x used this entry to display the according channel of the 2D register, so it gave the impression you could directly read the sequence.
The registers SEQUENCE_DMA_xx and AREA_MULTIPLEXED_SEQUENCE_DMA together describe the register "DMA" (register name can vary). To get the accoding sequence use a 2D accessor of "DMA" and get the channel you want (see 2D Register Accessors example). In QtHardMon 1.x and newer, use the register DMA and also select the correct channel.