![]() |
Scanframe Modular Application 0.1.0
|
Base class for the repetitive signal acquisition interface. More...
#include <RsaInterface.h>


Classes | |
| struct | Parameters |
| Parameters structure passed to an RSA implementation class. More... | |
Public Member Functions | |
| RsaInterface (const Parameters &) | |
| Constructor for passing general structure for derived classes. | |
| virtual | ~RsaInterface () |
| Virtual destructor for derived classes. | |
| bool | initialize () |
| Initializes the implementation for operation. Calls doInitialize. | |
| bool | uninitialize () |
| Un-initializes the implementation. Calls doInitialize. | |
| EAcquisitionType | getType () const |
| bool | storeSettings (bool read) |
| Writes the non exported parameters to profile. | |
| int | getError () const |
| Gets the error value. | |
| unsigned | getChannelCount () |
| Gets the amount of channels for this implementation. | |
| unsigned | getGateCount (unsigned channel) |
| Gets the amount of gates for this channels' implementation. | |
| std::string | getGateName (unsigned int gate, unsigned int channel=0) |
| Gets the name of the passed gate and channel. | |
| bool | setPopManual (int channel, EPopManual pm) |
| Sets the pop manual state for a channel. | |
| EPopManual | getPopManual (int channel) const |
| Gets the pop-manual state on a channel. | |
| bool | getParamInfo (IdType id, ParamInfo &info) const |
| bool | getParam (IdType id, Value &value) const |
| Gets the value of the specified parameter id. When the ID does not exist it returns false. | |
| bool | setParam (IdType id, const Value &value, bool skip_event) |
| Sets the value of the specified parameter id. When the ID does not exist it returns false. | |
| bool | paramSetGet (IdType id, Value &value, bool skip_event) |
| Sets and immediately gets the same value again clipped or not. | |
| virtual bool | handleParam (IdType id, ParamInfo *info, const Value *setval, Value *getval)=0 |
| Pure virtual method to be overridden in a derived class. This method handles the interface parameters. When info in non-null the parameter info must be filled in. When the set or get value is non-null the value is set and/or retrieved. | |
| bool | setParam (EDefaultParam param, unsigned gate, unsigned ch, const Value &value, bool skip_event) |
| Same as setParam() but the ID is formed by getParamId() | |
| bool | getParam (EDefaultParam param, unsigned gate, unsigned ch, Value &value) const |
| Same as getParam() but the ID is formed by getParamId() | |
| virtual bool | setRunMode (bool on, bool clear)=0 |
| Sets the implementation in hold or Run mode. | |
| virtual bool | getRunMode () const =0 |
| Gets the current run mode of a derived class. | |
| virtual IdType | getParamId (EDefaultParam param, unsigned gate=UINT_MAX, unsigned channel=UINT_MAX) const =0 |
| Gets the ID of the parameter for the specified gate. | |
| virtual bool | enumParamIds (IdList &ids)=0 |
| Gets all interface parameters ids. | |
| void | setParamHook (NotifyProc proc, void *data) |
| Sets a procedure hook for the interface implementation to be called when the value changes as a result of the implementation itself. | |
| void | setResultHook (NotifyProc proc, void *data) |
| Sets a procedure hook for the interface implementation to be called when there ias data result has data. | |
| virtual IdType | getResultId (EDefaultResult result, unsigned gate=UINT_MAX, unsigned channel=UINT_MAX) const =0 |
| Returns the ID of the result for the specified gate. | |
| virtual bool | enumResultIds (IdList &ids)=0 |
| Gets interface results ids. | |
| bool | getResultInfo (IdType id, ResultInfo &info) |
| Retrieve information about the passed id. | |
| virtual bool | handleResult (IdType id, ResultInfo *info, BufferInfo *bufInfo)=0 |
| Handles results. | |
| bool | getResultBuffer (IdType id, BufferInfo &bufInfo) |
| Gets the result buffer associated with the result id passed in the result hook at the time of the call. | |
| bool | isInitialized () const |
| For testing initialization by the implementation. | |
| std::string | getProfilePath () const |
| Returns the path of the static configuration of the driver. | |
| virtual void | addPropertyPages (PropertySheetDialog *sheet) |
| Adds controller specific property pages to the passed sheet. | |
Protected Member Functions | |
| virtual bool | doInitialize (bool init) |
| Must be overridden by a derived class. Should check the hardware configuration. | |
| void | callParamHook (IdType id) |
| Calls the hooked function when it exists. | |
| void | callResultHook (IdType id) |
| Calls the hooked function when it exists. | |
| bool | setType (EAcquisitionType at) |
| Sets the implementation type of the implementation used by the server side. Only allowed before and during initialization. By default, the type is ultrasonic. | |
Additional Inherited Members | |
Public Types inherited from sf::RsaTypes | |
| enum | EParamFlag { pfReadonly = 1 << 0 , pfEffectsParameter = 1 << 1 , pfEffectsResult = 1 << 2 , pfEffectsData = 1 << 3 , pfChannelSingle = 1 << 4 , pfGate = 1 << 5 , pfMethod = 1 << 6 , pfExport = 1 << 7 , pfSystem = 1 << 8 , pfWriteable = 1 << 9 , pfAlias = 1 << 10 , pfArchive = 1 << 11 , pfWriteAtOff = 1 << 12 } |
| Parameter flags for defining parameter behaviour. More... | |
| enum | EResultFlag { rfGate = 1 << 0 , rfIndex = 1 << 1 , rfAsync = 1 << 2 , rfAsyncIndex = 1 << 3 , rfHugeData = 1 << 4 , rfStored = 1 << 5 } |
| Result flags for defining result behaviour. More... | |
| enum | EAcquisitionType { atUltrasonic , atEddyCurrent } |
| enum | EDefaultParam : uint64_t { apNone = 0x0000 , apChannels = 0x0002 , apError = 0x0003 , apErrorMessage = 0x0004 , apAmplitudeUnit = 0x0005 , apUserFirst = 0x000F , apChannel_Mask = 0x4000 , apChannel_RepRate = 0x4001 , apChannel_SyncMode = 0x4002 , apChannel_Gates = 0x4003 , apChannel_Inputs = 0x4004 , apChannel_TimeUnits = 0x4005 , apChannel_CopyDelay = 0x4006 , apChannel_CopyRange = 0x4007 , apChannel_SampleRate = 0x4008 , apChannel_CopyEnable = 0x4009 , apChannel_PopManual = 0x400A , apChannel_BiDirMode = 0x400B , apChannel_UserFirst = 0x401F , apGate_Mask = 0x8000 , apGate_Name = 0x8001 , apGate_Delay = 0x8002 , apGate_Range = 0x8003 , apGate_SlaveTo = 0x8004 , apGate_Enable = 0x8005 , apGate_Method = 0x8006 , apGate_Threshold = 0x8007 , apGate_Amplitude = 0x8008 , apGate_TimeOfFlight = 0x8009 , apGate_UserFirst = 0x801F } |
| enum | EDefaultResult : uint64_t { arNone = 0x0000 , arUserFirst = 0x0001 , arChannel_Mask = 0x4000 , arChannel_PopIndex = 0x4001 , arChannel_CopyData = 0x4002 , arChannel_CopyIndex = 0x4003 , arChannel_UserFirst = 0x401F , arGate_Amplitude = 0x8001 , arGate_TimeOfFlight = 0x8002 , arGate_Copy = 0x8003 , arGate_Mask = 0x8000 , arGate_UserFirst = 0x801F } |
| enum | EPopManual { pmDisabled = 0 , pmReady , pmTrigger } |
| Enumerate for the pop manual function. More... | |
| typedef unsigned long long | IdType |
| Type for gathering parameter ID's. | |
| typedef TVector< IdType > | IdList |
| Type for gathering parameter ID's. | |
| typedef void(* | NotifyProc) (void *data, IdType id) |
| Function type for the function type which is called when a parameter changes as a result of changes in the interface itself. | |
| typedef TVector< ParamState > | ParamStates |
| Vector to specify states. | |
Base class for the repetitive signal acquisition interface.
|
explicit |
Constructor for passing general structure for derived classes.
|
virtual |
Virtual destructor for derived classes.
|
virtual |
Adds controller specific property pages to the passed sheet.
| sheet |
|
protected |
Calls the hooked function when it exists.
| id | Parameter identifier. |
|
protected |
Calls the hooked function when it exists.
| id | Result identifier. |
|
inlineprotectedvirtual |
Must be overridden by a derived class. Should check the hardware configuration.
| init | True when initializing. |
|
pure virtual |
Gets all interface parameters ids.
| ids | The return value. |
Implemented in sf::AcquisitionEmulator.
|
pure virtual |
Gets interface results ids.
| ids | List of identifiers |
Implemented in sf::AcquisitionEmulator.
| unsigned sf::RsaInterface::getChannelCount | ( | ) |
Gets the amount of channels for this implementation.
| int sf::RsaInterface::getError | ( | ) | const |
Gets the error value.
| unsigned sf::RsaInterface::getGateCount | ( | unsigned | channel | ) |
Gets the amount of gates for this channels' implementation.
| channel | Channel number. |
| std::string sf::RsaInterface::getGateName | ( | unsigned int | gate, |
| unsigned int | channel = 0 |
||
| ) |
Gets the name of the passed gate and channel.
| gate | Gate number |
| channel | Channel number. |
| bool sf::RsaInterface::getParam | ( | EDefaultParam | param, |
| unsigned | gate, | ||
| unsigned | ch, | ||
| Value & | value | ||
| ) | const |
Same as getParam() but the ID is formed by getParamId()
Gets the value of the specified parameter id. When the ID does not exist it returns false.
| id | Parameter identifier. |
| value | Returned value. |
|
pure virtual |
Gets the ID of the parameter for the specified gate.
| param | Type of default parameter. |
| gate | Gate number and when UINT_MAX it is ignored. |
| channel | Channel number and when UINT_MAX it is ignored. |
Implemented in sf::AcquisitionEmulator.
Retrieve information about the passed param id.
| id | id Parameter identifier. |
| info | Return value. |
| EPopManual sf::RsaInterface::getPopManual | ( | int | channel | ) | const |
Gets the pop-manual state on a channel.
| channel | Channel number. |
| std::string sf::RsaInterface::getProfilePath | ( | ) | const |
Returns the path of the static configuration of the driver.
| bool sf::RsaInterface::getResultBuffer | ( | IdType | id, |
| BufferInfo & | bufInfo | ||
| ) |
Gets the result buffer associated with the result id passed in the result hook at the time of the call.
|
pure virtual |
Returns the ID of the result for the specified gate.
| result | Default result type. |
| gate | Gate number and when UINT_MAX tels the argument is ignored. |
| channel | Channel number and when UINT_MAX tels the argument is ignored. |
Implemented in sf::AcquisitionEmulator.
| bool sf::RsaInterface::getResultInfo | ( | IdType | id, |
| ResultInfo & | info | ||
| ) |
Retrieve information about the passed id.
|
pure virtual |
Gets the current run mode of a derived class.
Implemented in sf::AcquisitionEmulator.
| EAcquisitionType sf::RsaInterface::getType | ( | ) | const |
Gets the type of acquisition.
|
pure virtual |
Pure virtual method to be overridden in a derived class. This method handles the interface parameters. When info in non-null the parameter info must be filled in. When the set or get value is non-null the value is set and/or retrieved.
| id | |
| info | |
| setval | |
| getval |
Implemented in sf::AcquisitionEmulator.
|
pure virtual |
Handles results.
Implemented in sf::AcquisitionEmulator.
| bool sf::RsaInterface::initialize | ( | ) |
Initializes the implementation for operation. Calls doInitialize.
|
inline |
For testing initialization by the implementation.
Sets and immediately gets the same value again clipped or not.
| id | Parameter identifier. |
| value | Set, get value. |
| skip_event |
| bool sf::RsaInterface::setParam | ( | EDefaultParam | param, |
| unsigned | gate, | ||
| unsigned | ch, | ||
| const Value & | value, | ||
| bool | skip_event | ||
| ) |
Same as setParam() but the ID is formed by getParamId()
Sets the value of the specified parameter id. When the ID does not exist it returns false.
| id | Parameter identifier. |
| value | Set value. |
| skip_event |
| void sf::RsaInterface::setParamHook | ( | NotifyProc | proc, |
| void * | data | ||
| ) |
Sets a procedure hook for the interface implementation to be called when the value changes as a result of the implementation itself.
| bool sf::RsaInterface::setPopManual | ( | int | channel, |
| EPopManual | pm | ||
| ) |
Sets the pop manual state for a channel.
| channel | Channel number. |
| pm | Manual pop mode. |
| void sf::RsaInterface::setResultHook | ( | NotifyProc | proc, |
| void * | data | ||
| ) |
Sets a procedure hook for the interface implementation to be called when there ias data result has data.
|
pure virtual |
Sets the implementation in hold or Run mode.
| on | When false the implementation goes in a non cpu time-consuming mode. |
| clear | When true all pending results are cleared and the index counter is reset. |
Implemented in sf::AcquisitionEmulator.
|
protected |
Sets the implementation type of the implementation used by the server side. Only allowed before and during initialization. By default, the type is ultrasonic.
| at | The acquisition type. |
| bool sf::RsaInterface::storeSettings | ( | bool | read | ) |
Writes the non exported parameters to profile.
| read | When true settings are read and with false written. |
| bool sf::RsaInterface::uninitialize | ( | ) |
Un-initializes the implementation. Calls doInitialize.