:orphan: .. index:: pair: group; Test parameters .. _doxid-group__te__ts__tapi__test__param: Test parameters =============== .. toctree:: :hidden: enum_sapi_buf_size.rst enum_test_ethdev_state.rst struct_tapi_test_expected_result.rst Overview ~~~~~~~~ If you need to pass a parameter to a test scenarion you need to specify that parameter in te_engine_tester configuration file (package description file). :ref:`More...<details-group__te__ts__tapi__test__param>` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // typedefs typedef enum :ref:`sapi_buf_size<doxid-group__te__ts__tapi__test__param_1gaa22535292f97943c07cc55192923af9a>` :ref:`sapi_buf_size<doxid-group__te__ts__tapi__test__param_1ga7ab5919a41cf4f970600205fb1000a95>`; typedef struct :ref:`tapi_test_expected_result<doxid-structtapi__test__expected__result>` :ref:`tapi_test_expected_result<doxid-group__te__ts__tapi__test__param_1ga9893dedff5b59d2c21699b1a1076ead2>`; // enums enum :ref:`sapi_buf_size<doxid-group__te__ts__tapi__test__param_1gaa22535292f97943c07cc55192923af9a>`; enum :ref:`test_ethdev_state<doxid-group__te__ts__tapi__test__param_1gaa147725402ce82ae7974f24b14b51df6>`; // structs struct :ref:`tapi_test_expected_result<doxid-structtapi__test__expected__result>`; // global variables unsigned int :ref:`te_test_id<doxid-group__te__ts__tapi__test__param_1gadf3ddf4d968d1899e2dc5e39ad4506c0>` = :ref:`TE_LOG_ID_UNDEFINED<doxid-te__raw__log_8h_1acde0e56112e7a231123647475d79d4df>`; // global functions const char* :ref:`test_get_opt_string_param<doxid-group__te__ts__tapi__test__param_1ga735aa22e39dbcd9683f890a6e1b0f757>`(int argc, char** argv, const char* name); :ref:`te_optional_uint_t<doxid-structte__optional__uint__t>` :ref:`test_get_opt_uint_param<doxid-group__te__ts__tapi__test__param_1ga4aaab829b34a6343d5dd03d7c67d4508>`(int argc, char** argv, const char* name); :ref:`te_optional_uintmax_t<doxid-structte__optional__uintmax__t>` :ref:`test_get_opt_uint64_param<doxid-group__te__ts__tapi__test__param_1ga9d5e67a1d52c95e8f961e9914a54dbcb>`(int argc, char** argv, const char* name); :ref:`te_optional_double_t<doxid-structte__optional__double__t>` :ref:`test_get_opt_double_param<doxid-group__te__ts__tapi__test__param_1gad4b30bbbb62461c5c6dda9d55808bda7>`(int argc, char** argv, const char* name); :ref:`te_optional_double_t<doxid-structte__optional__double__t>` :ref:`test_get_opt_value_unit_param<doxid-group__te__ts__tapi__test__param_1gae91a819809a79cb06754b2e512c4e132>`(int argc, char** argv, const char* name); :ref:`te_optional_uintmax_t<doxid-structte__optional__uintmax__t>` :ref:`test_get_opt_value_bin_unit_param<doxid-group__te__ts__tapi__test__param_1ga4ed04a6d780ed08396abda304ff88f82>`(int argc, char** argv, const char* name); bool :ref:`te_sigusr2_caught<doxid-group__te__ts__tapi__test__param_1ga5f481f3aacab30ef99af6441ac273830>`(void); const char* :ref:`test_find_param<doxid-group__te__ts__tapi__test__param_1gaa413ebdafc7a28dc0cfa1179f339f7ee>`(int argc, char* argv[], const char* name); const char* :ref:`test_get_param<doxid-group__te__ts__tapi__test__param_1ga77a71497ad2b8ab7c1e29125938bb85b>`(int argc, char* argv[], const char* name); int :ref:`test_map_param_value<doxid-group__te__ts__tapi__test__param_1gac8da08a1496d064df1da54e1eeeed841>`(const char* var_name, const struct :ref:`param_map_entry<doxid-structparam__map__entry>`* maps, const char* str_val, int* num_val); uint8_t* :ref:`test_get_octet_string_param<doxid-group__te__ts__tapi__test__param_1ga102c7fca532ab5d105086c08a799c03f>`(const char* str_val, size_t len); int :ref:`test_get_enum_param<doxid-group__te__ts__tapi__test__param_1ga57f609884c8c04669ff42cf5dc56e597>`(int argc, char** argv, const char* name, const struct :ref:`param_map_entry<doxid-structparam__map__entry>`* maps); const char* :ref:`test_get_string_param<doxid-group__te__ts__tapi__test__param_1ga64e6f278e8e6c7bccc9893e10914f941>`(int argc, char** argv, const char* name); char* :ref:`test_get_filename_param<doxid-group__te__ts__tapi__test__param_1gade61128b6343d4c49bec0ed39bcc4a4d>`(int argc, char** argv, const char* name); int :ref:`test_get_int_param<doxid-group__te__ts__tapi__test__param_1ga01233e843679ccd48f51c67e98ecfa6c>`(int argc, char** argv, const char* name); unsigned int :ref:`test_get_test_id<doxid-group__te__ts__tapi__test__param_1ga597073da6002a20853c609524e1adfe2>`(int argc, char** argv); unsigned int :ref:`test_get_uint_param<doxid-group__te__ts__tapi__test__param_1gac0048a575436b181629f48adeed5d2d4>`(int argc, char** argv, const char* name); int64_t :ref:`test_get_int64_param<doxid-group__te__ts__tapi__test__param_1ga00c8faef1d49be13340bf43b5dcfa88d>`(int argc, char** argv, const char* name); uint64_t :ref:`test_get_uint64_param<doxid-group__te__ts__tapi__test__param_1ga9c5bea105286b66c7c64e9f5d5279a42>`(int argc, char** argv, const char* name); double :ref:`test_get_double_param<doxid-group__te__ts__tapi__test__param_1ga58c8e5e2ad5f25ee8fb1c55d1eab8499>`(int argc, char** argv, const char* name); char* :ref:`test_get_default_string_param<doxid-group__te__ts__tapi__test__param_1ga650b44f6fa007c0d31d8fc5503741bd2>`(const char* test_name, const char* param_name); uint64_t :ref:`test_get_default_uint64_param<doxid-group__te__ts__tapi__test__param_1ga2b9d844e65ac8d32fd07035f2fca3987>`(const char* test_name, const char* param_name); double :ref:`test_get_default_double_param<doxid-group__te__ts__tapi__test__param_1ga607d056568922d62f47154a187483d93>`(const char* test_name, const char* param_name); double :ref:`test_get_value_unit_param<doxid-group__te__ts__tapi__test__param_1ga7046dc5b9aaf8bf19c429741f24f0758>`(int argc, char** argv, const char* name); uintmax_t :ref:`test_get_value_bin_unit_param<doxid-group__te__ts__tapi__test__param_1ga1e2422f48a57e7fcc5229f1617260e69>`(int argc, char** argv, const char* name); bool :ref:`tapi_test_check_expected_result<doxid-group__te__ts__tapi__test__param_1ga6b8e4bbeb9bcbe082b1128cb183852e1>`(const :ref:`tapi_test_expected_result<doxid-structtapi__test__expected__result>`* expected, :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` rc, const char* output); bool :ref:`tapi_test_check_expected_int_result<doxid-group__te__ts__tapi__test__param_1ga6581850476487c5293f709bf8b951ba3>`(const :ref:`tapi_test_expected_result<doxid-structtapi__test__expected__result>`* expected, :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` rc, intmax_t ival); :ref:`tapi_test_expected_result<doxid-structtapi__test__expected__result>` :ref:`test_get_expected_result_param<doxid-group__te__ts__tapi__test__param_1gac2ec22f3271a0f17faf26b6008d98f52>`(int argc, char** argv, const char* name); const char* :ref:`print_octet_string<doxid-group__te__ts__tapi__test__param_1ga45f930feddc88924a3d1e7d2cc822586>`(const uint8_t* oct_string, size_t len); int :ref:`test_split_param_list<doxid-group__te__ts__tapi__test__param_1ga9851d7ab004dad641fc228d98e0d254b>`(const char* list, char sep, char*** array_p); :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` :ref:`tapi_asn_param_value_parse<doxid-group__te__ts__tapi__test__param_1ga1a33143e0d8cbdda99bf752e1cb041e5>`(char* pwd, char** s, const :ref:`asn_type<doxid-structasn__type>`* type, :ref:`asn_value<doxid-structasn__value>`** parsed_val, int* parsed_syms, char* ns); :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` :ref:`tapi_asn_params_get<doxid-group__te__ts__tapi__test__param_1gaab285bf591ff5a142b99eb94ee87a032>`(int argc, char** argv, const char* conf_prefix, const :ref:`asn_type<doxid-structasn__type>`* conf_type, :ref:`asn_value<doxid-structasn__value>`* conf_value); :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` :ref:`tapi_test_args2kvpairs<doxid-group__te__ts__tapi__test__param_1ga3fbf5a090f63b86627b4138831dc4b5b>`(int argc, char* argv[], te_kvpair_h* args); void :ref:`test_octet_strings2list<doxid-group__te__ts__tapi__test__param_1ga8aa7c7ce9b8ed4f7a1c8bd42c2401195>`(const char* str, unsigned int str_len, uint8_t*** oct_str_list, unsigned int* list_len); // macros #define :ref:`BOOL3_MAPPING_LIST<doxid-group__te__ts__tapi__test__param_1gadf626b085c6b70a151b4a33b0c3e08c3>` #define :ref:`BOOL_MAPPING_LIST<doxid-group__te__ts__tapi__test__param_1ga0716ab016d43a49a6e321b31dbd6460d>` #define :ref:`BUF_SIZE_MAPPING_LIST<doxid-group__te__ts__tapi__test__param_1ga02b7ca7c5b0f34d8f3bc61081b73e85b>` #define :ref:`ETHDEV_STATE_MAPPING_LIST<doxid-group__te__ts__tapi__test__param_1ga9a0a3c352ed1a328a0e35d16c8fa506b>` #define :ref:`FILTER_TYPE_MAPPING_LIST<doxid-group__te__ts__tapi__test__param_1ga7ca8573c21da03ab015e375d945e5a1e>` #define :ref:`TEST_DEFAULT_DOUBLE_PARAM<doxid-group__te__ts__tapi__test__param_1ga4c966e7d9c130a5da7341169bb69136b>`(var_name_) #define :ref:`TEST_DEFAULT_UINT64_PARAM<doxid-group__te__ts__tapi__test__param_1gad01992d9ace03af406613e452954c694>`(var_name_) #define :ref:`TEST_DOUBLE_PARAM<doxid-group__te__ts__tapi__test__param_1ga3b05949ff8f8c1eb7669a735158c6f70>`(var_name_) #define :ref:`TEST_ENUM_PARAM<doxid-group__te__ts__tapi__test__param_1gae31affa7c8894b2134c43da6b4fb59d6>`(var_name_, maps_...) #define :ref:`TEST_EXPECTED_RESULT_PARAM<doxid-group__te__ts__tapi__test__param_1ga64a23c6ae5f791b5c594d9c427b37b71>`(var_name_) #define :ref:`TEST_FILENAME_PARAM<doxid-group__te__ts__tapi__test__param_1ga1999edfcb4db7d736b27f50260ab50e8>`(var_name_) #define :ref:`TEST_GET_BIT_MASK_PARAM<doxid-group__te__ts__tapi__test__param_1ga8ed8dcbdc7eea916d0154815ceabc4fc>`(var_name_, maps_...) #define :ref:`TEST_GET_BOOL3_PARAM<doxid-group__te__ts__tapi__test__param_1ga6591cbfa1fb4b6f29e3a1db20b3bbdae>`(var_name_) #define :ref:`TEST_GET_BOOL_PARAM<doxid-group__te__ts__tapi__test__param_1ga3881eaa71326e2e6ee763ad9b76dbb9d>`(var_name_) #define :ref:`TEST_GET_BUFF_SIZE<doxid-group__te__ts__tapi__test__param_1ga4ea8dadbaddcd936470f432740911332>`(var_name_) #define :ref:`TEST_GET_DEFAULT_DOUBLE_PARAM<doxid-group__te__ts__tapi__test__param_1ga6129a295519773063a43d850f202ea04>`(var_name_) #define :ref:`TEST_GET_DEFAULT_UINT64_PARAM<doxid-group__te__ts__tapi__test__param_1ga448d70593f21723832c7896497c2156e>`(var_name_) #define :ref:`TEST_GET_DOUBLE_PARAM<doxid-group__te__ts__tapi__test__param_1gae80cda63a67e37dbc4ab610a9408b7ed>`(var_name_) #define :ref:`TEST_GET_ENUM_PARAM<doxid-group__te__ts__tapi__test__param_1ga165df4451b2456291410cb5203b7b787>`(var_name_, maps_...) #define :ref:`TEST_GET_ETHDEV_STATE<doxid-group__te__ts__tapi__test__param_1ga6878e70b648893c44106abb256fa3302>`(var_name_) #define :ref:`TEST_GET_EXPECTED_RESULT_PARAM<doxid-group__te__ts__tapi__test__param_1ga43a9b6ccbd1c0283bdf5c881ccae6b50>`(var_name_) #define :ref:`TEST_GET_FILENAME_PARAM<doxid-group__te__ts__tapi__test__param_1ga6a2f77fcb3e9abafa7ed3afbf37c54d8>`(var_name_) #define :ref:`TEST_GET_FILTER_TYPE<doxid-group__te__ts__tapi__test__param_1ga14efd20ace306a622bc31e1368ddf171>`(var_name_) #define :ref:`TEST_GET_INT64_PARAM<doxid-group__te__ts__tapi__test__param_1gac1b946de532bfa453f97eafcef33cde7>`(var_name_) #define :ref:`TEST_GET_INT_LIST_PARAM<doxid-group__te__ts__tapi__test__param_1ga41da78b0997e884a8565765a2b3567c9>`(var_name_, var_len_) #define :ref:`TEST_GET_INT_PARAM<doxid-group__te__ts__tapi__test__param_1ga42ce6e09659e68964858166357d9cda9>`(var_name_) #define :ref:`TEST_GET_IP4_PARAM<doxid-group__te__ts__tapi__test__param_1ga83d7449366dabad09d96743919669524>`(var_name_) #define :ref:`TEST_GET_OCTET_STRING_LIST_PARAM<doxid-group__te__ts__tapi__test__param_1ga8230dd2c7b309f29ba303989a8c8853e>`(var_name_, var_list_len_, var_str_len_) #define :ref:`TEST_GET_OCTET_STRING_PARAM<doxid-group__te__ts__tapi__test__param_1gaec445c18a2c06f56472575cf072d866d>`(var_name_, var_len_) #define :ref:`TEST_GET_OPT_DOUBLE_PARAM<doxid-group__te__ts__tapi__test__param_1gace55883ffed39ffe166e8871759776ce>`(var_name_) #define :ref:`TEST_GET_OPT_STRING_PARAM<doxid-group__te__ts__tapi__test__param_1ga76249711cbbdebfc9f02799fa46861fa>`(var_name_) #define :ref:`TEST_GET_OPT_UINT64_PARAM<doxid-group__te__ts__tapi__test__param_1ga4ed45170e0c3447bc4d696fcd872a7a0>`(var_name_) #define :ref:`TEST_GET_OPT_UINT_PARAM<doxid-group__te__ts__tapi__test__param_1ga82c6d06f99ca1269cb1545d61cee5b11>`(var_name_) #define :ref:`TEST_GET_OPT_VALUE_BIN_UNIT_PARAM<doxid-group__te__ts__tapi__test__param_1ga5057245b0000b9551e6ca9500438f3b6>`(var_name_) #define :ref:`TEST_GET_OPT_VALUE_UNIT_PARAM<doxid-group__te__ts__tapi__test__param_1gad13cc4ec41bc5a0f724ba4be8c4ac9db>`(var_name_) #define :ref:`TEST_GET_STRING_LIST_PARAM<doxid-group__te__ts__tapi__test__param_1ga5554072fbebc45f2735cfa882a7ed338>`(var_name_, var_len_) #define :ref:`TEST_GET_STRING_PARAM<doxid-group__te__ts__tapi__test__param_1gaa1d7b320bc887b35d9c486c0f5c01271>`(var_name_) #define :ref:`TEST_GET_TUNNEL_TYPE<doxid-group__te__ts__tapi__test__param_1ga91ecbfab20b265bcc03b322fe84fd99e>`(var_name_) #define :ref:`TEST_GET_UINT64_PARAM<doxid-group__te__ts__tapi__test__param_1ga9631dface5e3f392cf28da3b0afa727e>`(var_name_) #define :ref:`TEST_GET_UINT_PARAM<doxid-group__te__ts__tapi__test__param_1gab26f8c57dfa1832fc8c044a1aea5eea7>`(_parameter) #define :ref:`TEST_GET_VALUE_BIN_UNIT_PARAM<doxid-group__te__ts__tapi__test__param_1ga5fe0aefecc17a1ecab4624f75bee93ee>`(var_name_) #define :ref:`TEST_GET_VALUE_UNIT_PARAM<doxid-group__te__ts__tapi__test__param_1ga9a85e076baa1fc01500c349656699667>`(var_name_) #define :ref:`TEST_HAS_PARAM<doxid-group__te__ts__tapi__test__param_1ga1e0dc6233de66745350a874910b459fe>`(var_name_) #define :ref:`TEST_INT64_PARAM<doxid-group__te__ts__tapi__test__param_1ga15ce302addb78b29aceac61c5c164470>`(var_name_) #define :ref:`TEST_INT_PARAM<doxid-group__te__ts__tapi__test__param_1ga39bd3b892c5b5a8788a8411fc98b6457>`(var_name_) #define :ref:`TEST_LIST_PARAM_SEPARATOR<doxid-group__te__ts__tapi__test__param_1gaa19fd9fc15ef2984cbe15274b31699d9>` #define :ref:`TEST_OPT_DOUBLE_PARAM<doxid-group__te__ts__tapi__test__param_1ga48f353f10a83e0fc449c4d6f3e83c29c>`(var_name_) #define :ref:`TEST_OPT_STRING_PARAM<doxid-group__te__ts__tapi__test__param_1ga3b83ceefa513e4233b4b5dfd303894a5>`(var_name_) #define :ref:`TEST_OPT_UINT64_PARAM<doxid-group__te__ts__tapi__test__param_1ga858e39fd73151c17829baff86a25d7e6>`(var_name_) #define :ref:`TEST_OPT_UINT_PARAM<doxid-group__te__ts__tapi__test__param_1ga0fb18fa1cf19d68273e6fea50e443eb2>`(var_name_) #define :ref:`TEST_OPT_VALUE_BIN_UNIT_PARAM<doxid-group__te__ts__tapi__test__param_1gab55e6531bd9d361d77bb0bb840040c03>`(var_name_) #define :ref:`TEST_OPT_VALUE_UNIT_PARAM<doxid-group__te__ts__tapi__test__param_1gaa748e3c8e90f531aedc3209efa480715>`(var_name_) #define :ref:`TEST_STRING_PARAM<doxid-group__te__ts__tapi__test__param_1gaef19355ac81ee3f1abae5f78d4220376>`(var_name_) #define :ref:`TEST_UINT64_PARAM<doxid-group__te__ts__tapi__test__param_1ga4a4f0a9951e9898db6b4ba23b941cd45>`(var_name_) #define :ref:`TEST_UINT_PARAM<doxid-group__te__ts__tapi__test__param_1ga5fb150d93f0a20b604d73851b80fc202>`(var_name_) #define :ref:`TEST_VALUE_BIN_UNIT_PARAM<doxid-group__te__ts__tapi__test__param_1ga1fec46ab3ebdb98ee44f72cedd96cf38>`(var_name_) #define :ref:`TEST_VALUE_UNIT_PARAM<doxid-group__te__ts__tapi__test__param_1gabd039f1f44e8d4ac61b047a4c43661ef>`(var_name_) #define :ref:`TUNNEL_TYPE_MAPPING_LIST<doxid-group__te__ts__tapi__test__param_1gadc6b3e5f3e40e3f77e08d1ffa89052c5>` .. _details-group__te__ts__tapi__test__param: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ If you need to pass a parameter to a test scenarion you need to specify that parameter in te_engine_tester configuration file (package description file). Each parameter is associated with symbolic name that should be used as the key while getting parameter value in test scenario context. The main function to process test parameters in test scenario context is :ref:`test_get_param() <doxid-group__te__ts__tapi__test__param_1ga77a71497ad2b8ab7c1e29125938bb85b>`. It gets parameter name as an argument value and returns string value associated with that parameter. Apart from base function :ref:`test_get_param() <doxid-group__te__ts__tapi__test__param_1ga77a71497ad2b8ab7c1e29125938bb85b>` there are a number of macros that process type-specific parameters: * :ref:`TEST_GET_ENUM_PARAM() <doxid-group__te__ts__tapi__test__param_1ga165df4451b2456291410cb5203b7b787>`; * :ref:`TEST_GET_STRING_PARAM() <doxid-group__te__ts__tapi__test__param_1gaa1d7b320bc887b35d9c486c0f5c01271>`; * :ref:`TEST_GET_INT_PARAM() <doxid-group__te__ts__tapi__test__param_1ga42ce6e09659e68964858166357d9cda9>`; * :ref:`TEST_GET_INT64_PARAM() <doxid-group__te__ts__tapi__test__param_1gac1b946de532bfa453f97eafcef33cde7>`; * :ref:`TEST_GET_DOUBLE_PARAM() <doxid-group__te__ts__tapi__test__param_1gae80cda63a67e37dbc4ab610a9408b7ed>`; * :ref:`TEST_GET_OCTET_STRING_PARAM() <doxid-group__te__ts__tapi__test__param_1gaec445c18a2c06f56472575cf072d866d>`; * :ref:`TEST_GET_STRING_LIST_PARAM() <doxid-group__te__ts__tapi__test__param_1ga5554072fbebc45f2735cfa882a7ed338>`; * :ref:`TEST_GET_INT_LIST_PARAM() <doxid-group__te__ts__tapi__test__param_1ga41da78b0997e884a8565765a2b3567c9>`; * :ref:`TEST_GET_BOOL_PARAM() <doxid-group__te__ts__tapi__test__param_1ga3881eaa71326e2e6ee763ad9b76dbb9d>`; * :ref:`TEST_GET_FILENAME_PARAM() <doxid-group__te__ts__tapi__test__param_1ga6a2f77fcb3e9abafa7ed3afbf37c54d8>`; * :ref:`TEST_GET_BUFF_SIZE() <doxid-group__te__ts__tapi__test__param_1ga4ea8dadbaddcd936470f432740911332>`. For example for the following test run (from ``package.xml``): .. ref-code-block:: cpp <run> <script name="comm_sender"/> <arg name="size"> <value>1</value> <value>100</value> </arg> <arg name="oob"> <value>:ref:`TRUE <doxid-te__defs_8h_1aa8cecfc5c5c054d2875c03e77b7be15d>`</value> <value>:ref:`FALSE <doxid-te__defs_8h_1aa93f0eb578d23995850d61f7d61c55c1>`</value> </arg> <arg name="msg"> <value>Test message</value> </arg> </run> we can have the following test scenario: .. ref-code-block:: cpp int main(int argc, char **argv) { int size; bool oob; char *msg; :ref:`TEST_START <doxid-group__te__ts__tapi__test_1ga06549ee78edde8ab8d888b504dc86728>`; :ref:`TEST_GET_INT_PARAM <doxid-group__te__ts__tapi__test__param_1ga42ce6e09659e68964858166357d9cda9>`(size); :ref:`TEST_GET_BOOL_PARAM <doxid-group__te__ts__tapi__test__param_1ga3881eaa71326e2e6ee763ad9b76dbb9d>`(oob); :ref:`TEST_GET_STRING_PARAM <doxid-group__te__ts__tapi__test__param_1gaa1d7b320bc887b35d9c486c0f5c01271>`(msg); ... } Please note that variable name passed to TEST_GET_xxx_PARAM() macro shall be the same as expected parameter name. Test suite can also define parameters of enumeration type. For this kind of parameters you will need to define a macro based on :ref:`TEST_GET_ENUM_PARAM() <doxid-group__te__ts__tapi__test__param_1ga165df4451b2456291410cb5203b7b787>`. For example if you want to specify something like the following in your ``package.xml`` files: .. ref-code-block:: cpp <enum name="ledtype"> <value>POWER</value> <value>USB</value> <value>ETHERNET</value> <value>WIFI</value> </enum> <run> <script name="led_test"/> <arg name="led" type="ledtype"/> </run> You can define something like this in your test suite header file (``test_suite.h``): .. ref-code-block:: cpp enum ts_led { TS_LED_POWER, TS_LED_USB, TS_LED_ETH, TS_LED_WIFI, }; #define LEDTYPE_MAPPING_LIST \ { "POWER", (int)TS_LED_POWER }, \ { "USB", (int)TS_LED_USB }, \ { "ETHERNET", (int)TS_LED_ETH }, \ { "WIFI", (int)TS_LED_WIFI } #define TEST_GET_LED_PARAM(var_name_) \ TEST_GET_ENUM_PARAM(var_name_, LEDTYPE_MAPPING_LIST) Then in your test scenario you can write the following: .. ref-code-block:: cpp int main(int argc, char **argv) { enum ts_led led; :ref:`TEST_START <doxid-group__te__ts__tapi__test_1ga06549ee78edde8ab8d888b504dc86728>`; TEST_GET_LED_PARAM(led); ... switch (led) { case TS_LED_POWER: ... } ... } Typedefs -------- .. index:: pair: typedef; sapi_buf_size .. _doxid-group__te__ts__tapi__test__param_1ga7ab5919a41cf4f970600205fb1000a95: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef enum :ref:`sapi_buf_size<doxid-group__te__ts__tapi__test__param_1gaa22535292f97943c07cc55192923af9a>` sapi_buf_size Abstaract enum to 'buf_size' parameter .. index:: pair: typedef; tapi_test_expected_result .. _doxid-group__te__ts__tapi__test__param_1ga9893dedff5b59d2c21699b1a1076ead2: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_test_expected_result<doxid-structtapi__test__expected__result>` tapi_test_expected_result The description of an expected result. The structure should be considered opaque and only handled by dedicated functions such as :ref:`test_get_expected_result_param() <doxid-group__te__ts__tapi__test__param_1gac2ec22f3271a0f17faf26b6008d98f52>`, :ref:`TEST_EXPECTED_RESULT_PARAM() <doxid-group__te__ts__tapi__test__param_1ga64a23c6ae5f791b5c594d9c427b37b71>`, :ref:`TEST_GET_EXPECTED_RESULT_PARAM() <doxid-group__te__ts__tapi__test__param_1ga43a9b6ccbd1c0283bdf5c881ccae6b50>`, :ref:`tapi_test_check_expected_result() <doxid-group__te__ts__tapi__test__param_1ga6b8e4bbeb9bcbe082b1128cb183852e1>`, :ref:`tapi_test_check_expected_int_result() <doxid-group__te__ts__tapi__test__param_1ga6581850476487c5293f709bf8b951ba3>`. The values of this type may be freely copied, they do not contain any dynamically-allocated resources. Global Variables ---------------- .. index:: pair: variable; te_test_id .. _doxid-group__te__ts__tapi__test__param_1gadf3ddf4d968d1899e2dc5e39ad4506c0: .. ref-code-block:: cpp :class: doxyrest-title-code-block unsigned int te_test_id = :ref:`TE_LOG_ID_UNDEFINED<doxid-te__raw__log_8h_1acde0e56112e7a231123647475d79d4df>` See description in ``tapi_test.h`` Global Functions ---------------- .. index:: pair: function; test_get_opt_string_param .. _doxid-group__te__ts__tapi__test__param_1ga735aa22e39dbcd9683f890a6e1b0f757: .. ref-code-block:: cpp :class: doxyrest-title-code-block const char* test_get_opt_string_param(int argc, char** argv, const char* name) Same as :ref:`test_get_string_param() <doxid-group__te__ts__tapi__test__param_1ga64e6f278e8e6c7bccc9893e10914f941>`, but returns ``NULL`` if the parameter value is blank. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - count of arguments * - argv - list of arguments * - name - name of parameter .. rubric:: Returns: parameter value or ``NULL`` .. index:: pair: function; test_get_opt_uint_param .. _doxid-group__te__ts__tapi__test__param_1ga4aaab829b34a6343d5dd03d7c67d4508: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_optional_uint_t<doxid-structte__optional__uint__t>` test_get_opt_uint_param(int argc, char** argv, const char* name) Same as :ref:`test_get_uint_param() <doxid-group__te__ts__tapi__test__param_1gac0048a575436b181629f48adeed5d2d4>`, but the return type is optional. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - count of arguments * - argv - list of arguments * - name - name of parameter .. rubric:: Returns: an optional unsigned value .. rubric:: See also: :ref:`te_optional_uint_t <doxid-structte__optional__uint__t>` .. index:: pair: function; test_get_opt_uint64_param .. _doxid-group__te__ts__tapi__test__param_1ga9d5e67a1d52c95e8f961e9914a54dbcb: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_optional_uintmax_t<doxid-structte__optional__uintmax__t>` test_get_opt_uint64_param(int argc, char** argv, const char* name) Same as :ref:`test_get_uint64_param() <doxid-group__te__ts__tapi__test__param_1ga9c5bea105286b66c7c64e9f5d5279a42>`, but the return type is optional. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - count of arguments * - argv - list of arguments * - name - name of parameter .. rubric:: Returns: an optional long unsigned value .. rubric:: See also: :ref:`te_optional_uintmax_t <doxid-structte__optional__uintmax__t>` .. index:: pair: function; test_get_opt_double_param .. _doxid-group__te__ts__tapi__test__param_1gad4b30bbbb62461c5c6dda9d55808bda7: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_optional_double_t<doxid-structte__optional__double__t>` test_get_opt_double_param(int argc, char** argv, const char* name) Same as :ref:`test_get_double_param() <doxid-group__te__ts__tapi__test__param_1ga58c8e5e2ad5f25ee8fb1c55d1eab8499>` but the return type is optional. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - count of arguments * - argv - list of arguments * - name - name of parameter .. rubric:: Returns: an optional double value .. rubric:: See also: :ref:`te_optional_double_t <doxid-structte__optional__double__t>` .. index:: pair: function; test_get_opt_value_unit_param .. _doxid-group__te__ts__tapi__test__param_1gae91a819809a79cb06754b2e512c4e132: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_optional_double_t<doxid-structte__optional__double__t>` test_get_opt_value_unit_param(int argc, char** argv, const char* name) Same as :ref:`test_get_value_unit_param() <doxid-group__te__ts__tapi__test__param_1ga7046dc5b9aaf8bf19c429741f24f0758>` but the return type is optional. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - count of arguments * - argv - list of arguments * - name - name of parameter .. rubric:: Returns: an optional double value .. rubric:: See also: :ref:`te_optional_double_t <doxid-structte__optional__double__t>` .. index:: pair: function; test_get_opt_value_bin_unit_param .. _doxid-group__te__ts__tapi__test__param_1ga4ed04a6d780ed08396abda304ff88f82: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_optional_uintmax_t<doxid-structte__optional__uintmax__t>` test_get_opt_value_bin_unit_param(int argc, char** argv, const char* name) Same as :ref:`test_get_value_bin_unit_param() <doxid-group__te__ts__tapi__test__param_1ga1e2422f48a57e7fcc5229f1617260e69>` but the return type is optional. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - count of arguments * - argv - list of arguments * - name - name of parameter .. rubric:: Returns: an optional long unsigned value .. rubric:: See also: :ref:`te_optional_uintmax_t <doxid-structte__optional__uintmax__t>` .. index:: pair: function; te_sigusr2_caught .. _doxid-group__te__ts__tapi__test__param_1ga5f481f3aacab30ef99af6441ac273830: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool te_sigusr2_caught(void) Check whether SIGUSR2 signal has ever been caught c false No signal has been caught c true Signal(-s) has(-ve) been caught. .. index:: pair: function; test_find_param .. _doxid-group__te__ts__tapi__test__param_1gaa413ebdafc7a28dc0cfa1179f339f7ee: .. ref-code-block:: cpp :class: doxyrest-title-code-block const char* test_find_param(int argc, char* argv[], const char* name) Finds a particular parameter in the list of parameters .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - number of parameters * - argv - Array of parameters in form "<param name>=<param value>" * - name - Parameter name whose value we want to obtain * - NULL - if parameter is not in the list of parameters .. rubric:: Returns: Pointer to the parameter .. index:: pair: function; test_get_param .. _doxid-group__te__ts__tapi__test__param_1ga77a71497ad2b8ab7c1e29125938bb85b: .. ref-code-block:: cpp :class: doxyrest-title-code-block const char* test_get_param(int argc, char* argv[], const char* name) Finds value of particular parameter in the list of parameters .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - number of parameters * - argv - Array of parameters in form "<param name>=<param value>" * - name - Parameter name whose value we want to obtain .. rubric:: Returns: Pointer to the value of the parameter .. index:: pair: function; test_map_param_value .. _doxid-group__te__ts__tapi__test__param_1gac8da08a1496d064df1da54e1eeeed841: .. ref-code-block:: cpp :class: doxyrest-title-code-block int test_map_param_value(const char* var_name, const struct :ref:`param_map_entry<doxid-structparam__map__entry>`* maps, const char* str_val, int* num_val) Maps all possible values of some variable from string to numberical representation. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name - Variable name whose value is being converted * - maps - Structure with mappings "str" -> num * - str_val - String value that should be mapped * - num_val - Mapped value (OUT) * - 0 - Mapping is successfully done * - -1 - Mapping fails (in this case the procedure generates ERROR message that describes the problem found during the procedure) .. rubric:: Returns: Status of the operation .. index:: pair: function; test_get_octet_string_param .. _doxid-group__te__ts__tapi__test__param_1ga102c7fca532ab5d105086c08a799c03f: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint8_t* test_get_octet_string_param(const char* str_val, size_t len) Transform string value to octet string value. Octet string returned by this function should be deallocated with free() call. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - str_val - String value (each byte is in hex format and delimeter is ':' character * - len - Expected octet string value length .. rubric:: Returns: Octet string value or NULL int case of failure. .. index:: pair: function; test_get_enum_param .. _doxid-group__te__ts__tapi__test__param_1ga57f609884c8c04669ff42cf5dc56e597: .. ref-code-block:: cpp :class: doxyrest-title-code-block int test_get_enum_param(int argc, char** argv, const char* name, const struct :ref:`param_map_entry<doxid-structparam__map__entry>`* maps) Generic way to return mapped value of a parameter: string -> enum .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - Count of arguments * - argv - List of arguments * - name - Name of parameter * - maps - An array of mappings: string -> enum .. index:: pair: function; test_get_string_param .. _doxid-group__te__ts__tapi__test__param_1ga64e6f278e8e6c7bccc9893e10914f941: .. ref-code-block:: cpp :class: doxyrest-title-code-block const char* test_get_string_param(int argc, char** argv, const char* name) Return parameters of type 'char \*', i.e. not parsed string value of the parameter .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - Count of arguments * - argv - List of arguments * - name - Name of parameter .. index:: pair: function; test_get_filename_param .. _doxid-group__te__ts__tapi__test__param_1gade61128b6343d4c49bec0ed39bcc4a4d: .. ref-code-block:: cpp :class: doxyrest-title-code-block char* test_get_filename_param(int argc, char** argv, const char* name) Return parameters of type ``char *`` with full filename which is the result of test location and file name concatenation. c NULL If relative path is empty .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - Count of arguments * - argv - List of arguments * - name - .. rubric:: Returns: String allocated from heap which should be freed by caller .. rubric:: See also: :ref:`TEST_FILENAME_PARAM <doxid-group__te__ts__tapi__test__param_1ga1999edfcb4db7d736b27f50260ab50e8>`, :ref:`TEST_GET_FILENAME_PARAM <doxid-group__te__ts__tapi__test__param_1ga6a2f77fcb3e9abafa7ed3afbf37c54d8>` .. index:: pair: function; test_get_int_param .. _doxid-group__te__ts__tapi__test__param_1ga01233e843679ccd48f51c67e98ecfa6c: .. ref-code-block:: cpp :class: doxyrest-title-code-block int test_get_int_param(int argc, char** argv, const char* name) Return parameters of type 'int' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - Count of arguments * - argv - List of arguments * - name - Name of parameter .. index:: pair: function; test_get_test_id .. _doxid-group__te__ts__tapi__test__param_1ga597073da6002a20853c609524e1adfe2: .. ref-code-block:: cpp :class: doxyrest-title-code-block unsigned int test_get_test_id(int argc, char** argv) Dedicated function to get te_test_id before any jump points installed (since logging of jump point setup requires te_test_id to associate the log message with the test). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - Count of arguments * - argv - List of arguments .. rubric:: Returns: TE test ID .. index:: pair: function; test_get_uint_param .. _doxid-group__te__ts__tapi__test__param_1gac0048a575436b181629f48adeed5d2d4: .. ref-code-block:: cpp :class: doxyrest-title-code-block unsigned int test_get_uint_param(int argc, char** argv, const char* name) Return parameters of type 'uint' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - Count of arguments * - argv - List of arguments * - name - Name of parameter .. index:: pair: function; test_get_int64_param .. _doxid-group__te__ts__tapi__test__param_1ga00c8faef1d49be13340bf43b5dcfa88d: .. ref-code-block:: cpp :class: doxyrest-title-code-block int64_t test_get_int64_param(int argc, char** argv, const char* name) Return parameters of type 'long long int' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - Count of arguments * - argc - List of arguments * - name - Name of parameter .. index:: pair: function; test_get_uint64_param .. _doxid-group__te__ts__tapi__test__param_1ga9c5bea105286b66c7c64e9f5d5279a42: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint64_t test_get_uint64_param(int argc, char** argv, const char* name) Return parameters of type 'unsigned long long int' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - count of arguments * - argv - list of arguments * - name - parameter name .. rubric:: Returns: the value of a parameter ``name`` .. index:: pair: function; test_get_double_param .. _doxid-group__te__ts__tapi__test__param_1ga58c8e5e2ad5f25ee8fb1c55d1eab8499: .. ref-code-block:: cpp :class: doxyrest-title-code-block double test_get_double_param(int argc, char** argv, const char* name) Return parameters of type 'double' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - Count of arguments * - argv - List of arguments * - name - Name of parameter .. index:: pair: function; test_get_default_string_param .. _doxid-group__te__ts__tapi__test__param_1ga650b44f6fa007c0d31d8fc5503741bd2: .. ref-code-block:: cpp :class: doxyrest-title-code-block char* test_get_default_string_param(const char* test_name, const char* param_name) Get default value of string parameter from local subtree. Function allocates memory with malloc(), which should be freed with free() by the caller. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - test_name - Name of test the parameter belongs. * - param_name - Parameter name. .. rubric:: Returns: Default value of ``param_name``. .. index:: pair: function; test_get_default_uint64_param .. _doxid-group__te__ts__tapi__test__param_1ga2b9d844e65ac8d32fd07035f2fca3987: .. ref-code-block:: cpp :class: doxyrest-title-code-block uint64_t test_get_default_uint64_param(const char* test_name, const char* param_name) Get default value of uint64 parameter from local subtree. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - test_name - Name of test the parameter belongs. * - param_name - Parameter name. .. rubric:: Returns: Default value of ``param_name``. .. index:: pair: function; test_get_default_double_param .. _doxid-group__te__ts__tapi__test__param_1ga607d056568922d62f47154a187483d93: .. ref-code-block:: cpp :class: doxyrest-title-code-block double test_get_default_double_param(const char* test_name, const char* param_name) Get default value of double parameter from local subtree. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - test_name - Name of test the parameter belongs. * - param_name - Parameter name. .. rubric:: Returns: Default value of ``param_name``. .. index:: pair: function; test_get_value_unit_param .. _doxid-group__te__ts__tapi__test__param_1ga7046dc5b9aaf8bf19c429741f24f0758: .. ref-code-block:: cpp :class: doxyrest-title-code-block double test_get_value_unit_param(int argc, char** argv, const char* name) Return parameters of type 'value-unit' ('double') .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - Count of arguments * - argv - List of arguments * - name - Name of parameter .. index:: pair: function; test_get_value_bin_unit_param .. _doxid-group__te__ts__tapi__test__param_1ga1e2422f48a57e7fcc5229f1617260e69: .. ref-code-block:: cpp :class: doxyrest-title-code-block uintmax_t test_get_value_bin_unit_param(int argc, char** argv, const char* name) Return parameters of type 'value-unit' (unsigned). Unlike :ref:`test_get_value_unit_param() <doxid-group__te__ts__tapi__test__param_1ga7046dc5b9aaf8bf19c429741f24f0758>`, the function uses binary base prefixes (i.e. ``1024``, not ``1000``). Bug The function uses doubles internally for unit conversion, and a double cannot hold all range of 64-bit integral values, so very large values (greater than approx. ``4.5e15`` or ``4P``) may be represented imprecisely. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - Count of arguments * - argv - List of arguments * - name - Name of parameter .. index:: pair: function; tapi_test_check_expected_result .. _doxid-group__te__ts__tapi__test__param_1ga6b8e4bbeb9bcbe082b1128cb183852e1: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool tapi_test_check_expected_result(const :ref:`tapi_test_expected_result<doxid-structtapi__test__expected__result>`* expected, :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` rc, const char* output) Check whether the actual result matches the expected one. The function will log details in case of a result mismatch, but it won't automatically fail the test. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - expected - the description of the expected result * - rc - actual status code * - output - actual output .. rubric:: Returns: ``true`` if the actual result matches the expected one. .. index:: pair: function; tapi_test_check_expected_int_result .. _doxid-group__te__ts__tapi__test__param_1ga6581850476487c5293f709bf8b951ba3: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool tapi_test_check_expected_int_result(const :ref:`tapi_test_expected_result<doxid-structtapi__test__expected__result>`* expected, :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` rc, intmax_t ival) Check whether the actual integral result matches the expected one. The expected output in ``expected`` must be a string representing an integral value; otherwise the function will fail the test. If ``expected`` contains ``NULL`` expected output, ``ival`` is not checked at all. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - expected - the description of the expected result * - rc - actual status code * - ival - actual integral result .. rubric:: Returns: ``true`` if the actual result matches the expected one. .. index:: pair: function; test_get_expected_result_param .. _doxid-group__te__ts__tapi__test__param_1gac2ec22f3271a0f17faf26b6008d98f52: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`tapi_test_expected_result<doxid-structtapi__test__expected__result>` test_get_expected_result_param(int argc, char** argv, const char* name) Get a parameter representing some expected result. The value has one of the following two forms: .. ref-code-block:: cpp [[MODULE_CODE "-" ] ERROR_CODE [ ":" EXPECTED_OUTPUT ] [ "OK:" ] EXPECTED_OUTPUT The module code and the error code correspond to names of members of te_module and te_errno_codes without the ``TE_`` prefix. If ``EXPECTED_OUTPUT`` is not provided, it is taken to be ``NULL``. For example: * ``OK:This is the output`` * ``This is the output`` * ``This is the output: it contains colons`` * ``OK:ENOENT:This is the output`` ``ENOENT`` here is part of the output. * ``ENOENT`` the output is expected to be @ NULL * ``TAPI-ENOENT`` * ``TAPI-ENOENT:Expected error message`` Also see ``suites/selftest/ts/minimal/parameters.c`` fore more examples. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - number of arguments * - argv - list of arguments * - name - name of the parameter .. rubric:: Returns: the expected result description .. index:: pair: function; print_octet_string .. _doxid-group__te__ts__tapi__test__param_1ga45f930feddc88924a3d1e7d2cc822586: .. ref-code-block:: cpp :class: doxyrest-title-code-block const char* print_octet_string(const uint8_t* oct_string, size_t len) Print octet string. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - oct_string - Octet string * - len - Octet string lentgh .. rubric:: Returns: Buffer with string representation of octet string .. index:: pair: function; test_split_param_list .. _doxid-group__te__ts__tapi__test__param_1ga9851d7ab004dad641fc228d98e0d254b: .. ref-code-block:: cpp :class: doxyrest-title-code-block int test_split_param_list(const char* list, char sep, char*** array_p) Split parameter string into array of string, using specified separator. This function creates a duplicate parameter string to avoid changing the real parameter. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - list - String to parse * - sep - Separator to split string * - array_p - Array to return .. rubric:: Returns: Length of the list or 0 on error .. index:: pair: function; tapi_asn_param_value_parse .. _doxid-group__te__ts__tapi__test__param_1ga1a33143e0d8cbdda99bf752e1cb041e5: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` tapi_asn_param_value_parse(char* pwd, char** s, const :ref:`asn_type<doxid-structasn__type>`* type, :ref:`asn_value<doxid-structasn__value>`** parsed_val, int* parsed_syms, char* ns) Function parses value and converts it to ASN value. It also handles cfg links. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ns - Preallocated buffer for updated value .. index:: pair: function; tapi_asn_params_get .. _doxid-group__te__ts__tapi__test__param_1gaab285bf591ff5a142b99eb94ee87a032: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` tapi_asn_params_get(int argc, char** argv, const char* conf_prefix, const :ref:`asn_type<doxid-structasn__type>`* conf_type, :ref:`asn_value<doxid-structasn__value>`* conf_value) Parse test ASN parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - Amount of test parameters * - argv - Test parameters array * - conf_prefix - Test ASN parameters prefix * - conf_type - Test ASN parameters aggregation type * - conf_value - Resulted ASN parameters aggregation value .. rubric:: Returns: 0 if success, or corresponding error otherwise .. index:: pair: function; tapi_test_args2kvpairs .. _doxid-group__te__ts__tapi__test__param_1ga3fbf5a090f63b86627b4138831dc4b5b: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno<doxid-te__errno_8h_1ac9fc14f28b70f4785037c1df70ebc2a5>` tapi_test_args2kvpairs(int argc, char* argv[], te_kvpair_h* args) Add test arguments to the list of test parameters .. index:: pair: function; test_octet_strings2list .. _doxid-group__te__ts__tapi__test__param_1ga8aa7c7ce9b8ed4f7a1c8bd42c2401195: .. ref-code-block:: cpp :class: doxyrest-title-code-block void test_octet_strings2list(const char* str, unsigned int str_len, uint8_t*** oct_str_list, unsigned int* list_len) Convert the string with several octet strings separated by commas to array of octet strings .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - str - String with octet strings * - str_len - Octet string lentgh * - oct_str_list - Array with octet strings (OUT) * - list_len - Length of the array (OUT) Macros ------ .. index:: pair: define; BOOL3_MAPPING_LIST .. _doxid-group__te__ts__tapi__test__param_1gadf626b085c6b70a151b4a33b0c3e08c3: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define BOOL3_MAPPING_LIST The list of values allowed for parameter of type 'te_bool3' .. index:: pair: define; BOOL_MAPPING_LIST .. _doxid-group__te__ts__tapi__test__param_1ga0716ab016d43a49a6e321b31dbd6460d: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define BOOL_MAPPING_LIST The list of values allowed for parameter of type ``bool`` .. index:: pair: define; BUF_SIZE_MAPPING_LIST .. _doxid-group__te__ts__tapi__test__param_1ga02b7ca7c5b0f34d8f3bc61081b73e85b: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define BUF_SIZE_MAPPING_LIST The list of values allowed for parameter of type 'sapi_buf_size' .. index:: pair: define; ETHDEV_STATE_MAPPING_LIST .. _doxid-group__te__ts__tapi__test__param_1ga9a0a3c352ed1a328a0e35d16c8fa506b: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define ETHDEV_STATE_MAPPING_LIST The list of values allowed for parameter of type 'test_ethdev_state' .. index:: pair: define; FILTER_TYPE_MAPPING_LIST .. _doxid-group__te__ts__tapi__test__param_1ga7ca8573c21da03ab015e375d945e5a1e: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define FILTER_TYPE_MAPPING_LIST The list of values allowed for parameter of type 'tarpc_rte_filter_type' .. index:: pair: define; TEST_DEFAULT_DOUBLE_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga4c966e7d9c130a5da7341169bb69136b: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_DEFAULT_DOUBLE_PARAM(var_name_) The macro to return default value of 'double' parameter from local subtree. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value. .. rubric:: Returns: double value. .. index:: pair: define; TEST_DEFAULT_UINT64_PARAM .. _doxid-group__te__ts__tapi__test__param_1gad01992d9ace03af406613e452954c694: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_DEFAULT_UINT64_PARAM(var_name_) The macro to return default value of 'uint64' parameter from local subtree. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value. .. rubric:: Returns: uint64 value. .. index:: pair: define; TEST_DOUBLE_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga3b05949ff8f8c1eb7669a735158c6f70: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_DOUBLE_PARAM(var_name_) The macro to return parameters of type 'double' ('float' also may be used) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. rubric:: Returns: double value .. index:: pair: define; TEST_ENUM_PARAM .. _doxid-group__te__ts__tapi__test__param_1gae31affa7c8894b2134c43da6b4fb59d6: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_ENUM_PARAM(var_name_, maps_...) Generic way to return mapped value of a parameter: string -> enum .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value * - maps\_ - An array of mappings: string -> enum .. rubric:: Returns: mapped value .. index:: pair: define; TEST_EXPECTED_RESULT_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga64a23c6ae5f791b5c594d9c427b37b71: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_EXPECTED_RESULT_PARAM(var_name_) The macro to get a parameter representing some expected result. See :ref:`test_get_expected_result_param() <doxid-group__te__ts__tapi__test__param_1gac2ec22f3271a0f17faf26b6008d98f52>` for the parameter value syntax. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. rubric:: Returns: :ref:`tapi_test_expected_result <doxid-structtapi__test__expected__result>` value .. index:: pair: define; TEST_FILENAME_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga1999edfcb4db7d736b27f50260ab50e8: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_FILENAME_PARAM(var_name_) The macro to return parameters of type ``char *`` with a full filename which is the result of test location and file name concatenation. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value * - NULL - If relative path is empty .. rubric:: Returns: full filename allocated from heap and should be freed by caller .. index:: pair: define; TEST_GET_BIT_MASK_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga8ed8dcbdc7eea916d0154815ceabc4fc: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_BIT_MASK_PARAM(var_name_, maps_...) The macro to get parameter of bit mask type. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value * - maps\_ - An array of mappings: string -> enum of each entry of a bitmask .. index:: pair: define; TEST_GET_BOOL3_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga6591cbfa1fb4b6f29e3a1db20b3bbdae: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_BOOL3_PARAM(var_name_) Get the value of parameter of type 'te_bool3' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Name of the variable used to get the value of "var_name\_" parameter of type 'te_bool3' (OUT) .. index:: pair: define; TEST_GET_BOOL_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga3881eaa71326e2e6ee763ad9b76dbb9d: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_BOOL_PARAM(var_name_) Get the value of parameter of type ``bool`` .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Name of the variable used to get the value of "var_name\_" parameter of type ``bool`` (OUT) .. index:: pair: define; TEST_GET_BUFF_SIZE .. _doxid-group__te__ts__tapi__test__param_1ga4ea8dadbaddcd936470f432740911332: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_BUFF_SIZE(var_name_) Get the value of parameter of type 'sapi_buf_size' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Name of the variable used to get the value of "var_name\_" parameter of type 'sapi_buf_size' (OUT) .. index:: pair: define; TEST_GET_DEFAULT_DOUBLE_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga6129a295519773063a43d850f202ea04: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_DEFAULT_DOUBLE_PARAM(var_name_) The macro to get default value of 'double' parameter from local subtree. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value. .. index:: pair: define; TEST_GET_DEFAULT_UINT64_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga448d70593f21723832c7896497c2156e: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_DEFAULT_UINT64_PARAM(var_name_) The macro to get default value of 'uint64' parameter from local subtree. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value. .. index:: pair: define; TEST_GET_DOUBLE_PARAM .. _doxid-group__te__ts__tapi__test__param_1gae80cda63a67e37dbc4ab610a9408b7ed: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_DOUBLE_PARAM(var_name_) The macro to get parameters of type 'double' ('float' also may be used) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. index:: pair: define; TEST_GET_ENUM_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga165df4451b2456291410cb5203b7b787: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_ENUM_PARAM(var_name_, maps_...) Generic way to get mapped value of a parameter: string -> enum .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value * - maps\_ - An array of mappings: string -> enum .. index:: pair: define; TEST_GET_ETHDEV_STATE .. _doxid-group__te__ts__tapi__test__param_1ga6878e70b648893c44106abb256fa3302: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_ETHDEV_STATE(var_name_) Get the value of parameter of type 'test_ethdev_state' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Name of the variable used to get the value of "var_name\_" parameter of type 'test_ethdev_state' (OUT) .. index:: pair: define; TEST_GET_EXPECTED_RESULT_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga43a9b6ccbd1c0283bdf5c881ccae6b50: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_EXPECTED_RESULT_PARAM(var_name_) The macro to assign a parameter representing some expected result. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. index:: pair: define; TEST_GET_FILENAME_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga6a2f77fcb3e9abafa7ed3afbf37c54d8: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_FILENAME_PARAM(var_name_) The macro to get parameters of type ``char *`` with a full filename and assign it to the variable with corresponding name. Full filename is a concatation of the running test location and relative path specified in an argument with matching name. ``NULL`` is assigned if relative path is empty. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. index:: pair: define; TEST_GET_FILTER_TYPE .. _doxid-group__te__ts__tapi__test__param_1ga14efd20ace306a622bc31e1368ddf171: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_FILTER_TYPE(var_name_) Get the value of parameter of type 'tarpc_rte_filter_type' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Name of the variable used to get the value of "var_name\_" parameter of type 'tarpc_rte_filter_type' (OUT) .. index:: pair: define; TEST_GET_INT64_PARAM .. _doxid-group__te__ts__tapi__test__param_1gac1b946de532bfa453f97eafcef33cde7: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_INT64_PARAM(var_name_) The macro to get parameters of type 'int64' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. index:: pair: define; TEST_GET_INT_LIST_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga41da78b0997e884a8565765a2b3567c9: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_INT_LIST_PARAM(var_name_, var_len_) The macro to get parameter of type 'int []', i.e. array of numbers .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. index:: pair: define; TEST_GET_INT_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga42ce6e09659e68964858166357d9cda9: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_INT_PARAM(var_name_) The macro to get parameters of type 'int' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. index:: pair: define; TEST_GET_IP4_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga83d7449366dabad09d96743919669524: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_IP4_PARAM(var_name_) Get the value of parameter that represents IPv4 address. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Name of the variable used to get the value of "var_name\_" parameter of type 'in_addr_t' (OUT) .. index:: pair: define; TEST_GET_OCTET_STRING_LIST_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga8230dd2c7b309f29ba303989a8c8853e: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_OCTET_STRING_LIST_PARAM(var_name_, var_list_len_, var_str_len_) The macro to get parameter of type 'octet string[]', i.e. array of octet strings .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value * - var_str_len\_ - Octet string lentgh * - var_list_len\_ - Variable for length of the list .. index:: pair: define; TEST_GET_OCTET_STRING_PARAM .. _doxid-group__te__ts__tapi__test__param_1gaec445c18a2c06f56472575cf072d866d: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_OCTET_STRING_PARAM(var_name_, var_len_) The macro to get parameter of type 'octet string' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value * - var_len\_ - TODO .. index:: pair: define; TEST_GET_OPT_DOUBLE_PARAM .. _doxid-group__te__ts__tapi__test__param_1gace55883ffed39ffe166e8871759776ce: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_OPT_DOUBLE_PARAM(var_name_) Same as :ref:`TEST_GET_DOUBLE_PARAM() <doxid-group__te__ts__tapi__test__param_1gae80cda63a67e37dbc4ab610a9408b7ed>` but for optional parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. index:: pair: define; TEST_GET_OPT_STRING_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga76249711cbbdebfc9f02799fa46861fa: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_OPT_STRING_PARAM(var_name_) Same as :ref:`TEST_GET_STRING_PARAM() <doxid-group__te__ts__tapi__test__param_1gaa1d7b320bc887b35d9c486c0f5c01271>` but for optional parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. index:: pair: define; TEST_GET_OPT_UINT64_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga4ed45170e0c3447bc4d696fcd872a7a0: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_OPT_UINT64_PARAM(var_name_) Same as :ref:`TEST_GET_UINT64_PARAM() <doxid-group__te__ts__tapi__test__param_1ga9631dface5e3f392cf28da3b0afa727e>` but for optional parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. index:: pair: define; TEST_GET_OPT_UINT_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga82c6d06f99ca1269cb1545d61cee5b11: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_OPT_UINT_PARAM(var_name_) Same as :ref:`TEST_GET_UINT_PARAM() <doxid-group__te__ts__tapi__test__param_1gab26f8c57dfa1832fc8c044a1aea5eea7>` but for optional parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. index:: pair: define; TEST_GET_OPT_VALUE_BIN_UNIT_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga5057245b0000b9551e6ca9500438f3b6: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_OPT_VALUE_BIN_UNIT_PARAM(var_name_) Same as :ref:`TEST_GET_VALUE_BIN_UNIT_PARAM() <doxid-group__te__ts__tapi__test__param_1ga5fe0aefecc17a1ecab4624f75bee93ee>` but for optional parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. index:: pair: define; TEST_GET_OPT_VALUE_UNIT_PARAM .. _doxid-group__te__ts__tapi__test__param_1gad13cc4ec41bc5a0f724ba4be8c4ac9db: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_OPT_VALUE_UNIT_PARAM(var_name_) Same as :ref:`TEST_GET_VALUE_UNIT_PARAM() <doxid-group__te__ts__tapi__test__param_1ga9a85e076baa1fc01500c349656699667>` but for optional parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. index:: pair: define; TEST_GET_STRING_LIST_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga5554072fbebc45f2735cfa882a7ed338: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_STRING_LIST_PARAM(var_name_, var_len_) The macro to get parameter of type 'char \*[]', i.e. array of string values .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. index:: pair: define; TEST_GET_STRING_PARAM .. _doxid-group__te__ts__tapi__test__param_1gaa1d7b320bc887b35d9c486c0f5c01271: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_STRING_PARAM(var_name_) The macro to get parameters of type 'char \*', i.e. not parsed string value of the parameter .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. index:: pair: define; TEST_GET_TUNNEL_TYPE .. _doxid-group__te__ts__tapi__test__param_1ga91ecbfab20b265bcc03b322fe84fd99e: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_TUNNEL_TYPE(var_name_) Get parameter value of 'tarpc_rte_eth_tunnel_type' type .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable name used to get "var_name\_" parameter value of 'tarpc_rte_eth_tunnel_type' type (OUT) .. index:: pair: define; TEST_GET_UINT64_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga9631dface5e3f392cf28da3b0afa727e: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_UINT64_PARAM(var_name_) The macro to get parameters of type 'uint64' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. index:: pair: define; TEST_GET_UINT_PARAM .. _doxid-group__te__ts__tapi__test__param_1gab26f8c57dfa1832fc8c044a1aea5eea7: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_UINT_PARAM(_parameter) Obtain the value of an 'unsigned int' parameter .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - _parameter - The name to denote both the target 'unsigned int' variable and the parameter of interest .. index:: pair: define; TEST_GET_VALUE_BIN_UNIT_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga5fe0aefecc17a1ecab4624f75bee93ee: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_VALUE_BIN_UNIT_PARAM(var_name_) The macro to get binary-scaled parameters (unsigned with unit prefix). Unlike :ref:`TEST_GET_VALUE_UNIT_PARAM() <doxid-group__te__ts__tapi__test__param_1ga9a85e076baa1fc01500c349656699667>`, the macro uses binary prefixes (i.e. 1024, not 1000). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. index:: pair: define; TEST_GET_VALUE_UNIT_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga9a85e076baa1fc01500c349656699667: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_GET_VALUE_UNIT_PARAM(var_name_) The macro to get parameters of type 'value-unit' (double with unit prefix) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. index:: pair: define; TEST_HAS_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga1e0dc6233de66745350a874910b459fe: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_HAS_PARAM(var_name_) Check if the parameter identified by the given name is available .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Parameter name for check .. rubric:: Returns: result of check .. index:: pair: define; TEST_INT64_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga15ce302addb78b29aceac61c5c164470: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_INT64_PARAM(var_name_) The macro to return parameters of type 'int64' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. rubric:: Returns: int64 value .. index:: pair: define; TEST_INT_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga39bd3b892c5b5a8788a8411fc98b6457: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_INT_PARAM(var_name_) The macro to return parameters of type 'int' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. rubric:: Returns: int value .. index:: pair: define; TEST_LIST_PARAM_SEPARATOR .. _doxid-group__te__ts__tapi__test__param_1gaa19fd9fc15ef2984cbe15274b31699d9: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_LIST_PARAM_SEPARATOR Default separator for argument list .. index:: pair: define; TEST_OPT_DOUBLE_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga48f353f10a83e0fc449c4d6f3e83c29c: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_OPT_DOUBLE_PARAM(var_name_) Same as :ref:`TEST_DOUBLE_PARAM() <doxid-group__te__ts__tapi__test__param_1ga3b05949ff8f8c1eb7669a735158c6f70>` but for optional parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. rubric:: Returns: optional double value .. index:: pair: define; TEST_OPT_STRING_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga3b83ceefa513e4233b4b5dfd303894a5: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_OPT_STRING_PARAM(var_name_) Same as :ref:`TEST_STRING_PARAM() <doxid-group__te__ts__tapi__test__param_1gaef19355ac81ee3f1abae5f78d4220376>` but for optional parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. rubric:: Returns: string value (``NULL`` if "missing") .. index:: pair: define; TEST_OPT_UINT64_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga858e39fd73151c17829baff86a25d7e6: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_OPT_UINT64_PARAM(var_name_) Same as :ref:`TEST_UINT64_PARAM() <doxid-group__te__ts__tapi__test__param_1ga4a4f0a9951e9898db6b4ba23b941cd45>` but for optional parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. rubric:: Returns: optional long unsigned value .. index:: pair: define; TEST_OPT_UINT_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga0fb18fa1cf19d68273e6fea50e443eb2: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_OPT_UINT_PARAM(var_name_) Same as :ref:`TEST_UINT_PARAM() <doxid-group__te__ts__tapi__test__param_1ga5fb150d93f0a20b604d73851b80fc202>` but for optional parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. rubric:: Returns: optional unsigned value .. index:: pair: define; TEST_OPT_VALUE_BIN_UNIT_PARAM .. _doxid-group__te__ts__tapi__test__param_1gab55e6531bd9d361d77bb0bb840040c03: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_OPT_VALUE_BIN_UNIT_PARAM(var_name_) Same as :ref:`TEST_VALUE_BIN_UNIT_PARAM() <doxid-group__te__ts__tapi__test__param_1ga1fec46ab3ebdb98ee44f72cedd96cf38>` but for optional parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. rubric:: Returns: optional long unsigned value .. index:: pair: define; TEST_OPT_VALUE_UNIT_PARAM .. _doxid-group__te__ts__tapi__test__param_1gaa748e3c8e90f531aedc3209efa480715: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_OPT_VALUE_UNIT_PARAM(var_name_) Same as :ref:`TEST_VALUE_UNIT_PARAM() <doxid-group__te__ts__tapi__test__param_1gabd039f1f44e8d4ac61b047a4c43661ef>` but for optional parameters. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. rubric:: Returns: optional double value .. index:: pair: define; TEST_STRING_PARAM .. _doxid-group__te__ts__tapi__test__param_1gaef19355ac81ee3f1abae5f78d4220376: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_STRING_PARAM(var_name_) The macro to return parameters of type 'char \*', i.e. not parsed string value of the parameter .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. rubric:: Returns: string value .. index:: pair: define; TEST_UINT64_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga4a4f0a9951e9898db6b4ba23b941cd45: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_UINT64_PARAM(var_name_) The macro to return parameters of type 'uint64' .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. rubric:: Returns: uint64 value .. index:: pair: define; TEST_UINT_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga5fb150d93f0a20b604d73851b80fc202: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_UINT_PARAM(var_name_) Obtain the value of an 'unsigned int' parameter .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - The name to denote both the target 'unsigned int' variable and the parameter of interest .. rubric:: Returns: unsigned int parameter .. index:: pair: define; TEST_VALUE_BIN_UNIT_PARAM .. _doxid-group__te__ts__tapi__test__param_1ga1fec46ab3ebdb98ee44f72cedd96cf38: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_VALUE_BIN_UNIT_PARAM(var_name_) The macro to get binary-scaled parameters (unsigned with unit prefix). Unlike :ref:`TEST_VALUE_UNIT_PARAM() <doxid-group__te__ts__tapi__test__param_1gabd039f1f44e8d4ac61b047a4c43661ef>`, the macro uses binary prefixes (i.e. 1024, not 1000). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - variable with the same name as the name of the desired parameter .. rubric:: Returns: unsigned value .. index:: pair: define; TEST_VALUE_UNIT_PARAM .. _doxid-group__te__ts__tapi__test__param_1gabd039f1f44e8d4ac61b047a4c43661ef: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TEST_VALUE_UNIT_PARAM(var_name_) The macro to get parameters of type 'value-unit' (double with unit prefix) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - var_name\_ - Variable whose name is the same as the name of parameter we get the value .. rubric:: Returns: double value .. index:: pair: define; TUNNEL_TYPE_MAPPING_LIST .. _doxid-group__te__ts__tapi__test__param_1gadc6b3e5f3e40e3f77e08d1ffa89052c5: .. ref-code-block:: cpp :class: doxyrest-title-code-block #define TUNNEL_TYPE_MAPPING_LIST List of values allowed for parameter of 'tarpc_rte_eth_tunnel_type' type