Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:26
erlang
2867-snmp-Types-and-specs-for-snmp_index-get_ne...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2867-snmp-Types-and-specs-for-snmp_index-get_next-2.patch of Package erlang
From d63abfc9d3ed3df7f374164d758030277f73c651 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Mon, 15 Jan 2024 14:54:50 +0100 Subject: [PATCH 47/67] [snmp] Types and specs for snmp_index:get_next/2 --- lib/snmp/doc/src/snmp_index.xml | 8 ++------ lib/snmp/src/agent/snmp_index.erl | 6 ++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/snmp/doc/src/snmp_index.xml b/lib/snmp/doc/src/snmp_index.xml index 94f6a15e8c..7dce842ba4 100644 --- a/lib/snmp/doc/src/snmp_index.xml +++ b/lib/snmp/doc/src/snmp_index.xml @@ -271,19 +271,15 @@ get_next_pid(Oid, SnmpIndex) -> </func> <func> - <name since="">get_next(Index, KeyOid) -> {ok, {NextKeyOid, Value}} | undefined</name> + <name name="get_next" arity="2" clause_i="1" since=""/> <fsummary>Get the next item</fsummary> - <type> - <v>Index = index()</v> - <v>KeyOid = NextKeyOid = oid()</v> - <v>Value = term()</v> - </type> <desc> <p>Gets the next item in the SNMP lexicographic ordering, after <c>KeyOid</c> in the index structure. <c>KeyOid</c> does not have to refer to an existing item in the index.</p> </desc> </func> + <func> <name since="">insert(Index, Key, Value) -> NewIndex</name> <fsummary>Insert an item into the index</fsummary> diff --git a/lib/snmp/src/agent/snmp_index.erl b/lib/snmp/src/agent/snmp_index.erl index c6a309813d..d04fa9cded 100644 --- a/lib/snmp/src/agent/snmp_index.erl +++ b/lib/snmp/src/agent/snmp_index.erl @@ -130,6 +130,12 @@ get_last(#tab{id = OrdSet} = Index) -> end. +-spec get_next(Index, KeyOid) -> {ok, {NextKeyOid, Value}} | undefined when + Index :: index(), + KeyOid :: snmp:oid(), + NextKeyOid :: snmp:oid(), + Value :: term(). + get_next(#tab{id = OrdSet} = Tab, KeyOid) -> ?vlog("get_next -> entry with" "~n Tab: ~p" -- 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