fwConfigs
8.4.5
|
The library to handle WinCC OA archiving. More...
Functions | |
fwArchive_deleteMultiple (dyn_string dpes, dyn_string &exceptionInfo) | |
fwArchive_deleteMany (dyn_string dpes, dyn_string &exceptionInfo) | |
fwArchive_delete (string dpe, dyn_string &exceptionInfo) | |
_fwArchive_setOrConfig (dyn_string dpes, bool startArchiving, dyn_string archiveClassDpName, dyn_int archiveType, dyn_int smoothProcedure, dyn_float deadband, dyn_float timeInterval, dyn_string &exceptionInfo, bool checkClass=TRUE, bool configureOnly=FALSE, int procedureIdx=1) | |
fwArchive_setMultiple (dyn_string dpes, string archiveClassName, int archiveType, int smoothProcedure, float deadband, float timeInterval, dyn_string &exceptionInfo, bool checkClass=TRUE, bool activateArchiving=TRUE, int procedureIdx=1) | |
fwArchive_setMany (dyn_string dpes, dyn_string archiveClassName, dyn_int archiveType, dyn_int smoothProcedure, dyn_float deadband, dyn_float timeInterval, dyn_string &exceptionInfo, bool checkClass=TRUE, bool activateArchiving=TRUE, bool configureOnly=false, int procedureIdx=1) | |
_fwArchive_convertManyArchiveClassNamesToDpNames (dyn_string dpes, dyn_string archiveClassNames, dyn_string &archiveClassDps, dyn_string &exceptionInfo) | |
fwArchive_set (string dpe, string archiveClassName, int archiveType, int smoothProcedure, float deadband, float timeInterval, dyn_string &exceptionInfo, bool checkClass=TRUE, int procedureIdx=1) | |
fwArchive_configMultiple (dyn_string dpes, string archiveClassName, int archiveType, int smoothProcedure, float deadband, float timeInterval, dyn_string &exceptionInfo, bool checkClass=TRUE, int procedureIdx=1) | |
fwArchive_configMany (dyn_string dpes, dyn_string archiveClassName, dyn_int archiveType, dyn_int smoothProcedure, dyn_float deadband, dyn_float timeInterval, dyn_string &exceptionInfo, bool checkClass=TRUE, int procedureIdx=1) | |
fwArchive_config (string dpe, string archiveClassName, int archiveType, int smoothProcedure, float deadband, float timeInterval, dyn_string &exceptionInfo, bool checkClass=TRUE, int procedureIdx=1) | |
fwArchive_getMany (dyn_string dpes, dyn_bool &configExists, dyn_string &archiveClass, dyn_int &archiveType, dyn_int &smoothProcedure, dyn_float &deadband, dyn_float &timeInterval, dyn_bool &isActive, dyn_string &exceptionInfo, int procedureIdx=1) | |
fwArchive_get (string dpe, bool &configExists, string &archiveClass, int &archiveType, int &smoothProcedure, float &deadband, float &timeInterval, bool &isActive, dyn_string &exceptionInfo, int procedureIdx=1) | |
fwArchive_startMultiple (dyn_string dpes, dyn_string &exceptionInfo) | |
fwArchive_start (string dpe, dyn_string &exceptionInfo) | |
fwArchive_stopMultiple (dyn_string dpes, dyn_string &exceptionInfo) | |
fwArchive_stop (string dpe, dyn_string &exceptionInfo) | |
_fwArchive_set (string dpe, bool startArchive, string archiveClassDpName, int archiveType, int smoothProcedure, float deadband, float timeInterval, dyn_string &exceptionInfo) | |
_fwArchive_setMany (dyn_string dpes, bool startArchive, dyn_string archiveClassDpName, dyn_int archiveType, dyn_int smoothProcedure, dyn_float deadband, dyn_float timeInterval, dyn_string &exceptionInfo, bool configureOnly=false, int procedureIdx=1) | |
fwArchive_convertClassNameToDpName (string archiveClassName, string &archiveDpName, dyn_string &exceptionInfo, string searchSystem="") | |
fwArchive_convertDpNameToClassName (string archiveDpName, string &archiveClassName, dyn_string &exceptionInfo) | |
fwArchive_checkClass (string archiveClassDpName, const dyn_string &dpesToAdd, dyn_string &exceptionInfo) | |
fwArchive_getClassState (string archiveClassDpName, int &archiveState, string &archiveStateText, dyn_string &exceptionInfo) | |
fwArchive_getClassStatistics (string archiveClassDpName, int ¤tDpes, int &dpesAfterFileSwitch, int &maximumDpes, dyn_string &exceptionInfo, bool refreshClass=TRUE) | |
fwArchive_getClassFreeSpace (string archiveClassDpName, int &freeSpace, dyn_string &exceptionInfo, bool refreshClass=TRUE) | |
fwArchive_checkDpesArchived (string archiveClassDpName, dyn_string dpesToCheck, dyn_bool &areArchived, dyn_string &exceptionInfo) | |
_fwArchive_flagEndOfRefresh (string dpe, int value) | |
fwArchive_convertDpNameToRDBClassName (string rdbArchiveGroupDpName, string &rdbClassName, dyn_string &exceptionInfo) | |
fwArchive_convertRDBClassNameToDpName (string rdbClassName, string &rdbArchiveGroupDpName, dyn_string &exceptionInfo, string searchSystem="") | |
fwArchive_getAllValueArchiveClasses (dyn_string readFromSystems, dyn_string &archiveClasses, dyn_string &archiveClassDps, dyn_string &exceptionInfo) | |
fwArchive_getAllRDBArchiveClasses (dyn_string readFromSystems, dyn_string &archiveClasses, dyn_string &archiveGroupDps, dyn_string &exceptionInfo, bool includeAlertGroups=FALSE) | |
bool | fwArchive_useNGA () |
bool | fwArchive_checkIfSystemUsesNGA (string sysName, dyn_string &exceptionInfo) |
bool | _fwArchive_checkIfSameArchivingIsUsed (const dyn_string &sysNames, dyn_bool &sysUsesNga, dyn_string &exceptionInfo) |
fwArchive_getAllNGAArchiveClasses (dyn_string readFromSystems, dyn_string &archiveClasses, dyn_string &archiveGroupDps, dyn_string &exceptionInfo, bool includeAlertGroups=FALSE) | |
fwArchive_convertDpNameToNGAClassName (string ngaArchiveGroupDpName, string &ngaClassName, dyn_string &exceptionInfo) | |
fwArchive_convertNGAClassNameToDpName (string ngaClassName, string &ngaArchiveGroupDpName, dyn_string &exceptionInfo, string searchSystem="") | |
string | _fwArchive_convertNGAClassNameToInternalName (const string &ngaClassName) |
bool | _fwArchive_isArchiveClassNameNga (const string &archClassName) |
_fwArchive_getNumberOfArchivingProcedures (const dyn_string &dpes, dyn_int &numbersOfProcedures, dyn_string &exceptionInfo) | |
_fwArchive_getDpeArchiveConfigsPresent (const dyn_string &dpes, dyn_bool &configsPresent, dyn_string &exceptionInfo) | |
_fwArchive_getDpeArchiveConfigsEnabled (const dyn_string &dpes, dyn_bool &configsEnabled, dyn_string &exceptionInfo) | |
_fwArchive_getDpeArchivingConfiguredActiveProcedureNumbers (const dyn_string &dpes, dyn_int &configExists, dyn_bool &configActive, dyn_int &procNumber, bool getActive, bool getProcNumber, dyn_string &exceptionInfo) | |
bool | _fwArchive_checkSettings (const dyn_string &dpes, const dyn_dyn_int &procedureIndexes, const dyn_dyn_string &archiveClasses, const dyn_dyn_int &archiveTypes, const dyn_dyn_int &smoothProcedures, const dyn_dyn_float &deadbands, const dyn_dyn_float &timeIntervals, const dyn_bool &activateArchiving, dyn_string &exceptionInfo, bool applyFirstSettingsToAllDpes=false) |
fwArchive_setManyArchivingProcedures (const dyn_string &dpes, const dyn_dyn_int &procedureIndexes, const dyn_dyn_string &archiveClasses, const dyn_dyn_int &archiveTypes, const dyn_dyn_int &smoothProcedures, const dyn_dyn_float &deadbands, const dyn_dyn_float &timeIntervals, const dyn_bool &activateArchiving, dyn_string &exceptionInfo, bool checkClass=true, bool applyFirstSettingsToAllDpes=false) | |
fwArchive_replaceManyArchivingProcedures (const dyn_string &dpes, const dyn_dyn_string &archiveClasses, const dyn_dyn_int &archiveTypes, const dyn_dyn_int &smoothProcedures, const dyn_dyn_float &deadbands, const dyn_dyn_float &timeIntervals, const dyn_bool &activateArchiving, dyn_string &exceptionInfo, bool checkClass=true, bool applyFirstSettingsToAllDpes=false) | |
fwArchive_appendManyArchivingProcedures (const dyn_string &dpes, const dyn_dyn_string &archiveClasses, const dyn_dyn_int &archiveTypes, const dyn_dyn_int &smoothProcedures, const dyn_dyn_float &deadbands, const dyn_dyn_float &timeIntervals, dyn_string &exceptionInfo, bool checkClass=true, bool applyFirstSettingsToAllDpes=false) | |
fwArchive_deleteManyArchivingProcedures (const dyn_string &dpes, dyn_dyn_int proceduresToDelete, dyn_string &exceptionInfo, bool applyFirstSettingsToAllDpes=false) | |
fwArchive_getManyArchivingProcedures (const dyn_string &dpes, dyn_bool &configExists, dyn_bool &configActive, dyn_dyn_string &archiveClasses, dyn_dyn_int &archiveTypes, dyn_dyn_int &smoothProcedures, dyn_dyn_float &deadbands, dyn_dyn_float &timeIntervals, dyn_string &exceptionInfo) | |
_fwArchive_convertManyArchiveClassNamesToDpNamesMultipleArchiveProcedures (dyn_string dpes, dyn_dyn_string archiveClassNames, dyn_dyn_string &archiveClassDps, dyn_string &exceptionInfo) | |
_fwArchive_convertManyArchiveClassDpsToNamesMultipleArchiveProcedures (dyn_dyn_string archiveClassDps, dyn_dyn_string &archiveClassNames, dyn_string &exceptionInfo) | |
The library to handle WinCC OA archiving.
The fwArchiveConfig library provides a set of functions to configure and manipulate the archiving. Both, the value archive as well as Oracle RDB Archive and NextGeneration Archiver are supported.
The following WinCC OA builtin constants (of type int) are used to specify the type of archiving:
DPATTR_ARCH_PROC_VALARCH:
standard archiving with no smoothing,DPATTR_ARCH_PROC_SIMPLESM:
value dependent + deadband/old-new comparison smoothingThe following WinCC OA builtin constants (of type int) are used in the functions to refer to various smoothing procedures:
DPATTR_VALUE_SMOOTH
: value dependent,DPATTR_VALUE_REL_SMOOTH
: relative value dependent,DPATTR_TIME_SMOOTH
: time dependent,DPATTR_TIME_AND_VALUE_SMOOTH
: value AND time dependent,DPATTR_TIME_AND_VALUE_REL_SMOOTH
: relative value AND time dependent,DPATTR_TIME_OR_VALUE_SMOOTH
: value OR time dependent,DPATTR_TIME_OR_VALUE_REL_SMOOTH
: relative value OR time dependent,DPATTR_COMPARE_OLD_NEW
: old-new comparison,DPATTR_OLD_NEW_AND_TIME_SMOOTH
: old-new comparison AND time,DPATTR_OLD_NEW_OR_TIME_SMOOTH
: old-new comparison OR time fwArchive_deleteMultiple | ( | dyn_string | dpes, |
dyn_string & | exceptionInfo | ||
) |
Deletes the archive config for the given data point elements
dpes | list of data point elements |
exceptionInfo | details of any errors are returned here |
fwArchive_deleteMany | ( | dyn_string | dpes, |
dyn_string & | exceptionInfo | ||
) |
Deletes the archive config for the given data point elements
dpes | list of data point elements |
exceptionInfo | details of any errors are returned here |
fwArchive_delete | ( | string | dpe, |
dyn_string & | exceptionInfo | ||
) |
Deletes the archive config for the given data point element
dpe | data point element |
exceptionInfo | details of any errors are returned here |
_fwArchive_setOrConfig | ( | dyn_string | dpes, |
bool | startArchiving, | ||
dyn_string | archiveClassDpName, | ||
dyn_int | archiveType, | ||
dyn_int | smoothProcedure, | ||
dyn_float | deadband, | ||
dyn_float | timeInterval, | ||
dyn_string & | exceptionInfo, | ||
bool | checkClass = TRUE , |
||
bool | configureOnly = FALSE , |
||
int | procedureIdx = 1 |
||
) |
Sets archive config for the given dp elements with the option to start or not start the archiving
dpes | list of data point elements |
startArchiving | true in order to start the archive immediately, false in order to ONLY configure it |
archiveClassDpName | the dp name of the archiving class to be used |
archiveType | specify whether archive smoothing shold be enabled (using Constants for archive type) |
smoothProcedure | list of smoothing procedures; use constants declared in Constants for archive smoothing procedure |
deadband | archive deadband |
timeInterval | archive time interval |
exceptionInfo | details of any errors are returned here |
checkClass | Optional parameter. Default value TRUE. If TRUE, check class is not deleted and has enough free space. If FALSE skip checks. |
configureOnly | (optional, default false); if set to true, the archiving will be started/stopped according to the startArchive parameter otherwise only configuration will be changed (e.g. for smoothing); for all DPEs that do not have the archiving configured, the value of startArchive parameter will be taken. |
procedureIdx | (optional, default 1) - archiving procedure index (detail in the archive config), should always be set to 1 unless NGA archiving is used. |
fwArchive_setMultiple | ( | dyn_string | dpes, |
string | archiveClassName, | ||
int | archiveType, | ||
int | smoothProcedure, | ||
float | deadband, | ||
float | timeInterval, | ||
dyn_string & | exceptionInfo, | ||
bool | checkClass = TRUE , |
||
bool | activateArchiving = TRUE , |
||
int | procedureIdx = 1 |
||
) |
Sets archive config for the given dp elements and start the archiving
dpes | list of data point elements |
archiveClassName | name of the archive class for the config (not archive class dp name) |
archiveType | specify whether archive smoothing shold be enabled (using Constants for archive type) |
smoothProcedure | list of smoothing procedures; use constants declared in Constants for archive smoothing procedure |
deadband | archive deadband |
timeInterval | archive time interval |
exceptionInfo | details of any errors are returned here |
checkClass | Optional parameter. Default value TRUE. If TRUE, check class is not deleted and has enough free space. If FALSE skip checks. |
activateArchiving | Optional parameter. Default value TRUE. Determines if archiving should be activated. |
procedureIdx | (optional, default 1) - archiving procedure index (detail in the archive config), should always be set to 1 unless NGA archiving is used. |
fwArchive_setMany | ( | dyn_string | dpes, |
dyn_string | archiveClassName, | ||
dyn_int | archiveType, | ||
dyn_int | smoothProcedure, | ||
dyn_float | deadband, | ||
dyn_float | timeInterval, | ||
dyn_string & | exceptionInfo, | ||
bool | checkClass = TRUE , |
||
bool | activateArchiving = TRUE , |
||
bool | configureOnly = false , |
||
int | procedureIdx = 1 |
||
) |
Sets archive config for the given dp elements and start the archiving
dpes | list of data point elements |
archiveClassName | name of the archive class for the config (not archive class dp name) |
archiveType | specify whether archive smoothing shold be enabled (using Constants for archive type) |
smoothProcedure | list of smoothing procedures; use constants declared in Constants for archive smoothing procedure |
deadband | archive deadband. |
timeInterval | archive time interval |
exceptionInfo | details of any errors are returned here |
checkClass | Optional parameter. Default value TRUE. If TRUE, check class is not deleted and has enough free space. If FALSE skip checks. |
activateArchiving | Optional parameter. For internal use - to configure but not start archiving, please use fwArchive_configMany. Default value = TRUE, archiving is started immediately. Else if set to FALSE archiving is configured but not started. |
configureOnly | (optional, default false); if set to true, the archiving will be started/stopped according to the activateArchiving, otherwise only configuration will be changed (e.g. for smoothing); for all DPEs that do not have the archiving configured, the value of activateArchiving parameter will be taken. |
procedureIdx | (optional, default 1) - archiving procedure index (detail in the archive config), should always be set to 1 unless NGA archiving is used. |
_fwArchive_convertManyArchiveClassNamesToDpNames | ( | dyn_string | dpes, |
dyn_string | archiveClassNames, | ||
dyn_string & | archiveClassDps, | ||
dyn_string & | exceptionInfo | ||
) |
Gets archive class DPs for a list of DPEs and their archive class names
dpes | list of DPEs |
archiveClassNames | names of archive classes |
archiveClassDps | archive class DPs for dpes are returned here |
exceptionInfo | details of errors are returned here |
fwArchive_set | ( | string | dpe, |
string | archiveClassName, | ||
int | archiveType, | ||
int | smoothProcedure, | ||
float | deadband, | ||
float | timeInterval, | ||
dyn_string & | exceptionInfo, | ||
bool | checkClass = TRUE , |
||
int | procedureIdx = 1 |
||
) |
Sets archive config for the given dp element and start the archiving
dpe | data point element |
archiveClassName | name of the archive class for the config (not archive class dp name) |
archiveType | specify whether archive smoothing shold be enabled (using Constants for archive type) |
smoothProcedure | list of smoothing procedures; use constants declared in Constants for archive smoothing procedure |
deadband | archive deadband |
timeInterval | archive time interval |
exceptionInfo | details of any errors are returned here |
checkClass | Optional parameter. Default value TRUE. If TRUE, check class is not deleted and has enough free space. If FALSE skip checks. |
procedureIdx | (optional, default 1) - archiving procedure index (detail in the archive config), should always be set to 1 unless NGA archiving is used. |
fwArchive_configMultiple | ( | dyn_string | dpes, |
string | archiveClassName, | ||
int | archiveType, | ||
int | smoothProcedure, | ||
float | deadband, | ||
float | timeInterval, | ||
dyn_string & | exceptionInfo, | ||
bool | checkClass = TRUE , |
||
int | procedureIdx = 1 |
||
) |
Sets archive config for the given dp elements without starting the archiving
dpes | list of data point elements |
archiveClassName | name of the archive class for the config (not archive class dp name) |
archiveType | specify whether archive smoothing shold be enabled (using Constants for archive type) |
smoothProcedure | list of smoothing procedures; use constants declared in Constants for archive smoothing procedure |
deadband | archive deadband |
timeInterval | archive time interval |
exceptionInfo | details of any errors are returned here |
checkClass | Optional parameter. Default value TRUE. If TRUE, check class is not deleted and has enough free space. If FALSE skip checks. |
procedureIdx | (optional, default 1) - archiving procedure index (detail in the archive config), should always be set to 1 unless NGA archiving is used. |
fwArchive_configMany | ( | dyn_string | dpes, |
dyn_string | archiveClassName, | ||
dyn_int | archiveType, | ||
dyn_int | smoothProcedure, | ||
dyn_float | deadband, | ||
dyn_float | timeInterval, | ||
dyn_string & | exceptionInfo, | ||
bool | checkClass = TRUE , |
||
int | procedureIdx = 1 |
||
) |
Sets archive config for the given dp elements without enabling or disabling the archive
dpes | list of data point elements |
archiveClassName | name of the archive class for the config (not archive class dp name) |
archiveType | specify whether archive smoothing shold be enabled (using Constants for archive type) |
smoothProcedure | list of smoothing procedures; use constants declared in Constants for archive smoothing procedure |
deadband | archive deadband |
timeInterval | archive time interval |
exceptionInfo | details of any errors are returned here |
checkClass | Optional parameter. Default value TRUE. If TRUE, check class is not deleted and has enough free space. If FALSE skip checks. |
procedureIdx | (optional, default 1) - archiving procedure index (detail in the archive config), should always be set to 1 unless NGA archiving is used. |
fwArchive_config | ( | string | dpe, |
string | archiveClassName, | ||
int | archiveType, | ||
int | smoothProcedure, | ||
float | deadband, | ||
float | timeInterval, | ||
dyn_string & | exceptionInfo, | ||
bool | checkClass = TRUE , |
||
int | procedureIdx = 1 |
||
) |
Sets archive config for the given dp element without starting the archiving
dpe | data point element |
archiveClassName | name of the archive class for the config (not archive class dp name) |
archiveType | specify whether archive smoothing shold be enabled (using Constants for archive type) |
smoothProcedure | list of smoothing procedures; use constants declared in Constants for archive smoothing procedure |
deadband | archive deadband |
timeInterval | archive time interval |
exceptionInfo | details of any errors are returned here |
checkClass | Optional parameter. Default value TRUE. If TRUE, check class is not deleted and has enough free space. If FALSE skip checks. |
procedureIdx | (optional, default 1) - archiving procedure index (detail in the archive config), should always be set to 1 unless NGA archiving is used. |
fwArchive_getMany | ( | dyn_string | dpes, |
dyn_bool & | configExists, | ||
dyn_string & | archiveClass, | ||
dyn_int & | archiveType, | ||
dyn_int & | smoothProcedure, | ||
dyn_float & | deadband, | ||
dyn_float & | timeInterval, | ||
dyn_bool & | isActive, | ||
dyn_string & | exceptionInfo, | ||
int | procedureIdx = 1 |
||
) |
Returns details of the archive config on the given list of dp elements
dpes | the list of data point elements. |
configExists | TRUE - archive config existing, FALSE - archive config is not existing |
archiveClass | name of the archive class for the config (not archive class dp name) |
archiveType | specify whether archive smoothing shold be enabled (using Constants for archive type) |
smoothProcedure | list of smoothing procedures; use constants declared in Constants for archive smoothing procedure |
deadband | archive deadband |
timeInterval | archive time interval |
isActive | TRUE if archiving of this dpe is active, else FALSE |
exceptionInfo | details of any errors are returned here |
procedureIdx | (optional, default 1) - archiving procedure index (detail in the archive config), should always be set to 1 unless NGA archiving is used. |
fwArchive_get | ( | string | dpe, |
bool & | configExists, | ||
string & | archiveClass, | ||
int & | archiveType, | ||
int & | smoothProcedure, | ||
float & | deadband, | ||
float & | timeInterval, | ||
bool & | isActive, | ||
dyn_string & | exceptionInfo, | ||
int | procedureIdx = 1 |
||
) |
Returns details of the archive config on the given dp element
dpe | data point element |
configExists | TRUE - archive config existing, FALSE - archive config is not existing |
archiveClass | name of the archive class for the config (not archive class dp name) |
archiveType | specifies whether archive smoothing is active (using Constants for archive type) |
smoothProcedure | list of smoothing procedures; use constants declared in Constants for archive smoothing procedure |
deadband | archive deadband |
timeInterval | archive time interval |
isActive | TRUE if archiving of this dpe is active, else FALSE |
exceptionInfo | details of any errors are returned here |
procedureIdx | (optional, default 1) - archiving procedure index (detail in the archive config), should always be set to 1 unless NGA archiving is used. |
fwArchive_startMultiple | ( | dyn_string | dpes, |
dyn_string & | exceptionInfo | ||
) |
Starts archiving for the given dp elements
dpes | list of data point elements |
exceptionInfo | details of any errors are returned here |
fwArchive_start | ( | string | dpe, |
dyn_string & | exceptionInfo | ||
) |
Starts archiving for the given dp element
dpe | data point element |
exceptionInfo | details of any errors are returned here |
fwArchive_stopMultiple | ( | dyn_string | dpes, |
dyn_string & | exceptionInfo | ||
) |
Stops archiving for the given dp elements
dpes | list of data point elements |
exceptionInfo | details of any errors are returned here |
fwArchive_stop | ( | string | dpe, |
dyn_string & | exceptionInfo | ||
) |
Stops archiving for the given dp element
dpe | data point element |
exceptionInfo | details of any errors are returned here |
_fwArchive_set | ( | string | dpe, |
bool | startArchive, | ||
string | archiveClassDpName, | ||
int | archiveType, | ||
int | smoothProcedure, | ||
float | deadband, | ||
float | timeInterval, | ||
dyn_string & | exceptionInfo | ||
) |
Sets archive config for the given dp element
NOTE: This function requires the dp name of the archiving class. It will not perform the search for the dp name from a given archive class name. NOTE: This function does not check that the chosen archive class has enough free space, nor if the class has been deleted
dpe | data point element |
startArchive | true in order to start the archive immediately, false in order to ONLY configure it |
archiveClassDpName | the dp name of the archiving class to be used |
archiveType | specifies whether archive smoothing should be ebabled (using Constants for archive type) |
smoothProcedure | list of smoothing procedures; use constants declared in Constants for archive smoothing procedure |
deadband | archive deadband |
timeInterval | archive time interval |
exceptionInfo | details of any errors are returned here |
_fwArchive_setMany | ( | dyn_string | dpes, |
bool | startArchive, | ||
dyn_string | archiveClassDpName, | ||
dyn_int | archiveType, | ||
dyn_int | smoothProcedure, | ||
dyn_float | deadband, | ||
dyn_float | timeInterval, | ||
dyn_string & | exceptionInfo, | ||
bool | configureOnly = false , |
||
int | procedureIdx = 1 |
||
) |
Sets archive config for the given dp elements
NOTE: This function requires the dp name of the archiving class. It will not perform the search for the dp name from a given archive class name. NOTE: This function does not check that the chosen archive class has enough free space, nor if the class has been deleted
dpes | data point elements |
startArchive | true in order to start the archive immediately, false in order to ONLY configure it |
archiveClassDpName | the dp name of the archiving class to be used |
archiveType | specifies whether archive smoothing should be ebabled (using Constants for archive type) |
smoothProcedure | list of smoothing procedures; use constants declared in Constants for archive smoothing procedure |
deadband | archive deadband |
timeInterval | archive time interval |
exceptionInfo | details of any errors are returned here |
configureOnly | (optional, default false); if set to true, the archiving will be started/stopped according to the startArchive parameter otherwise only configuration will be changed (e.g. for smoothing); for all DPEs that do not have the archiving configured, the value of startArchive parameter will be taken. |
procedureIdx | (optional, default 1) - archiving procedure index (detail in the archive config), should always be set to 1 unless NGA archiving is used. |
fwArchive_convertClassNameToDpName | ( | string | archiveClassName, |
string & | archiveDpName, | ||
dyn_string & | exceptionInfo, | ||
string | searchSystem = "" |
||
) |
Finds the _ValueArchive DP name corresponding to the given archive class name
archiveClassName | name of the archive class |
archiveDpName | dp name of the archive class _ValueArchive data point is returned here |
exceptionInfo | details of any errors are returned here |
searchSystem | OPTIONAL PARAMETER - default value is "" (search local system) The system on which to perform the lookup of the archive class name |
fwArchive_convertDpNameToClassName | ( | string | archiveDpName, |
string & | archiveClassName, | ||
dyn_string & | exceptionInfo | ||
) |
Finds the archive class name corresponding to the given _ValueArchive DP
archiveDpName | dp name of the archive class _ValueArchive data point |
archiveClassName | name of the archive class is returned here |
exceptionInfo | details of any errors are returned here |
fwArchive_checkClass | ( | string | archiveClassDpName, |
const dyn_string & | dpesToAdd, | ||
dyn_string & | exceptionInfo | ||
) |
Checks the given archive class to ensure the class has not been deleted and has enough free
space to configure a given number of archiving configs
archiveClassDpName | dp name of the archive class _ValueArchive data point to check |
dpesToAdd | a list of data point elements you wish to configure with the given class |
exceptionInfo | details of any errors are returned here |
fwArchive_getClassState | ( | string | archiveClassDpName, |
int & | archiveState, | ||
string & | archiveStateText, | ||
dyn_string & | exceptionInfo | ||
) |
Gets the state of the given archive class
archiveClassDpName | dp name of the archive class _ValueArchive data point to check |
archiveState | the archive state is returned here fwArchive_CLASS_STOPPED = Archive manager not running fwArchive_CLASS_ONLINE = Archive manager running fwArchive_CLASS_SWAPPED_OUT = Archive is currently swapped out fwArchive_CLASS_DELETED = Archive has been deleted |
archiveStateText | a text representation of the state is returned here |
exceptionInfo | details of any errors are returned here |
fwArchive_getClassStatistics | ( | string | archiveClassDpName, |
int & | currentDpes, | ||
int & | dpesAfterFileSwitch, | ||
int & | maximumDpes, | ||
dyn_string & | exceptionInfo, | ||
bool | refreshClass = TRUE |
||
) |
Gets the statistics of the given archive class
archiveClassDpName | dp name of the archive class _ValueArchive data point to check |
currentDpes | the number of dpes currently in the archive is returned here |
dpesAfterFileSwitch | the number of dpes that will be in the archive after a file switch is returned here |
maximumDpes | the maximum number of dpes for this class is returned here |
exceptionInfo | details of any errors are returned here |
refreshClass | Optional parameter. Default value TRUE. If TRUE, force class to refresh statistics before getting values (maybe slow) If FALSE, get current values which may be out of date |
fwArchive_getClassFreeSpace | ( | string | archiveClassDpName, |
int & | freeSpace, | ||
dyn_string & | exceptionInfo, | ||
bool | refreshClass = TRUE |
||
) |
Gets the amount of additional data point elements that can be added to a given archive class
The value returned is based on the number of dpes in the archive currently, not the number after the next file switch
archiveClassDpName | dp name of the archive class _ValueArchive data point to check |
freeSpace | the number of dpes that can be added to the archive is returned here |
exceptionInfo | details of any errors are returned here |
refreshClass | Optional parameter. Default value TRUE. If TRUE, force class to refresh statistics before getting values (maybe slow) If FALSE, get current values which may be out of date |
fwArchive_checkDpesArchived | ( | string | archiveClassDpName, |
dyn_string | dpesToCheck, | ||
dyn_bool & | areArchived, | ||
dyn_string & | exceptionInfo | ||
) |
This function can be used to check if a given list of dpes are correctly configured to be archived by a given archive manager.
Sometimes, if an archive class is full and more data point elements are added without checking for errors, the additional data points are not added to the archive class (even though the config appears correct) and only a log messages indicates this failure. This function can be used to check that the data point elements are really going to be archived.
archiveClassDpName | dp name of the archive class _ValueArchive data point to check |
dpesToCheck | the list of dpes that you wish to check are correctly configured for the given archive class |
areArchived | list of booleans relating to dpes in dpesToCheck. TRUE = archived, FALSE = not archived |
exceptionInfo | details of any errors are returned here |
_fwArchive_flagEndOfRefresh | ( | string | dpe, |
int | value | ||
) |
Work function used to flag the end of a refresh of the archive class statistics
dpe | name of the data point element connected to (archiveClassDpName + ".statistics.dpElements:_online.._stime") |
value | the time of the latest update of the datapoint element connected to |
fwArchive_convertDpNameToRDBClassName | ( | string | rdbArchiveGroupDpName, |
string & | rdbClassName, | ||
dyn_string & | exceptionInfo | ||
) |
Finds the RDB archive class name corresponding to the given _RDBArchiveGroups DP
The default RDB Archive class is called "RDB-99) EVENT"
rdbArchiveGroupDpName | dp name of the RDB archive group _RDBArchiveGroups data point |
rdbClassName | name of the archive class is returned here |
exceptionInfo | details of any errors are returned here |
fwArchive_convertRDBClassNameToDpName | ( | string | rdbClassName, |
string & | rdbArchiveGroupDpName, | ||
dyn_string & | exceptionInfo, | ||
string | searchSystem = "" |
||
) |
Finds the _RDBArchiveGroups DP name corresponding to the given RDB archive class name
rdbClassName | name of the RDB archive class |
rdbArchiveGroupDpName | dp name of the RDB archive group _RDBArchiveGroups data point is returned here |
exceptionInfo | details of any errors are returned here |
searchSystem | OPTIONAL PARAMETER - default value is "" (search local system) The system on which to perform the lookup of the archive class name |
fwArchive_getAllValueArchiveClasses | ( | dyn_string | readFromSystems, |
dyn_string & | archiveClasses, | ||
dyn_string & | archiveClassDps, | ||
dyn_string & | exceptionInfo | ||
) |
Finds all the NOT DELETED Value Archive classes and returns the class names (for display) and the class dps (for writing to the config)
readFromSystems | The systems to read from - the list of classes returned is only those classes that are available on every one of the named systems |
archiveClasses | The list of archive class names is returned here |
archiveClassDps | The list of _ValueArchive data point names is returned here |
exceptionInfo | Details of any errors are returned here |
fwArchive_getAllRDBArchiveClasses | ( | dyn_string | readFromSystems, |
dyn_string & | archiveClasses, | ||
dyn_string & | archiveGroupDps, | ||
dyn_string & | exceptionInfo, | ||
bool | includeAlertGroups = FALSE |
||
) |
Finds all the RDB Archiving Group classes and returns the class names (for display) and the group dps (for writing to the config)
readFromSystems | The systems to read from - the list of classes returned is only those classes that are available on every one of the named systems |
archiveClasses | The list of RDB archive group names is returned here |
archiveGroupDps | The list of _RDBArchiveGroups data point names is returned here |
exceptionInfo | Details of any errors are returned here |
includeAlertGroups | OPTIONAL PARAMETER - default value = FALSE If set to FALSE, only EVENT archive groups are returned If set to TRUE, both EVENT and ALERT archive groups are returned |
bool fwArchive_useNGA | ( | ) |
Checks if the NGA is enabled in the local system
bool fwArchive_checkIfSystemUsesNGA | ( | string | sysName, |
dyn_string & | exceptionInfo | ||
) |
Checks if a system uses the NGA based on how it handles _archive configs and presence of _NGA internal datapoint
Checking the behaviour of _archive configs is necessary to properly handle cases in which both RDB/VALARCH and NGA archiving is used interchangeably and the _NGA internal datapoint is kept even when NGA is (temporarily) disabled.
sysName | name of the system to check |
bool _fwArchive_checkIfSameArchivingIsUsed | ( | const dyn_string & | sysNames, |
dyn_bool & | sysUsesNga, | ||
dyn_string & | exceptionInfo | ||
) |
Checks if systems uses the same type of archiving (NGA or RDB/VALARCH) based on how they handle _archive configs and presence of
_NGA internal datapoint
sysNames | names of the systems to check |
sysUsesNga | true if the corresponding system uses the NGA, false otherwise |
fwArchive_getAllNGAArchiveClasses | ( | dyn_string | readFromSystems, |
dyn_string & | archiveClasses, | ||
dyn_string & | archiveGroupDps, | ||
dyn_string & | exceptionInfo, | ||
bool | includeAlertGroups = FALSE |
||
) |
Finds all the NGA Archiving Group classes and returns the class names (for display) and the group dps (for writing to the config)
readFromSystems | The systems to read from - the list of classes returned is only those classes that are available on every one of the named systems |
archiveClasses | The list of NGA archive group names is returned here |
archiveGroupDps | The list of _NGA_Group data point names is returned here |
exceptionInfo | Details of any errors are returned here |
includeAlertGroups | OPTIONAL PARAMETER - default value = FALSE If set to FALSE, only EVENT archive groups are returned If set to TRUE, both EVENT and ALERT archive groups are returned |
fwArchive_convertDpNameToNGAClassName | ( | string | ngaArchiveGroupDpName, |
string & | ngaClassName, | ||
dyn_string & | exceptionInfo | ||
) |
Finds the NGA archive class name corresponding to the given _NGA_Group DP
ngaArchiveGroupDpName | dp name of the NGA archive group _NGA_Group data point |
ngaClassName | name of the archive class is returned here |
exceptionInfo | details of any errors are returned here |
fwArchive_convertNGAClassNameToDpName | ( | string | ngaClassName, |
string & | ngaArchiveGroupDpName, | ||
dyn_string & | exceptionInfo, | ||
string | searchSystem = "" |
||
) |
Finds the _NGA_Group DP name corresponding to the given NGA archive class name
ngaClassName | name of the NGA archive class |
ngaArchiveGroupDpName | dp name of the NGA archive group _NGA_Group data point is returned here |
exceptionInfo | details of any errors are returned here |
searchSystem | OPTIONAL PARAMETER - default value is "" (search local system) The system on which to perform the lookup of the archive class name |
string _fwArchive_convertNGAClassNameToInternalName | ( | const string & | ngaClassName | ) |
Returns the NGA archive class name from displayed name (prefixed with "NGA) ")
ngaClassName | displayed archive class name |
bool _fwArchive_isArchiveClassNameNga | ( | const string & | archClassName | ) |
Checks if the displayed archive class name is prefixed with "NGA) "
archClassName | displayed archive class name |
_fwArchive_getNumberOfArchivingProcedures | ( | const dyn_string & | dpes, |
dyn_int & | numbersOfProcedures, | ||
dyn_string & | exceptionInfo | ||
) |
Returns the numbers of archiving procedures for passed DPEs
dpes | DPEs to check |
numbersOfProcedures | numbers of configured archiving procedures for DPEs are returned here |
exceptionInfo | details of errors are returned here |
_fwArchive_getDpeArchiveConfigsPresent | ( | const dyn_string & | dpes, |
dyn_bool & | configsPresent, | ||
dyn_string & | exceptionInfo | ||
) |
Checks if archive configs are present for passed DPEs
dpes | DPEs to check |
configsPresent | config presences for DPEs are returned here |
exceptionInfo | details of errors are returned here |
_fwArchive_getDpeArchiveConfigsEnabled | ( | const dyn_string & | dpes, |
dyn_bool & | configsEnabled, | ||
dyn_string & | exceptionInfo | ||
) |
Checks if archive configs are active for passed DPEs
dpes | DPEs to check |
configsEnabled | config active states for DPEs are returned here |
exceptionInfo | details of errors are returned here |
_fwArchive_getDpeArchivingConfiguredActiveProcedureNumbers | ( | const dyn_string & | dpes, |
dyn_int & | configExists, | ||
dyn_bool & | configActive, | ||
dyn_int & | procNumber, | ||
bool | getActive, | ||
bool | getProcNumber, | ||
dyn_string & | exceptionInfo | ||
) |
Checks if archive configs for passed DPEs exist, are active and their number of archiving procedures, depending on the mode selected
dpes | DPEs to check |
configExists | true if an archive config exists |
configActive | true if the config is active |
procNumber | number of configured archive procedures |
getActive | if true, it is checked if configs are active (otherwise configActive is filled with false) |
getProcNumber | if true, archiving procedure numbers are retrieved (otherwise procNumber is filled with 0s) |
exceptionInfo | details of errors are returned here |
bool _fwArchive_checkSettings | ( | const dyn_string & | dpes, |
const dyn_dyn_int & | procedureIndexes, | ||
const dyn_dyn_string & | archiveClasses, | ||
const dyn_dyn_int & | archiveTypes, | ||
const dyn_dyn_int & | smoothProcedures, | ||
const dyn_dyn_float & | deadbands, | ||
const dyn_dyn_float & | timeIntervals, | ||
const dyn_bool & | activateArchiving, | ||
dyn_string & | exceptionInfo, | ||
bool | applyFirstSettingsToAllDpes = false |
||
) |
Checks if passed archiving procedure settings are correct. Note that this function does not perform all the checks and does not guarantee that applying the passed settings will not fail e.g. at the step of calling dpSetWait().
dpes | DPEs to which the settings will be applied |
procedureIndexes | indexes of archiving procedures |
archiveClasses | names of archive classes |
archiveTypes | types of archive smoothing; use constants from Constants for archive type |
smoothProcedures | smoothing procedures; use constants from Constants for archive smoothing procedure |
deadbands | deadband settings |
timeIntervals | archiving time intervals |
activateArchiving | true if archiving should be active, false otherwise |
exceptionInfo | details of any errors are returned here |
fwArchive_setManyArchivingProcedures | ( | const dyn_string & | dpes, |
const dyn_dyn_int & | procedureIndexes, | ||
const dyn_dyn_string & | archiveClasses, | ||
const dyn_dyn_int & | archiveTypes, | ||
const dyn_dyn_int & | smoothProcedures, | ||
const dyn_dyn_float & | deadbands, | ||
const dyn_dyn_float & | timeIntervals, | ||
const dyn_bool & | activateArchiving, | ||
dyn_string & | exceptionInfo, | ||
bool | checkClass = true , |
||
bool | applyFirstSettingsToAllDpes = false |
||
) |
Sets many archiving procedures for many DPEs to the given settings
Archiving configuration is applied in the following way: for every element in dpes, properties passed in dyn_dyn_* arguments are applied to archive procedures at indexes specified by procedureIndexes argument.
In contrast to fwArchive_replaceManyArchivingProcedures, this function does not erase all procedure indexes that are not passed in procedureIndexes, making it useful for applying isolated changes to archive configs with many procedures defined and when most of them should be kept unchanged.
Note that gaps in archive procedure indexes are not allowed, e.g. if an archive config has only one procedure already defined, trying to set archive procedure at index 3 will fail.
This function can also be used for non-NGA archiving that does not support multiple archiving procedures. In such case only one procedure with index 1 should be used.
dpes | DPEs to which the settings will be applied |
procedureIndexes | indexes of archiving procedures; if empty dyn value is passed here, then the natural order of procedure settings in other arguments is assumed |
archiveClasses | names of archive classes |
archiveTypes | types of archive smoothing; use constants from Constants for archive type |
smoothProcedures | smoothing procedures; use constants from Constants for archive smoothing procedure |
deadbands | deadband settings |
timeIntervals | archiving time intervals |
activateArchiving | true if archiving should be active, false otherwise |
exceptionInfo | details of any errors are returned here |
checkClass | optional parameter, default value is true - check if class is not deleted and has enough free space. If false, the checks will be skipped. |
applyFirstSettingsToAllDpes | optional parameter, default value is false. When set to true, settings at index 1 will be applied to all DPEs |
fwArchive_replaceManyArchivingProcedures | ( | const dyn_string & | dpes, |
const dyn_dyn_string & | archiveClasses, | ||
const dyn_dyn_int & | archiveTypes, | ||
const dyn_dyn_int & | smoothProcedures, | ||
const dyn_dyn_float & | deadbands, | ||
const dyn_dyn_float & | timeIntervals, | ||
const dyn_bool & | activateArchiving, | ||
dyn_string & | exceptionInfo, | ||
bool | checkClass = true , |
||
bool | applyFirstSettingsToAllDpes = false |
||
) |
Replaces archiving procedures for many DPEs with the given ones
Archiving configuration is applied in the following way: for every element in dpes, properties from the corresponding indexes in settings arguments are applied to the subsequent archiving procedures. All existing archiving procedues are deleted.
This function can also be used for non-NGA archiving that does not support multiple archiving procedures. In such case only a single single archiving procedure can be passed per DPE.
dpes | DPEs to which the settings will be applied |
archiveClasses | names of archive classes |
archiveTypes | types of archive smoothing; use constants from Constants for archive type |
smoothProcedures | smoothing procedures; use constants from Constants for archive smoothing procedure |
deadbands | deadband settings |
timeIntervals | archiving time intervals |
activateArchiving | true if archiving should be active, false otherwise |
exceptionInfo | details of any errors are returned here |
checkClass | optional parameter, default value is true - check if class is not deleted and has enough free space. If false, the checks will be skipped. |
applyFirstSettingsToAllDpes | optional parameter, default value is false. When set to true, settings at index 1 will be applied to all DPEs |
fwArchive_appendManyArchivingProcedures | ( | const dyn_string & | dpes, |
const dyn_dyn_string & | archiveClasses, | ||
const dyn_dyn_int & | archiveTypes, | ||
const dyn_dyn_int & | smoothProcedures, | ||
const dyn_dyn_float & | deadbands, | ||
const dyn_dyn_float & | timeIntervals, | ||
dyn_string & | exceptionInfo, | ||
bool | checkClass = true , |
||
bool | applyFirstSettingsToAllDpes = false |
||
) |
Appends many archiving procedures to many DPEs
dpes | DPEs to which the procedures will be appended |
archiveClasses | names of archive classes |
archiveTypes | types of archive smoothing; use constants from Constants for archive type |
smoothProcedures | smoothing procedures; use constants from Constants for archive smoothing procedure |
deadbands | deadband settings |
timeIntervals | archiving time intervals |
exceptionInfo | details of any errors are returned here |
checkClass | optional parameter, default value is true - check if class is not deleted and has enough free space. If false, the checks will be skipped. |
applyFirstSettingsToAllDpes | optional parameter, default value is false. When set to true, settings at index 1 will be applied to all DPEs |
fwArchive_deleteManyArchivingProcedures | ( | const dyn_string & | dpes, |
dyn_dyn_int | proceduresToDelete, | ||
dyn_string & | exceptionInfo, | ||
bool | applyFirstSettingsToAllDpes = false |
||
) |
Deletes selected archiving procedures from many DPEs
dpes | DPEs from which the procedures are deleted |
proceduresToDelete | indexes of archiving procedures to be deleted |
exceptionInfo | details of errors are returned here |
applyFirstSettingsToAllDpes | optional argument, default value is false. When set to true, the procedures with indexes in proceduresToDelete[1] will be removed from all DPEs. |
fwArchive_getManyArchivingProcedures | ( | const dyn_string & | dpes, |
dyn_bool & | configExists, | ||
dyn_bool & | configActive, | ||
dyn_dyn_string & | archiveClasses, | ||
dyn_dyn_int & | archiveTypes, | ||
dyn_dyn_int & | smoothProcedures, | ||
dyn_dyn_float & | deadbands, | ||
dyn_dyn_float & | timeIntervals, | ||
dyn_string & | exceptionInfo | ||
) |
Gets parameters of all archiving procedures for many DPEs Output arguments are of dyn_* type if the property is valid for the entire _archive config (e.g. @ref configExists) and of dyn_dyn_* type if it is configured per archiving procedure (e.g. @ref archiveClasses). Archiving procedure parameters are returned in natural order, i.e. archiveClasses[DPE index][archiving procedure index], e.g. archiveClass[1][1] -> archive class of the first archiving procedure of the first DPE in dpes archiveClass[1][2] -> archive class of the second archiving procedure of the first DPE in dpes archiveClass[2][1] -> archive class of the first archiving procedure of the second DPE in dpes ... and so on.
dpes | DPEs from which the procedures are retrieved |
configExists | true if archive config exists, false otherwise |
configActive | true if archive config is active, false otherwise |
archiveClasses | names of archive classes are returned here |
archiveTypes | types of archive smoothing are returned here (constants from Constants for archive type) |
smoothProcedures | smoothing procedures are returned here (constants from Constants for archive smoothing procedure) |
deadbands | deadband are returned here |
timeIntervals | archiving time intervals are returned here |
exceptionInfo | details of errors are returned here |
_fwArchive_convertManyArchiveClassNamesToDpNamesMultipleArchiveProcedures | ( | dyn_string | dpes, |
dyn_dyn_string | archiveClassNames, | ||
dyn_dyn_string & | archiveClassDps, | ||
dyn_string & | exceptionInfo | ||
) |
Gets archive class DPs for a list of DPEs and their archive class names (version supporting multiple archiving procedures)
dpes | list of DPEs |
archiveClassNames | names of archive classes |
archiveClassDps | archive class DPs for dpes are returned here |
exceptionInfo | details of errors are returned here |
_fwArchive_convertManyArchiveClassDpsToNamesMultipleArchiveProcedures | ( | dyn_dyn_string | archiveClassDps, |
dyn_dyn_string & | archiveClassNames, | ||
dyn_string & | exceptionInfo | ||
) |
Gets archive class names for archive class DPs (version supporting multiple archiving procedures)
archiveClassDps | archive class DPs |
archiveClassNames | archive class names are returned here |
exceptionInfo | details of errors are returned here |