1%% 2%% %CopyrightBegin% 3%% 4%% Copyright Ericsson AB 1997-2016. All Rights Reserved. 5%% 6%% Licensed under the Apache License, Version 2.0 (the "License"); 7%% you may not use this file except in compliance with the License. 8%% You may obtain a copy of the License at 9%% 10%% http://www.apache.org/licenses/LICENSE-2.0 11%% 12%% Unless required by applicable law or agreed to in writing, software 13%% distributed under the License is distributed on an "AS IS" BASIS, 14%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15%% See the License for the specific language governing permissions and 16%% limitations under the License. 17%% 18%% %CopyrightEnd% 19%% 20 21-module(test1). 22 23-compile(export_all). 24 25bits1(get) -> 26 {value, [b0, b2]}. 27bits1(set, _) -> 28 noError. 29 30bits2(get) -> 31 {value, 2#11000000110}. 32bits2(set, _) -> 33 noError. 34 35bits3(get) -> 36 {value, [b0, b4]}. % error! 37 38bits4(get) -> 39 {value, 2#1000}. % error! 40 41opaque_obj(get) -> 42 {value, "opaque-data"}. 43 44cnt64(get) -> 45 {value, 18446744073709551615}. 46 47multiStr(get) -> 48 i("multiStr(get) -> entry"), 49 global:re_register_name(snmp_multi_tester, self()), 50 i("multiStr(get) -> registered, now await continue"), 51 receive 52 continue -> 53 i("multiStr(get) -> received continue"), 54 ok 55 end, 56 {value, "ok"}. 57 58multiStr(set, "block") -> 59 global:re_register_name(snmp_multi_tester, self()), 60 receive 61 continue -> ok 62 end, 63 noError; 64multiStr(set, _Value) -> 65 noError. 66 67 68i(F) -> 69 i(F, []). 70 71i(F, A) -> 72 io:format("~p ~w:" ++ F ++ "~n", [self(), ?MODULE | A]). 73 74