winIDEA SDK
isys::COptionFNetCounterChannelOp Class Reference

Description

FNet Counter channel operation.

#include <CFNetCtrl.h>

Inheritance diagram for isys::COptionFNetCounterChannelOp:
isys::COptionController isys::WrapperBase

Public Member Functions

SPOptionController add ()
 Adds an element to the array and returns COptionController for it. More...
 
SPOptionController at (size_t nIndex)
 Return COptionController for element at nIndex. More...
 
void clear ()
 Removes all elements. More...
 
 COptionController (isys::ConnectionMgrSPtr connectionMgr, const std::string &rstrBaseURL)
 Instantiates object. More...
 
SPOptionController find (const std::string &rstrOption, const std::string &rstrValue, bool bAllowEmptyForSingleElement=false)
 Returns COptionController for the element whose rstrOption has value rstrValue. More...
 
std::string get (const std::string &rstrOption)
 Returns string value of rstrOption. More...
 
bool get_bool (const std::string &rstrOption)
 Gets bool value of rstrOption. More...
 
int64_t get_int (const std::string &rstrOption)
 Gets integer value of rstrOption. More...
 
uint64_t get_uint (const std::string &rstrOption)
 Gets unsigned integer value of rstrOption. More...
 
int index_of (const std::string &rstrOption, const std::string &rstrValue)
 Returns index of element whose element rstrOption has value rstrValue, or -1 if element is not found. More...
 
SPOptionController opt (const std::string &rstrOption)
 Returns COptionController based on rstrOption (appended to the base URL). More...
 
void remove (size_t nIndex)
 Removes element at nIndex. More...
 
void set (const std::string &rstrOption, const std::string &rstrValue)
 Sets rstrValue to rstrOption (appended to the base URL). More...
 
void set_active (const bool bStartActive, const uint8_t nFTrigRestart, const uint8_t nFTrigSuspend, const uint8_t nFTrigResume)
 Sets some of the start/stop options for the counter. More...
 
void set_bool (const std::string &rstrOption, bool bValue)
 Sets bValue to rstrOption. More...
 
void set_count_on (const bool bCount, const uint32_t nPeriod_us, const uint8_t nFEvent)
 Sets the counter and increase periodically or when an event happens. More...
 
void set_int (const std::string &rstrOption, int64_t iValue)
 Sets iValue to rstrOption. More...
 
void set_limit (const bool bLimit, const uint32_t nLimit, const uint8_t nFTrig, const bool bRestart)
 Configures the counter behavior when reaching the limit. More...
 
void set_multi (const iconnect::StrStrMap &inParams)
 Sets multiple option values with one call. More...
 
void set_on_increment (const uint8_t nFTrig)
 Set event on which the counter will increase. More...
 
void set_record (const bool bOnChange)
 Record the changes. More...
 
void set_uint (const std::string &rstrOption, uint64_t nValue)
 Sets nValue to rstrOption. More...
 
size_t size ()
 Returns array size of this instance. More...
 
std::string URL ()
 Returns full option URL of this instance. More...
 

Protected Member Functions

std::string get_option_URL (std::string strBase, std::string_view strvOption) const
 Possible parameters if we want the return string to be for example "/IDE/Info.VerMajor". More...
 
std::string get_option_URL (std::string_view strvOption) const
 See COptionController::get_option_URL(std::string, std::string_view) const examples for getting the right URL.
 

Static Protected Member Functions

static std::string format_index (size_t nIndex)
 returns "[<index dec>]"
 

Member Function Documentation

◆ add()

SPOptionController isys::COptionController::add ( )
inherited

Adds an element to the array and returns COptionController for it.

Returns
COptionController instance
Exceptions
TExceptionif this is not an array, or the array size is static

Python example: test_add_remove.py

◆ at()

SPOptionController isys::COptionController::at ( size_t  nIndex)
inherited

Return COptionController for element at nIndex.

Parameters
nIndexelement index
Returns
COptionController for element at index

Python example: test_at.py

◆ clear()

void isys::COptionController::clear ( )
inherited

Removes all elements.

Exceptions
TExceptionif this is not an array, the array size is static

Python example: test_add_remove.py

◆ COptionController()

isys::COptionController::COptionController ( isys::ConnectionMgrSPtr  connectionMgr,
const std::string &  rstrBaseURL 
)

Instantiates object.

Parameters
connectionMgrclass which maintains connection to winIDEA. Connection must be established before this call.
rstrBaseURLconfiguration node URL, for example /IDE/Debug.DownloadFiles In winIDEA see Help->Display Option...

◆ find()

SPOptionController isys::COptionController::find ( const std::string &  rstrOption,
const std::string &  rstrValue,
bool  bAllowEmptyForSingleElement = false 
)
inherited

Returns COptionController for the element whose rstrOption has value rstrValue.

Parameters
rstrOptionoption string which is appended to the base URL
rstrValueoption value
bAllowEmptyForSingleElementif a single element is present, allow access with empty rstrValue
Returns
COptionController for the element found
Exceptions
TExceptionif this is not an array, rstrOption is not a valid option, or the element is not found

Python example: test_find.py

◆ get()

std::string isys::COptionController::get ( const std::string &  rstrOption)
inherited

Returns string value of rstrOption.

Parameters
rstrOptionoption string which is appended to the base URL
Returns
string value
Exceptions
TExceptionif rstrOption is invalid

Python example: test_get_set.py

◆ get_bool()

bool isys::COptionController::get_bool ( const std::string &  rstrOption)
inherited

Gets bool value of rstrOption.

Parameters
rstrOptionoption string which is appended to the base URL
Returns
bool value
Exceptions
TExceptionif rstrOption is invalid, or type is not bool

Python example: test_get_set_bool.py

◆ get_int()

int64_t isys::COptionController::get_int ( const std::string &  rstrOption)
inherited

Gets integer value of rstrOption.

Parameters
rstrOptionoption string which is appended to the base URL
Returns
int64_t value
Exceptions
TExceptionif rstrOption is invalid, or type is not integer

Python example: test_get_set_int_uint.py

◆ get_option_URL()

std::string isys::COptionController::get_option_URL ( std::string  strBase,
std::string_view  strvOption 
) const
protectedinherited

Possible parameters if we want the return string to be for example "/IDE/Info.VerMajor".

  • ("" , "IDE/Info.VerMajor")
  • ("/IDE/" , "Info.VerMajor")
  • ("/IDE/Info", "VerMajor")

◆ get_uint()

uint64_t isys::COptionController::get_uint ( const std::string &  rstrOption)
inherited

Gets unsigned integer value of rstrOption.

Parameters
rstrOptionoption string which is appended to the base URL
Returns
uint64_t value
Exceptions
TExceptionif rstrOption is invalid, or type is not a positive integer

Python example: test_get_set_int_uint.py

◆ index_of()

int isys::COptionController::index_of ( const std::string &  rstrOption,
const std::string &  rstrValue 
)
inherited

Returns index of element whose element rstrOption has value rstrValue, or -1 if element is not found.

Parameters
rstrOptionoption string which is appended to the base URL
rstrValueoption value
Returns
index if element exists, -1 otherwise
Exceptions
TExceptionif this is not an array, or rstrOption is not an element name

Python example: test_index_of.py

◆ opt()

SPOptionController isys::COptionController::opt ( const std::string &  rstrOption)
inherited

Returns COptionController based on rstrOption (appended to the base URL).

Parameters
rstrOptionoption string which is appended to the base URL
Returns
COptionController instance

Python example: test_opt.py

◆ remove()

void isys::COptionController::remove ( size_t  nIndex)
inherited

Removes element at nIndex.

Parameters
nIndexelement index
Exceptions
TExceptionif this is not an array, the array size is static, or nIndex is out of array range

Python example: test_add_remove.py

◆ set()

void isys::COptionController::set ( const std::string &  rstrOption,
const std::string &  rstrValue 
)
inherited

Sets rstrValue to rstrOption (appended to the base URL).

Parameters
rstrOptionoption string which is appended to the base URL
rstrValuestring value
Exceptions
TExceptionif rstrOption is invalid

Python example: test_get_set.py

◆ set_active()

void isys::COptionFNetCounterChannelOp::set_active ( const bool  bStartActive,
const uint8_t  nFTrigRestart,
const uint8_t  nFTrigSuspend,
const uint8_t  nFTrigResume 
)

Sets some of the start/stop options for the counter.

Parameters
bStartActiveset to true to start active
nFTrigRestartFTrigger index to act upon, 0 to disable
nFTrigSuspendFTrigger index to act upon, 0 to disable
nFTrigResumeFTrigger index to act upon, 0 to disable

◆ set_bool()

void isys::COptionController::set_bool ( const std::string &  rstrOption,
bool  bValue 
)
inherited

Sets bValue to rstrOption.

Parameters
rstrOptionoption string which is appended to the base URL
bValuebool value
Exceptions
TExceptionif rstrOption is invalid

Python example: test_get_set_bool.py

◆ set_count_on()

void isys::COptionFNetCounterChannelOp::set_count_on ( const bool  bCount,
const uint32_t  nPeriod_us,
const uint8_t  nFEvent 
)

Sets the counter and increase periodically or when an event happens.

Parameters
bCountset it on/off
nPeriod_usperiod to increase the counter
nFEventincrease also if the specific event happens

◆ set_int()

void isys::COptionController::set_int ( const std::string &  rstrOption,
int64_t  iValue 
)
inherited

Sets iValue to rstrOption.

Parameters
rstrOptionoption string which is appended to the base URL
iValueint64_t value
Exceptions
TExceptionif rstrOption is invalid

Python example: test_get_set_int_uint.py

◆ set_limit()

void isys::COptionFNetCounterChannelOp::set_limit ( const bool  bLimit,
const uint32_t  nLimit,
const uint8_t  nFTrig,
const bool  bRestart 
)

Configures the counter behavior when reaching the limit.

Parameters
bLimitenables or disables the limit
nLimitlimit value
nFTrigFTrigger index to act upon, 0 to disable
bRestartset auto-restart

◆ set_multi()

void isys::COptionController::set_multi ( const iconnect::StrStrMap inParams)
inherited

Sets multiple option values with one call.

Parameters
inParamsmap of string option value pairs

Note: Python and Java support Python mapping and Java Map as input type in addition to isystem.connect.StrStrMap. Examples:

Python: optCtrlApp0.set_multi({"Name": "MyApp", "SymbolFiles.DefaultFile": "0"});

Java:   optCtrlApp0.set_multi(Map.of("Name", "MyApp", "SymbolFiles.DefaultFile", "0"));

Python example: test_set_multi.py

◆ set_on_increment()

void isys::COptionFNetCounterChannelOp::set_on_increment ( const uint8_t  nFTrig)

Set event on which the counter will increase.

Parameters
nFTrigevent index from 0 - 10; 0 will not increase the counter on any event

◆ set_record()

void isys::COptionFNetCounterChannelOp::set_record ( const bool  bOnChange)

Record the changes.

Parameters
bOnChangeset to true if you want to record the changes

◆ set_uint()

void isys::COptionController::set_uint ( const std::string &  rstrOption,
uint64_t  nValue 
)
inherited

Sets nValue to rstrOption.

Parameters
rstrOptionoption string which is appended to the base URL
nValueuint64_t value
Exceptions
TExceptionif rstrOption is invalid

Python example: test_get_set_int_uint.py

◆ size()

size_t isys::COptionController::size ( )
inherited

Returns array size of this instance.

Returns
size of array
Exceptions
TExceptionif this is not an array

Python example: test_size.py

◆ URL()

std::string isys::COptionController::URL ( )
inherited

Returns full option URL of this instance.

Returns
full option URL

Python example: test_url.py