Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
2044-megaco-Types-and-spec-for-megaco-test_requ...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2044-megaco-Types-and-spec-for-megaco-test_requests-5.patch of Package erlang
From a1d79885c84cfd573ab82bb7e92e37e23f6818f1 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Fri, 5 Jan 2024 16:07:19 +0100 Subject: [PATCH 34/46] [megaco] Types and spec for megaco:test_requests/5 OTP-18920 --- lib/megaco/doc/src/megaco.xml | 35 ++++++++++++++--------------------- lib/megaco/src/app/megaco.erl | 13 +++++++++++++ 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/lib/megaco/doc/src/megaco.xml b/lib/megaco/doc/src/megaco.xml index 3fdcf05e48..184057418b 100644 --- a/lib/megaco/doc/src/megaco.xml +++ b/lib/megaco/doc/src/megaco.xml @@ -3118,6 +3118,7 @@ megaco_incr_timer() = #megaco_incr_timer{} <p>Retreive a (SNMP) statistic counter maintained by the megaco application.</p> <marker id="reset_stats"></marker> + <marker id="reset_stats_0"></marker> </desc> </func> @@ -3126,7 +3127,7 @@ megaco_incr_timer() = #megaco_incr_timer{} <fsummary></fsummary> <desc> <p>Reset all (SNMP) statistics counters.</p> - <marker id="test_request"></marker> + <marker id="reset_stats_1_1"></marker> </desc> </func> @@ -3135,7 +3136,7 @@ megaco_incr_timer() = #megaco_incr_timer{} <fsummary></fsummary> <desc> <p>Reset the specified (SNMP) statistics counter.</p> - <marker id="test_request"></marker> + <marker id="reset_stats_1_2"></marker> </desc> </func> @@ -3149,29 +3150,21 @@ megaco_incr_timer() = #megaco_incr_timer{} </func> <func> - <name since="">test_request(ConnHandle, Version, EncodingMod, EncodingConfig, Actions) -> {MegaMsg, EncodeRes}</name> + <name name="test_request" arity="5" clause_i="1" since=""/> <fsummary>Tests if the Actions argument is correct</fsummary> - <type> - <v>ConnHandle = conn_handle()</v> - <v>Version = integer()</v> - <v>EncodingMod = atom()</v> - <v>EncodingConfig = Encoding configuration</v> - <v>Actions = A list</v> - <v>MegaMsg = #'MegacoMessage'{}</v> - <v>EncodeRes = {ok, Bin} | {error, Reason}</v> - <v>Bin = binary()</v> - <v>Reason = term()</v> - </type> <desc> <p>Tests if the Actions argument is correctly composed.</p> <p>This function is only intended for testing purposes. It's - supposed to have a same kind of interface as the <seeerl marker="#call">call</seeerl> or <seeerl marker="#cast">cast</seeerl> functions (with the additions - of the <c><![CDATA[EncodingMod]]></c> and <c><![CDATA[EncodingConfig]]></c> - arguments). It composes a complete megaco message end - attempts to encode it. The return value, will be a tuple of - the composed megaco message and the encode result. </p> - - <marker id="test_reply"></marker> + supposed to have a same kind of interface as the + <seeerl marker="#call">call</seeerl> or + <seeerl marker="#cast">cast</seeerl> functions (with the additions + of the + <c><![CDATA[EncodingMod]]></c> and <c><![CDATA[EncodingConfig]]></c> + arguments). It composes a complete megaco message end + attempts to encode it. The return value, will be a tuple of + the composed megaco message and the encode result. </p> + + <marker id="test_reply"></marker> </desc> </func> diff --git a/lib/megaco/src/app/megaco.erl b/lib/megaco/src/app/megaco.erl index 93806dc8f6..f6ab5bcf43 100644 --- a/lib/megaco/src/app/megaco.erl +++ b/lib/megaco/src/app/megaco.erl @@ -601,6 +601,19 @@ cast(ConnHandle, ActionRequests, Options) -> %% Test the validity of the actions %%----------------------------------------------------------------- +-spec test_request(ConnHandle, Version, + EncodingMod, EncodingConfig, + ActionRequests) -> {MegaMsg, EncodeRes} when + ConnHandle :: conn_handle(), + Version :: protocol_version(), + EncodingMod :: module(), + EncodingConfig :: list(), + ActionRequests :: action_reqs() | [action_reqs()], + MegaMsg :: megaco_message(), + EncodeRes :: {ok, Bin} | {error, Reason}, + Bin :: binary(), + Reason :: term(). + test_request(ConnHandle, Version, EncodingMod, EncodingConfig, ActionRequests) -> megaco_messenger:test_request(ConnHandle, ActionRequests, -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor