|
| RsaServer (int compatible, id_type deviceNumber, const std::string &serverName={}) |
| Constructor.
|
|
| ~RsaServer () override |
| Destructor.
|
|
std::string | getServerName () const |
| Gets the name given at the constructor.
|
|
bool | createImplementation (const std::string &name) |
| Creates an attached implementation by name.
|
|
std::string | getImplementationName () const |
| Gets the name of the current implementation.
|
|
void | destroyImplementation () |
| Destroys the created implementation.
|
|
RsaInterface * | getAcquisition () |
| Gets a pointer to the current acquisition implementation.
|
|
bool | isLocked () const |
| Returns true whe all parameters are locked.
|
|
void | setLocked (bool) |
| Locks the variables by making them all read only.
|
|
| InformationServer () |
| Default constructor.
|
|
virtual | ~InformationServer () |
|
void | setup (const std::string &name, const std::string &namePrefix, long vid, long deviceMask, long serverMask) |
| When device mask is non-zero, variables are added automatically on creation to this info server.
|
|
void | flush () |
| Clears the instance. Also called from setup.
|
|
EState | getState () const |
| Gets the current state.
|
|
const char * | getStateName (int state) const |
| Gets the name of the passed state.
|
|
void | setState (EState) |
| Sets the current state.
|
|
bool | isServerId (id_type id) const |
| Determines if the passed id belongs to this info server.
|
|
void | attachVariable (Variable *var, EClass cls) |
| Adds a variable to the variables vector.
|
|
void | detachVariable (Variable *var) |
|
void | attachResult (ResultData *res) |
|
void | detachResult (ResultData *res) |
|
bool | isGeneratingResults () |
|
template<typename T > |
constexpr std::enable_if_t<(sizeof(T)<=sizeof(data_type)), data_type > | toDataType (T value) const |
| Casts any type to a data_type value.
|
|
template<typename T > |
constexpr std::enable_if_t<(sizeof(T)<=sizeof(data_type)), T > | fromDataType (data_type value) const |
| Casts a data_type value to a given type.
|
|
|
bool | createImplementation (int index) |
| Creates the implementation of index on the registered implementations.
|
|
void | createInterface () |
| Create interface parameters at construction once.
|
|
void | destroyInterface () |
| Remove all parameters and results.
|
|
Variable::PtrVector::size_type | variableListFind (id_type id) const |
| Looks up a parameter which is represented by the interface id.
|
|
bool | createVariable (Variable *&var, RsaTypes::ParamInfo &info, const std::string &setup) |
| Creates a variable with a extra info structure attached.
|
|
void | destroyVariable (Variable *var) |
| Destroys a variable including the attached extra info structure.
|
|
std::string | createSetupString (const RsaTypes::ParamInfo &info, long vid) |
| Creates a setup string from the passed parameter info structure.
|
|
void | evaluateInterfaceParams () |
| Evaluate parameters after the configuration has changed.
|
|
std::string | getNameOffset (const RsaTypes::ParamInfo &info) |
| Gets the name of the channel using the device name.
|
|
std::string | getDescription (const RsaTypes::ParamInfo &info) |
| Gets the description prefix of the channel.
|
|
ResultData::PtrVector::size_type | resultListFind (id_type id) const |
| Looks up a result data which is represented by the interface id.
|
|
bool | createResultData (ResultData *&res, RsaTypes::ResultInfo &info, const std::string &setup) |
| Creates a variable with a extra info structure attached.
|
|
void | destroyResultData (ResultData *var) |
| Destroys a variable including the attached extra info structure.
|
|
std::string | createSetupString (const RsaTypes::ResultInfo &info, long vid) |
| Creates a setup string from the passed result info structure.
|
|
void | evaluateInterfaceResults () |
| Evaluate results after the configuration has changed.
|
|
std::string | getNameOffset (const RsaTypes::ResultInfo &info) |
| Returns the name of the channel using the device name.
|
|
std::string | getDescription (const RsaTypes::ResultInfo &info) |
| Returns the description prefix of the channel.
|
|
ExtraInfo * | castExtraInfo (const Variable *var) |
| Easy to use function to access the extra info from a variable.
|
|
ExtraInfo * | castExtraInfo (const ResultData *var) |
| Easy to use function to access the extra info from a result data.
|
|
void | onStateChange (EState prevState, EState nextState) override |
| Overloaded from TInfoServer.
|
|
void | paramNotify (id_type id) |
| Hook function indirectly called from the implementation.
|
|
void | resultNotify (id_type id) |
| Hook function indirectly called from the implementation.
|
|
void | checkReadOnly () |
| Sets the variables to readonly based on the flags and lock status.
|
|
void | clearValidations () override |
| Overridden from InformationServer.
|
|
void | serverVariableHandler (Variable::EEvent event, const Variable &caller, Variable &linker, bool sameInst) |
| Event handler for variables.
|
|
void | serverResultDataHandler (ResultData::EEvent event, const ResultData &caller, ResultData &link, const Range &rng, bool same_inst) |
| Event handler for results.
|
|
|
enum | EState {
issOff = 0
, issRun
, issRecord
, issPause
,
issStop
, issMaxState
} |
| Enumerate for state of the info server. More...
|
|
enum | EClass { clA = 0
, clB
, clC
, clMaxClass
} |
| Variable/parameter class enumerator. More...
|
|
typedef unsigned long long | id_type |
| Type used for the identifying integer (64-bits).
|
|
typedef int32_t | flags_type |
| Type used for the flag integer.
|
|
typedef size_t | size_type |
| Type used for size of vectors.
|
|
typedef uint64_t | data_type |
| Type used for containing a single data element which is the largest integer.
|
|
typedef int64_t | sdata_type |
| Type used for containing a single data element which is the largest signed integer.
|
|
typedef TVector< id_type > | IdVector |
| Vector for lists of information ID's.
|
|
typedef TVector< InformationBase * > | Vector |
| Vector for containing different information base derived classes.
|
|
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.
|
|
static constexpr size_t | npos = std::numeric_limits<size_type>::max() |
| Unsigned size value indicating not found or no index.
|
|
RSA implementation of an information server.