pax_global_header00006660000000000000000000000064136155213100014507gustar00rootroot0000000000000052 comment=3eb9a75c1e66e6182e87e2bd758ff2a4d16acbdc nanopb-0.4.1/000077500000000000000000000000001361552131000127665ustar00rootroot00000000000000nanopb-0.4.1/.gitignore000066400000000000000000000010011361552131000147460ustar00rootroot00000000000000*.gcda *.gcno *.gcov *.o *.pb.c *.pb.h *.pb *.pyc *_pb2.py *~ *.tar.gz .sconsign.dblite config.log .sconf_temp tests/build julkaisu.txt dist docs/*.html docs/generator_flow.png examples/simple/simple examples/network_server/client examples/network_server/server examples/using_double_on_avr/decode_double examples/using_double_on_avr/encode_double examples/using_double_on_avr/test_conversions examples/using_union_messages/decode examples/using_union_messages/encode generator/nanopb_pb2.pyc !generator-bin/**/* nanopb-0.4.1/.travis.yml000066400000000000000000000033071361552131000151020ustar00rootroot00000000000000# Travis CI has no ability to handle 3 langauges (c, c++, python) # and it overrides $CC/$CXX if language is set to c/c++ (only one, not both). # # Set language to python since at least the result of that is something useful. language: python python: - "2.7" - "3.4" # Manage the C/C++ compiler manually env: - CC=gcc CXX=g++ - CC=gcc-4.8 CXX=g++-4.8 - CC=gcc-4.9 CXX=g++-4.9 - CC=gcc-5 CXX=g++-5 - CC=clang CXX=clang++ addons: apt: sources: - ubuntu-toolchain-r-test packages: - gcc-4.8 - g++-4.8 - gcc-4.9 - g++-4.9 - gcc-5 - g++-5 - scons before_install: - export PATH=$HOME/.local/bin:$HOME/protobuf/bin:$PATH - export MAKEFLAGS=-j$(nproc) - $CC --version - $CXX --version - python --version - lsb_release -a # Seems to be issues with concurrent builds #cache: # directories: # - $HOME/protobuf # Rather then compile protobuf 3 from source, use the binaries now available # to speed up build time and reduce surprises until Ubuntu adds protobuf3 # packages to the repository. install: - mkdir -p $HOME/protobuf && pushd $HOME/protobuf && curl -LO 'https://github.com/google/protobuf/releases/download/v3.4.0/protoc-3.4.0-linux-x86_64.zip' && unzip protoc-3.4.0-linux-x86_64.zip && popd - curl -L 'https://github.com/google/protobuf/releases/download/v3.4.0/protobuf-python-3.4.0.tar.gz' | tar xzf - && pushd protobuf-3.4.0/python && python setup.py build && python setup.py install && popd script: - pushd generator/proto && make && popd - pushd tests && scons CC=$CC CXX=$CXX && popd nanopb-0.4.1/AUTHORS.txt000066400000000000000000000045021361552131000146550ustar00rootroot00000000000000Petteri Aimonen Michael Poole Daniel Kan Stan Hu David Hotham Steffen Siering Jens Steinhauser Pavel Ilin Kent Ryhorchuk Martin Donath Oliver Lee Michael Haberler Nicolas Colomer Ivan Kravets Kyle Manna Benjamin Kamath Andrew Ruder Kenshi Kawaguchi isotes Maxim Khitrov Yaniv Mordekhay Ming Zhao Google, Inc. Tom Roeder Piotr Sikora Bernhard Krämer Konstantin Podsvirov William A. Kennington III Guillaume Lager Tobias Haegermarck Justin DeMartino Constantine Grantcharov Nick Ewalt Harald Fernengel Alice Wang Kevin Fitch Kamal Marhubi Elco Jacobs Sébastien Morin Dave Flogeras Edward Z. Yang Robbie Shade Andrew Ballinger Hamina, Juha-Pekka Jason Bishop matejcik Tobias Müller Jari Vetoniemi Gabriel Staples Amarnath Michal Rostecki Pei Wang Noah Pendleton <2538614+noahp@users.noreply.github.com> Pavol Rusnak der-imp Mark Hill Torfinn Berset Bo Langgaard Lind Stephane Dorre Phillip Cao Melvin Wang Joshua Salzedo nanopb-0.4.1/BUILD000066400000000000000000000005241361552131000135510ustar00rootroot00000000000000licenses(["notice"]) exports_files(["LICENSE.txt"]) package(default_visibility = ["//visibility:public"]) cc_library( name = "nanopb", visibility = ["//visibility:public"], hdrs = [ "pb.h", "pb_common.h", "pb_decode.h", "pb_encode.h", ], srcs = [ "pb_common.c", "pb_decode.c", "pb_encode.c", ], ) nanopb-0.4.1/CHANGELOG.txt000066400000000000000000000430601361552131000150210ustar00rootroot00000000000000nanopb-0.4.1 (2019-02-02) Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p) Avoid overflows in allocation for packed fields. Verify stream size before allocating string / bytes. Add workaround for avr-libc realloc() bug (#475) Fix bug with field numbers >255 (#407) Fix compilation error on platforms without uint8_t (#485) Fix warnings on Python3.8 (#399, #467) Make fixed_count option work when combined with FT_POINTER. Add missing #define for submsg callbacks, add regression test (#472) Fix ImportError when using generator/protoc with Python 3 Remove accidental debug code in generator Reduce stack usage (#484) Remove PB_FIELDINFO_WIDTH option (#473) Add nanopb-specific package name option (#422) Add testcase for Any type (#163) Add exclude option also from .proto/.options Set default include path in the grpc_tools protoc wrapper. Add workaround for python-protobuf 3.6.1 bug (#478) Detect invalid wire type when decoding fields. Improved fuzz testing nanopb-0.4.0 (2019-12-20) New field descriptor format. Make nanopb_generator automatically compile .proto files (#462) Allow installing as Python package from pip (#460) Use protoc from grpcio-tools Python package if available (#463) Change proto3 message types to be optional (#308, #452) Add pb_decode_ex(), pb_encode_ex() functions. Automatically rebuild nanopb_pb2.py Use plugin.proto that comes with python-protobuf (#234) Allow specifying a per-message callback. (#175) Improve callback handling inside oneofs. (#175) Introduce new compile time flag: PB_VALIDATE_UTF8 (#437) Add TypenameMangling.M_PACKAGE_INITIALS (#394) Introduce new compile time flag: PB_ENCODE_ARRAYS_UNPACKED (#427) Add default_has option (#423) Add option for including extra files from .pb.h Add generator option to error out on unmatched options (#458) Generator: Allow comma separated options in plugin mode (#343) Allow comma-separated option parsing to handle `#include` (#450) Remove timestamp from generated files by default, add -t to keep it. Make --no-strip-path default (#326) Fix .options file case sensitivity on Windows. Fix generator error with mangle_names option (#380) Take int_size setting into account in calculating message sizes (#373) .gitignore: don't ignore generator-bin files (#419) Cleanup .pb.h header format Make tests run on AVR and STM32 Add PB_CONVERT_DOUBLE_FLOAT setting to convert doubles on AVR. Store field descriptor constants in flash on AVR (#464) Added "f" suffix to const float declarations. (#453) Fix clang-tidy warnings about using signed integers in binary bitwise operations (#451) Add C++ message descriptors helper (#384) Implement conan recipe (#378) CMake: Split nanopb_out command (#454) CMake: install created shared library(dll) in windows to the binary folder (#447) nanopb-0.3.9.5 (2020-02-02) Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p) Add workaround for avr-libc realloc() bug (#475) Fix empty submessages getting encoded in proto3 mode (#395) Avoid overflows in allocation for packed fields. nanopb-0.3.9.4 (2019-10-13) Fix undefined behavior with bool fields (#434) Fix enum min/max defines when values are not in order (#405) Fix network_server socket example with zero-length strings (#421) Don't call stream read callback with count=0 (#421) Add compile time flag PB_ENCODE_ARRAYS_UNPACKED (#427) nanopb-0.3.9.3 (2019-03-08) NOTE: nanopb-0.3.9.3.tar.gz before 2019-03-21 was accidentally from 0.4 branch (#388) Fix fixed size and callback repeated fields inside proto3 submessages (#376, #382, #386) Fix incorrect PB_STATIC_ASSERT for bytes inside oneof (#363) Fix generator error with mangle_names option (#380) Generator: Allow comma separated options in plugin mode (#343) nanopb-0.3.9.2 (2018-11-10) Erroneous free() when using callbacks combined with PB_ENABLE_MALLOC (#346) Fix possible null-pointer dereference in decode_callback_field (#342) Fix FindNanopb.cmake on Windows (#335) Fix large generator memory usage with oneof fields (#338) Fix error in splint test (#359) Allow cmake to build as a shared library (#352, #353) Add --no-strip-path command line option (#326) Option for flattening nested protobuf names (#333) Documentation fixes (#329, #350, #358) Better error messages (#351) nanopb-0.3.9.1 (2018-04-14) Fix handling of special characters in string/bytes default values (issue #322) Fix encoding of negative numbers with PB_WITHOUT_64BIT (#285) Fix _zero initializer for enums that don't begin at 0. (#295) Multiple CMake fixes (#296, #299, #304, #312, #320) Fix compiler warnings (#305) Fix scons rules for Python 3 Add check for large extension field number (issue #306) Updated included descriptor.proto version (#314) Resolve oneof sizes symbolically when needed (#311) Add fixed_count option (#260) Add some verbose prints in generator (issue #238) Add test/example of using 'map' type. (#289) nanopb-0.3.9 (2017-09-23) Fix bugs in proto3 encoding of submessages (#256) Fix message size calculation for arrays of size 1 (#253) Fix segfault with FT_CALLBACK inside FT_POINTER (#259) Properly detect truncated tags in corrupted messages (#277) Make pb_decode_varint32 overflow checks exact (#258) Add option to build without 64-bit support (#86) Add options to define source and header file extensions (#264) Add pb_en/decode_nullterminated() (part of #278) Add pb_decode_delimited_noinit (#284) CMake: add dependency for .options file (#265) CMake: change use of relative paths (#250,#271,#273) Better error message for missing max_size option (#281) Travis-CI build fixes (#283) Add Bazel build system file (#266) nanopb-0.3.8 (2017-03-05) Fix problems with multiple oneofs in same message (#229) Zero-valued extension fields were mistakenly ignored by encoder (#242) Multiple fixes related to proto3 mode (#242, #245, #247, #249) Fix potential unaligned access (#226, #227) Fix documentation for protoc --plugin argument (#239) Extend inline / fixed length bytes array support (#244) Add new option max_length for strings (#107) Make string substream API more robust (#230) Make pb_decode_varint32 public API (#231) Allow overriding proto3 mode (#228) Add optional enum->string mapping function (#223) Add transitional options.proto file (#241) Add better error message on Python library version imcompatibility (#240) Include version number in PlatformIO library.json (#222) CMake build script changes (#236, #237) Change download links to https Improvements to test cases. nanopb-0.3.7 (2016-10-30) Add support for proto3-style singular fields (#182, #206, #216) Updated binary package protoc to version 3.1.0 Add FT_INLINE allocation of bytes fields (#211) Include package name in include guard (#207) Fix missing warning with large bytes fields (issue #220) Added CMake project (#208) Add bazel BUILD file for nanopb (#209) Added an AUTHORS file (#211) Documentation updates Improvements to test cases. nanopb-0.3.6 (2016-06-19) Protect against corrupted _count fields in pb_release (#205) Fix error in STATIC_ASSERT with multiple files (#203) Add -D option to specify output directory (#193) Generate MIN/MAX/ARRAYSIZE defines for enums (#194) Generate comments about uncalculable message sizes (#195) Documentation updates (#196, #201) Improvements to test cases. nanopb-0.3.5 (2016-02-13) NOTE: If you are using pb_syshdr.h, you will need to add uint_least8_t definition. See docs/migration.rst for details. Fix generator crash with Enum inside Oneof (#188) Fix some generator regressions related to .options file path (#172) Add support for platforms without uint8_t (#191) Allow const parameter to pb_istream_from_buffer (#152) Ignore null pointers in pb_release() (#183) Add support for anonymous unions (#184) Add Python3 support to the generator (#169) Add code generator insertion points to generated files (#178) Improvements to CMake script (#181) Improvements to test cases. nanopb-0.3.4 (2015-09-26) Fix handling of unsigned 8- and 16-bit enums (issue 164) Fix generator on systems where python = python3. (issue 155) Fix compiler warning on GCC 5.x (issue 171) Make the generator better handle imported .protos (issue 165) Add packed_enum option to generator. Add syntax= line to .proto files (issue 167) Add PlatformIO registry manifest file. (pr 156) nanopb-0.3.3 (2015-04-10) Fix missing files in Linux binary package (issue 146) Fix generator bug when oneof is first field in a message. (issue 142) Fix generator error when long_names:false is combined with Oneofs. (issue 147) Fix oneof submessage initialization bug. (issue 149) Fix problem with plugin options on Python 2.7.2 and older. (issue 153) Fix crash when callback is inside oneof field. (issue 148) Switch to .tar.gz format for Mac OS X packages. (issue 154) Always define enum long names so that cross-file references work. (issue 118) Add msgid generator option. (issue 151) Improve comment support in .options files. (issue 145) Updates for the CMake rule file, add cmake example. Better error messages for syntax errors in .options file nanopb-0.3.2 (2015-01-24) Fix memory leaks with PB_ENABLE_MALLOC with some submessage hierarchies (issue 138) Implement support for oneofs (C unions). (issues 131, 141) Add int_size option for generator (issue 139) Add compilation option to disable struct packing. (issue 136) Change PB_RETURN_ERROR() macro to avoid compiler warnings (issue 140) Fix build problems with protoc 3.0.0 Add support for POINTER type in extensions Initialize also extension fields to defaults in pb_decode(). Detect too large varint values when decoding. nanopb-0.3.1 (2014-09-11) Fix security issue due to size_t overflows. (issue 132) Fix memory leak with duplicated fields and PB_ENABLE_MALLOC Fix crash if pb_release() is called twice. Fix cyclic message support (issue 130) Fix error in generated initializers for repeated pointer fields. Improve tests (issues 113, 126) nanopb-0.3.0 (2014-08-26) NOTE: See docs/migration.html or online at http://koti.kapsi.fi/~jpa/nanopb/docs/migration.html for changes in this version. Most importantly, you need to add pb_common.c to the list of files to compile. Separated field iterator logic to pb_common.c (issue 128) Change the _count fields to use pb_size_t datatype (issue 82) Added PB_ prefix to macro names (issue 106) Added #if version guard to generated files (issue 129) Added migration document nanopb-0.2.9.4 (2020-02-02) Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p) Add workaround for avr-libc realloc() bug (#475) nanopb-0.2.9.3 (2016-06-19) Protect against corrupted _count fields in pb_release (#205) nanopb-0.2.9.2 (2015-01-24) Fix memory leaks with PB_ENABLE_MALLOC with some submessage hierarchies (issue 138) Fix compilation error with generated initializers for repeated pointer fields nanopb-0.2.9.1 (2014-09-11) Fix security issue due to size_t overflows. (issue 132) Fix memory leak with duplicated fields and PB_ENABLE_MALLOC Fix crash if pb_release() is called twice. nanopb-0.2.9 (2014-08-09) NOTE: If you are using the -e option with the generator, you have to prepend . to the argument to get the same behaviour as before. Do not automatically add a dot with generator -e option. (issue 122) Fix problem with .options file and extension fields. (issue 125) Don't use SIZE_MAX macro, as it is not in C89. (issue 120) Generate #defines for initializing message structures. (issue 79) Add skip_message option to generator. (issue 121) Add PB_PACKED_STRUCT support for Keil MDK-ARM toolchain (issue 119) Give better messages about the .options file path. (issue 124) Improved tests nanopb-0.2.8 (2014-05-20) Fix security issue with PB_ENABLE_MALLOC. (issue 117) Add option to not add timestamps to .pb.h and .pb.c preambles. (issue 115) Documentation updates Improved tests nanopb-0.2.7 (2014-04-07) Fix bug with default values for extension fields (issue 111) Fix some MISRA-C warnings (issue 91) Implemented optional malloc() support (issue 80) Changed pointer-type bytes field datatype Add a "found" field to pb_extension_t (issue 112) Add convenience function pb_get_encoded_size() (issue 16) nanopb-0.2.6 (2014-02-15) Fix generator error with bytes callback fields (issue 99) Fix warnings about large integer constants (issue 102) Add comments to where STATIC_ASSERT is used (issue 96) Add warning about unknown field names on .options (issue 105) Move descriptor.proto to google/protobuf subdirectory (issue 104) Improved tests nanopb-0.2.5 (2014-01-01) Fix a bug with encoding negative values in int32 fields (issue 97) Create binary packages of the generator + dependencies (issue 47) Add support for pointer-type fields to the encoder (part of issue 80) Fixed path in FindNanopb.cmake (issue 94) Improved tests nanopb-0.2.4 (2013-11-07) Remove the deprecated NANOPB_INTERNALS functions from public API. Document the security model. Check array and bytes max sizes when encoding (issue 90) Add #defines for maximum encoded message size (issue 89) Add #define tags for extension fields (issue 93) Fix MISRA C violations (issue 91) Clean up pb_field_t definition with typedefs. nanopb-0.2.3 (2013-09-18) Improve compatibility by removing ternary operator from initializations (issue 88) Fix build error on Visual C++ (issue 84, patch by Markus Schwarzenberg) Don't stop on unsupported extension fields (issue 83) Add an example pb_syshdr.h file for non-C99 compilers Reorganize tests and examples into subfolders (issue 63) Switch from Makefiles to scons for building the tests Make the tests buildable on Windows nanopb-0.2.2 (2013-08-18) Add support for extension fields (issue 17) Fix unknown fields in empty message (issue 78) Include the field tags in the generated .pb.h file. Add pb_decode_delimited and pb_encode_delimited wrapper functions (issue 74) Add a section in top of pb.h for changing compilation settings (issue 76) Documentation improvements (issues 12, 77 and others) Improved tests nanopb-0.2.1 (2013-04-14) NOTE: The default callback function signature has changed. If you don't want to update your code, define PB_OLD_CALLBACK_STYLE. Change the callback function to use void** (issue 69) Add support for defining the nanopb options in a separate file (issue 12) Add support for packed structs in IAR and MSVC (in addition to GCC) (issue 66) Implement error message support for the encoder side (issue 7) Handle unterminated strings when encoding (issue 68) Fix bug with empty strings in repeated string callbacks (issue 73) Fix regression in 0.2.0 with optional callback fields (issue 70) Fix bugs with empty message types (issues 64, 65) Fix some compiler warnings on clang (issue 67) Some portability improvements (issues 60, 62) Various new generator options Improved tests nanopb-0.2.0 (2013-03-02) NOTE: This release requires you to regenerate all .pb.c files. Files generated by older versions will not compile anymore. Reformat generated .pb.c files using macros (issue 58) Rename PB_HTYPE_ARRAY -> PB_HTYPE_REPEATED Separate PB_HTYPE to PB_ATYPE and PB_HTYPE Move STATIC_ASSERTs to .pb.c file Added CMake file (by Pavel Ilin) Add option to give file extension to generator (by Michael Haberler) Documentation updates nanopb-0.1.9 (2013-02-13) Fixed error message bugs (issues 52, 56) Sanitize #ifndef filename (issue 50) Performance improvements Add compile-time option PB_BUFFER_ONLY Add Java package name to nanopb.proto Check for sizeof(double) == 8 (issue 54) Added generator option to ignore some fields. (issue 51) Added generator option to make message structs packed. (issue 49) Add more test cases. nanopb-0.1.8 (2012-12-13) Fix bugs in the enum short names introduced in 0.1.7 (issues 42, 43) Fix STATIC_ASSERT macro when using multiple .proto files. (issue 41) Fix missing initialization of istream.errmsg Make tests/Makefile work for non-gcc compilers (issue 40) nanopb-0.1.7 (2012-11-11) Remove "skip" mode from pb_istream_t callbacks. Example implementation had a bug. (issue 37) Add option to use shorter names for enum values (issue 38) Improve options support in generator (issues 12, 30) Add nanopb version number to generated files (issue 36) Add extern "C" to generated headers (issue 35) Add names for structs to allow forward declaration (issue 39) Add buffer size check in example (issue 34) Fix build warnings on MS compilers (issue 33) nanopb-0.1.6 (2012-09-02) Reorganize the field decoder interface (issue 2) Improve performance in submessage decoding (issue 28) Implement error messages in the decoder side (issue 7) Extended testcases (alltypes test is now complete). Fix some compiler warnings (issues 25, 26, 27, 32). nanopb-0.1.5 (2012-08-04) Fix bug in decoder with packed arrays (issue 23). Extended testcases. Fix some compiler warnings. nanopb-0.1.4 (2012-07-05) Add compile-time options for easy-to-use >255 field support. Improve the detection of missing required fields. Added example on how to handle union messages. Fix generator error with .proto without messages. Fix problems that stopped the code from compiling with some compilers. Fix some compiler warnings. nanopb-0.1.3 (2012-06-12) Refactor the field encoder interface. Improve generator error messages (issue 5) Add descriptor.proto into the #include exclusion list Fix some compiler warnings. nanopb-0.1.2 (2012-02-15) Make the generator to generate include for other .proto files (issue 4). Fixed generator not working on Windows (issue 3) nanopb-0.1.1 (2012-01-14) Fixed bug in encoder with 'bytes' fields (issue 1). Fixed a bug in the generator that caused a compiler error on sfixed32 and sfixed64 fields. Extended testcases. nanopb-0.1.0 (2012-01-06) First stable release. nanopb-0.4.1/CMakeLists.txt000066400000000000000000000101531361552131000155260ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8.12) project(nanopb C) set(nanopb_VERSION_STRING nanopb-0.4.1) set(nanopb_SOVERSION 0) string(REPLACE "nanopb-" "" nanopb_VERSION ${nanopb_VERSION_STRING}) option(BUILD_SHARED_LIBS "Build shared libraries" OFF) option(BUILD_STATIC_LIBS "Build static libraries" ON) option(nanopb_BUILD_RUNTIME "Build the headers and libraries needed at runtime" ON) option(nanopb_BUILD_GENERATOR "Build the protoc plugin for code generation" ON) option(nanopb_MSVC_STATIC_RUNTIME "Link static runtime libraries" ON) if(NOT DEFINED nanopb_PROTOC_PATH) set(nanopb_PROTOC_PATH "protoc") endif() if(NOT DEFINED CMAKE_DEBUG_POSTFIX) set(CMAKE_DEBUG_POSTFIX "d") endif() include(GNUInstallDirs) if(MSVC AND nanopb_MSVC_STATIC_RUNTIME) foreach(flag_var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) if(${flag_var} MATCHES "/MD") string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") endif(${flag_var} MATCHES "/MD") endforeach(flag_var) endif() if(NOT DEFINED CMAKE_INSTALL_CMAKEDIR) set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/nanopb") endif() if(nanopb_BUILD_GENERATOR) set(generator_protos nanopb) find_package(PythonInterp 2.7 REQUIRED) execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print(sysconfig.get_python_lib(prefix=''))" OUTPUT_VARIABLE PYTHON_INSTDIR OUTPUT_STRIP_TRAILING_WHITESPACE ) foreach(generator_proto IN LISTS generator_protos) string(REGEX REPLACE "([^;]+)" "${PROJECT_SOURCE_DIR}/generator/proto/\\1.proto" generator_proto_file "${generator_proto}") string(REGEX REPLACE "([^;]+)" "\\1_pb2.py" generator_proto_py_file "${generator_proto}") add_custom_command( OUTPUT ${generator_proto_py_file} COMMAND ${nanopb_PROTOC_PATH} --python_out=${PROJECT_BINARY_DIR} -I${PROJECT_SOURCE_DIR}/generator/proto ${generator_proto_file} DEPENDS ${generator_proto_file} ) add_custom_target("generate_${generator_proto_py_file}" ALL DEPENDS ${generator_proto_py_file}) install( FILES ${PROJECT_BINARY_DIR}/${generator_proto_py_file} DESTINATION ${PYTHON_INSTDIR} ) endforeach() endif() if(nanopb_BUILD_RUNTIME) if(BUILD_SHARED_LIBS) add_library(protobuf-nanopb SHARED pb.h pb_common.h pb_common.c pb_encode.h pb_encode.c pb_decode.h pb_decode.c) set_target_properties(protobuf-nanopb PROPERTIES SOVERSION ${nanopb_SOVERSION}) install(TARGETS protobuf-nanopb EXPORT nanopb-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) target_include_directories(protobuf-nanopb INTERFACE $ ) endif() if(BUILD_STATIC_LIBS) add_library(protobuf-nanopb-static STATIC pb.h pb_common.h pb_common.c pb_encode.h pb_encode.c pb_decode.h pb_decode.c) set_target_properties(protobuf-nanopb-static PROPERTIES OUTPUT_NAME protobuf-nanopb) install(TARGETS protobuf-nanopb-static EXPORT nanopb-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) target_include_directories(protobuf-nanopb-static INTERFACE $ ) endif() configure_file(extra/nanopb-config-version.cmake.in nanopb-config-version.cmake @ONLY) install(EXPORT nanopb-targets DESTINATION ${CMAKE_INSTALL_CMAKEDIR} NAMESPACE nanopb::) install(FILES extra/nanopb-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/nanopb-config-version.cmake DESTINATION ${CMAKE_INSTALL_CMAKEDIR}) install(FILES pb.h pb_common.h pb_encode.h pb_decode.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) endif() nanopb-0.4.1/CONTRIBUTING.md000066400000000000000000000023131361552131000152160ustar00rootroot00000000000000Contributing to Nanopb development ================================== Reporting issues and requesting features ---------------------------------------- Feel free to report any issues you see or features you would like to see in the future to the Github issue tracker. Using the templates below is preferred: * [Report a bug](https://github.com/nanopb/nanopb/issues/new?body=**Steps%20to%20reproduce%20the%20issue**%0a%0a1.%0a2.%0a3.%0a%0a**What%20happens?**%0A%0A**What%20should%20happen?**&labels=Type-Defect) * [Request a feature](https://github.com/nanopb/nanopb/issues/new?body=**What%20should%20the%20feature%20do?**%0A%0A**In%20what%20situation%20would%20the%20feature%20be%20useful?**&labels=Type-Enhancement) Requesting help --------------- If there is something strange going on, but you do not know if it is actually a bug in nanopb, try asking first on the [discussion forum](https://groups.google.com/forum/#!forum/nanopb). Pull requests ------------- Pull requests are welcome! If it is not obvious from the commit message, please indicate the same information as you would for an issue report: * What functionality it fixes/adds. * How can the problem be reproduced / when would the feature be useful. nanopb-0.4.1/LICENSE.txt000066400000000000000000000016021361552131000146100ustar00rootroot00000000000000Copyright (c) 2011 Petteri Aimonen This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. nanopb-0.4.1/README.md000066400000000000000000000124721361552131000142530ustar00rootroot00000000000000Nanopb - Protocol Buffers for Embedded Systems ============================================== [![Build Status](https://travis-ci.org/nanopb/nanopb.svg?branch=master)](https://travis-ci.org/nanopb/nanopb) Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is especially suitable for use in microcontrollers, but fits any memory restricted system. * **Homepage:** https://jpa.kapsi.fi/nanopb/ * **Documentation:** https://jpa.kapsi.fi/nanopb/docs/ * **Downloads:** https://jpa.kapsi.fi/nanopb/download/ * **Forum:** https://groups.google.com/forum/#!forum/nanopb Using the nanopb library ------------------------ To use the nanopb library, you need to do two things: 1. Compile your .proto files for nanopb, using `protoc`. 2. Include *pb_encode.c*, *pb_decode.c* and *pb_common.c* in your project. The easiest way to get started is to study the project in "examples/simple". It contains a Makefile, which should work directly under most Linux systems. However, for any other kind of build system, see the manual steps in README.txt in that folder. Using the Protocol Buffers compiler (protoc) -------------------------------------------- The nanopb generator is implemented as a plugin for the Google's own `protoc` compiler. This has the advantage that there is no need to reimplement the basic parsing of .proto files. However, it does mean that you need the Google's protobuf library in order to run the generator. If you have downloaded a binary package for nanopb (either Windows, Linux or Mac OS X version), the `protoc` binary is included in the 'generator-bin' folder. In this case, you are ready to go. Simply run this command: generator-bin/protoc --nanopb_out=. myprotocol.proto However, if you are using a git checkout or a plain source distribution, you need to provide your own version of `protoc` and the Google's protobuf library. On Linux, the necessary packages are `protobuf-compiler` and `python-protobuf`. On Windows, you can either build Google's protobuf library from source (see section below) or use one of the binary distributions of it. In either case, if you use a separate `protoc`, you need to manually give the path to the nanopb generator to the `protoc-gen-nanopb` plugin, as follows: protoc --plugin=protoc-gen-nanopb=nanopb/generator/protoc-gen-nanopb --nanopb_out=. myprotocol.proto Note that the above `protoc`-based commands are the 1-command versions of a 2-command process, as described in the ["Nanopb: Basic concepts" document under the section "Compiling .proto files for nanopb"](https://jpa.kapsi.fi/nanopb/docs/concepts.html#compiling-proto-files-for-nanopb). Here is the 2-command process: protoc -omyprotocol.pb myprotocol.proto python nanopb/generator/nanopb_generator.py myprotocol.pb Building [Google's protobuf library](https://github.com/protocolbuffers/protobuf) from source --------------------------------------------------------------------------------------------- When building Google's protobuf library from source, be sure to follow both the C++ installation instructions *and* the Python installation instructions, as *both* are required: 1. [Protobuf's C++ build & installation instructions](https://github.com/protocolbuffers/protobuf/tree/master/src) 2. [Protobuf's Python build & installation instructions](https://github.com/protocolbuffers/protobuf/tree/master/python) - See additional reading [here](https://github.com/nanopb/nanopb/issues/417#issuecomment-517619517) and [here](https://stackoverflow.com/questions/57367265/how-to-compile-nanopb-proto-file-into-h-and-c-files-using-nanopb-and-protobuf/57367543#57367543). Running the tests ----------------- If you want to perform further development of the nanopb core, or to verify its functionality using your compiler and platform, you'll want to run the test suite. The build rules for the test suite are implemented using Scons, so you need to have that installed (ex: `sudo apt install scons` on Ubuntu). To run the tests: cd tests scons This will show the progress of various test cases. If the output does not end in an error, the test cases were successful. Note: Mac OS X by default aliases 'clang' as 'gcc', while not actually supporting the same command line options as gcc does. To run tests on Mac OS X, use: `scons CC=clang CXX=clang`. Same way can be used to run tests with different compilers on any platform. For embedded platforms, there is currently support for running the tests on STM32 discovery board and [simavr](https://github.com/buserror/simavr) AVR simulator. Use `scons PLATFORM=STM32` and `scons PLATFORM=AVR` to run these tests. Build systems and integration ----------------------------- Nanopb C code itself is designed to be portable and easy to build on any platform. Often the bigger hurdle is running the generator which takes in the `.proto` files and outputs `.pb.c` definitions. There exist build rules for several systems: * **Makefiles**: `extra/nanopb.mk`, see `examples/simple` * **CMake**: `extra/FindNanopb.cmake`, see `examples/cmake` * **SCons**: `tests/site_scons` (generator only) * **Bazel**: `BUILD` in source root * **Conan**: `conanfile.py` in source root * **PlatformIO**: https://platformio.org/lib/show/431/Nanopb * **PyPI/pip**: https://pypi.org/project/nanopb/ And also integration to platform interfaces: * **Arduino**: http://platformio.org/lib/show/1385/nanopb-arduino nanopb-0.4.1/WORKSPACE000066400000000000000000000000531361552131000142450ustar00rootroot00000000000000workspace(name="com_github_nanopb_nanopb") nanopb-0.4.1/build.py000066400000000000000000000003151361552131000144360ustar00rootroot00000000000000from conan.packager import ConanMultiPackager if __name__ == "__main__": builder = ConanMultiPackager(build_policy="outdated") builder.add_common_builds(shared_option_name=None) builder.run() nanopb-0.4.1/conan-wrapper/000077500000000000000000000000001361552131000155425ustar00rootroot00000000000000nanopb-0.4.1/conan-wrapper/CMakeLists.txt000066400000000000000000000002561361552131000203050ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8.12) project(cmake_wrapper) include(${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() add_subdirectory(".." "nanopb") nanopb-0.4.1/conanfile.py000066400000000000000000000016111361552131000152750ustar00rootroot00000000000000from conans import ConanFile, CMake, tools from os import path class NanoPbConan(ConanFile): name = "nanopb" version = "0.4.1" license = "zlib" url = "https://jpa.kapsi.fi/nanopb/" description = "Protocol Buffers with small code size" settings = "os", "compiler", "build_type", "arch" generators = "cmake" exports = '*' options = { "fPIC": [True, False], } default_options = { "fPIC": True, } def configure(self): if self.settings.os == "Windows" and self.settings.compiler == "Visual Studio": del self.options.fPIC def build(self): cmake = CMake(self) cmake.configure(source_folder=path.join(self.source_folder, "conan-wrapper")) cmake.build() cmake.install() def package_info(self): self.cpp_info.includedirs = ["include"] self.cpp_info.libdirs = ["lib"] nanopb-0.4.1/docs/000077500000000000000000000000001361552131000137165ustar00rootroot00000000000000nanopb-0.4.1/docs/Makefile000066400000000000000000000004321361552131000153550ustar00rootroot00000000000000all: index.html concepts.html reference.html security.html migration.html whats_new.html %.html: %.rst rst2html --field-name-limit=32 --stylesheet=lsr.css --link-stylesheet $< $@ sed -i 's!!\n!' $@ nanopb-0.4.1/docs/concepts.rst000066400000000000000000000474551361552131000163050ustar00rootroot00000000000000====================== Nanopb: Basic concepts ====================== .. include :: menu.rst The things outlined here are the underlying concepts of the nanopb design. .. contents:: Proto files =========== All Protocol Buffers implementations use .proto files to describe the message format. The point of these files is to be a portable interface description language. Compiling .proto files for nanopb --------------------------------- Nanopb comes with a Python script to generate `.pb.c` and `.pb.h` files from the `.proto` definition:: user@host:~$ python nanopb/generator/nanopb_generator.py message.proto Writing to message.pb.h and message.pb.c Internally this script uses Google `protoc` to parse the input file. If you do not have it available, you may receive an error message. You can install either `grpcio-tools` Python package using `pip`, or the `protoc` compiler itself from `protobuf-compiler` distribution package. Generally the Python package is recommended, because nanopb requires protoc version 3.6 or newer, and some distributions come with an older version. Modifying generator behaviour ----------------------------- Using generator options, you can set maximum sizes for fields in order to allocate them statically. The preferred way to do this is to create an .options file with the same name as your .proto file:: # Foo.proto message Foo { required string name = 1; } :: # Foo.options Foo.name max_size:16 For more information on this, see the `Proto file options`_ section in the reference manual. .. _`Proto file options`: reference.html#proto-file-options Streams ======= Nanopb uses streams for accessing the data in encoded format. The stream abstraction is very lightweight, and consists of a structure (*pb_ostream_t* or *pb_istream_t*) which contains a pointer to a callback function. There are a few generic rules for callback functions: #) Return false on IO errors. The encoding or decoding process will abort immediately. #) Use state to store your own data, such as a file descriptor. #) *bytes_written* and *bytes_left* are updated by pb_write and pb_read. #) Your callback may be used with substreams. In this case *bytes_left*, *bytes_written* and *max_size* have smaller values than the original stream. Don't use these values to calculate pointers. #) Always read or write the full requested length of data. For example, POSIX *recv()* needs the *MSG_WAITALL* parameter to accomplish this. Output streams -------------- :: struct _pb_ostream_t { bool (*callback)(pb_ostream_t *stream, const uint8_t *buf, size_t count); void *state; size_t max_size; size_t bytes_written; }; The *callback* for output stream may be NULL, in which case the stream simply counts the number of bytes written. In this case, *max_size* is ignored. Otherwise, if *bytes_written* + bytes_to_be_written is larger than *max_size*, pb_write returns false before doing anything else. If you don't want to limit the size of the stream, pass SIZE_MAX. **Example 1:** This is the way to get the size of the message without storing it anywhere:: Person myperson = ...; pb_ostream_t sizestream = {0}; pb_encode(&sizestream, Person_fields, &myperson); printf("Encoded size is %d\n", sizestream.bytes_written); **Example 2:** Writing to stdout:: bool callback(pb_ostream_t *stream, const uint8_t *buf, size_t count) { FILE *file = (FILE*) stream->state; return fwrite(buf, 1, count, file) == count; } pb_ostream_t stdoutstream = {&callback, stdout, SIZE_MAX, 0}; Input streams ------------- For input streams, there is one extra rule: #) You don't need to know the length of the message in advance. After getting EOF error when reading, set bytes_left to 0 and return false. Pb_decode will detect this and if the EOF was in a proper position, it will return true. Here is the structure:: struct _pb_istream_t { bool (*callback)(pb_istream_t *stream, uint8_t *buf, size_t count); void *state; size_t bytes_left; }; The *callback* must always be a function pointer. *Bytes_left* is an upper limit on the number of bytes that will be read. You can use SIZE_MAX if your callback handles EOF as described above. **Example:** This function binds an input stream to stdin: :: bool callback(pb_istream_t *stream, uint8_t *buf, size_t count) { FILE *file = (FILE*)stream->state; bool status; if (buf == NULL) { while (count-- && fgetc(file) != EOF); return count == 0; } status = (fread(buf, 1, count, file) == count); if (feof(file)) stream->bytes_left = 0; return status; } pb_istream_t stdinstream = {&callback, stdin, SIZE_MAX}; Data types ========== Most Protocol Buffers datatypes have directly corresponding C datatypes, such as int32 is int32_t, float is float and bool is bool. However, the variable-length datatypes are more complex: 1) Strings, bytes and repeated fields of any type map to callback functions by default. 2) If there is a special option *(nanopb).max_size* specified in the .proto file, string maps to null-terminated char array and bytes map to a structure containing a char array and a size field. 3) If *(nanopb).fixed_length* is set to *true* and *(nanopb).max_size* is also set, then bytes map to an inline byte array of fixed size. 4) If there is a special option *(nanopb).max_count* specified on a repeated field, it maps to an array of whatever type is being repeated. Another field will be created for the actual number of entries stored. 5) If *(nanopb).fixed_count* is set to *true* and *(nanopb).max_count* is also set, the field for the actual number of entries will not by created as the count is always assumed to be max count. =============================================================================== ======================= field in .proto autogenerated in .h =============================================================================== ======================= required string name = 1; pb_callback_t name; required string name = 1 [(nanopb).max_size = 40]; char name[40]; repeated string name = 1 [(nanopb).max_size = 40]; pb_callback_t name; repeated string name = 1 [(nanopb).max_size = 40, (nanopb).max_count = 5]; | size_t name_count; | char name[5][40]; required bytes data = 1 [(nanopb).max_size = 40]; | typedef struct { | size_t size; | pb_byte_t bytes[40]; | } Person_data_t; | Person_data_t data; required bytes data = 1 [(nanopb).max_size = 40, (nanopb).fixed_length = true]; | pb_byte_t data[40]; repeated int32 data = 1 [(nanopb).max_count = 5, (nanopb).fixed_count true]; | int32_t data[5]; =============================================================================== ======================= The maximum lengths are checked in runtime. If string/bytes/array exceeds the allocated length, *pb_decode* will return false. Note: For the *bytes* datatype, the field length checking may not be exact. The compiler may add some padding to the *pb_bytes_t* structure, and the nanopb runtime doesn't know how much of the structure size is padding. Therefore it uses the whole length of the structure for storing data, which is not very smart but shouldn't cause problems. In practise, this means that if you specify *(nanopb).max_size=5* on a *bytes* field, you may be able to store 6 bytes there. For the *string* field type, the length limit is exact. Note: When using the *fixed_count* option, the decoder assumes the repeated elements are received sequentially or that repeated elements for a non-packed field will not be interleaved with another *fixed_count* non-packed field. Field callbacks =============== When a field has dynamic length, nanopb cannot statically allocate storage for it. Instead, it allows you to handle the field in whatever way you want, using a callback function. The `pb_callback_t`_ structure contains a function pointer and a *void* pointer called *arg* you can use for passing data to the callback. If the function pointer is NULL, the field will be skipped. A pointer to the *arg* is passed to the function, so that it can modify it and retrieve the value. The actual behavior of the callback function is different in encoding and decoding modes. In encoding mode, the callback is called once and should write out everything, including field tags. In decoding mode, the callback is called repeatedly for every data item. .. _`pb_callback_t`: reference.html#pb-callback-t Encoding callbacks ------------------ :: bool (*encode)(pb_ostream_t *stream, const pb_field_iter_t *field, void * const *arg); When encoding, the callback should write out complete fields, including the wire type and field number tag. It can write as many or as few fields as it likes. For example, if you want to write out an array as *repeated* field, you should do it all in a single call. Usually you can use `pb_encode_tag_for_field`_ to encode the wire type and tag number of the field. However, if you want to encode a repeated field as a packed array, you must call `pb_encode_tag`_ instead to specify a wire type of *PB_WT_STRING*. If the callback is used in a submessage, it will be called multiple times during a single call to `pb_encode`_. In this case, it must produce the same amount of data every time. If the callback is directly in the main message, it is called only once. .. _`pb_encode`: reference.html#pb-encode .. _`pb_encode_tag_for_field`: reference.html#pb-encode-tag-for-field .. _`pb_encode_tag`: reference.html#pb-encode-tag This callback writes out a dynamically sized string:: bool write_string(pb_ostream_t *stream, const pb_field_iter_t *field, void * const *arg) { char *str = get_string_from_somewhere(); if (!pb_encode_tag_for_field(stream, field)) return false; return pb_encode_string(stream, (uint8_t*)str, strlen(str)); } Decoding callbacks ------------------ :: bool (*decode)(pb_istream_t *stream, const pb_field_iter_t *field, void **arg); When decoding, the callback receives a length-limited substring that reads the contents of a single field. The field tag has already been read. For *string* and *bytes*, the length value has already been parsed, and is available at *stream->bytes_left*. The callback will be called multiple times for repeated fields. For packed fields, you can either read multiple values until the stream ends, or leave it to `pb_decode`_ to call your function over and over until all values have been read. .. _`pb_decode`: reference.html#pb-decode This callback reads multiple integers and prints them:: bool read_ints(pb_istream_t *stream, const pb_field_iter_t *field, void **arg) { while (stream->bytes_left) { uint64_t value; if (!pb_decode_varint(stream, &value)) return false; printf("%lld\n", value); } return true; } Function name bound callbacks ----------------------------- :: bool MyMessage_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_iter_t *field); :istream: Input stream to read from, or NULL if called in encoding context. :ostream: Output stream to write to, or NULL if called in decoding context. :field: Iterator for the field currently being encoded or decoded. Storing function pointer in `pb_callback_t` fields inside the message requires extra storage space and is often cumbersome. As an alternative, the generator options `callback_function` and `callback_datatype` can be used to bind a callback function based on its name. Typically this feature is used by setting `callback_datatype` to e.g. `void*` or other data type used for callback state. Then the generator will automatically set `callback_function` to `MessageName_callback` and produce a prototype for it in generated `.pb.h`. By implementing this function in your own code, you will receive callbacks for fields without having to separately set function pointers. If you want to use function name bound callbacks for some fields and `pb_callback_t` for other fields, you can call `pb_default_field_callback` from the message-level callback. It will then read a function pointer from `pb_callback_t` and call it. Message descriptor ================== For using the *pb_encode* and *pb_decode* functions, you need a description of all the fields contained in a message. This description is usually autogenerated from .proto file. For example this submessage in the Person.proto file:: message Person { message PhoneNumber { required string number = 1 [(nanopb).max_size = 40]; optional PhoneType type = 2 [default = HOME]; } } This in turn generates a macro list in the `.pb.h` file:: #define Person_PhoneNumber_FIELDLIST(X, a) \ X(a, STATIC, REQUIRED, STRING, number, 1) \ X(a, STATIC, OPTIONAL, UENUM, type, 2) Inside the `.pb.c` file there is a macro call to `PB_BIND`:: PB_BIND(Person_PhoneNumber, Person_PhoneNumber, AUTO) These macros will in combination generate `pb_msgdesc_t` structure and associated lists:: const uint32_t Person_PhoneNumber_field_info[] = { ... }; const pb_msgdesc_t * const Person_PhoneNumber_submsg_info[] = { ... }; const pb_msgdesc_t Person_PhoneNumber_msg = { 2, Person_PhoneNumber_field_info, Person_PhoneNumber_submsg_info, Person_PhoneNumber_DEFAULT, NULL, }; The encoding and decoding functions take a pointer to this structure and use it to process each field in the message. Oneof ===== Protocol Buffers supports `oneof`_ sections. Here is an example of ``oneof`` usage:: message MsgType1 { required int32 value = 1; } message MsgType2 { required bool value = 1; } message MsgType3 { required int32 value1 = 1; required int32 value2 = 2; } message MyMessage { required uint32 uid = 1; required uint32 pid = 2; required uint32 utime = 3; oneof payload { MsgType1 msg1 = 4; MsgType2 msg2 = 5; MsgType3 msg3 = 6; } } Nanopb will generate ``payload`` as a C union and add an additional field ``which_payload``:: typedef struct _MyMessage { uint32_t uid; uint32_t pid; uint32_t utime; pb_size_t which_payload; union { MsgType1 msg1; MsgType2 msg2; MsgType3 msg3; } payload; /* @@protoc_insertion_point(struct:MyMessage) */ } MyMessage; ``which_payload`` indicates which of the ``oneof`` fields is actually set. The user is expected to set the field manually using the correct field tag:: MyMessage msg = MyMessage_init_zero; msg.payload.msg2.value = true; msg.which_payload = MyMessage_msg2_tag; Notice that neither ``which_payload`` field nor the unused fields in ``payload`` will consume any space in the resulting encoded message. When a field inside ``oneof`` contains `pb_callback_t` fields, the callback values cannot be set before decoding. This is because the different fields share the same storage space in C `union`. Instead either function name bound callbacks or a separate message level callback can be used. See `tests/oneof_callback`_ for an example on this. .. _`oneof`: https://developers.google.com/protocol-buffers/docs/reference/proto2-spec#oneof_and_oneof_field .. _`tests/oneof_callback`: https://github.com/nanopb/nanopb/tree/master/tests/oneof_callback Extension fields ================ Protocol Buffers supports a concept of `extension fields`_, which are additional fields to a message, but defined outside the actual message. The definition can even be in a completely separate .proto file. The base message is declared as extensible by keyword *extensions* in the .proto file:: message MyMessage { .. fields .. extensions 100 to 199; } For each extensible message, *nanopb_generator.py* declares an additional callback field called *extensions*. The field and associated datatype *pb_extension_t* forms a linked list of handlers. When an unknown field is encountered, the decoder calls each handler in turn until either one of them handles the field, or the list is exhausted. The actual extensions are declared using the *extend* keyword in the .proto, and are in the global namespace:: extend MyMessage { optional int32 myextension = 100; } For each extension, *nanopb_generator.py* creates a constant of type *pb_extension_type_t*. To link together the base message and the extension, you have to: 1. Allocate storage for your field, matching the datatype in the .proto. For example, for a *int32* field, you need a *int32_t* variable to store the value. 2. Create a *pb_extension_t* constant, with pointers to your variable and to the generated *pb_extension_type_t*. 3. Set the *message.extensions* pointer to point to the *pb_extension_t*. An example of this is available in *tests/test_encode_extensions.c* and *tests/test_decode_extensions.c*. .. _`extension fields`: https://developers.google.com/protocol-buffers/docs/proto#extensions Default values ============== Protobuf has two syntax variants, proto2 and proto3. Of these proto2 has user definable default values that can be given in .proto file:: message MyMessage { optional bytes foo = 1 [default = "ABC\x01\x02\x03"]; optional string bar = 2 [default = "åäö"]; } Nanopb will generate both static and runtime initialization for the default values. In `myproto.pb.h` there will be a `#define MyMessage_init_default` that can be used to initialize whole message into default values:: MyMessage msg = MyMessage_init_default; In addition to this, `pb_decode()` will initialize message fields to defaults at runtime. If this is not desired, `pb_decode_ex()` can be used instead. Message framing =============== Protocol Buffers does not specify a method of framing the messages for transmission. This is something that must be provided by the library user, as there is no one-size-fits-all solution. Typical needs for a framing format are to: 1. Encode the message length. 2. Encode the message type. 3. Perform any synchronization and error checking that may be needed depending on application. For example UDP packets already fullfill all the requirements, and TCP streams typically only need a way to identify the message length and type. Lower level interfaces such as serial ports may need a more robust frame format, such as HDLC (high-level data link control). Nanopb provides a few helpers to facilitate implementing framing formats: 1. Functions *pb_encode_ex* and *pb_decode_ex* prefix the message data with a varint-encoded length. 2. Union messages and oneofs are supported in order to implement top-level container messages. 3. Message IDs can be specified using the *(nanopb_msgopt).msgid* option and can then be accessed from the header. Return values and error handling ================================ Most functions in nanopb return bool: *true* means success, *false* means failure. There is also some support for error messages for debugging purposes: the error messages go in *stream->errmsg*. The error messages help in guessing what is the underlying cause of the error. The most common error conditions are: 1) Running out of memory, i.e. stack overflow. 2) Invalid field descriptors (would usually mean a bug in the generator). 3) IO errors in your own stream callbacks. 4) Errors that happen in your callback functions. 5) Exceeding the max_size or bytes_left of a stream. 6) Exceeding the max_size/max_count of a string or array field 7) Invalid protocol buffers binary message. nanopb-0.4.1/docs/generator_flow.svg000066400000000000000000003372011361552131000174620ustar00rootroot00000000000000 image/svg+xml MyMessage.proto pb_encode( ); pb_decode( ); nanopb_generator.py MyMessage.pb.c MyMessage.pb.h c Nanopb library Protocol Buffersmessages Data structures User application nanopb-0.4.1/docs/index.rst000066400000000000000000000134441361552131000155650ustar00rootroot00000000000000============================================= Nanopb: Protocol Buffers with small code size ============================================= .. include :: menu.rst Nanopb is an ANSI-C library for encoding and decoding messages in Google's `Protocol Buffers`__ format with minimal requirements for RAM and code space. It is primarily suitable for 32-bit microcontrollers. __ https://developers.google.com/protocol-buffers/docs/reference/overview Overall structure ================= For the runtime program, you always need *pb.h* for type declarations and *pb_common.h/c* for base functions. Depending on whether you want to encode, decode, or both, you also need *pb_encode.h/c* or *pb_decode.h/c*. The high-level encoding and decoding functions take a pointer to *pb_msgdesc_t* structure, which describes the fields of a message structure. Usually you want these autogenerated from a *.proto* file. The tool script *nanopb_generator.py* accomplishes this. .. image:: generator_flow.svg So a typical project might include these files: 1) Nanopb runtime library: - pb.h - pb_common.h and pb_common.c (always needed) - pb_decode.h and pb_decode.c (needed for decoding messages) - pb_encode.h and pb_encode.c (needed for encoding messages) 2) Protocol description (you can have many): - person.proto (just an example) - person.pb.c (autogenerated, contains initializers for const arrays) - person.pb.h (autogenerated, contains type declarations) Features and limitations ======================== **Features** #) Pure C runtime #) Small code size (5–10 kB depending on processor and compilation options, plus any message definitions) #) Small ram usage (typically ~300 bytes stack, plus any message structs) #) Allows specifying maximum size for strings and arrays, so that they can be allocated statically. #) No malloc needed: everything can be allocated statically or on the stack. Optional malloc support available. #) You can use either encoder or decoder alone to cut the code size in half. #) Support for most protobuf features, including: all data types, nested submessages, default values, repeated and optional fields, oneofs, packed arrays, extension fields. #) Callback mechanism for handling messages larger than can fit in available RAM. #) Extensive set of tests. **Limitations** #) Some speed has been sacrificed for code size. #) Encoding is focused on writing to streams. For memory buffers only it could be made more efficient. #) The deprecated Protocol Buffers feature called "groups" is not supported. #) Fields in the generated structs are ordered by the tag number, instead of the natural ordering in .proto file. #) Unknown fields are not preserved when decoding and re-encoding a message. #) Reflection (runtime introspection) is not supported. E.g. you can't request a field by giving its name in a string. #) Numeric arrays are always encoded as packed, even if not marked as packed in .proto. #) Cyclic references between messages are supported only in callback and malloc mode. #) Nanopb doesn't have a stable ABI (application binary interface) between versions, so using it as a shared library (.so / .dll) requires extra care. Getting started =============== For starters, consider this simple message:: message Example { required int32 value = 1; } Save this in *message.proto* and compile it:: user@host:~$ python nanopb/generator/nanopb_generator.py message.proto You should now have in *message.pb.h*:: typedef struct { int32_t value; } Example; extern const pb_msgdesc_t Example_msg; #define Example_fields &Example_msg Then you have to include the nanopb headers and the generated header:: #include #include "message.pb.h" Now in your main program do this to encode a message:: Example mymessage = {42}; uint8_t buffer[10]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); pb_encode(&stream, Example_fields, &mymessage); After that, buffer will contain the encoded message. The number of bytes in the message is stored in *stream.bytes_written*. You can feed the message to *protoc --decode=Example message.proto* to verify its validity. For a complete example of the simple case, see *examples/simple/simple.c*. For a more complex example with network interface, see the *examples/network_server* subdirectory. Compiler requirements ===================== Nanopb should compile with most ansi-C compatible compilers. It however requires a few header files to be available: #) *string.h*, with these functions: *strlen*, *memcpy*, *memset* #) *stdint.h*, for definitions of *int32_t* etc. #) *stddef.h*, for definition of *size_t* #) *stdbool.h*, for definition of *bool* #) *limits.h*, for definition of *CHAR_BIT* If these header files do not come with your compiler, you can use the file *extra/pb_syshdr.h* instead. It contains an example of how to provide the dependencies. You may have to edit it a bit to suit your custom platform. To use the pb_syshdr.h, define *PB_SYSTEM_HEADER* as *"pb_syshdr.h"* (including the quotes). Similarly, you can provide a custom include file, which should provide all the dependencies listed above. Running the test cases ====================== Extensive unittests and test cases are included under the *tests* folder. To build the tests, you will need the `scons`__ build system. The tests should be runnable on most platforms. Windows and Linux builds are regularly tested. The tests also support embedded targets: STM32 (ARM Cortex-M) and AVR builds are regularly tested. __ http://www.scons.org/ In addition to the build system, you will also need a working Google Protocol Buffers *protoc* compiler, and the Python bindings for Protocol Buffers. Easiest way to install dependencies is to use the Python package manager `pip`, which works on all platforms supported by Python:: pip install scons protobuf grpcio-tools nanopb-0.4.1/docs/logo/000077500000000000000000000000001361552131000146565ustar00rootroot00000000000000nanopb-0.4.1/docs/logo/logo.png000066400000000000000000000351751361552131000163370ustar00rootroot00000000000000PNG  IHDRRlsBIT|d pHYs7]7]F]tEXtSoftwarewww.inkscape.org< IDATx}y\EUf$,3@Bx/ $l"^P EYT@A+\DOEdQdMA4$L2gc2Ko]:{{ 9,]N[}_}UEB+ hG# @=֮.@ vT& EQcOo^!+ `zҎoBKW,`W@d! P `"K@%A;9x2V B; 3Z/a~T!7j D xb ױzMP:/s_|yc<H$ض=qF"`+MH$@w[[[@+KWMߝx=||ppp8[' Ʋ|!&B7u9 D"d"X\g+}ُd%`A|yaw]7 ,1x( X|cA?g0 ~ =܅Vf&9,ly8N> $Ps·B-e]6XO`0󫮺jODX,C,C4E$A8F(eY!I'\a-c ([t:=-Hj~v u5/chAr_ps~];Tmۓ*dRyW/@>#=aYҠѪ@^ g\v)rO~TUK'%>& Q-@=/"?fYVK_U_^+T9{rD✅ ~a 0n0Oݜ|`` t1upwv~US*88NMMͱVzb0A%-Wl3 ^:]uWttULֶmL&]hѾe~c1-J {۷oIW}^j|j{ LjP%NT.L>hѢJ>X]= oݺsKjغP*)LHޫ[Q,#`j>CsvZU3hJn`tј^?LUM/bf  (${e .1RKx?~\+4PTE Ó9uzx:tgQ{]7 nNx*k0&L٦V)B˲fv@-&"b1,^(%YBHaWv B"ә,+[L۶dɐJ044 &0R )4älU!8J",}u۷qDQXI?ϒj쒗v4~c=!DU 9(~ׇPB.tWn82LL# w}r]U!@*w]wbjr<>^W]"dFFy-rd2/M~LZӶ?@1GU pgΜ/T$X\y.md2 ud3Щ.-Tud_yw]7?eD[- NpbN5m{KHcXL)'ND___P"rii*ʣ>(j,hS>D1C5 mJT!J*b1ROG+YIUAD~; U#cE&7 AF ]uȼkkk  IVCy?;2-D\.CՂ\׽KdB`R3] %S- 6KiF@Pk֬  P5lڴ^W]@aj.nG jkkHקY/?^P\Tv:;4=צ:4%?9mQE6uuuyW$2)W)$TBsڲAO+ӧ鼱5ҰU[0aB^U\SOtwPP(eݺum#vv J 6CS*RIqZ@%D"E"zlYR "X-r݊#2LQ/-PƯjb16둨sY5iEWa]%W xyM H{P(_>U+~$a$y/U'ڵkx-w釆&ʿ AmmmAZ9-j `Y{W cF|zx%`xxHQ2U!i+]*eT9m\۶3̣DdCr"ӅB!L:hyF wd2cZvU݊FH4^w}Y/`blڵk,3RsLFK&I B@{T5'MH$2jWnp8O^:u1m$Z[[mtUxtO(O:EKJP:λRJe*c`|pp%qSx !Ѐ< TTc:$8鴯G9ĉ'cPyWT-m``widrEӆ{Kzٛ cI(m۶!Ymd-9Gmm 1Vaj rxuww;.Pf͚h4z >N.ӹj;'ǶmcƍQ=zTP#HOn)Ӫ'D"?TWBÅ2sXcs(;f͚&LX9_ WI477R)V:SD۶Jm۶!9GL0ᶮJ[mm׉jWf~*T۷o삝]B9sܜH$.B.Fkk=&M¬Y O_[%A<?jYVf„ ;}oc{$P[ Ez1l۶m]K ---ն꾔АW}T' 4{;}#}X,hY#Dtau!>(>eQ`oI÷&DZL® _KkllԩS H 9ywGGk}9_NDg$"ܶm[_0. > o1. ںO2|2\Jmf%H =E@qKq+*yI&BDQnv=BSmt%`Ƹ&)Dd2yF*۶_ eMMMX,6QQB7kYr%1y !RD-[g(nCgϮm ut]wumq:X/mfEDo "Zݝ;wns{1jlt8ml%e8qbs[ * k6mtUe_.ݖ59|>^:u(8Χ:;;﮴SLyJן9s͛J`%8pΏR jqy}_G"P 6b@GD/B_~[(q1Fz̎:PGzqc{{{߬,qbE3%P㙄״_dc?mtHucN%~ h+-˺ϫWeB`hmm=13/W҈8 ,GZ21V4K,mݖg ,83L}ԫ\tP@B%56#kkk[z] ---p |: -Aq,qeuH}{)˗/߾p?m{ofW?fߖǀyX~eꭷiߦ\ZZZb16i$$P r__MqZ}_j:Xn&H$A2[|ْHW XMjVQ7買zJO)%pcӉKIouҁƨeY䜟:!$>2u8F$ɷ&_}G [k+ҿ@D_nݿ*>~Pg2e-TaC_ B=⋿*R`| ?<_GQ_WqN:Q4tK U(!+xskvV. @e3gNc؇uuȏZkuSZ !nsYk#Qr /5 旡CAT/.&^{Bg?XcΜ9!؝Oꐪ 2\688e>H KR$&? U Y-\%G}Z&*LuE!joohzhnn6ck^6'u8yD«#3kU2 Pe477_@D*f]qZ-{Szz{{zO2<&H9 !@ ,IB B?x]18G]v[%W Zelذ᧮ N{9.xL^=KZpd8كNs5KGMcC,߷\oDD\m;w#tttt<8ΑUWpN&1D"Z%Sҗ4{mc6TϏH^>ݓ< <͝;?F *Иbs!":;T1o8g~1&$oMMMc SW4Ͳm0d@{dL=׭[qQ!:;;r]BT!r{˵gXkk믥=HD{׽}%q{uʔ)ׅ߯KX,nOpzH?_,W;F{"U'g`'cӦMOy!9\ם]d|kyS? D|~/C]#<[ \Fϝ;wa9yشiSB*C`j/^iQ5:uThar*N뺷O@]͛7;6mg !~ޡvzzz_D ,+dl:ʪ0Uw& g{Z[[O(u_@]͛7u#zt"000P˚_KGX?_BLD`r#*J``˖-B,xܾ}}}d2p](jT{Ԛ_ &_G$} !---'/PccyB~5 !0sLL8555^uh~㣺:zܣ6w5 =aN9Unk$o#G``˖-#mjtu'q:1&IDATJ!JqO*I1m_c)1H$Wo@@joo3eY߇6wȲ,8t:L&"*[L/}ߴcgW[ZZ&T}v6o/w]0H$'bԩ2e &Lh4$toi 6 X>7~]3hLbO0q]7oC3ЫƭڣVkл ^yqbuDtu $c@mD"VDx^.O] ːkSh"W!YfMڸqcz= :-<Ol`p04-#cp]T jE^=IFݠ55&{3 d]ՙT&/CIg{!Լ?ӿzO3ƸkRQ#9mp;SL4^%dӃ.ql޼+Vmϑ& i>x{ރ: v_WFM?wj9¯0nk/}J"=Ʋ6N&D"0sL̟?w\@V`:;;ADG4-=J^O?gy2qWc޼yX\IٳCy- C^xaTq34KBR?Z"kr2q_D*iV[n?^Y>}:/^KGy$z)B!lݺw7p8?G_0y\׍Xx'@X^58M:~:F2w\20EH֬YSpo2qm?m·mp m; i!U)T*C+T+z^%)655۶KR,{c/H $uɓ{(HQꀈDlBTޮG|( p`B UP4ADPBh.d K!ɽÎjH*E"Sȵ`6$ϟL6 }}}XjD ;/e(߀2 @D\ wTtD40y!Dgho&]O!g !Ƈ\x"7 !Wm8TѹBSԩS'DTAB+{yt'|tK"y($5i{wF%ɠK,^s㦛n֭[ #Rt[<5—$@F#Cr`Hspl|3ry L0wP,#h\D>=< imx:ψh2z4F !1>~GDK)BU'eYyUB.|!! CUFJ0#U$o3(z~r!KꫯW^N\]rZN p8v?ADW;j/ѵB~ C<1wBW4OX xçe9;|O4UQA tTqktS~oVII'#<s~il޼8蠃O~hBD"|8seK"%!1OQ]dk>> } )7W.BVKoʋPg"S-8 7 Dt<'~8O~ r7gV0Yp}ϔ#Lt:%I 3gw܁9swtt.5`l~?яkʕ+_\p 7 k_Z%y&)^Bt>?!CDUҿgjC"آAfn@rowA*xɧ y@7Xr'4d[%P8ٔtO !򭀌Uuԗ)S?9s&Q[[3fCepaOj*\tE{=wߍ5kIe͚5 x޼y8CrUhy0wY !:#/= Y]=\5CLVo=pBmN7bȶt%YTJDD"2^w]w'ytܫƾ%'+ʎ_v1++ ,VXQNzWͯ ṽ pv`Nx@2?gʔ,Wn!rC(%xې !w B?*kQX3Xi*/kWBlH "z7ӔKr \|vn)nDH`?DDY`=<>Q;7GM &N;$s}6,#ƾ7dW\ᗂ]__Xre&xחA`1d7 !(AD3U1F!D\ό> R P퍬#1gZX5s| Yפ7?P SfbG?jY{15\ӑUEaȅkx@zxFjLR6ȪP[%oG4_r\Wg6=] {YS9}|ǚ*} uԔwq2a۷oŋ܌vmx5#%ض]g"z'y!_Dcȶ/Vg '-3o?t^Gkt< Yڢ| ,ybȒxv.(,L<,D @~Vuu{qgY>=SO!H 9|M ~8#N}vl߾HR? /[l 7܀u^nOk/8MDŽvCvY0& Dt==7mNBlP];Z?aj5B?[E, ի$/ !n:d;dxگ!;444̊by!o@VX! YXp!.\X,fR^z%twwCGGQ?]t9r83xbB|~zӦM}QD"0 HB-˲n.pp~- nOroB(CȪ01dG93BMd",O( ;Yq˅p_3kKwJ5˲P dU1@x7o^~E?ؾ{8!9Ǽyc„ bH&ڵk[/ǫ*]جH1TgA(D *yXH\-GV4~+zm~RczzzZBp]&9RI0M[9~y+;63\ Z/rM'W5:J%~׼Ȩ=ZKUL/0ƞB0گ\T+W&N)_W};FIXuo<7ZsyIJcU"QՏjS L]ej5vwwh Zm_0dW d^~(G{/ǏjRZ߃sx<9AYf3g/8ޠj@ycM/G#^JOOw6!Z LDtcNaJy{L祌]/o?R'WA\'@얘5k֍PJ3ZTI>Ey{wwܢ5-nD"  s/4Of7hvO466η,X]9v@5jT} B1a@@MMMpCDV9hk/#^ߏBy|`7GSS5+US{-G)g$)r_s_YPU :TcT<~J=[q|:9rZ? z+ HazzV@=US]~"JZxE 44441V;HPJKc3Uj}z| Bo۶NsnBCCC egݚd_nOQ3 xK[=3 ; SNG\M¨鿩r|yʵ8x<;C1cƌ{AO&=\"UЏSrkgx碡!IE*S=W²OU܀pL>]|(j/!|Qs~MWW׷FRG}}t؝ ˭OW%ѼXp_' +F@=1~{Enr\#?a:F*,W@=ӦM[ uArr tcsTKB@=ӦMZugޭZ{뿗 2_70烃\-ADT__LuBf0iD87z< ")S|!N@%)8/(JDߚH$<5D]]ݑK !&!B]ǡH1 MD)DNqgυ2D@e^7a„-:!YȮBlCvMl~#Hmk & G# @=`F@{4أ hG# @=CA.=IIENDB`nanopb-0.4.1/docs/logo/logo.svg000066400000000000000000003127411361552131000163470ustar00rootroot00000000000000 image/svg+xml Pb Pb nano nano nanopb-0.4.1/docs/logo/logo16px.png000066400000000000000000000015261361552131000170470ustar00rootroot00000000000000PNG  IHDRasRGBbKGD pHYs ) )'g)tIME7/.IDAT8]?h,Uƿ{ޙɚlLn,,aB)X6 vBB*SF B V>l\OH,L$fdvgslKNww95 $Kʲ4凜k-f///_I,e[c̫Fֻ++++Q8~?I0|vdZ-89_6g~kkkZ |ߟ5s7MSՂB|վS8!0̵(pl۾fA'C U`uB]QVxn!"q3gu*AT F$DuijV2MrJ!譚QHW}gI(tP,ЀL&˲033S>sC5[quy^uF=σeY, DlC5@Dn"x]u\ׅ8B6>>fF2Dccc5KEQ|>|*j\eYmJr8utMMM0eyiUUg2k9~י)qDD>($IB:Fkk+$IB<ny?mDl6{_-骵_kY3e-cB\.l6 P,LOO|||dKc>UU/U{aJO{8k $T*u333G+u|~$x*z.WEY;22R Y[[[x<>L,J pL:~\UՇO:222sZ>/ONN`+A7񻦦;10ͮN*JZZZ.:&j5+cJ0>'@\̎>?}6]Rf.yS>?z{{eB,B j,?4445KK,٣|GRiOMM%HR_&+m?mYeYdYaP}uG x^ٹMQGCRPXa鉿{?B MӐL& !,B\%>u?qhhhmۛWUaWVY:T HӨC,, "HI*4M)\3ĉw:c@X,J}}biMdd2PUD4kmEiYIrƼW fcqݲrs<aXhADpar_,hk%IP5MCX b4QTS$Ȳ|{[[ۭ09\.}d2\W{,4gI7BHtV!h_V0ƩT*؈hǏW_}5FGG /x衇`oa؋1[ncjjjZ4`64Mؿ?֮]R{7Cn:ϚP Kt)DڕDJDO"ZLD "^"oiͯBrWֶ23<.03/^ݻwc4m\8N|8WXe^-)x Ww (|G3w"m #c֭⋱cǎ*[0 l۶m:$k|0cDop0vDTQ&6"zcDlEQ@D,300*f$IEڵ U,l3lt Ѓ ̼!~K<8w> Ef~.:%,p癹\(SG V|ϕ,}83 W`QApk) ^[wfc\>aٳzh2>>q{n ܹmW%cfw:::WddT~QU$'eRCDK?[afȲ UU Y\n,/˲n(D<+rO@r< /*ϝ Y!2t]ӧo XKK.f~XWb'TU}vbb.mmm+={uh5{(2E9-忱[tfv$I*HI^rSkll=\OƀlfSIENDB`nanopb-0.4.1/docs/lsr.css000066400000000000000000000070471361552131000152400ustar00rootroot00000000000000/* Author: Peter Parente Date: 2008/01/22 Version: 1.0 (modified) Copyright: This stylesheet has been placed in the public domain - free to edit and use for all uses. */ body { font: 100% sans-serif; background: #ffffff; color: black; margin: 2em; padding: 0em 2em; max-width: 1200px; } p.topic-title { font-weight: bold; } table.docinfo { text-align: left; margin: 2em 0em; } a[href] { color: #436976; background-color: transparent; } a.toc-backref { text-decoration: none; } h1 a[href] { color: #003a6b; text-decoration: none; background-color: transparent; } a.strong { font-weight: bold; } img { margin: 0; border: 0; } p { margin: 0.5em 0 1em 0; line-height: 1.5em; } p a:visited { color: purple; background-color: transparent; } p a:active { color: red; background-color: transparent; } a:hover { text-decoration: none; } p img { border: 0; margin: 0; } p.rubric { font-weight: bold; font-style: italic; } em, cite { font-style: normal; font-family: monospace; font-weight: bold; } pre { border-left: 3px double #aaa; padding: 5px 10px; background-color: #f6f6f6; } h1.title { color: #003a6b; font-size: 180%; margin-bottom: 0em; } h2.subtitle { color: #003a6b; border-bottom: 0px; } h1, h2, h3, h4, h5, h6 { color: #555; background-color: transparent; margin: 0em; padding-top: 0.5em; } h1 { font-size: 150%; margin-bottom: 0.5em; border-bottom: 2px solid #aaa; } h2 { font-size: 130%; margin-bottom: 0.5em; border-bottom: 1px solid #aaa; } h3 { font-size: 120%; margin-bottom: 0.5em; } h4 { font-size: 110%; font-weight: bold; margin-bottom: 0.5em; } h5 { font-size: 105%; font-weight: bold; margin-bottom: 0.5em; } h6 { font-size: 100%; font-weight: bold; margin-bottom: 0.5em; } dt { font-style: italic; } dd { margin-bottom: 1.5em; } div.admonition, div.note, div.tip, div.caution, div.important { margin: 2em 2em; padding: 0em 1em; border-top: 1px solid #aaa; border-left: 1px solid #aaa; border-bottom: 2px solid #555; border-right: 2px solid #555; } div.important { background: transparent url('../images/important.png') 10px 2px no-repeat; } div.caution { background: transparent url('../images/caution.png') 10px 2px no-repeat; } div.note { background: transparent url('../images/note.png') 10px 2px no-repeat; } div.tip { background: transparent url('../images/tip.png') 10px 2px no-repeat; } div.admonition-example { background: transparent url('../images/tip.png') 10px 2px no-repeat; } div.admonition-critical-example { background: transparent url('../images/important.png') 10px 2px no-repeat; } p.admonition-title { font-weight: bold; border-bottom: 1px solid #aaa; padding-left: 30px; } table.docutils { text-align: left; border: 1px solid gray; border-collapse: collapse; margin: 1.5em 0em; } table.docutils caption { font-style: italic; } table.docutils td, table.docutils th { padding: 0.25em 0.5em; } th.field-name { text-align: right; width: 15em; } table.docutils th { font-family: monospace; background-color: #f6f6f6; vertical-align: middle; } table.field-list { border: none; } div.sidebar { margin: 2em 2em 2em 0em; padding: 0em 1em; border-top: 1px solid #aaa; border-left: 1px solid #aaa; border-bottom: 2px solid #555; border-right: 2px solid #555; } p.sidebar-title { margin-bottom: 0em; color: #003a6b; border-bottom: 1px solid #aaa; font-weight: bold; } p.sidebar-subtitle { margin-top: 0em; font-style: italic; color: #003a6b; } nanopb-0.4.1/docs/menu.rst000066400000000000000000000006261361552131000154200ustar00rootroot00000000000000.. sidebar :: Documentation index 1) `Overview`_ 2) `Concepts`_ 3) `API reference`_ 4) `Security model`_ 5) `Migration from older versions`_ 6) `New features`_ .. _`Overview`: index.html .. _`Concepts`: concepts.html .. _`API reference`: reference.html .. _`Security model`: security.html .. _`Migration from older versions`: migration.html .. _`New features`: whats_new.html nanopb-0.4.1/docs/migration.rst000066400000000000000000000523521361552131000164500ustar00rootroot00000000000000===================================== Nanopb: Migration from older versions ===================================== .. include :: menu.rst This document details all the breaking changes that have been made to nanopb since its initial release. For each change, the rationale and required modifications of user applications are explained. Also any error indications are included, in order to make it easier to find this document. .. contents :: Nanopb-0.4.0 (future) ===================== New field descriptor format --------------------------- **Rationale:** Previously information about struct fields was stored as an array of `pb_field_t` structures. This was a straightforward method, but required allocating space for e.g. submessage type and array size for all fields, even though most fields are not submessages nor arrays. **Changes:** Now field information is encoded more efficiently in `uint32_t` array in a variable-length format. Old `pb_field_t` structure has been removed and it is now a typedef for `pb_field_iter_t`. This retains compatibility with most old callback definitions. The field definitions in `.pb.h` files are now of type `pb_msgdesc_t`. **Required actions:** If your own code accesses the low-level field information in `pb_field_t`, it must be modified to do so only through the functions declared in `pb_common.h`. **Error indications:** `incompatible pointer type` errors relating to `pb_field_t` Changes to generator default options ------------------------------------ **Rationale:** Previously nanopb_generator added a timestamp header to generated files and used only basename of files in `#include` directives. This is different than what the `protoc` C++ backend does. **Changes:** Now default options are `--no-timestamp` and `--no-strip-path`. **Required actions:** If old behaviour is desired, add `--timestamp` and `--strip-path` options to `nanopb_generator.py` or on `protoc` command line as `--nanopb_out=--timestamp,--strip-path:outdir`. **Error indications:** Compiler error: cannot find include file `mymessage.pb.h` when compiling `mymessage.pb.c`. Removal of bundled plugin.proto ------------------------------- **Rationale:** Google's Python protobuf library, which is used in nanopb generator, has included `plugin_pb2` with it since version 3.1.0. It is not necessary to bundle it with nanopb anymore. **Required actions:** Update `python-protobuf` to version 3.1.0 or newer. **Error indications:** `ImportError: No module named compiler.plugin_pb2` .options file is now always case-sensitive ------------------------------------------ **Rationale:** Previously field names in `.options` file were case-sensitive on Linux and case-insensitive on Windows. This was by accident. Because `.proto` files are case-sensitive, `.options` files should be too. **Changes:** Now field names in `.options` are always case-sensitive, and matched by `fnmatchcase()` instead of `fnmatch()`. **Required actions:** If field names in `.options` are not capitalized the same as in `.proto`, they must be updated. *CHAR_BIT* define is now needed ------------------------------- **Rationale:** To check whether the platform has 8-bit or larger chars, the C standard *CHAR_BIT* macro is needed. **Changes:** *pb.h* now includes *limits.h* for this macro. **Required actions:** If your platform doesn't have *limits.h* available, you can define the macro in *pb_syshdr.h*. There is an example in *extra* directory. **Error indications:** "Cannot find include file ." or "Undefined identifier: CHAR_BIT." Strings must now always be null-terminated ------------------------------------------ **Rationale:** Previously *pb_encode()* would accept non-terminated strings and assume that they are the full length of the defined array. However, *pb_decode()* would reject such messages because null terminator wouldn't fit in the array. **Changes:** *pb_encode()* will now return an error if null terminator is missing. Maximum encoded message size calculation is changed accordingly so that at most *max_size-1* strings are assumed. New field option *max_length* can be used to define the maximum string length, instead of the array size. **Required actions:** If your strings were previously filling the whole allocated array, increase the size of the field by 1. **Error indications:** *pb_encode()* returns error *unterminated string*. Removal of per-field default value constants -------------------------------------------- **Rationale:** Previously nanopb declared a `fieldname_default` constant variable for each field with a default value, and used these internally to initialize messages. This however used unnecessarily large amount of storage for the values. The variables were mostly for internal usage, but were available in the header file. **Changes:** Default values are now stored as an encoded protobuf message. **Required actions:** If your code previously used default constants, it will have to be adapted to take the default value in some other way, such as by accessing `static const MyMessage msg_default = MyMessage_init_default;` and `msg_default.fieldname`. **Error indications:** Compiler error about `fieldname_default` being undeclared. Zero tag in message now raises error by default ----------------------------------------------- **Rationale:** Previously nanopb has allowed messages to be terminated by a null byte, which is read as zero tag value. Most other protobuf implementations don't support this, so it is not very useful feature. It has also been noted that this can complicate debugging issues with corrupted messages. **Changes:** `pb_decode()` now gives error when it encounters zero tag value. A new function `pb_decode_ex()` supports flag `PB_DECODE_NULLTERMINATED` that supports decoding null terminated messages. **Required actions:** If application uses null termination for messages, switch it to use `pb_decode_ex()` and `pb_encode_ex()`. If compatibility with 0.3.9.x is needed, there are also `pb_decode_nullterminated()` and `pb_encode_nullterminated()` macros, which work both in 0.4.0 and 0.3.9. **Error indications:** Error message from `pb_decode()`: 'zero_tag'. Submessages now have has_field in proto3 mode --------------------------------------------- **Rationale:** Previously nanopb considered proto3 submessages as 'present' only when their contents was non-zero. Most other protobuf libraries allow explicit 'null' state for submessages. **Changes:** Submessages now have separate `has_field` in proto3 mode also. **Required actions:** When using submessages in proto3 mode, user code must now set `mymsg.has_submsg = true` for each submessage that is present. Alternatively, the field option `proto3_singular_msgs` can be used to restore the old behavior. **Error indications:** Submessages do not get encoded. PB_OLD_CALLBACK_STYLE option has been removed --------------------------------------------- **Rationale:** Back in 2013, function signature for callbacks was changed. The `PB_OLD_CALLBACK_STYLE` option allowed compatibility with old code, but complicated code and testing because of the different options. **Changes:** `PB_OLD_CALLBACK_STYLE` option no-longer has any effect. **Required actions:** If `PB_OLD_CALLBACK_STYLE` option was in use previously, function signatures must be updated to use double pointers (`void**` and `void * const *`). **Error indications:** Assignment from incompatible pointer type. protoc insertion points are no longer included by default --------------------------------------------------------- **Rationale:** Protoc allows including comments in form `@@protoc_insertion_point` to identify locations for other plugins to insert their own extra content. Previously these were included by default, but they clutter the generated files and are rarely used. **Changes:** Insertion points are now included only when `--protoc-insertion-points` option is passed to the generator. Nanopb-0.3.9.4, 0.4.0 (2019-xx-xx) ================================== Fix generation of min/max defines for enum types ------------------------------------------------ **Rationale:** Nanopb generator makes #defines for enum minimum and maximum value. Previously these defines incorrectly had the first and last enum value, instead of the actual minimum and maximum. (issue #405) **Changes:** Minimum define now always has the smallest value, and maximum define always has the largest value. **Required actions:** If these defines are used and enum values in .proto file are not defined in ascending order, user code behaviour may change. Check that user code doesn't expect the old, incorrect first/last behaviour. Fix undefined behavior related to bool fields --------------------------------------------- **Rationale:** In C99, `bool` variables are not allowed to have other values than `true` and `false`. Compilers use this fact in optimization, and constructs like `int foo = msg.has_field ? 100 : 0` will give unexpected results otherwise. Previously nanopb didn't enforce that decoded bool fields had valid values. **Changes:** Bool fields are now handled separately as `PB_LTYPE_BOOL`. The `LTYPE` descriptor numbers for other field types were renumbered. **Required actions:** Source code files must be recompiled, but regenerating `.pb.h`/`.pb.c` files from `.proto` is not required. If user code directly uses the nanopb internal field representation (search for `PB_LTYPE_VARINT` in source), it may need updating. Nanopb-0.3.9.1, 0.4.0 (2018-04-14) ================================== Fix handling of string and bytes default values ----------------------------------------------- **Rationale:** Previously nanopb didn't properly decode special character escapes like \\200 emitted by protoc. This caused these escapes to end up verbatim in the default values in .pb.c file. **Changes:** Escapes are now decoded, and e.g. "\\200" or "\\x80" results in {0x80} for bytes field and "\\x80" for string field. **Required actions:** If code has previously relied on '\\' in default value being passed through verbatim, it must now be changed to '\\\\'. Nanopb-0.3.8 (2017-03-05) ========================= Fully drain substreams before closing ------------------------------------- **Rationale:** If the substream functions were called directly and the caller did not completely empty the substring before closing it, the parent stream would be put into an incorrect state. **Changes:** *pb_close_string_substream* can now error and returns a boolean. **Required actions:** Add error checking onto any call to *pb_close_string_substream*. Change oneof format in .pb.c files ---------------------------------- **Rationale:** Previously two oneofs in a single message would be erroneously handled as part of the same union. **Changes:** Oneofs fields now use special *PB_DATAOFFSET_UNION* offset type in generated .pb.c files to distinguish whether they are the first or following field inside an union. **Required actions:** Regenerate *.pb.c/.pb.h* files with new nanopb version if oneofs are used. Nanopb-0.3.5 (2016-02-13) ========================= Add support for platforms without uint8_t ----------------------------------------- **Rationale:** Some platforms cannot access 8-bit sized values directly, and do not define *uint8_t*. Nanopb previously didn't support these platforms. **Changes:** References to *uint8_t* were replaced with several alternatives, one of them being a new *pb_byte_t* typedef. This in turn uses *uint_least8_t* which means the smallest available type. **Required actions:** If your platform does not have a standards-compliant *stdint.h*, it may lack the definition for *[u]int_least8_t*. This must be added manually, example can be found in *extra/pb_syshdr.h*. **Error indications:** Compiler error: "unknown type name 'uint_least8_t'". Nanopb-0.3.2 (2015-01-24) ========================= Add support for OneOfs ---------------------- **Rationale:** Previously nanopb did not support the *oneof* construct in *.proto* files. Those fields were generated as regular *optional* fields. **Changes:** OneOfs are now generated as C unions. Callback fields are not supported inside oneof and generator gives an error. **Required actions:** The generator option *no_unions* can be used to restore old behaviour and to allow callbacks to be used. To use unions, one change is needed: use *which_xxxx* field to detect which field is present, instead of *has_xxxx*. Compare the value against *MyStruct_myfield_tag*. **Error indications:** Generator error: "Callback fields inside of oneof are not supported". Compiler error: "Message" has no member named "has_xxxx". Nanopb-0.3.0 (2014-08-26) ========================= Separate field iterator logic to pb_common.c -------------------------------------------- **Rationale:** Originally, the field iteration logic was simple enough to be duplicated in *pb_decode.c* and *pb_encode.c*. New field types have made the logic more complex, which required the creation of a new file to contain the common functionality. **Changes:** There is a new file, *pb_common.c*, which must be included in builds. **Required actions:** Add *pb_common.c* to build rules. This file is always required. Either *pb_decode.c* or *pb_encode.c* can still be left out if some functionality is not needed. **Error indications:** Linker error: undefined reference to *pb_field_iter_begin*, *pb_field_iter_next* or similar. Change data type of field counts to pb_size_t --------------------------------------------- **Rationale:** Often nanopb is used with small arrays, such as 255 items or less. Using a full *size_t* field to store the array count wastes memory if there are many arrays. There already exists parameters *PB_FIELD_16BIT* and *PB_FIELD_32BIT* which tell nanopb what is the maximum size of arrays in use. **Changes:** Generator will now use *pb_size_t* for the array *_count* fields. The size of the type will be controlled by the *PB_FIELD_16BIT* and *PB_FIELD_32BIT* compilation time options. **Required actions:** Regenerate all *.pb.h* files. In some cases casts to the *pb_size_t* type may need to be added in the user code when accessing the *_count* fields. **Error indications:** Incorrect data at runtime, crashes. But note that other changes in the same version already require regenerating the files and have better indications of errors, so this is only an issue for development versions. Renamed some macros and identifiers ----------------------------------- **Rationale:** Some names in nanopb core were badly chosen and conflicted with ISO C99 reserved names or lacked a prefix. While they haven't caused trouble so far, it is reasonable to switch to non-conflicting names as these are rarely used from user code. **Changes:** The following identifier names have changed: * Macros: * STATIC_ASSERT(x) -> PB_STATIC_ASSERT(x) * UNUSED(x) -> PB_UNUSED(x) * Include guards: * _PB_filename_ -> PB_filename_INCLUDED * Structure forward declaration tags: * _pb_field_t -> pb_field_s * _pb_bytes_array_t -> pb_bytes_array_s * _pb_callback_t -> pb_callback_s * _pb_extension_type_t -> pb_extension_type_s * _pb_extension_t -> pb_extension_s * _pb_istream_t -> pb_istream_s * _pb_ostream_t -> pb_ostream_s **Required actions:** Regenerate all *.pb.c* files. If you use any of the above identifiers in your application code, perform search-replace to the new name. **Error indications:** Compiler errors on lines with the macro/type names. Nanopb-0.2.9 (2014-08-09) ========================= Change semantics of generator -e option --------------------------------------- **Rationale:** Some compilers do not accept filenames with two dots (like in default extension .pb.c). The *-e* option to the generator allowed changing the extension, but not skipping the extra dot. **Changes:** The *-e* option in generator will no longer add the prepending dot. The default value has been adjusted accordingly to *.pb.c* to keep the default behaviour the same as before. **Required actions:** Only if using the generator -e option. Add dot before the parameter value on the command line. **Error indications:** File not found when trying to compile generated files. Nanopb-0.2.7 (2014-04-07) ========================= Changed pointer-type bytes field datatype ----------------------------------------- **Rationale:** In the initial pointer encoding support since nanopb-0.2.5, the bytes type used a separate *pb_bytes_ptr_t* type to represent *bytes* fields. This made it easy to encode data from a separate, user-allocated buffer. However, it made the internal logic more complex and was inconsistent with the other types. **Changes:** Dynamically allocated bytes fields now have the *pb_bytes_array_t* type, just like statically allocated ones. **Required actions:** Only if using pointer-type fields with the bytes datatype. Change any access to *msg->field.size* to *msg->field->size*. Change any allocation to reserve space of amount *PB_BYTES_ARRAY_T_ALLOCSIZE(n)*. If the data pointer was begin assigned from external source, implement the field using a callback function instead. **Error indications:** Compiler error: unknown type name *pb_bytes_ptr_t*. Nanopb-0.2.4 (2013-11-07) ========================= Remove the NANOPB_INTERNALS compilation option ---------------------------------------------- **Rationale:** Having the option in the headers required the functions to be non-static, even if the option is not used. This caused errors on some static analysis tools. **Changes:** The *#ifdef* and associated functions were removed from the header. **Required actions:** Only if the *NANOPB_INTERNALS* option was previously used. Actions are as listed under nanopb-0.1.3 and nanopb-0.1.6. **Error indications:** Compiler warning: implicit declaration of function *pb_dec_string*, *pb_enc_string*, or similar. Nanopb-0.2.1 (2013-04-14) ========================= Callback function signature --------------------------- **Rationale:** Previously the auxilary data to field callbacks was passed as *void\**. This allowed passing of any data, but made it unnecessarily complex to return a pointer from callback. **Changes:** The callback function parameter was changed to *void\*\**. **Required actions:** You can continue using the old callback style by defining *PB_OLD_CALLBACK_STYLE*. Recommended action is to: * Change the callback signatures to contain *void\*\** for decoders and *void \* const \** for encoders. * Change the callback function body to use *\*arg* instead of *arg*. **Error indications:** Compiler warning: assignment from incompatible pointer type, when initializing *funcs.encode* or *funcs.decode*. Nanopb-0.2.0 (2013-03-02) ========================= Reformatted generated .pb.c file using macros --------------------------------------------- **Rationale:** Previously the generator made a list of C *pb_field_t* initializers in the .pb.c file. This led to a need to regenerate all .pb.c files after even small changes to the *pb_field_t* definition. **Changes:** Macros were added to pb.h which allow for cleaner definition of the .pb.c contents. By changing the macro definitions, changes to the field structure are possible without breaking compatibility with old .pb.c files. **Required actions:** Regenerate all .pb.c files from the .proto sources. **Error indications:** Compiler warning: implicit declaration of function *pb_delta_end*. Changed pb_type_t definitions ----------------------------- **Rationale:** The *pb_type_t* was previously an enumeration type. This caused warnings on some compilers when using bitwise operations to set flags inside the values. **Changes:** The *pb_type_t* was changed to *typedef uint8_t*. The values were changed to *#define*. Some value names were changed for consistency. **Required actions:** Only if you directly access the `pb_field_t` contents in your own code, something which is not usually done. Needed changes: * Change *PB_HTYPE_ARRAY* to *PB_HTYPE_REPEATED*. * Change *PB_HTYPE_CALLBACK* to *PB_ATYPE()* and *PB_ATYPE_CALLBACK*. **Error indications:** Compiler error: *PB_HTYPE_ARRAY* or *PB_HTYPE_CALLBACK* undeclared. Nanopb-0.1.6 (2012-09-02) ========================= Refactored field decoder interface ---------------------------------- **Rationale:** Similarly to field encoders in nanopb-0.1.3. **Changes:** New functions with names *pb_decode_\** were added. **Required actions:** By defining NANOPB_INTERNALS, you can still keep using the old functions. Recommended action is to replace any calls with the newer *pb_decode_\** equivalents. **Error indications:** Compiler warning: implicit declaration of function *pb_dec_string*, *pb_dec_varint*, *pb_dec_submessage* or similar. Nanopb-0.1.3 (2012-06-12) ========================= Refactored field encoder interface ---------------------------------- **Rationale:** The old *pb_enc_\** functions were designed mostly for the internal use by the core. Because they are internally accessed through function pointers, their signatures had to be common. This led to a confusing interface for external users. **Changes:** New functions with names *pb_encode_\** were added. These have easier to use interfaces. The old functions are now only thin wrappers for the new interface. **Required actions:** By defining NANOPB_INTERNALS, you can still keep using the old functions. Recommended action is to replace any calls with the newer *pb_encode_\** equivalents. **Error indications:** Compiler warning: implicit declaration of function *pb_enc_string*, *pb_enc_varint, *pb_enc_submessage* or similar. nanopb-0.4.1/docs/reference.rst000066400000000000000000001247251361552131000164210ustar00rootroot00000000000000===================== Nanopb: API reference ===================== .. include :: menu.rst .. contents :: Compilation options =================== The following options can be specified in one of two ways: 1. Using the -D switch on the C compiler command line. 2. By #defining them at the top of pb.h. You must have the same settings for the nanopb library and all code that includes pb.h. ============================ ================================================ PB_NO_PACKED_STRUCTS Disable packed structs. Increases RAM usage but is necessary on some platforms that do not support unaligned memory access. PB_ENABLE_MALLOC Set this to enable dynamic allocation support in the decoder. PB_MAX_REQUIRED_FIELDS Maximum number of required fields to check for presence. Default value is 64. Increases stack usage 1 byte per every 8 fields. Compiler warning will tell if you need this. PB_FIELD_32BIT Add support for tag numbers > 65535 and fields larger than 65535 bytes or 65535 array entries. Increases code size 9 bytes per each field. Compiler error will tell if you need this. PB_NO_ERRMSG Disables the support for error messages; only error information is the true/false return value. Decreases the code size by a few hundred bytes. PB_BUFFER_ONLY Disables the support for custom streams. Only supports encoding and decoding with memory buffers. Speeds up execution and decreases code size slightly. PB_SYSTEM_HEADER Replace the standard header files with a single header file. It should define all the required functions and typedefs listed on the `overview page`_. Value must include quotes, for example *#define PB_SYSTEM_HEADER "foo.h"*. PB_WITHOUT_64BIT Disable 64-bit support, for old compilers or for a slight speedup on 8-bit platforms. PB_ENCODE_ARRAYS_UNPACKED Don't encode scalar arrays as packed. This is only to be used when the decoder on the receiving side cannot process packed scalar arrays. Such example is older protobuf.js. PB_CONVERT_DOUBLE_FLOAT Convert doubles to floats for platforms that do not support 64-bit doubles. Mainly AVR. PB_VALIDATE_UTF8 Check whether incoming strings are valid UTF-8 sequences. Slows down the string processing slightly and slightly increases code size. ============================ ================================================ The PB_MAX_REQUIRED_FIELDS and PB_FIELD_32BIT settings allow raising some datatype limits to suit larger messages. Their need is recognized automatically by C-preprocessor #if-directives in the generated `.pb.c` files. The default setting is to use the smallest datatypes (least resources used). .. _`overview page`: index.html#compiler-requirements Proto file options ================== The generator behaviour can be adjusted using several options, defined in the `nanopb.proto`_ file in the generator folder. Here is a list of the most common options, but see the file for a full list: .. _`nanopb.proto`: https://github.com/nanopb/nanopb/blob/master/generator/proto/nanopb.proto ============================ ================================================ max_size Allocated size for *bytes* and *string* fields. max_count Allocated number of entries in arrays (*repeated* fields). int_size Override the integer type of a field. (To use e.g. uint8_t to save RAM.) type Type of the generated field. Default value is *FT_DEFAULT*, which selects automatically. You can use *FT_CALLBACK*, *FT_POINTER*, *FT_STATIC* or *FT_IGNORE* to force a callback field, a dynamically allocated field, a static field or to completely ignore the field. long_names Prefix the enum name to the enum value in definitions, i.e. *EnumName_EnumValue*. Enabled by default. packed_struct Make the generated structures packed. NOTE: This cannot be used on CPUs that break on unaligned accesses to variables. skip_message Skip the whole message from generation. no_unions Generate 'oneof' fields as optional fields instead of C unions. msgid Specifies a unique id for this message type. Can be used by user code as an identifier. anonymous_oneof Generate 'oneof' fields as anonymous unions. fixed_length Generate 'bytes' fields with constant length (max_size must also be defined). fixed_count Generate arrays with constant length (max_count must also be defined). package Package name that applies only for nanopb generator, as opposed to the .proto file *package* keyword that applies for all languages. ============================ ================================================ These options can be defined for the .proto files before they are converted using the nanopb-generatory.py. There are three ways to define the options: 1. Using a separate .options file. This allows using wildcards for applying same options to multiple fields. 2. Defining the options on the command line of nanopb_generator.py. This only makes sense for settings that apply to a whole file. 3. Defining the options in the .proto file using the nanopb extensions. This keeps the options close to the fields they apply to, but can be problematic if the same .proto file is shared with many projects. The effect of the options is the same no matter how they are given. The most common purpose is to define maximum size for string fields in order to statically allocate them. Defining the options in a .options file --------------------------------------- The preferred way to define options is to have a separate file 'myproto.options' in the same directory as the 'myproto.proto'. :: # myproto.proto message MyMessage { required string name = 1; repeated int32 ids = 4; } :: # myproto.options MyMessage.name max_size:40 MyMessage.ids max_count:5 The generator will automatically search for this file and read the options from it. The file format is as follows: * Lines starting with '#' or '//' are regarded as comments. * Blank lines are ignored. * All other lines should start with a field name pattern, followed by one or more options. For example: *"MyMessage.myfield max_size:5 max_count:10"*. * The field name pattern is matched against a string of form *'Message.field'*. For nested messages, the string is *'Message.SubMessage.field'*. * The field name pattern may use the notation recognized by Python fnmatch(): - *\** matches any part of string, like 'Message.\*' for all fields - *\?* matches any single character - *[seq]* matches any of characters 's', 'e' and 'q' - *[!seq]* matches any other character * The options are written as *'option_name:option_value'* and several options can be defined on same line, separated by whitespace. * Options defined later in the file override the ones specified earlier, so it makes sense to define wildcard options first in the file and more specific ones later. To debug problems in applying the options, you can use the *-v* option for the nanopb generator. With protoc, plugin options are specified in front of the output path: nanopb_generator -v message.proto # When invoked directly protoc ... --nanopb_out=-v:. message.proto # When invoked through protoc Protoc doesn't currently pass include path into plugins. Therefore if your *.proto* is in a subdirectory, nanopb may have trouble finding the associated *.options* file. A workaround is to specify include path separately to the nanopb plugin, like: protoc -Isubdir --nanopb_out=-Isubdir:. message.proto If preferred, the name of the options file can be set using plugin argument *-f*. Defining the options on command line ------------------------------------ The nanopb_generator.py has a simple command line option *-s OPTION:VALUE*. The setting applies to the whole file that is being processed. Defining the options in the .proto file --------------------------------------- The .proto file format allows defining custom options for the fields. The nanopb library comes with *nanopb.proto* which does exactly that, allowing you do define the options directly in the .proto file:: import "nanopb.proto"; message MyMessage { required string name = 1 [(nanopb).max_size = 40]; repeated int32 ids = 4 [(nanopb).max_count = 5]; } A small complication is that you have to set the include path of protoc so that nanopb.proto can be found. Therefore, to compile a .proto file which uses options, use a protoc command similar to:: protoc -Inanopb/generator/proto -I. --nanopb_out=. message.proto The options can be defined in file, message and field scopes:: option (nanopb_fileopt).max_size = 20; // File scope message Message { option (nanopb_msgopt).max_size = 30; // Message scope required string fieldsize = 1 [(nanopb).max_size = 40]; // Field scope } pb.h ==== pb_byte_t --------- Type used for storing byte-sized data, such as raw binary input and bytes-type fields. :: typedef uint_least8_t pb_byte_t; For most platforms this is equivalent to `uint8_t`. Some platforms however do not support 8-bit variables, and on those platforms 16 or 32 bits need to be used for each byte. pb_size_t --------- Type used for storing tag numbers and sizes of message fields. By default the type is 16-bit:: typedef uint_least16_t pb_size_t; If tag numbers or fields larger than 65535 are needed, `PB_FIELD_32BIT` option can be used to change the type to 32-bit value. pb_type_t --------- Type used to store the type of each field, to control the encoder/decoder behaviour. :: typedef uint_least8_t pb_type_t; The low-order nibble of the enumeration values defines the function that can be used for encoding and decoding the field data: =========================== ===== ================================================ LTYPE identifier Value Storage format =========================== ===== ================================================ PB_LTYPE_BOOL 0x00 Boolean. PB_LTYPE_VARINT 0x01 Integer. PB_LTYPE_UVARINT 0x02 Unsigned integer. PB_LTYPE_SVARINT 0x03 Integer, zigzag encoded. PB_LTYPE_FIXED32 0x04 32-bit integer or floating point. PB_LTYPE_FIXED64 0x05 64-bit integer or floating point. PB_LTYPE_BYTES 0x06 Structure with *size_t* field and byte array. PB_LTYPE_STRING 0x07 Null-terminated string. PB_LTYPE_SUBMESSAGE 0x08 Submessage structure. PB_LTYPE_SUBMSG_W_CB 0x09 Submessage with pre-decoding callback. PB_LTYPE_EXTENSION 0x0A Point to *pb_extension_t*. PB_LTYPE_FIXED_LENGTH_BYTES 0x0B Inline *pb_byte_t* array of fixed size. =========================== ===== ================================================ The bits 4-5 define whether the field is required, optional or repeated. There are separate definitions for semantically different modes, even though some of them share values and are distinguished based on values of other fields: ==================== ===== ================================================ HTYPE identifier Value Field handling ==================== ===== ================================================ PB_HTYPE_REQUIRED 0x00 Verify that field exists in decoded message. PB_HTYPE_OPTIONAL 0x10 Use separate *has_* boolean to specify whether the field is present. PB_HTYPE_SINGULAR 0x10 Proto3 field, which is present when its value is non-zero. PB_HTYPE_REPEATED 0x20 A repeated field with preallocated array. Separate *_count* for number of items. PB_HTYPE_FIXARRAY 0x20 A repeated field that has constant length. PB_HTYPE_ONEOF 0x30 Oneof-field, only one of each group can be present. ==================== ===== ================================================ The bits 6-7 define the how the storage for the field is allocated: ==================== ===== ================================================ ATYPE identifier Value Allocation method ==================== ===== ================================================ PB_ATYPE_STATIC 0x00 Statically allocated storage in the structure. PB_ATYPE_POINTER 0x80 Dynamically allocated storage. Struct field contains a pointer to the storage. PB_ATYPE_CALLBACK 0x40 A field with dynamic storage size. Struct field contains a pointer to a callback function. ==================== ===== ================================================ pb_msgdesc_t ------------ Autogenerated structure that contains information about a message and pointers to the field descriptors. Use functions defined in `pb_common.h` to process the field information:: typedef struct pb_msgdesc_s pb_msgdesc_t; struct pb_msgdesc_s { pb_size_t field_count; const uint32_t *field_info; const pb_msgdesc_t * const * submsg_info; const pb_byte_t *default_value; bool (*field_callback)(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_iter_t *field); }; :field_count: Total number of fields in the message. :field_info: Pointer to compact representation of the field information. :submsg_info: Pointer to array of pointers to descriptors for submessages. :default_value: Default values for this message as an encoded protobuf message. :field_callback: Function used to handle all callback fields in this message. By default `pb_default_field_callback()` loads per-field callbacks from a `pb_callback_t` structure. pb_field_iter_t --------------- Describes a single structure field with memory position in relation to others. The field information is stored in a compact format and loaded into `pb_field_iter_t` by the functions defined in `pb_common.h`. :: typedef struct pb_field_iter_s pb_field_iter_t; struct pb_field_iter_s { const pb_msgdesc_t *descriptor; void *message; pb_size_t index; pb_size_t field_info_index; pb_size_t required_field_index; pb_size_t submessage_index; pb_size_t tag; pb_size_t data_size; pb_size_t array_size; pb_type_t type; void *pField; void *pData; void *pSize; const pb_msgdesc_t *submsg_desc; }; :descriptor: Pointer to `pb_msgdesc_t` for the message that contains this field. :message: Pointer to the start of the message structure. :index: Index of the field inside the message :field_info_index: Index to the internal `field_info` array :required_field_index: Index that counts only the required fields :submessage_index: Index that counts only submessages :tag: Tag number defined in `.proto` file for this field. :data_size: `sizeof()` of the field in the structure. For repeated fields this is for a single array entry. :array_size: Maximum number of items in a statically allocated array. :type: Type (`pb_type_t`_) of the field. :pField: Pointer to the field storage in the structure. :pData: Pointer to data contents. For arrays and pointers this can be different than `pField`. :pSize: Pointer to count or has field, or NULL if this field doesn't have such. :submsg_desc: For submessage fields, points to the descriptor for the submessage. By default `pb_size_t`_ is 16-bit, limiting the sizes and tags to 65535. The limit can be raised by defining `PB_FIELD_32BIT`. pb_bytes_array_t ---------------- An byte array with a field for storing the length:: typedef struct { pb_size_t size; pb_byte_t bytes[1]; } pb_bytes_array_t; In an actual array, the length of *bytes* may be different. The macros `PB_BYTES_ARRAY_T()` and `PB_BYTES_ARRAY_T_ALLOCSIZE()` are used to allocate variable length storage for bytes fields. pb_callback_t ------------- Part of a message structure, for fields with type PB_HTYPE_CALLBACK:: typedef struct _pb_callback_t pb_callback_t; struct _pb_callback_t { union { bool (*decode)(pb_istream_t *stream, const pb_field_iter_t *field, void **arg); bool (*encode)(pb_ostream_t *stream, const pb_field_iter_t *field, void * const *arg); } funcs; void *arg; }; A pointer to the *arg* is passed to the callback when calling. It can be used to store any information that the callback might need. Note that this is a double pointer. If you set `field.arg` to point to `&data` in your main code, in the callback you can access it like this:: myfunction(*arg); /* Gives pointer to data as argument */ myfunction(*(data_t*)*arg); /* Gives value of data as argument */ *arg = newdata; /* Alters value of field.arg in structure */ When calling `pb_encode`_, *funcs.encode* is used, and similarly when calling `pb_decode`_, *funcs.decode* is used. The function pointers are stored in the same memory location but are of incompatible types. You can set the function pointer to NULL to skip the field. pb_wire_type_t -------------- Protocol Buffers wire types. These are used with `pb_encode_tag`_. :: typedef enum { PB_WT_VARINT = 0, PB_WT_64BIT = 1, PB_WT_STRING = 2, PB_WT_32BIT = 5 } pb_wire_type_t; pb_extension_type_t ------------------- Defines the handler functions and auxiliary data for a field that extends another message. Usually autogenerated by *nanopb_generator.py*:: typedef struct { bool (*decode)(pb_istream_t *stream, pb_extension_t *extension, uint32_t tag, pb_wire_type_t wire_type); bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension); const void *arg; } pb_extension_type_t; In the normal case, the function pointers are *NULL* and the decoder and encoder use their internal implementations. The internal implementations assume that *arg* points to a `pb_field_iter_t`_ that describes the field in question. To implement custom processing of unknown fields, you can provide pointers to your own functions. Their functionality is mostly the same as for normal callback fields, except that they get called for any unknown field when decoding. pb_extension_t -------------- Ties together the extension field type and the storage for the field value:: typedef struct { const pb_extension_type_t *type; void *dest; pb_extension_t *next; bool found; } pb_extension_t; :type: Pointer to the structure that defines the callback functions. :dest: Pointer to the variable that stores the field value (as used by the default extension callback functions.) :next: Pointer to the next extension handler, or *NULL*. :found: Decoder sets this to true if the extension was found. PB_GET_ERROR ------------ Get the current error message from a stream, or a placeholder string if there is no error message:: #define PB_GET_ERROR(stream) (string expression) This should be used for printing errors, for example:: if (!pb_decode(...)) { printf("Decode failed: %s\n", PB_GET_ERROR(stream)); } The macro only returns pointers to constant strings (in code memory), so that there is no need to release the returned pointer. PB_RETURN_ERROR --------------- Set the error message and return false:: #define PB_RETURN_ERROR(stream,msg) (sets error and returns false) This should be used to handle error conditions inside nanopb functions and user callback functions:: if (error_condition) { PB_RETURN_ERROR(stream, "something went wrong"); } The *msg* parameter must be a constant string. PB_BIND ------- This macro generates the `pb_msgdesc_t`_ and associated arrays, based on a list of fields in `X-macro`_ format. :: #define PB_BIND(msgname, structname, width) ... :msgname: Name of the message type. Expects `msgname_FIELDLIST` macro to exist. :structname: Name of the C structure to bind to. :width: Number of words per field descriptor, or `AUTO` to use minimum size possible. This macro is automatically invoked inside the autogenerated `.pb.c` files. User code can also call it to bind message types with custom structures or class types. .. _`X-macro`: https://en.wikipedia.org/wiki/X_Macro pb_encode.h =========== pb_ostream_from_buffer ---------------------- Constructs an output stream for writing into a memory buffer. This is just a helper function, it doesn't do anything you couldn't do yourself in a callback function. It uses an internal callback that stores the pointer in stream *state* field. :: pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); :buf: Memory buffer to write into. :bufsize: Maximum number of bytes to write. :returns: An output stream. After writing, you can check *stream.bytes_written* to find out how much valid data there is in the buffer. pb_write -------- Writes data to an output stream. Always use this function, instead of trying to call stream callback manually. :: bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); :stream: Output stream to write to. :buf: Pointer to buffer with the data to be written. :count: Number of bytes to write. :returns: True on success, false if maximum length is exceeded or an IO error happens. If an error happens, *bytes_written* is not incremented. Depending on the callback used, calling pb_write again after it has failed once may be dangerous. Nanopb itself never does this, instead it returns the error to user application. The builtin pb_ostream_from_buffer is safe to call again after failed write. pb_encode --------- Encodes the contents of a structure as a protocol buffers message and writes it to output stream. :: bool pb_encode(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct); :stream: Output stream to write to. :fields: Message descriptor, usually autogenerated. :src_struct: Pointer to the data that will be serialized. :returns: True on success, false on IO error, on detectable errors in field description, or if a field encoder returns false. Normally pb_encode simply walks through the fields description array and serializes each field in turn. However, submessages must be serialized twice: first to calculate their size and then to actually write them to output. This causes some constraints for callback fields, which must return the same data on every call. pb_encode_ex ------------------- Encodes the message, with several extended options:: bool pb_encode_ex(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct, unsigned int flags); :stream: Output stream to write to. :fields: Message descriptor, usually autogenerated. :src_struct: Pointer to the data that will be serialized. :flags: Extended options, see below. :returns: True on success, false on IO error, on detectable errors in field description, or if a field encoder returns false. The options that can be defined are: :PB_ENCODE_DELIMITED: Indicate the length of the message by prefixing with a varint-encoded length. Compatible with *parseDelimitedFrom* in Google's protobuf library. :PB_ENCODE_NULLTERMINATED: Indicate the length of the message by appending a zero tag value after it. Supported by nanopb decoder, but not by most other protobuf libraries. pb_get_encoded_size ------------------- Calculates the length of the encoded message. :: bool pb_get_encoded_size(size_t *size, const pb_msgdesc_t *fields, const void *src_struct); :size: Calculated size of the encoded message. :fields: Message descriptor, usually autogenerated. :src_struct: Pointer to the data that will be serialized. :returns: True on success, false on detectable errors in field description or if a field encoder returns false. .. sidebar:: Encoding fields manually The functions with names *pb_encode_\** are used when dealing with callback fields. The typical reason for using callbacks is to have an array of unlimited size. In that case, `pb_encode`_ will call your callback function, which in turn will call *pb_encode_\** functions repeatedly to write out values. The tag of a field must be encoded separately with `pb_encode_tag_for_field`_. After that, you can call exactly one of the content-writing functions to encode the payload of the field. For repeated fields, you can repeat this process multiple times. Writing packed arrays is a little bit more involved: you need to use `pb_encode_tag` and specify `PB_WT_STRING` as the wire type. Then you need to know exactly how much data you are going to write, and use `pb_encode_varint`_ to write out the number of bytes before writing the actual data. Substreams can be used to determine the number of bytes beforehand; see `pb_encode_submessage`_ source code for an example. pb_encode_tag ------------- Starts a field in the Protocol Buffers binary format: encodes the field number and the wire type of the data. :: bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number); :stream: Output stream to write to. 1-5 bytes will be written. :wiretype: PB_WT_VARINT, PB_WT_64BIT, PB_WT_STRING or PB_WT_32BIT :field_number: Identifier for the field, defined in the .proto file. You can get it from field->tag. :returns: True on success, false on IO error. pb_encode_tag_for_field ----------------------- Same as `pb_encode_tag`_, except takes the parameters from a *pb_field_iter_t* structure. :: bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_iter_t *field); :stream: Output stream to write to. 1-5 bytes will be written. :field: Field iterator for this field. :returns: True on success, false on IO error or unknown field type. This function only considers the LTYPE of the field. You can use it from your field callbacks, because the source generator writes correct LTYPE also for callback type fields. Wire type mapping is as follows: ============================================= ============ LTYPEs Wire type ============================================= ============ VARINT, UVARINT, SVARINT PB_WT_VARINT FIXED64 PB_WT_64BIT STRING, BYTES, SUBMESSAGE, FIXED_LENGTH_BYTES PB_WT_STRING FIXED32 PB_WT_32BIT ============================================= ============ pb_encode_varint ---------------- Encodes a signed or unsigned integer in the varint_ format. Works for fields of type `bool`, `enum`, `int32`, `int64`, `uint32` and `uint64`:: bool pb_encode_varint(pb_ostream_t *stream, uint64_t value); :stream: Output stream to write to. 1-10 bytes will be written. :value: Value to encode. Just cast e.g. int32_t directly to uint64_t. :returns: True on success, false on IO error. .. _varint: http://code.google.com/apis/protocolbuffers/docs/encoding.html#varints pb_encode_svarint ----------------- Encodes a signed integer in the 'zig-zagged' format. Works for fields of type `sint32` and `sint64`:: bool pb_encode_svarint(pb_ostream_t *stream, int64_t value); (parameters are the same as for `pb_encode_varint`_ pb_encode_string ---------------- Writes the length of a string as varint and then contents of the string. Works for fields of type `bytes` and `string`:: bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size); :stream: Output stream to write to. :buffer: Pointer to string data. :size: Number of bytes in the string. Pass `strlen(s)` for strings. :returns: True on success, false on IO error. pb_encode_fixed32 ----------------- Writes 4 bytes to stream and swaps bytes on big-endian architectures. Works for fields of type `fixed32`, `sfixed32` and `float`:: bool pb_encode_fixed32(pb_ostream_t *stream, const void *value); :stream: Output stream to write to. :value: Pointer to a 4-bytes large C variable, for example `uint32_t foo;`. :returns: True on success, false on IO error. pb_encode_fixed64 ----------------- Writes 8 bytes to stream and swaps bytes on big-endian architecture. Works for fields of type `fixed64`, `sfixed64` and `double`:: bool pb_encode_fixed64(pb_ostream_t *stream, const void *value); :stream: Output stream to write to. :value: Pointer to a 8-bytes large C variable, for example `uint64_t foo;`. :returns: True on success, false on IO error. pb_encode_float_as_double ------------------------- Encodes a 32-bit `float` value so that it appears like a 64-bit `double` in the encoded message. This is sometimes needed when platforms like AVR that do not support need to communicate using a message type that contains `double` fields. :: bool pb_encode_float_as_double(pb_ostream_t *stream, float value); :stream: Output stream to write to. :value: Float value to encode. :returns: True on success, false on IO error. pb_encode_submessage -------------------- Encodes a submessage field, including the size header for it. Works for fields of any message type:: bool pb_encode_submessage(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct); :stream: Output stream to write to. :fields: Pointer to the autogenerated message descriptor for the submessage type, e.g. `MyMessage_fields`. :src: Pointer to the structure where submessage data is. :returns: True on success, false on IO errors, pb_encode errors or if submessage size changes between calls. In Protocol Buffers format, the submessage size must be written before the submessage contents. Therefore, this function has to encode the submessage twice in order to know the size beforehand. If the submessage contains callback fields, the callback function might misbehave and write out a different amount of data on the second call. This situation is recognized and *false* is returned, but garbage will be written to the output before the problem is detected. pb_decode.h =========== pb_istream_from_buffer ---------------------- Helper function for creating an input stream that reads data from a memory buffer. :: pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t bufsize); :buf: Pointer to byte array to read from. :bufsize: Size of the byte array. :returns: An input stream ready to use. pb_read ------- Read data from input stream. Always use this function, don't try to call the stream callback directly. :: bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); :stream: Input stream to read from. :buf: Buffer to store the data to, or NULL to just read data without storing it anywhere. :count: Number of bytes to read. :returns: True on success, false if *stream->bytes_left* is less than *count* or if an IO error occurs. End of file is signalled by *stream->bytes_left* being zero after pb_read returns false. pb_decode --------- Read and decode all fields of a structure. Reads until EOF on input stream. :: bool pb_decode(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct); :stream: Input stream to read from. :fields: Message descriptor, usually autogenerated. :dest_struct: Pointer to structure where data will be stored. :returns: True on success, false on IO error, on detectable errors in field description, if a field encoder returns false or if a required field is missing. In Protocol Buffers binary format, EOF is only allowed between fields. If it happens anywhere else, pb_decode will return *false*. If pb_decode returns false, you cannot trust any of the data in the structure. For optional fields, this function applies the default value and sets *has_* to false if the field is not present. If *PB_ENABLE_MALLOC* is defined, this function may allocate storage for any pointer type fields. In this case, you have to call `pb_release`_ to release the memory after you are done with the message. On error return `pb_decode` will release the memory itself. pb_decode_ex ------------ Same as `pb_decode`_, but allows extended options. :: bool pb_decode_ex(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct, unsigned int flags); :stream: Input stream to read from. :fields: Message descriptor, usually autogenerated. :dest_struct: Pointer to structure where data will be stored. :flags: Extended options, see below :returns: True on success, false on IO error, on detectable errors in field description, if a field encoder returns false or if a required field is missing. The following options can be defined and combined with bitwise `|` operator: :PB_DECODE_NOINIT: Do not initialize structure before decoding. This can be used to combine multiple messages, or if you have already initialized the message yourself. :PB_DECODE_DELIMITED: Expect a length prefix in varint format before message. The counterpart of `PB_ENCODE_DELIMITED`. :PB_DECODE_NULLTERMINATED: Expect the message to be terminated with zero tag. The counterpart of `PB_ENCODE_NULLTERMINATED`. If *PB_ENABLE_MALLOC* is defined, this function may allocate storage for any pointer type fields. In this case, you have to call `pb_release`_ to release the memory after you are done with the message. On error return `pb_decode_ex` will release the memory itself. pb_release ---------- Releases any dynamically allocated fields:: void pb_release(const pb_msgdesc_t *fields, void *dest_struct); :fields: Message descriptor, usually autogenerated. :dest_struct: Pointer to structure where data is stored. If NULL, function does nothing. This function is only available if *PB_ENABLE_MALLOC* is defined. It will release any pointer type fields in the structure and set the pointers to NULL. pb_decode_tag ------------- Decode the tag that comes before field in the protobuf encoding:: bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof); :stream: Input stream to read from. :wire_type: Pointer to variable where to store the wire type of the field. :tag: Pointer to variable where to store the tag of the field. :eof: Pointer to variable where to store end-of-file status. :returns: True on success, false on error or EOF. When the message (stream) ends, this function will return false and set *eof* to true. On other errors, *eof* will be set to false. pb_skip_field ------------- Remove the data for a field from the stream, without actually decoding it:: bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type); :stream: Input stream to read from. :wire_type: Type of field to skip. :returns: True on success, false on IO error. .. sidebar:: Decoding fields manually The functions with names beginning with *pb_decode_* are used when dealing with callback fields. The typical reason for using callbacks is to have an array of unlimited size. In that case, `pb_decode`_ will call your callback function repeatedly, which can then store the values into e.g. filesystem in the order received in. For decoding numeric (including enumerated and boolean) values, use `pb_decode_varint`_, `pb_decode_svarint`_, `pb_decode_fixed32`_ and `pb_decode_fixed64`_. They take a pointer to a 32- or 64-bit C variable, which you may then cast to smaller datatype for storage. For decoding strings and bytes fields, the length has already been decoded. You can therefore check the total length in *stream->bytes_left* and read the data using `pb_read`_. Finally, for decoding submessages in a callback, simply use `pb_decode`_ and pass it the *SubMessage_fields* descriptor array. pb_decode_varint ---------------- Read and decode a varint_ encoded integer. :: bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest); :stream: Input stream to read from. 1-10 bytes will be read. :dest: Storage for the decoded integer. Value is undefined on error. :returns: True on success, false if value exceeds uint64_t range or an IO error happens. pb_decode_varint32 ------------------ Same as `pb_decode_varint`, but limits the value to 32 bits:: bool pb_decode_varint32(pb_istream_t *stream, uint32_t *dest); Parameters are the same as `pb_decode_varint`. This function can be used for decoding lengths and other commonly occurring elements that you know shouldn't be larger than 32 bit. It will return an error if the value exceeds the `uint32_t` datatype. pb_decode_svarint ----------------- Similar to `pb_decode_varint`_, except that it performs zigzag-decoding on the value. This corresponds to the Protocol Buffers *sint32* and *sint64* datatypes. :: bool pb_decode_svarint(pb_istream_t *stream, int64_t *dest); (parameters are the same as `pb_decode_varint`_) pb_decode_fixed32 ----------------- Decode a *fixed32*, *sfixed32* or *float* value. :: bool pb_decode_fixed32(pb_istream_t *stream, void *dest); :stream: Input stream to read from. 4 bytes will be read. :dest: Pointer to destination *int32_t*, *uint32_t* or *float*. :returns: True on success, false on IO errors. This function reads 4 bytes from the input stream. On big endian architectures, it then reverses the order of the bytes. Finally, it writes the bytes to *dest*. pb_decode_fixed64 ----------------- Decode a *fixed64*, *sfixed64* or *double* value. :: bool pb_decode_fixed64(pb_istream_t *stream, void *dest); :stream: Input stream to read from. 8 bytes will be read. :dest: Pointer to destination *int64_t*, *uint64_t* or *double*. :returns: True on success, false on IO errors. Same as `pb_decode_fixed32`_, except this reads 8 bytes. pb_decode_double_as_float ------------------------- Decodes a 64-bit `double` value into a 32-bit `float` variable. Counterpart of `pb_encode_float_as_double`_. :: bool pb_decode_double_as_float(pb_istream_t *stream, float *dest); :stream: Input stream to read from. 8 bytes will be read. :dest: Pointer to destination *float*. :returns: True on success, false on IO errors. pb_make_string_substream ------------------------ Decode the length for a field with wire type *PB_WT_STRING* and create a substream for reading the data. :: bool pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream); :stream: Original input stream to read the length and data from. :substream: New substream that has limited length. Filled in by the function. :returns: True on success, false if reading the length fails. This function uses `pb_decode_varint`_ to read an integer from the stream. This is interpreted as a number of bytes, and the substream is set up so that its `bytes_left` is initially the same as the length, and its callback function and state the same as the parent stream. pb_close_string_substream ------------------------- Close the substream created with `pb_make_string_substream`_. :: void pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream); :stream: Original input stream to read the length and data from. :substream: Substream to close This function copies back the state from the substream to the parent stream. It must be called after done with the substream. pb_common.h =========== pb_field_iter_begin ------------------- Begins iterating over the fields in a message type:: bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_msgdesc_t *desc, void *message); :iter: Pointer to destination `pb_field_iter_t`_ variable. :desc: Autogenerated message descriptor. :message: Pointer to message structure. :returns: True on success, false if the message type has no fields. pb_field_iter_next ------------------ Advance to the next field in the message:: bool pb_field_iter_next(pb_field_iter_t *iter); :iter: Pointer to `pb_field_iter_t`_ previously initialized by `pb_field_iter_begin`_. :returns: True on success, false after last field in the message. When the last field in the message has been processed, this function will return false and initialize `iter` back to the first field in the message. pb_field_iter_find ------------------ Find a field specified by tag number in the message:: bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag); :iter: Pointer to `pb_field_iter_t`_ previously initialized by `pb_field_iter_begin`_. :tag: Tag number to search for. :returns: True if field was found, false otherwise. This function is functionally identical to calling `pb_field_iter_next()` until `iter.tag` equals the searched value. Internally this function avoids fully processing the descriptor for intermediate fields. pb_validate_utf8 ---------------- Validates an UTF8 encoded string:: bool pb_validate_utf8(const char *s); :s: Pointer to beginning of a string. :returns: True, if string is valid UTF-8, false otherwise. The protobuf standard requires that `string` fields only contain valid UTF-8 encoded text, while `bytes` fields can contain arbitrary data. When the compilation option `PB_VALIDATE_UTF8` is defined, nanopb will automatically validate strings on both encoding and decoding. User code can call this function to validate strings in e.g. custom callbacks. nanopb-0.4.1/docs/security.rst000066400000000000000000000075241361552131000163270ustar00rootroot00000000000000====================== Nanopb: Security model ====================== .. include :: menu.rst .. contents :: Importance of security in a Protocol Buffers library ==================================================== In the context of protocol buffers, security comes into play when decoding untrusted data. Naturally, if the attacker can modify the contents of a protocol buffers message, he can feed the application any values possible. Therefore the application itself must be prepared to receive untrusted values. Where nanopb plays a part is preventing the attacker from running arbitrary code on the target system. Mostly this means that there must not be any possibility to cause buffer overruns, memory corruption or invalid pointers by the means of crafting a malicious message. Division of trusted and untrusted data ====================================== The following data is regarded as **trusted**. It must be under the control of the application writer. Malicious data in these structures could cause security issues, such as execution of arbitrary code: 1. Callback, pointer and extension fields in message structures given to pb_encode() and pb_decode(). These fields are memory pointers, and are generated depending on the message definition in the .proto file. 2. The automatically generated field definitions, i.e. *pb_msgdesc_t*. 3. Contents of the *pb_istream_t* and *pb_ostream_t* structures (this does not mean the contents of the stream itself, just the stream definition). The following data is regarded as **untrusted**. Invalid/malicious data in these will cause "garbage in, garbage out" behaviour. It will not cause buffer overflows, information disclosure or other security problems: 1. All data read from *pb_istream_t*. 2. All fields in message structures, except: - callbacks (*pb_callback_t* structures) - pointer fields (malloc support) and *_count* fields for pointers - extensions (*pb_extension_t* structures) Invariants ========== The following invariants are maintained during operation, even if the untrusted data has been maliciously crafted: 1. Nanopb will never read more than *bytes_left* bytes from *pb_istream_t*. 2. Nanopb will never write more than *max_size* bytes to *pb_ostream_t*. 3. Nanopb will never access memory out of bounds of the message structure. 4. After pb_decode() returns successfully, the message structure will be internally consistent: - The *count* fields of arrays will not exceed the array size. - The *size* field of bytes will not exceed the allocated size. - All string fields will have null terminator. - bool fields will have valid true/false values (since nanopb-0.3.9.4) 5. After pb_encode() returns successfully, the resulting message is a valid protocol buffers message. (Except if user-defined callbacks write incorrect data.) Further considerations ====================== Even if the nanopb library is free of any security issues, there are still several possible attack vectors that the application author must consider. The following list is not comprehensive: 1. Stack usage may depend on the contents of the message. The message definition places an upper bound on how much stack will be used. Tests should be run with all fields present, to record the maximum possible stack usage. 2. Callbacks can do anything. The code for the callbacks must be carefully checked if they are used with untrusted data. 3. If using stream input, a maximum size should be set in *pb_istream_t* to stop a denial of service attack from using an infinite message. 4. If using network sockets as streams, a timeout should be set to stop denial of service attacks. 5. If using *malloc()* support, some method of limiting memory use should be employed. This can be done by defining custom *pb_realloc()* function. Nanopb will properly detect and handle failed memory allocations. nanopb-0.4.1/docs/whats_new.rst000066400000000000000000000206461361552131000164570ustar00rootroot00000000000000==================== Nanopb: New features ==================== .. include :: menu.rst .. contents :: What's new in nanopb 0.4 ======================== Long in the making, nanopb 0.4 has seen some wide reaching improvements in reaction to the development of the rest of the protobuf ecosystem. This document showcases features that are not immediately visible, but that you may want to take advantage of. A lot of effort has been spent in retaining backwards and forwards compatibility with previous nanopb versions. For a list of breaking changes, see `migration document`_ .. _`migration document`: migration.html New field descriptor format --------------------------- The basic design of nanopb has always been that the information about messages is stored in a compact descriptor format, which is iterated in runtime. Initially it was very tightly tied with encoder and decoder logic. In nanopb-0.3.0 the field iteration logic was separated to `pb_common.c`. Already at that point it was clear that the old format was getting too limited, but it wasn't extended at that time. Now in 0.4, the descriptor format was completely decoupled from the encoder and decoder logic, and redesigned to meet new demands. Previously each field was stored as `pb_field_t` struct, which was between 8 and 32 bytes in size, depending on compilation options and platform. Now information about fields is stored as a variable length sequence of `uint32_t` data words. There are 1, 2, 4 and 8 word formats, with the 8 word format containing plenty of space for future extensibility. One benefit of the variable length format is that most messages now take less storage space. Most fields use 2 words, while simple fields in small messages require only 1 word. Benefit is larger if code previously required `PB_FIELD_16BIT` or `PB_FIELD_32BIT` options. In the `AllTypes` test case, 0.3 had data size of 1008 bytes in 8-bit configuration and 1408 bytes in 16-bit configuration. New format in 0.4 takes 896 bytes for either of these. In addition, the new decoupling has allowed moving most of the field descriptor data into FLASH on Harvard architectures, such as AVR. Previously nanopb was quite RAM-heavy on AVR, which cannot put normal constants in flash like most other platforms do. Python packaging for generator ------------------------------ Nanopb generator is now available as a Python package, installable using `pip` package manager. This will reduce the need for binary packages, as if you have Python already installed you can just `pip install nanopb` and have the generator available on path as `nanopb_generator`. The generator can also take advantage of the Python-based `protoc` available in `grpcio-tools` Python package. If you also install that, there is no longer a need to have binary `protoc` available. Generator now automatically calls protoc ---------------------------------------- Initially, nanopb generator was used in two steps: first calling `protoc` to parse the `.proto` file into `.pb` binary format, and then calling `nanopb_generator` to output the `.pb.h` and `.pb.c` files. Nanopb 0.2.3 added support for running as a `protoc` plugin, which allowed single-step generation using `--nanopb_out` parameter. However, the plugin mode has two complications: passing options to nanopb generator itself becomes more difficult, and the generator does not know the actual path of input files. The second limitation has been particularly problematic for locating `.options` files. Both of these older methods still work and will remain supported. However, now `nanopb_generator` can also take `.proto` files directly and it will transparently call `protoc` in the background. Callbacks bound by function name -------------------------------- Since its very beginnings, nanopb has supported field callbacks to allow processing structures that are larger than what could fit in memory at once. So far the callback functions have been stored in the message structure in a `pb_callback_t` struct. Storing pointers along with user data is somewhat risky from a security point of view. In addition it has caused problems with `oneof` fields, which reuse the same storage space for multiple submessages. Because there is no separate area for each submessage, there is no space to store the callback pointers either. Nanopb-0.4.0 introduces callbacks that are referenced by the function name instead of setting the pointers separately. This should work well for most applications that have a single callback function for each message type. For more complex needs, `pb_callback_t` will also remain supported. Function name callbacks also allow specifying custom data types for inclusion in the message structure. For example, you could have `MyObject*` pointer along with other message fields, and then process that object in custom way in your callback. This feature is demonstrated in `tests/oneof_callback`_ test case and `examples/network_server`_ example. .. _`examples/network_server`: https://github.com/nanopb/nanopb/tree/master/examples/network_server Message level callback for oneofs --------------------------------- As mentioned above, callbacks inside submessages inside oneofs have been problematic to use. To make using `pb_callback_t`-style callbacks there possible, a new generator option `submsg_callback` was added. Setting this option to true will cause a new message level callback to be added before the `which_field` of the oneof. This callback will be called when the submessage tag number is known, but before the actual message is decoded. The callback can either choose to set callback pointers inside the submessage, or just completely decode the submessage there and then. If any unread data remains after the callback returns, normal submessage decoding will continue. There is an example of this in `tests/oneof_callback`_ test case. .. _`tests/oneof_callback`: https://github.com/nanopb/nanopb/tree/master/tests/oneof_callback Binding message types to custom structures ------------------------------------------ It is often said that good C code is chock full of macros. Or maybe I got it wrong. But since nanopb 0.2, the field descriptor generation has heavily relied on macros. This allows it to automatically adapt to differences in type alignment on different platforms, and to decouple the Python generation logic from how the message descriptors are implemented on the C side. Now in 0.4.0, I've made the macros even more abstract. Time will tell whether this was such a great idea that I think it is, but now the complete list of fields in each message is available in `.pb.h` file. This allows a kind of metaprogramming using `X-macros`_ .. _`X-macros`: https://en.wikipedia.org/wiki/X_Macro One feature that this can be used for is binding the message descriptor to a custom structure or C++ class type. You could have a bunch of other fields in the structure and even the datatypes can be different to an extent, and nanopb will automatically detect the size and position of each field. The generated `.pb.c` files now just have calls of `PB_BIND(msgname, structname, width)`. Adding a similar call to your own code will bind the message to your own structure. UTF-8 validation ---------------- Protobuf format defines that strings should consist of valid UTF-8 codepoints. Previously nanopb has not enforced this, requiring extra care in the user code. Now optional UTF-8 validation is available with compilation option `PB_VALIDATE_UTF8`. Double to float conversion -------------------------- Some platforms such as `AVR` do not support the `double` datatype, instead making it an alias for `float`. This has resulted in problems when trying to process message types containing `double` fields generated on other machines. There has been an example on how to manually perform the conversion between `double` and `float`. Now that example is integrated as an optional feature in nanopb core. By defining `PB_CONVERT_DOUBLE_FLOAT`, the required conversion between 32- and 64-bit floating point formats happens automatically on decoding and encoding. Improved testing ---------------- Testing on embedded platforms has been integrated in the continuous testing environment. Now all of the 80+ test cases are automatically run on STM32 and AVR targets. Previously only a few specialized test cases were manually tested on embedded systems. Nanopb fuzzer has also been integrated in Google's `OSSFuzz`_ platform, giving a huge boost in the CPU power available for randomized testing. .. _`OSSFuzz`: https://google.github.io/oss-fuzz/ nanopb-0.4.1/examples/000077500000000000000000000000001361552131000146045ustar00rootroot00000000000000nanopb-0.4.1/examples/cmake_relpath/000077500000000000000000000000001361552131000174035ustar00rootroot00000000000000nanopb-0.4.1/examples/cmake_relpath/CMakeLists.txt000066400000000000000000000012041361552131000221400ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8) project(NANOPB_CMAKE_SIMPLE C) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../extra) find_package(Nanopb REQUIRED) include_directories(${NANOPB_INCLUDE_DIRS}) nanopb_generate_cpp(PROTO_SRCS PROTO_HDRS RELPATH proto proto/simple.proto proto/sub/unlucky.proto) include_directories(${CMAKE_CURRENT_BINARY_DIR}) #add_custom_target(generate_proto_sources DEPENDS ${PROTO_SRCS} ${PROTO_HDRS}) set_source_files_properties(${PROTO_SRCS} ${PROTO_HDRS} PROPERTIES GENERATED TRUE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -g -O0") add_executable(simple simple.c ${PROTO_SRCS} ${PROTO_HDRS}) nanopb-0.4.1/examples/cmake_relpath/README.txt000066400000000000000000000010251361552131000210770ustar00rootroot00000000000000Nanopb example "simple" using CMake ======================= This example is the same as the simple nanopb example but built using CMake. Example usage ------------- On Linux, create a build directory and then call cmake: nanopb/examples/cmake_simple$ mkdir build nanopb/examples/cmake_simple$ cd build/ nanopb/examples/cmake_simple/build$ cmake .. nanopb/examples/cmake_simple/build$ make After that, you can run it with the command: ./simple On other platforms supported by CMake, refer to CMake instructions. nanopb-0.4.1/examples/cmake_relpath/proto/000077500000000000000000000000001361552131000205465ustar00rootroot00000000000000nanopb-0.4.1/examples/cmake_relpath/proto/simple.proto000066400000000000000000000003421361552131000231230ustar00rootroot00000000000000// A very simple protocol definition, consisting of only // one message. syntax = "proto2"; import "sub/unlucky.proto"; message SimpleMessage { required int32 lucky_number = 1; required UnluckyNumber unlucky = 2; } nanopb-0.4.1/examples/cmake_relpath/proto/sub/000077500000000000000000000000001361552131000213375ustar00rootroot00000000000000nanopb-0.4.1/examples/cmake_relpath/proto/sub/unlucky.proto000066400000000000000000000001131361552131000241110ustar00rootroot00000000000000syntax = "proto2"; message UnluckyNumber { required uint32 number = 1; } nanopb-0.4.1/examples/cmake_relpath/simple.c000066400000000000000000000044231361552131000210430ustar00rootroot00000000000000#include #include #include #include "simple.pb.h" int main() { /* This is the buffer where we will store our message. */ uint8_t buffer[128]; size_t message_length; bool status; /* Encode our message */ { /* Allocate space on the stack to store the message data. * * Nanopb generates simple struct definitions for all the messages. * - check out the contents of simple.pb.h! * It is a good idea to always initialize your structures * so that you do not have garbage data from RAM in there. */ SimpleMessage message = SimpleMessage_init_zero; /* Create a stream that will write to our buffer. */ pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Fill in the lucky number */ message.lucky_number = 13; message.unlucky.number = 42; /* Now we are ready to encode the message! */ status = pb_encode(&stream, SimpleMessage_fields, &message); message_length = stream.bytes_written; /* Then just check for any errors.. */ if (!status) { printf("Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; } } /* Now we could transmit the message over network, store it in a file or * wrap it to a pigeon's leg. */ /* But because we are lazy, we will just decode it immediately. */ { /* Allocate space for the decoded message. */ SimpleMessage message = SimpleMessage_init_zero; /* Create a stream that reads from the buffer. */ pb_istream_t stream = pb_istream_from_buffer(buffer, message_length); /* Now we are ready to decode the message. */ status = pb_decode(&stream, SimpleMessage_fields, &message); /* Check for errors... */ if (!status) { printf("Decoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; } /* Print the data contained in the message. */ printf("Your lucky number was %d!\n", message.lucky_number); printf("Your unlucky number was %u!\n", message.unlucky.number); } return 0; } nanopb-0.4.1/examples/cmake_simple/000077500000000000000000000000001361552131000172355ustar00rootroot00000000000000nanopb-0.4.1/examples/cmake_simple/CMakeLists.txt000066400000000000000000000011261361552131000217750ustar00rootroot00000000000000cmake_minimum_required(VERSION 2.8) project(NANOPB_CMAKE_SIMPLE C) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../extra) find_package(Nanopb REQUIRED) include_directories(${NANOPB_INCLUDE_DIRS}) nanopb_generate_cpp(PROTO_SRCS PROTO_HDRS simple.proto) include_directories(${CMAKE_CURRENT_BINARY_DIR}) #add_custom_target(generate_proto_sources DEPENDS ${PROTO_SRCS} ${PROTO_HDRS}) set_source_files_properties(${PROTO_SRCS} ${PROTO_HDRS} PROPERTIES GENERATED TRUE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -g -O0") add_executable(simple simple.c ${PROTO_SRCS} ${PROTO_HDRS}) nanopb-0.4.1/examples/cmake_simple/README.txt000066400000000000000000000010251361552131000207310ustar00rootroot00000000000000Nanopb example "simple" using CMake ======================= This example is the same as the simple nanopb example but built using CMake. Example usage ------------- On Linux, create a build directory and then call cmake: nanopb/examples/cmake_simple$ mkdir build nanopb/examples/cmake_simple$ cd build/ nanopb/examples/cmake_simple/build$ cmake .. nanopb/examples/cmake_simple/build$ make After that, you can run it with the command: ./simple On other platforms supported by CMake, refer to CMake instructions. nanopb-0.4.1/examples/cmake_simple/simple.c000066400000000000000000000042451361552131000206770ustar00rootroot00000000000000#include #include #include #include "simple.pb.h" int main() { /* This is the buffer where we will store our message. */ uint8_t buffer[128]; size_t message_length; bool status; /* Encode our message */ { /* Allocate space on the stack to store the message data. * * Nanopb generates simple struct definitions for all the messages. * - check out the contents of simple.pb.h! * It is a good idea to always initialize your structures * so that you do not have garbage data from RAM in there. */ SimpleMessage message = SimpleMessage_init_zero; /* Create a stream that will write to our buffer. */ pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Fill in the lucky number */ message.lucky_number = 13; /* Now we are ready to encode the message! */ status = pb_encode(&stream, SimpleMessage_fields, &message); message_length = stream.bytes_written; /* Then just check for any errors.. */ if (!status) { printf("Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; } } /* Now we could transmit the message over network, store it in a file or * wrap it to a pigeon's leg. */ /* But because we are lazy, we will just decode it immediately. */ { /* Allocate space for the decoded message. */ SimpleMessage message = SimpleMessage_init_zero; /* Create a stream that reads from the buffer. */ pb_istream_t stream = pb_istream_from_buffer(buffer, message_length); /* Now we are ready to decode the message. */ status = pb_decode(&stream, SimpleMessage_fields, &message); /* Check for errors... */ if (!status) { printf("Decoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; } /* Print the data contained in the message. */ printf("Your lucky number was %d!\n", message.lucky_number); } return 0; } nanopb-0.4.1/examples/cmake_simple/simple.proto000066400000000000000000000002361361552131000216140ustar00rootroot00000000000000// A very simple protocol definition, consisting of only // one message. syntax = "proto2"; message SimpleMessage { required int32 lucky_number = 1; } nanopb-0.4.1/examples/network_server/000077500000000000000000000000001361552131000176635ustar00rootroot00000000000000nanopb-0.4.1/examples/network_server/Makefile000066400000000000000000000005441361552131000213260ustar00rootroot00000000000000# Include the nanopb provided Makefile rules include ../../extra/nanopb.mk # Compiler flags to enable all warnings & debug info CFLAGS = -ansi -Wall -Werror -g -O0 CFLAGS += -I$(NANOPB_DIR) all: server client .SUFFIXES: clean: rm -f server client fileproto.pb.c fileproto.pb.h %: %.c common.c fileproto.pb.c $(CC) $(CFLAGS) -o $@ $^ $(NANOPB_CORE) nanopb-0.4.1/examples/network_server/README.txt000066400000000000000000000041271361552131000213650ustar00rootroot00000000000000Nanopb example "network_server" =============================== This example demonstrates the use of nanopb to communicate over network connections. It consists of a server that sends file listings, and of a client that requests the file list from the server. Example usage ------------- user@host:~/nanopb/examples/network_server$ make # Build the example protoc -ofileproto.pb fileproto.proto python ../../generator/nanopb_generator.py fileproto.pb Writing to fileproto.pb.h and fileproto.pb.c cc -ansi -Wall -Werror -I .. -g -O0 -I../.. -o server server.c ../../pb_decode.c ../../pb_encode.c fileproto.pb.c common.c cc -ansi -Wall -Werror -I .. -g -O0 -I../.. -o client client.c ../../pb_decode.c ../../pb_encode.c fileproto.pb.c common.c user@host:~/nanopb/examples/network_server$ ./server & # Start the server on background [1] 24462 petteri@oddish:~/nanopb/examples/network_server$ ./client /bin # Request the server to list /bin Got connection. Listing directory: /bin 1327119 bzdiff 1327126 bzless 1327147 ps 1327178 ntfsmove 1327271 mv 1327187 mount 1327259 false 1327266 tempfile 1327285 zfgrep 1327165 gzexe 1327204 nc.openbsd 1327260 uname Details of implementation ------------------------- fileproto.proto contains the portable Google Protocol Buffers protocol definition. It could be used as-is to implement a server or a client in any other language, for example Python or Java. fileproto.options contains the nanopb-specific options for the protocol file. This sets the amount of space allocated for file names when decoding messages. common.c/h contains functions that allow nanopb to read and write directly from network socket. This way there is no need to allocate a separate buffer to store the message. server.c contains the code to open a listening socket, to respond to clients and to list directory contents. client.c contains the code to connect to a server, to send a request and to print the response message. The code is implemented using the POSIX socket api, but it should be easy enough to port into any other socket api, such as lwip. nanopb-0.4.1/examples/network_server/client.c000066400000000000000000000074501361552131000213130ustar00rootroot00000000000000/* This is a simple TCP client that connects to port 1234 and prints a list * of files in a given directory. * * It directly deserializes and serializes messages from network, minimizing * memory use. * * For flexibility, this example is implemented using posix api. * In a real embedded system you would typically use some other kind of * a communication and filesystem layer. */ #include #include #include #include #include #include #include #include #include #include "fileproto.pb.h" #include "common.h" /* This callback function will be called once for each filename received * from the server. The filenames will be printed out immediately, so that * no memory has to be allocated for them. */ bool ListFilesResponse_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_iter_t *field) { PB_UNUSED(ostream); if (istream != NULL && field->tag == ListFilesResponse_file_tag) { FileInfo fileinfo = {}; if (!pb_decode(istream, FileInfo_fields, &fileinfo)) return false; printf("%-10lld %s\n", (long long)fileinfo.inode, fileinfo.name); } return true; } /* This function sends a request to socket 'fd' to list the files in * directory given in 'path'. The results received from server will * be printed to stdout. */ bool listdir(int fd, char *path) { /* Construct and send the request to server */ { ListFilesRequest request = {}; pb_ostream_t output = pb_ostream_from_socket(fd); /* In our protocol, path is optional. If it is not given, * the server will list the root directory. */ if (path == NULL) { request.has_path = false; } else { request.has_path = true; if (strlen(path) + 1 > sizeof(request.path)) { fprintf(stderr, "Too long path.\n"); return false; } strcpy(request.path, path); } /* Encode the request. It is written to the socket immediately * through our custom stream. */ if (!pb_encode_delimited(&output, ListFilesRequest_fields, &request)) { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&output)); return false; } } /* Read back the response from server */ { ListFilesResponse response = {}; pb_istream_t input = pb_istream_from_socket(fd); if (!pb_decode_delimited(&input, ListFilesResponse_fields, &response)) { fprintf(stderr, "Decode failed: %s\n", PB_GET_ERROR(&input)); return false; } /* If the message from server decodes properly, but directory was * not found on server side, we get path_error == true. */ if (response.path_error) { fprintf(stderr, "Server reported error.\n"); return false; } } return true; } int main(int argc, char **argv) { int sockfd; struct sockaddr_in servaddr; char *path = NULL; if (argc > 1) path = argv[1]; sockfd = socket(AF_INET, SOCK_STREAM, 0); /* Connect to server running on localhost:1234 */ memset(&servaddr, 0, sizeof(servaddr)); servaddr.sin_family = AF_INET; servaddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); servaddr.sin_port = htons(1234); if (connect(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) != 0) { perror("connect"); return 1; } /* Send the directory listing request */ if (!listdir(sockfd, path)) return 2; /* Close connection */ close(sockfd); return 0; } nanopb-0.4.1/examples/network_server/common.c000066400000000000000000000017031361552131000213200ustar00rootroot00000000000000/* Simple binding of nanopb streams to TCP sockets. */ #include #include #include #include #include "common.h" static bool write_callback(pb_ostream_t *stream, const uint8_t *buf, size_t count) { int fd = (intptr_t)stream->state; return send(fd, buf, count, 0) == count; } static bool read_callback(pb_istream_t *stream, uint8_t *buf, size_t count) { int fd = (intptr_t)stream->state; int result; if (count == 0) return true; result = recv(fd, buf, count, MSG_WAITALL); if (result == 0) stream->bytes_left = 0; /* EOF */ return result == count; } pb_ostream_t pb_ostream_from_socket(int fd) { pb_ostream_t stream = {&write_callback, (void*)(intptr_t)fd, SIZE_MAX, 0}; return stream; } pb_istream_t pb_istream_from_socket(int fd) { pb_istream_t stream = {&read_callback, (void*)(intptr_t)fd, SIZE_MAX}; return stream; } nanopb-0.4.1/examples/network_server/common.h000066400000000000000000000002571361552131000213300ustar00rootroot00000000000000#ifndef _PB_EXAMPLE_COMMON_H_ #define _PB_EXAMPLE_COMMON_H_ #include pb_ostream_t pb_ostream_from_socket(int fd); pb_istream_t pb_istream_from_socket(int fd); #endifnanopb-0.4.1/examples/network_server/fileproto.options000066400000000000000000000011701361552131000233020ustar00rootroot00000000000000# This file defines the nanopb-specific options for the messages defined # in fileproto.proto. # # If you come from high-level programming background, the hardcoded # maximum lengths may disgust you. However, if your microcontroller only # has a few kB of ram to begin with, setting reasonable limits for # filenames is ok. # # On the other hand, using the callback interface, it is not necessary # to set a limit on the number of files in the response. * include:"sys/types.h" * include:"dirent.h" ListFilesResponse.file type:FT_CALLBACK, callback_datatype:"DIR*" ListFilesRequest.path max_size:128 FileInfo.name max_size:128 nanopb-0.4.1/examples/network_server/fileproto.proto000066400000000000000000000006471361552131000227620ustar00rootroot00000000000000// This defines protocol for a simple server that lists files. // // See also the nanopb-specific options in fileproto.options. syntax = "proto2"; message ListFilesRequest { optional string path = 1 [default = "/"]; } message FileInfo { required uint64 inode = 1; required string name = 2; } message ListFilesResponse { optional bool path_error = 1 [default = false]; repeated FileInfo file = 2; } nanopb-0.4.1/examples/network_server/server.c000066400000000000000000000112701361552131000213360ustar00rootroot00000000000000/* This is a simple TCP server that listens on port 1234 and provides lists * of files to clients, using a protocol defined in file_server.proto. * * It directly deserializes and serializes messages from network, minimizing * memory use. * * For flexibility, this example is implemented using posix api. * In a real embedded system you would typically use some other kind of * a communication and filesystem layer. */ #include #include #include #include #include #include #include #include #include #include "fileproto.pb.h" #include "common.h" /* This callback function will be called during the encoding. * It will write out any number of FileInfo entries, without consuming unnecessary memory. * This is accomplished by fetching the filenames one at a time and encoding them * immediately. */ bool ListFilesResponse_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_iter_t *field) { PB_UNUSED(istream); if (ostream != NULL && field->tag == ListFilesResponse_file_tag) { DIR *dir = *(DIR**)field->pData; struct dirent *file; FileInfo fileinfo = {}; while ((file = readdir(dir)) != NULL) { fileinfo.inode = file->d_ino; strncpy(fileinfo.name, file->d_name, sizeof(fileinfo.name)); fileinfo.name[sizeof(fileinfo.name) - 1] = '\0'; /* This encodes the header for the field, based on the constant info * from pb_field_t. */ if (!pb_encode_tag_for_field(ostream, field)) return false; /* This encodes the data for the field, based on our FileInfo structure. */ if (!pb_encode_submessage(ostream, FileInfo_fields, &fileinfo)) return false; } /* Because the main program uses pb_encode_delimited(), this callback will be * called twice. Rewind the directory for the next call. */ rewinddir(dir); } return true; } /* Handle one arriving client connection. * Clients are expected to send a ListFilesRequest, terminated by a '0'. * Server will respond with a ListFilesResponse message. */ void handle_connection(int connfd) { DIR *directory = NULL; /* Decode the message from the client and open the requested directory. */ { ListFilesRequest request = {}; pb_istream_t input = pb_istream_from_socket(connfd); if (!pb_decode_delimited(&input, ListFilesRequest_fields, &request)) { printf("Decode failed: %s\n", PB_GET_ERROR(&input)); return; } directory = opendir(request.path); printf("Listing directory: %s\n", request.path); } /* List the files in the directory and transmit the response to client */ { ListFilesResponse response = {}; pb_ostream_t output = pb_ostream_from_socket(connfd); if (directory == NULL) { perror("opendir"); /* Directory was not found, transmit error status */ response.has_path_error = true; response.path_error = true; } else { /* Directory was found, transmit filenames */ response.has_path_error = false; response.file = directory; } if (!pb_encode_delimited(&output, ListFilesResponse_fields, &response)) { printf("Encoding failed: %s\n", PB_GET_ERROR(&output)); } } if (directory != NULL) closedir(directory); } int main(int argc, char **argv) { int listenfd, connfd; struct sockaddr_in servaddr; int reuse = 1; /* Listen on localhost:1234 for TCP connections */ listenfd = socket(AF_INET, SOCK_STREAM, 0); setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)); memset(&servaddr, 0, sizeof(servaddr)); servaddr.sin_family = AF_INET; servaddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); servaddr.sin_port = htons(1234); if (bind(listenfd, (struct sockaddr*)&servaddr, sizeof(servaddr)) != 0) { perror("bind"); return 1; } if (listen(listenfd, 5) != 0) { perror("listen"); return 1; } for(;;) { /* Wait for a client */ connfd = accept(listenfd, NULL, NULL); if (connfd < 0) { perror("accept"); return 1; } printf("Got connection.\n"); handle_connection(connfd); printf("Closing connection.\n"); close(connfd); } return 0; } nanopb-0.4.1/examples/simple/000077500000000000000000000000001361552131000160755ustar00rootroot00000000000000nanopb-0.4.1/examples/simple/Makefile000066400000000000000000000013201361552131000175310ustar00rootroot00000000000000# Include the nanopb provided Makefile rules include ../../extra/nanopb.mk # Compiler flags to enable all warnings & debug info CFLAGS = -Wall -Werror -g -O0 CFLAGS += -I$(NANOPB_DIR) # C source code files that are required CSRC = simple.c # The main program CSRC += simple.pb.c # The compiled protocol definition CSRC += $(NANOPB_DIR)/pb_encode.c # The nanopb encoder CSRC += $(NANOPB_DIR)/pb_decode.c # The nanopb decoder CSRC += $(NANOPB_DIR)/pb_common.c # The nanopb common parts # Build rule for the main program simple: $(CSRC) $(CC) $(CFLAGS) -osimple $(CSRC) # Build rule for the protocol simple.pb.c: simple.proto $(PROTOC) $(PROTOC_OPTS) --nanopb_out=. simple.proto nanopb-0.4.1/examples/simple/README.txt000066400000000000000000000015201361552131000175710ustar00rootroot00000000000000Nanopb example "simple" ======================= This example demonstrates the very basic use of nanopb. It encodes and decodes a simple message. The code uses four different API functions: * pb_ostream_from_buffer() to declare the output buffer that is to be used * pb_encode() to encode a message * pb_istream_from_buffer() to declare the input buffer that is to be used * pb_decode() to decode a message Example usage ------------- On Linux, simply type "make" to build the example. After that, you can run it with the command: ./simple On other platforms, you first have to compile the protocol definition using the following command:: ../../generator-bin/protoc --nanopb_out=. simple.proto After that, add the following five files to your project and compile: simple.c simple.pb.c pb_encode.c pb_decode.c pb_common.c nanopb-0.4.1/examples/simple/simple.c000066400000000000000000000042521361552131000175350ustar00rootroot00000000000000#include #include #include #include "simple.pb.h" int main() { /* This is the buffer where we will store our message. */ uint8_t buffer[128]; size_t message_length; bool status; /* Encode our message */ { /* Allocate space on the stack to store the message data. * * Nanopb generates simple struct definitions for all the messages. * - check out the contents of simple.pb.h! * It is a good idea to always initialize your structures * so that you do not have garbage data from RAM in there. */ SimpleMessage message = SimpleMessage_init_zero; /* Create a stream that will write to our buffer. */ pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Fill in the lucky number */ message.lucky_number = 13; /* Now we are ready to encode the message! */ status = pb_encode(&stream, SimpleMessage_fields, &message); message_length = stream.bytes_written; /* Then just check for any errors.. */ if (!status) { printf("Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; } } /* Now we could transmit the message over network, store it in a file or * wrap it to a pigeon's leg. */ /* But because we are lazy, we will just decode it immediately. */ { /* Allocate space for the decoded message. */ SimpleMessage message = SimpleMessage_init_zero; /* Create a stream that reads from the buffer. */ pb_istream_t stream = pb_istream_from_buffer(buffer, message_length); /* Now we are ready to decode the message. */ status = pb_decode(&stream, SimpleMessage_fields, &message); /* Check for errors... */ if (!status) { printf("Decoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; } /* Print the data contained in the message. */ printf("Your lucky number was %d!\n", (int)message.lucky_number); } return 0; } nanopb-0.4.1/examples/simple/simple.proto000066400000000000000000000002361361552131000204540ustar00rootroot00000000000000// A very simple protocol definition, consisting of only // one message. syntax = "proto2"; message SimpleMessage { required int32 lucky_number = 1; } nanopb-0.4.1/examples/using_union_messages/000077500000000000000000000000001361552131000210305ustar00rootroot00000000000000nanopb-0.4.1/examples/using_union_messages/Makefile000066400000000000000000000006341361552131000224730ustar00rootroot00000000000000# Include the nanopb provided Makefile rules include ../../extra/nanopb.mk # Compiler flags to enable all warnings & debug info CFLAGS = -ansi -Wall -Werror -g -O0 CFLAGS += -I$(NANOPB_DIR) all: encode decode ./encode 1 | ./decode ./encode 2 | ./decode ./encode 3 | ./decode .SUFFIXES: clean: rm -f encode unionproto.pb.h unionproto.pb.c %: %.c unionproto.pb.c $(CC) $(CFLAGS) -o $@ $^ $(NANOPB_CORE) nanopb-0.4.1/examples/using_union_messages/README.txt000066400000000000000000000037671361552131000225430ustar00rootroot00000000000000Nanopb example "using_union_messages" ===================================== Union messages is a common technique in Google Protocol Buffers used to represent a group of messages, only one of which is passed at a time. It is described in Google's documentation: https://developers.google.com/protocol-buffers/docs/techniques#union This directory contains an example on how to encode and decode union messages with minimal memory usage. Usually, nanopb would allocate space to store all of the possible messages at the same time, even though at most one of them will be used at a time. By using some of the lower level nanopb APIs, we can manually generate the top level message, so that we only need to allocate the one submessage that we actually want. Similarly when decoding, we can manually read the tag of the top level message, and only then allocate the memory for the submessage after we already know its type. NOTE: There is a newer protobuf feature called `oneof` that is also supported by nanopb. It might be a better option for new code. Example usage ------------- Type `make` to run the example. It will build it and run commands like following: ./encode 1 | ./decode Got MsgType1: 42 ./encode 2 | ./decode Got MsgType2: true ./encode 3 | ./decode Got MsgType3: 3 1415 This simply demonstrates that the "decode" program has correctly identified the type of the received message, and managed to decode it. Details of implementation ------------------------- unionproto.proto contains the protocol used in the example. It consists of three messages: MsgType1, MsgType2 and MsgType3, which are collected together into UnionMessage. encode.c takes one command line argument, which should be a number 1-3. It then fills in and encodes the corresponding message, and writes it to stdout. decode.c reads a UnionMessage from stdin. Then it calls the function decode_unionmessage_type() to determine the type of the message. After that, the corresponding message is decoded and the contents of it printed to the screen. nanopb-0.4.1/examples/using_union_messages/decode.c000066400000000000000000000050741361552131000224250ustar00rootroot00000000000000/* This program reads a message from stdin, detects its type and decodes it. */ #include #include #include #include #include #include "unionproto.pb.h" /* This function reads manually the first tag from the stream and finds the * corresponding message type. It doesn't yet decode the actual message. * * Returns a pointer to the MsgType_fields array, as an identifier for the * message type. Returns null if the tag is of unknown type or an error occurs. */ const pb_msgdesc_t* decode_unionmessage_type(pb_istream_t *stream) { pb_wire_type_t wire_type; uint32_t tag; bool eof; while (pb_decode_tag(stream, &wire_type, &tag, &eof)) { if (wire_type == PB_WT_STRING) { pb_field_iter_t iter; if (pb_field_iter_begin(&iter, UnionMessage_fields, NULL) && pb_field_iter_find(&iter, tag)) { /* Found our field. */ return iter.submsg_desc; } } /* Wasn't our field.. */ pb_skip_field(stream, wire_type); } return NULL; } bool decode_unionmessage_contents(pb_istream_t *stream, const pb_msgdesc_t *messagetype, void *dest_struct) { pb_istream_t substream; bool status; if (!pb_make_string_substream(stream, &substream)) return false; status = pb_decode(&substream, messagetype, dest_struct); pb_close_string_substream(stream, &substream); return status; } int main() { /* Read the data into buffer */ uint8_t buffer[512]; size_t count = fread(buffer, 1, sizeof(buffer), stdin); pb_istream_t stream = pb_istream_from_buffer(buffer, count); const pb_msgdesc_t *type = decode_unionmessage_type(&stream); bool status = false; if (type == MsgType1_fields) { MsgType1 msg = {}; status = decode_unionmessage_contents(&stream, MsgType1_fields, &msg); printf("Got MsgType1: %d\n", msg.value); } else if (type == MsgType2_fields) { MsgType2 msg = {}; status = decode_unionmessage_contents(&stream, MsgType2_fields, &msg); printf("Got MsgType2: %s\n", msg.value ? "true" : "false"); } else if (type == MsgType3_fields) { MsgType3 msg = {}; status = decode_unionmessage_contents(&stream, MsgType3_fields, &msg); printf("Got MsgType3: %d %d\n", msg.value1, msg.value2); } if (!status) { printf("Decode failed: %s\n", PB_GET_ERROR(&stream)); return 1; } return 0; } nanopb-0.4.1/examples/using_union_messages/encode.c000066400000000000000000000044211361552131000224320ustar00rootroot00000000000000/* This program takes a command line argument and encodes a message in * one of MsgType1, MsgType2 or MsgType3. */ #include #include #include #include #include #include "unionproto.pb.h" /* This function is the core of the union encoding process. It handles * the top-level pb_field_t array manually, in order to encode a correct * field tag before the message. The pointer to MsgType_fields array is * used as an unique identifier for the message type. */ bool encode_unionmessage(pb_ostream_t *stream, const pb_msgdesc_t *messagetype, void *message) { pb_field_iter_t iter; if (!pb_field_iter_begin(&iter, UnionMessage_fields, message)) return false; do { if (iter.submsg_desc == messagetype) { /* This is our field, encode the message using it. */ if (!pb_encode_tag_for_field(stream, &iter)) return false; return pb_encode_submessage(stream, messagetype, message); } } while (pb_field_iter_next(&iter)); /* Didn't find the field for messagetype */ return false; } int main(int argc, char **argv) { if (argc != 2) { fprintf(stderr, "Usage: %s (1|2|3)\n", argv[0]); return 1; } uint8_t buffer[512]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); bool status = false; int msgtype = atoi(argv[1]); if (msgtype == 1) { /* Send message of type 1 */ MsgType1 msg = {42}; status = encode_unionmessage(&stream, MsgType1_fields, &msg); } else if (msgtype == 2) { /* Send message of type 2 */ MsgType2 msg = {true}; status = encode_unionmessage(&stream, MsgType2_fields, &msg); } else if (msgtype == 3) { /* Send message of type 3 */ MsgType3 msg = {3, 1415}; status = encode_unionmessage(&stream, MsgType3_fields, &msg); } else { fprintf(stderr, "Unknown message type: %d\n", msgtype); return 2; } if (!status) { fprintf(stderr, "Encoding failed!\n"); return 3; } else { fwrite(buffer, 1, stream.bytes_written, stdout); return 0; /* Success */ } } nanopb-0.4.1/examples/using_union_messages/unionproto.proto000066400000000000000000000011671361552131000243360ustar00rootroot00000000000000// This is an example of how to handle 'union' style messages // with nanopb, without allocating memory for all the message types. // // There is no official type in Protocol Buffers for describing unions, // but they are commonly implemented by filling out exactly one of // several optional fields. syntax = "proto2"; message MsgType1 { required int32 value = 1; } message MsgType2 { required bool value = 1; } message MsgType3 { required int32 value1 = 1; required int32 value2 = 2; } message UnionMessage { optional MsgType1 msg1 = 1; optional MsgType2 msg2 = 2; optional MsgType3 msg3 = 3; } nanopb-0.4.1/extra/000077500000000000000000000000001361552131000141115ustar00rootroot00000000000000nanopb-0.4.1/extra/FindNanopb.cmake000066400000000000000000000317141361552131000171370ustar00rootroot00000000000000# This is an example script for use with CMake projects for locating and configuring # the nanopb library. # # The following variables can be set and are optional: # # # PROTOBUF_SRC_ROOT_FOLDER - When compiling with MSVC, if this cache variable is set # the protobuf-default VS project build locations # (vsprojects/Debug & vsprojects/Release) will be searched # for libraries and binaries. # # NANOPB_IMPORT_DIRS - List of additional directories to be searched for # imported .proto files. # # NANOPB_OPTIONS - List of options passed to nanopb. # # NANOPB_DEPENDS - List of files to be used as dependencies # for the generated source and header files. These # files are not directly passed as options to # nanopb but rather their directories. # # NANOPB_GENERATE_CPP_APPEND_PATH - By default -I will be passed to protoc # for each directory where a proto file is referenced. # Set to FALSE if you want to disable this behaviour. # # Defines the following variables: # # NANOPB_FOUND - Found the nanopb library (source&header files, generator tool, protoc compiler tool) # NANOPB_INCLUDE_DIRS - Include directories for Google Protocol Buffers # # The following cache variables are also available to set or use: # PROTOBUF_PROTOC_EXECUTABLE - The protoc compiler # NANOPB_GENERATOR_SOURCE_DIR - The nanopb generator source # # ==================================================================== # # NANOPB_GENERATE_CPP (public function) # NANOPB_GENERATE_CPP(SRCS HDRS [RELPATH ] # ...) # SRCS = Variable to define with autogenerated source files # HDRS = Variable to define with autogenerated header files # If you want to use relative paths in your import statements use the RELPATH # option. The argument to RELPATH should be the directory that all the # imports will be relative to. # When RELPATH is not specified then all proto files can be imported without # a path. # # # ==================================================================== # Example: # # set(NANOPB_SRC_ROOT_FOLDER "/path/to/nanopb") # set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${NANOPB_SRC_ROOT_FOLDER}/extra) # find_package( Nanopb REQUIRED ) # include_directories(${NANOPB_INCLUDE_DIRS}) # # NANOPB_GENERATE_CPP(PROTO_SRCS PROTO_HDRS foo.proto) # # include_directories(${CMAKE_CURRENT_BINARY_DIR}) # add_executable(bar bar.cc ${PROTO_SRCS} ${PROTO_HDRS}) # # Example with RELPATH: # Assume we have a layout like: # .../CMakeLists.txt # .../bar.cc # .../proto/ # .../proto/foo.proto (Which contains: import "sub/bar.proto"; ) # .../proto/sub/bar.proto # Everything would be the same as the previous example, but the call to # NANOPB_GENERATE_CPP would change to: # # NANOPB_GENERATE_CPP(PROTO_SRCS PROTO_HDRS RELPATH proto # proto/foo.proto proto/sub/bar.proto) # # ==================================================================== #============================================================================= # Copyright 2009 Kitware, Inc. # Copyright 2009-2011 Philip Lowman # Copyright 2008 Esben Mose Hansen, Ange Optimization ApS # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # * Neither the names of Kitware, Inc., the Insight Software Consortium, # nor the names of their contributors may be used to endorse or promote # products derived from this software without specific prior written # permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # #============================================================================= # # Changes # 2013.01.31 - Pavlo Ilin - used Modules/FindProtobuf.cmake from cmake 2.8.10 to # write FindNanopb.cmake # #============================================================================= function(NANOPB_GENERATE_CPP SRCS HDRS) cmake_parse_arguments(NANOPB_GENERATE_CPP "" "RELPATH" "" ${ARGN}) if(NOT NANOPB_GENERATE_CPP_UNPARSED_ARGUMENTS) return() endif() if(NANOPB_GENERATE_CPP_APPEND_PATH) # Create an include path for each file specified foreach(FIL ${NANOPB_GENERATE_CPP_UNPARSED_ARGUMENTS}) get_filename_component(ABS_FIL ${FIL} ABSOLUTE) get_filename_component(ABS_PATH ${ABS_FIL} PATH) list(APPEND _nanopb_include_path "-I${ABS_PATH}") endforeach() else() set(_nanopb_include_path "-I${CMAKE_CURRENT_SOURCE_DIR}") endif() if(NANOPB_GENERATE_CPP_RELPATH) list(APPEND _nanopb_include_path "-I${NANOPB_GENERATE_CPP_RELPATH}") endif() if(DEFINED NANOPB_IMPORT_DIRS) foreach(DIR ${NANOPB_IMPORT_DIRS}) get_filename_component(ABS_PATH ${DIR} ABSOLUTE) list(APPEND _nanopb_include_path "-I${ABS_PATH}") endforeach() endif() list(REMOVE_DUPLICATES _nanopb_include_path) set(GENERATOR_PATH ${CMAKE_BINARY_DIR}/nanopb/generator) set(NANOPB_GENERATOR_EXECUTABLE ${GENERATOR_PATH}/nanopb_generator.py) if (CMAKE_HOST_WIN32) set(NANOPB_GENERATOR_PLUGIN ${GENERATOR_PATH}/protoc-gen-nanopb.bat) else() set(NANOPB_GENERATOR_PLUGIN ${GENERATOR_PATH}/protoc-gen-nanopb) endif() set(GENERATOR_CORE_DIR ${GENERATOR_PATH}/proto) set(GENERATOR_CORE_SRC ${GENERATOR_CORE_DIR}/nanopb.proto) # Treat the source diretory as immutable. # # Copy the generator directory to the build directory before # compiling python and proto files. Fixes issues when using the # same build directory with different python/protobuf versions # as the binary build directory is discarded across builds. # add_custom_command( OUTPUT ${NANOPB_GENERATOR_EXECUTABLE} ${GENERATOR_CORE_SRC} COMMAND ${CMAKE_COMMAND} -E copy_directory ARGS ${NANOPB_GENERATOR_SOURCE_DIR} ${GENERATOR_PATH} VERBATIM) set(GENERATOR_CORE_PYTHON_SRC) foreach(FIL ${GENERATOR_CORE_SRC}) get_filename_component(ABS_FIL ${FIL} ABSOLUTE) get_filename_component(FIL_WE ${FIL} NAME_WE) set(output "${GENERATOR_CORE_DIR}/${FIL_WE}_pb2.py") set(GENERATOR_CORE_PYTHON_SRC ${GENERATOR_CORE_PYTHON_SRC} ${output}) add_custom_command( OUTPUT ${output} COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} ARGS -I${GENERATOR_PATH}/proto --python_out=${GENERATOR_CORE_DIR} ${ABS_FIL} DEPENDS ${ABS_FIL} VERBATIM) endforeach() if(NANOPB_GENERATE_CPP_RELPATH) get_filename_component(ABS_ROOT ${NANOPB_GENERATE_CPP_RELPATH} ABSOLUTE) endif() foreach(FIL ${NANOPB_GENERATE_CPP_UNPARSED_ARGUMENTS}) get_filename_component(ABS_FIL ${FIL} ABSOLUTE) get_filename_component(FIL_WE ${FIL} NAME_WE) get_filename_component(FIL_DIR ${FIL} PATH) set(FIL_PATH_REL) if(ABS_ROOT) # Check that the file is under the given "RELPATH" string(FIND ${ABS_FIL} ${ABS_ROOT} LOC) if (${LOC} EQUAL 0) string(REPLACE "${ABS_ROOT}/" "" FIL_REL ${ABS_FIL}) get_filename_component(FIL_PATH_REL ${FIL_REL} PATH) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${FIL_PATH_REL}) endif() endif() if(NOT FIL_PATH_REL) set(FIL_PATH_REL ".") endif() list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_PATH_REL}/${FIL_WE}.pb.c") list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_PATH_REL}/${FIL_WE}.pb.h") set(NANOPB_PLUGIN_OPTIONS) set(NANOPB_OPTIONS_DIRS) # If there an options file in the same working directory, set it as a dependency set(NANOPB_OPTIONS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${FIL_DIR}/${FIL_WE}.options) if(EXISTS ${NANOPB_OPTIONS_FILE}) # Get directory as lookups for dependency options fail if an options # file is used. The options is still set as a dependency of the # generated source and header. get_filename_component(options_dir ${NANOPB_OPTIONS_FILE} DIRECTORY) list(APPEND NANOPB_OPTIONS_DIRS ${options_dir}) else() set(NANOPB_OPTIONS_FILE) endif() # If the dependencies are options files, we need to pass the directories # as arguments to nanopb foreach(depends_file ${NANOPB_DEPENDS}) get_filename_component(ext ${depends_file} EXT) if(ext STREQUAL ".options") get_filename_component(depends_dir ${depends_file} DIRECTORY) list(APPEND NANOPB_OPTIONS_DIRS ${depends_dir}) endif() endforeach() if(NANOPB_OPTIONS_DIRS) list(REMOVE_DUPLICATES NANOPB_OPTIONS_DIRS) endif() foreach(options_path ${NANOPB_OPTIONS_DIRS}) set(NANOPB_PLUGIN_OPTIONS "${NANOPB_PLUGIN_OPTIONS} -I${options_path}") endforeach() if(NANOPB_OPTIONS) set(NANOPB_PLUGIN_OPTIONS "${NANOPB_PLUGIN_OPTIONS} ${NANOPB_OPTIONS}") endif() add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_PATH_REL}/${FIL_WE}.pb.c" "${CMAKE_CURRENT_BINARY_DIR}/${FIL_PATH_REL}/${FIL_WE}.pb.h" COMMAND ${PROTOBUF_PROTOC_EXECUTABLE} ARGS -I${GENERATOR_PATH} -I${GENERATOR_CORE_DIR} -I${CMAKE_CURRENT_BINARY_DIR} ${_nanopb_include_path} --plugin=protoc-gen-nanopb=${NANOPB_GENERATOR_PLUGIN} "--nanopb_opt=${NANOPB_PLUGIN_OPTIONS}" "--nanopb_out=${CMAKE_CURRENT_BINARY_DIR}" ${ABS_FIL} DEPENDS ${ABS_FIL} ${GENERATOR_CORE_PYTHON_SRC} ${NANOPB_OPTIONS_FILE} ${NANOPB_DEPENDS} COMMENT "Running C++ protocol buffer compiler using nanopb plugin on ${FIL}" VERBATIM ) endforeach() set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE) set(${SRCS} ${${SRCS}} ${NANOPB_SRCS} PARENT_SCOPE) set(${HDRS} ${${HDRS}} ${NANOPB_HDRS} PARENT_SCOPE) endfunction() # # Main. # # By default have NANOPB_GENERATE_CPP macro pass -I to protoc # for each directory where a proto file is referenced. if(NOT DEFINED NANOPB_GENERATE_CPP_APPEND_PATH) set(NANOPB_GENERATE_CPP_APPEND_PATH TRUE) endif() # Make a really good guess regarding location of NANOPB_SRC_ROOT_FOLDER if(NOT DEFINED NANOPB_SRC_ROOT_FOLDER) get_filename_component(NANOPB_SRC_ROOT_FOLDER ${CMAKE_CURRENT_LIST_DIR}/.. ABSOLUTE) endif() # Find the include directory find_path(NANOPB_INCLUDE_DIRS pb.h PATHS ${NANOPB_SRC_ROOT_FOLDER} NO_CMAKE_FIND_ROOT_PATH ) mark_as_advanced(NANOPB_INCLUDE_DIRS) # Find nanopb source files set(NANOPB_SRCS) set(NANOPB_HDRS) list(APPEND _nanopb_srcs pb_decode.c pb_encode.c pb_common.c) list(APPEND _nanopb_hdrs pb_decode.h pb_encode.h pb_common.h pb.h) foreach(FIL ${_nanopb_srcs}) find_file(${FIL}__nano_pb_file NAMES ${FIL} PATHS ${NANOPB_SRC_ROOT_FOLDER} ${NANOPB_INCLUDE_DIRS} NO_CMAKE_FIND_ROOT_PATH) list(APPEND NANOPB_SRCS "${${FIL}__nano_pb_file}") mark_as_advanced(${FIL}__nano_pb_file) endforeach() foreach(FIL ${_nanopb_hdrs}) find_file(${FIL}__nano_pb_file NAMES ${FIL} PATHS ${NANOPB_INCLUDE_DIRS} NO_CMAKE_FIND_ROOT_PATH) mark_as_advanced(${FIL}__nano_pb_file) list(APPEND NANOPB_HDRS "${${FIL}__nano_pb_file}") endforeach() # Find the protoc Executable find_program(PROTOBUF_PROTOC_EXECUTABLE NAMES protoc DOC "The Google Protocol Buffers Compiler" PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Release ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug ) mark_as_advanced(PROTOBUF_PROTOC_EXECUTABLE) # Find nanopb generator source dir find_path(NANOPB_GENERATOR_SOURCE_DIR NAMES nanopb_generator.py DOC "nanopb generator source" PATHS ${NANOPB_SRC_ROOT_FOLDER}/generator NO_CMAKE_FIND_ROOT_PATH ) mark_as_advanced(NANOPB_GENERATOR_SOURCE_DIR) find_package(PythonInterp REQUIRED) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(NANOPB DEFAULT_MSG NANOPB_INCLUDE_DIRS NANOPB_SRCS NANOPB_HDRS NANOPB_GENERATOR_SOURCE_DIR PROTOBUF_PROTOC_EXECUTABLE ) nanopb-0.4.1/extra/nanopb-config-version.cmake.in000066400000000000000000000006211361552131000217220ustar00rootroot00000000000000set(PACKAGE_VERSION "@nanopb_VERSION@") # Check whether the requested PACKAGE_FIND_VERSION is compatible if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") set(PACKAGE_VERSION_COMPATIBLE FALSE) else() set(PACKAGE_VERSION_COMPATIBLE TRUE) if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") set(PACKAGE_VERSION_EXACT TRUE) endif() endif() nanopb-0.4.1/extra/nanopb-config.cmake000066400000000000000000000000711361552131000176310ustar00rootroot00000000000000include(${CMAKE_CURRENT_LIST_DIR}/nanopb-targets.cmake) nanopb-0.4.1/extra/nanopb.mk000066400000000000000000000022251361552131000157200ustar00rootroot00000000000000# This is an include file for Makefiles. It provides rules for building # .pb.c and .pb.h files out of .proto, as well the path to nanopb core. # Path to the nanopb root directory NANOPB_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../) # Files for the nanopb core NANOPB_CORE = $(NANOPB_DIR)/pb_encode.c $(NANOPB_DIR)/pb_decode.c $(NANOPB_DIR)/pb_common.c # Check if we are running on Windows ifdef windir WINDOWS = 1 endif ifdef WINDIR WINDOWS = 1 endif # Check whether to use binary version of nanopb_generator or the # system-supplied python interpreter. ifneq "$(wildcard $(NANOPB_DIR)/generator-bin)" "" # Binary package PROTOC = $(NANOPB_DIR)/generator-bin/protoc PROTOC_OPTS = else # Source only or git checkout ifdef WINDOWS PROTOC = "python $(NANOPB_DIR)/generator/protoc" PROTOC_OPTS = --plugin=protoc-gen-nanopb=$(NANOPB_DIR)/generator/protoc-gen-nanopb.bat else PROTOC = $(NANOPB_DIR)/generator/protoc PROTOC_OPTS = --plugin=protoc-gen-nanopb=$(NANOPB_DIR)/generator/protoc-gen-nanopb endif endif # Rule for building .pb.c and .pb.h %.pb.c %.pb.h: %.proto $(wildcard %.options) $(PROTOC) $(PROTOC_OPTS) --nanopb_out=. $< nanopb-0.4.1/extra/pb_syshdr.h000066400000000000000000000046231361552131000162640ustar00rootroot00000000000000/* This is an example of a header file for platforms/compilers that do * not come with stdint.h/stddef.h/stdbool.h/string.h. To use it, define * PB_SYSTEM_HEADER as "pb_syshdr.h", including the quotes, and add the * extra folder to your include path. * * It is very likely that you will need to customize this file to suit * your platform. For any compiler that supports C99, this file should * not be necessary. */ #ifndef _PB_SYSHDR_H_ #define _PB_SYSHDR_H_ /* stdint.h subset */ #ifdef HAVE_STDINT_H #include #else /* You will need to modify these to match the word size of your platform. */ typedef signed char int8_t; typedef unsigned char uint8_t; typedef signed short int16_t; typedef unsigned short uint16_t; typedef signed int int32_t; typedef unsigned int uint32_t; typedef signed long long int64_t; typedef unsigned long long uint64_t; /* These are ok for most platforms, unless uint8_t is actually not available, * in which case you should give the smallest available type. */ typedef int8_t int_least8_t; typedef uint8_t uint_least8_t; typedef uint8_t uint_fast8_t; typedef int16_t int_least16_t; typedef uint16_t uint_least16_t; #endif /* stddef.h subset */ #ifdef HAVE_STDDEF_H #include #else typedef uint32_t size_t; #define offsetof(st, m) ((size_t)(&((st *)0)->m)) #ifndef NULL #define NULL 0 #endif #endif /* stdbool.h subset */ #ifdef HAVE_STDBOOL_H #include #else #ifndef __cplusplus typedef int bool; #define false 0 #define true 1 #endif #endif /* stdlib.h subset */ #ifdef PB_ENABLE_MALLOC #ifdef HAVE_STDLIB_H #include #else void *realloc(void *ptr, size_t size); void free(void *ptr); #endif #endif /* string.h subset */ #ifdef HAVE_STRING_H #include #else /* Implementations are from the Public Domain C Library (PDCLib). */ static size_t strlen( const char * s ) { size_t rc = 0; while ( s[rc] ) { ++rc; } return rc; } static void * memcpy( void *s1, const void *s2, size_t n ) { char * dest = (char *) s1; const char * src = (const char *) s2; while ( n-- ) { *dest++ = *src++; } return s1; } static void * memset( void * s, int c, size_t n ) { unsigned char * p = (unsigned char *) s; while ( n-- ) { *p++ = (unsigned char) c; } return s; } #endif /* limits.h subset */ #ifdef HAVE_LIMITS_H #include #else #define CHAR_BIT 8 #endif #endif nanopb-0.4.1/extra/poetry/000077500000000000000000000000001361552131000154335ustar00rootroot00000000000000nanopb-0.4.1/extra/poetry/poetry_build.sh000077500000000000000000000003751361552131000205000ustar00rootroot00000000000000#!/bin/bash rm -rf nanopb mkdir nanopb cp -pr ../../generator nanopb/ touch nanopb/__init__.py nanopb/generator/__init__.py cp -pr ../../README.md . sed -i -e 's/\(version =.*\)-dev.*/\1-dev'$(git rev-list HEAD --count)'"/' pyproject.toml poetry build nanopb-0.4.1/extra/poetry/pyproject.toml000066400000000000000000000020171361552131000203470ustar00rootroot00000000000000[tool.poetry] name = "nanopb" version = "0.4.1" description = "Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is especially suitable for use in microcontrollers, but fits any memory restricted system." authors = ["Petteri Aimonen "] license = "Zlib" repository = "https://github.com/nanopb/nanopb/" readme = "README.md" homepage = "https://jpa.kapsi.fi/nanopb/" documentation = "https://jpa.kapsi.fi/nanopb/docs/index.html" keywords = ["protobuf", "protoc"] classifiers = ["Topic :: Software Development :: Build Tools"] [tool.poetry.scripts] nanopb_generator = "nanopb.generator.nanopb_generator:main_cli" protoc-gen-nanopb = "nanopb.generator.nanopb_generator:main_plugin" [tool.poetry.dependencies] python = ">=2.7" protobuf = ">=3.6" grpcio-tools = {version = ">=1.26.0rc1", allow-prereleases = true, optional=true} [tool.poetry.dev-dependencies] [tool.poetry.extras] grpcio-tools = ["grpcio-tools"] [build-system] requires = ["poetry>=0.12"] build-backend = "poetry.masonry.api" nanopb-0.4.1/generator/000077500000000000000000000000001361552131000147545ustar00rootroot00000000000000nanopb-0.4.1/generator/nanopb/000077500000000000000000000000001361552131000162315ustar00rootroot00000000000000nanopb-0.4.1/generator/nanopb/options.proto000066400000000000000000000077241361552131000210230ustar00rootroot00000000000000// This is a transitional file, to provide parallel support between the old // nanopb.proto and new options.proto files. Eventually nanopb.proto will // be left only for legacy code, but for now the generator is still also // using it. However, your new code can start using this file already now. // See pull request #241 for details: // https://github.com/nanopb/nanopb/pull/241 // Custom options for defining: // - Maximum size of string/bytes // - Maximum number of elements in array // // These are used by nanopb to generate statically allocable structures // for memory-limited environments. syntax = "proto2"; import "google/protobuf/descriptor.proto"; package nanopb; option java_package = "fi.kapsi.koti.jpa.nanopb"; enum FieldType { FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible. FT_CALLBACK = 1; // Always generate a callback field. FT_POINTER = 4; // Always generate a dynamically allocated field. FT_STATIC = 2; // Generate a static field or raise an exception if not possible. FT_IGNORE = 3; // Ignore the field completely. FT_INLINE = 5; // Legacy option, use the separate 'fixed_length' option instead } enum IntSize { IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto IS_8 = 8; IS_16 = 16; IS_32 = 32; IS_64 = 64; } // This is the inner options message, which basically defines options for // a field. When it is used in message or file scope, it applies to all // fields. message Options { // Allocated size for 'bytes' and 'string' fields. // For string fields, this should include the space for null terminator. optional int32 max_size = 1; // Maximum length for 'string' fields. Setting this is equivalent // to setting max_size to a value of length+1. optional int32 max_length = 14; // Allocated number of entries in arrays ('repeated' fields) optional int32 max_count = 2; // Size of integer fields. Can save some memory if you don't need // full 32 bits for the value. optional IntSize int_size = 7 [default = IS_DEFAULT]; // Force type of field (callback or static allocation) optional FieldType type = 3 [default = FT_DEFAULT]; // Use long names for enums, i.e. EnumName_EnumValue. optional bool long_names = 4 [default = true]; // Add 'packed' attribute to generated structs. // Note: this cannot be used on CPUs that break on unaligned // accesses to variables. optional bool packed_struct = 5 [default = false]; // Add 'packed' attribute to generated enums. optional bool packed_enum = 10 [default = false]; // Skip this message optional bool skip_message = 6 [default = false]; // Generate oneof fields as normal optional fields instead of union. optional bool no_unions = 8 [default = false]; // integer type tag for a message optional uint32 msgid = 9; // decode oneof as anonymous union optional bool anonymous_oneof = 11 [default = false]; // Proto3 singular field does not generate a "has_" flag optional bool proto3 = 12 [default = false]; // Generate an enum->string mapping function (can take up lots of space). optional bool enum_to_string = 13 [default = false]; // Generate bytes arrays with fixed length optional bool fixed_length = 15 [default = false]; // Generate repeated field with fixed count optional bool fixed_count = 16 [default = false]; } // Extensions to protoc 'Descriptor' type in order to define options // inside a .proto file. // // Protocol Buffers extension number registry // -------------------------------- // Project: Nanopb // Contact: Petteri Aimonen // Web site: http://kapsi.fi/~jpa/nanopb // Extensions: 1010 (all types) // -------------------------------- extend google.protobuf.FileOptions { optional Options fileopt = 1010; } extend google.protobuf.MessageOptions { optional Options msgopt = 1010; } extend google.protobuf.EnumOptions { optional Options enumopt = 1010; } extend google.protobuf.FieldOptions { optional Options fieldopt = 1010; } nanopb-0.4.1/generator/nanopb_generator.py000077500000000000000000002403171361552131000206630ustar00rootroot00000000000000#!/usr/bin/env python # kate: replace-tabs on; indent-width 4; from __future__ import unicode_literals '''Generate header file for nanopb from a ProtoBuf FileDescriptorSet.''' nanopb_version = "nanopb-0.4.1" import sys import re import codecs import copy import tempfile import os from functools import reduce try: # Add some dummy imports to keep packaging tools happy. import google, distutils.util # bbfreeze seems to need these import pkg_resources # pyinstaller / protobuf 2.5 seem to need these import proto.nanopb_pb2 as nanopb_pb2 # pyinstaller seems to need this except: # Don't care, we will error out later if it is actually important. pass try: import google.protobuf.text_format as text_format import google.protobuf.descriptor_pb2 as descriptor import google.protobuf.compiler.plugin_pb2 as plugin_pb2 import google.protobuf.reflection as reflection import google.protobuf.descriptor except: sys.stderr.write(''' ************************************************************* *** Could not import the Google protobuf Python libraries *** *** Try installing package 'python-protobuf' or similar. *** ************************************************************* ''' + '\n') raise try: from .proto import nanopb_pb2 from .proto._utils import invoke_protoc except TypeError: sys.stderr.write(''' **************************************************************************** *** Got TypeError when importing the protocol definitions for generator. *** *** This usually means that the protoc in your path doesn't match the *** *** Python protobuf library version. *** *** *** *** Please check the output of the following commands: *** *** which protoc *** *** protoc --version *** *** python -c 'import google.protobuf; print(google.protobuf.__file__)' *** *** If you are not able to find the python protobuf version using the *** *** above command, use this command. *** *** pip freeze | grep -i protobuf *** **************************************************************************** ''' + '\n') raise except (ValueError, SystemError, ImportError): # Probably invoked directly instead of via installed scripts. import proto.nanopb_pb2 as nanopb_pb2 from proto._utils import invoke_protoc except: sys.stderr.write(''' ******************************************************************** *** Failed to import the protocol definitions for generator. *** *** You have to run 'make' in the nanopb/generator/proto folder. *** ******************************************************************** ''' + '\n') raise # --------------------------------------------------------------------------- # Generation of single fields # --------------------------------------------------------------------------- import time import os.path # Values are tuple (c type, pb type, encoded size, data_size) FieldD = descriptor.FieldDescriptorProto datatypes = { FieldD.TYPE_BOOL: ('bool', 'BOOL', 1, 4), FieldD.TYPE_DOUBLE: ('double', 'DOUBLE', 8, 8), FieldD.TYPE_FIXED32: ('uint32_t', 'FIXED32', 4, 4), FieldD.TYPE_FIXED64: ('uint64_t', 'FIXED64', 8, 8), FieldD.TYPE_FLOAT: ('float', 'FLOAT', 4, 4), FieldD.TYPE_INT32: ('int32_t', 'INT32', 10, 4), FieldD.TYPE_INT64: ('int64_t', 'INT64', 10, 8), FieldD.TYPE_SFIXED32: ('int32_t', 'SFIXED32', 4, 4), FieldD.TYPE_SFIXED64: ('int64_t', 'SFIXED64', 8, 8), FieldD.TYPE_SINT32: ('int32_t', 'SINT32', 5, 4), FieldD.TYPE_SINT64: ('int64_t', 'SINT64', 10, 8), FieldD.TYPE_UINT32: ('uint32_t', 'UINT32', 5, 4), FieldD.TYPE_UINT64: ('uint64_t', 'UINT64', 10, 8), # Integer size override options (FieldD.TYPE_INT32, nanopb_pb2.IS_8): ('int8_t', 'INT32', 10, 1), (FieldD.TYPE_INT32, nanopb_pb2.IS_16): ('int16_t', 'INT32', 10, 2), (FieldD.TYPE_INT32, nanopb_pb2.IS_32): ('int32_t', 'INT32', 10, 4), (FieldD.TYPE_INT32, nanopb_pb2.IS_64): ('int64_t', 'INT32', 10, 8), (FieldD.TYPE_SINT32, nanopb_pb2.IS_8): ('int8_t', 'SINT32', 2, 1), (FieldD.TYPE_SINT32, nanopb_pb2.IS_16): ('int16_t', 'SINT32', 3, 2), (FieldD.TYPE_SINT32, nanopb_pb2.IS_32): ('int32_t', 'SINT32', 5, 4), (FieldD.TYPE_SINT32, nanopb_pb2.IS_64): ('int64_t', 'SINT32', 10, 8), (FieldD.TYPE_UINT32, nanopb_pb2.IS_8): ('uint8_t', 'UINT32', 2, 1), (FieldD.TYPE_UINT32, nanopb_pb2.IS_16): ('uint16_t','UINT32', 3, 2), (FieldD.TYPE_UINT32, nanopb_pb2.IS_32): ('uint32_t','UINT32', 5, 4), (FieldD.TYPE_UINT32, nanopb_pb2.IS_64): ('uint64_t','UINT32', 10, 8), (FieldD.TYPE_INT64, nanopb_pb2.IS_8): ('int8_t', 'INT64', 10, 1), (FieldD.TYPE_INT64, nanopb_pb2.IS_16): ('int16_t', 'INT64', 10, 2), (FieldD.TYPE_INT64, nanopb_pb2.IS_32): ('int32_t', 'INT64', 10, 4), (FieldD.TYPE_INT64, nanopb_pb2.IS_64): ('int64_t', 'INT64', 10, 8), (FieldD.TYPE_SINT64, nanopb_pb2.IS_8): ('int8_t', 'SINT64', 2, 1), (FieldD.TYPE_SINT64, nanopb_pb2.IS_16): ('int16_t', 'SINT64', 3, 2), (FieldD.TYPE_SINT64, nanopb_pb2.IS_32): ('int32_t', 'SINT64', 5, 4), (FieldD.TYPE_SINT64, nanopb_pb2.IS_64): ('int64_t', 'SINT64', 10, 8), (FieldD.TYPE_UINT64, nanopb_pb2.IS_8): ('uint8_t', 'UINT64', 2, 1), (FieldD.TYPE_UINT64, nanopb_pb2.IS_16): ('uint16_t','UINT64', 3, 2), (FieldD.TYPE_UINT64, nanopb_pb2.IS_32): ('uint32_t','UINT64', 5, 4), (FieldD.TYPE_UINT64, nanopb_pb2.IS_64): ('uint64_t','UINT64', 10, 8), } class Globals: '''Ugly global variables, should find a good way to pass these.''' verbose_options = False separate_options = [] matched_namemasks = set() protoc_insertion_points = False # String types (for python 2 / python 3 compatibility) try: strtypes = (unicode, str) openmode_unicode = 'rU' except NameError: strtypes = (str, ) openmode_unicode = 'r' class Names: '''Keeps a set of nested names and formats them to C identifier.''' def __init__(self, parts = ()): if isinstance(parts, Names): parts = parts.parts elif isinstance(parts, strtypes): parts = (parts,) self.parts = tuple(parts) def __str__(self): return '_'.join(self.parts) def __add__(self, other): if isinstance(other, strtypes): return Names(self.parts + (other,)) elif isinstance(other, Names): return Names(self.parts + other.parts) elif isinstance(other, tuple): return Names(self.parts + other) else: raise ValueError("Name parts should be of type str") def __eq__(self, other): return isinstance(other, Names) and self.parts == other.parts def names_from_type_name(type_name): '''Parse Names() from FieldDescriptorProto type_name''' if type_name[0] != '.': raise NotImplementedError("Lookup of non-absolute type names is not supported") return Names(type_name[1:].split('.')) def varint_max_size(max_value): '''Returns the maximum number of bytes a varint can take when encoded.''' if max_value < 0: max_value = 2**64 - max_value for i in range(1, 11): if (max_value >> (i * 7)) == 0: return i raise ValueError("Value too large for varint: " + str(max_value)) assert varint_max_size(-1) == 10 assert varint_max_size(0) == 1 assert varint_max_size(127) == 1 assert varint_max_size(128) == 2 class EncodedSize: '''Class used to represent the encoded size of a field or a message. Consists of a combination of symbolic sizes and integer sizes.''' def __init__(self, value = 0, symbols = []): if isinstance(value, EncodedSize): self.value = value.value self.symbols = value.symbols elif isinstance(value, strtypes + (Names,)): self.symbols = [str(value)] self.value = 0 else: self.value = value self.symbols = symbols def __add__(self, other): if isinstance(other, int): return EncodedSize(self.value + other, self.symbols) elif isinstance(other, strtypes + (Names,)): return EncodedSize(self.value, self.symbols + [str(other)]) elif isinstance(other, EncodedSize): return EncodedSize(self.value + other.value, self.symbols + other.symbols) else: raise ValueError("Cannot add size: " + repr(other)) def __mul__(self, other): if isinstance(other, int): return EncodedSize(self.value * other, [str(other) + '*' + s for s in self.symbols]) else: raise ValueError("Cannot multiply size: " + repr(other)) def __str__(self): if not self.symbols: return str(self.value) else: return '(' + str(self.value) + ' + ' + ' + '.join(self.symbols) + ')' def upperlimit(self): if not self.symbols: return self.value else: return 2**32 - 1 class Enum: def __init__(self, names, desc, enum_options): '''desc is EnumDescriptorProto''' self.options = enum_options self.names = names # by definition, `names` include this enum's name base_name = Names(names.parts[:-1]) if enum_options.long_names: self.values = [(names + x.name, x.number) for x in desc.value] else: self.values = [(base_name + x.name, x.number) for x in desc.value] self.value_longnames = [self.names + x.name for x in desc.value] self.packed = enum_options.packed_enum def has_negative(self): for n, v in self.values: if v < 0: return True return False def encoded_size(self): return max([varint_max_size(v) for n,v in self.values]) def __str__(self): result = 'typedef enum _%s {\n' % self.names result += ',\n'.join([" %s = %d" % x for x in self.values]) result += '\n}' if self.packed: result += ' pb_packed' result += ' %s;' % self.names return result def auxiliary_defines(self): # sort the enum by value sorted_values = sorted(self.values, key = lambda x: (x[1], x[0])) result = '#define _%s_MIN %s\n' % (self.names, sorted_values[0][0]) result += '#define _%s_MAX %s\n' % (self.names, sorted_values[-1][0]) result += '#define _%s_ARRAYSIZE ((%s)(%s+1))\n' % (self.names, self.names, sorted_values[-1][0]) if not self.options.long_names: # Define the long names always so that enum value references # from other files work properly. for i, x in enumerate(self.values): result += '#define %s %s\n' % (self.value_longnames[i], x[0]) if self.options.enum_to_string: result += 'const char *%s_name(%s v);\n' % (self.names, self.names) return result def enum_to_string_definition(self): if not self.options.enum_to_string: return "" result = 'const char *%s_name(%s v) {\n' % (self.names, self.names) result += ' switch (v) {\n' for ((enumname, _), strname) in zip(self.values, self.value_longnames): # Strip off the leading type name from the string value. strval = str(strname)[len(str(self.names)) + 1:] result += ' case %s: return "%s";\n' % (enumname, strval) result += ' }\n' result += ' return "unknown";\n' result += '}\n' return result class FieldMaxSize: def __init__(self, worst = 0, checks = [], field_name = 'undefined'): if isinstance(worst, list): self.worst = max(i for i in worst if i is not None) else: self.worst = worst self.worst_field = field_name self.checks = list(checks) def extend(self, extend, field_name = None): self.worst = max(self.worst, extend.worst) if self.worst == extend.worst: self.worst_field = extend.worst_field self.checks.extend(extend.checks) class Field: def __init__(self, struct_name, desc, field_options): '''desc is FieldDescriptorProto''' self.tag = desc.number self.struct_name = struct_name self.union_name = None self.name = desc.name self.default = None self.max_size = None self.max_count = None self.array_decl = "" self.enc_size = None self.data_item_size = None self.ctype = None self.fixed_count = False self.callback_datatype = field_options.callback_datatype if field_options.type == nanopb_pb2.FT_INLINE: # Before nanopb-0.3.8, fixed length bytes arrays were specified # by setting type to FT_INLINE. But to handle pointer typed fields, # it makes sense to have it as a separate option. field_options.type = nanopb_pb2.FT_STATIC field_options.fixed_length = True # Parse field options if field_options.HasField("max_size"): self.max_size = field_options.max_size self.default_has = field_options.default_has if desc.type == FieldD.TYPE_STRING and field_options.HasField("max_length"): # max_length overrides max_size for strings self.max_size = field_options.max_length + 1 if field_options.HasField("max_count"): self.max_count = field_options.max_count if desc.HasField('default_value'): self.default = desc.default_value # Check field rules, i.e. required/optional/repeated. can_be_static = True if desc.label == FieldD.LABEL_REPEATED: self.rules = 'REPEATED' if self.max_count is None: can_be_static = False else: self.array_decl = '[%d]' % self.max_count if field_options.fixed_count: self.rules = 'FIXARRAY' elif field_options.proto3: if desc.type == FieldD.TYPE_MESSAGE and not field_options.proto3_singular_msgs: # In most other protobuf libraries proto3 submessages have # "null" status. For nanopb, that is implemented as has_ field. self.rules = 'OPTIONAL' else: self.rules = 'SINGULAR' elif desc.label == FieldD.LABEL_REQUIRED: self.rules = 'REQUIRED' elif desc.label == FieldD.LABEL_OPTIONAL: self.rules = 'OPTIONAL' else: raise NotImplementedError(desc.label) # Check if the field can be implemented with static allocation # i.e. whether the data size is known. if desc.type == FieldD.TYPE_STRING and self.max_size is None: can_be_static = False if desc.type == FieldD.TYPE_BYTES and self.max_size is None: can_be_static = False # Decide how the field data will be allocated if field_options.type == nanopb_pb2.FT_DEFAULT: if can_be_static: field_options.type = nanopb_pb2.FT_STATIC else: field_options.type = nanopb_pb2.FT_CALLBACK if field_options.type == nanopb_pb2.FT_STATIC and not can_be_static: raise Exception("Field '%s' is defined as static, but max_size or " "max_count is not given." % self.name) if field_options.fixed_count and self.max_count is None: raise Exception("Field '%s' is defined as fixed count, " "but max_count is not given." % self.name) if field_options.type == nanopb_pb2.FT_STATIC: self.allocation = 'STATIC' elif field_options.type == nanopb_pb2.FT_POINTER: self.allocation = 'POINTER' elif field_options.type == nanopb_pb2.FT_CALLBACK: self.allocation = 'CALLBACK' else: raise NotImplementedError(field_options.type) # Decide the C data type to use in the struct. if desc.type in datatypes: self.ctype, self.pbtype, self.enc_size, self.data_item_size = datatypes[desc.type] # Override the field size if user wants to use smaller integers if (desc.type, field_options.int_size) in datatypes: self.ctype, self.pbtype, self.enc_size, self.data_item_size = datatypes[(desc.type, field_options.int_size)] elif desc.type == FieldD.TYPE_ENUM: self.pbtype = 'ENUM' self.data_item_size = 4 self.ctype = names_from_type_name(desc.type_name) if self.default is not None: self.default = self.ctype + self.default self.enc_size = None # Needs to be filled in when enum values are known elif desc.type == FieldD.TYPE_STRING: self.pbtype = 'STRING' self.ctype = 'char' if self.allocation == 'STATIC': self.ctype = 'char' self.array_decl += '[%d]' % self.max_size # -1 because of null terminator. Both pb_encode and pb_decode # check the presence of it. self.enc_size = varint_max_size(self.max_size) + self.max_size - 1 elif desc.type == FieldD.TYPE_BYTES: if field_options.fixed_length: self.pbtype = 'FIXED_LENGTH_BYTES' if self.max_size is None: raise Exception("Field '%s' is defined as fixed length, " "but max_size is not given." % self.name) self.enc_size = varint_max_size(self.max_size) + self.max_size self.ctype = 'pb_byte_t' self.array_decl += '[%d]' % self.max_size else: self.pbtype = 'BYTES' self.ctype = 'pb_bytes_array_t' if self.allocation == 'STATIC': self.ctype = self.struct_name + self.name + 't' self.enc_size = varint_max_size(self.max_size) + self.max_size elif desc.type == FieldD.TYPE_MESSAGE: self.pbtype = 'MESSAGE' self.ctype = self.submsgname = names_from_type_name(desc.type_name) self.enc_size = None # Needs to be filled in after the message type is available if field_options.submsg_callback: self.pbtype = 'MSG_W_CB' else: raise NotImplementedError(desc.type) def __lt__(self, other): return self.tag < other.tag def __str__(self): result = '' if self.allocation == 'POINTER': if self.rules == 'REPEATED': if self.pbtype == 'MSG_W_CB': result += ' pb_callback_t cb_' + self.name + ';\n' result += ' pb_size_t ' + self.name + '_count;\n' if self.pbtype in ['MESSAGE', 'MSG_W_CB']: # Use struct definition, so recursive submessages are possible result += ' struct _%s *%s;' % (self.ctype, self.name) elif self.pbtype == 'FIXED_LENGTH_BYTES' or self.rules == 'FIXARRAY': # Pointer to fixed size array result += ' %s (*%s)%s;' % (self.ctype, self.name, self.array_decl) elif self.rules in ['REPEATED', 'FIXARRAY'] and self.pbtype in ['STRING', 'BYTES']: # String/bytes arrays need to be defined as pointers to pointers result += ' %s **%s;' % (self.ctype, self.name) else: result += ' %s *%s;' % (self.ctype, self.name) elif self.allocation == 'CALLBACK': result += ' %s %s;' % (self.callback_datatype, self.name) else: if self.pbtype == 'MSG_W_CB' and self.rules in ['OPTIONAL', 'REPEATED']: result += ' pb_callback_t cb_' + self.name + ';\n' if self.rules == 'OPTIONAL': result += ' bool has_' + self.name + ';\n' elif self.rules == 'REPEATED': result += ' pb_size_t ' + self.name + '_count;\n' result += ' %s %s%s;' % (self.ctype, self.name, self.array_decl) return result def types(self): '''Return definitions for any special types this field might need.''' if self.pbtype == 'BYTES' and self.allocation == 'STATIC': result = 'typedef PB_BYTES_ARRAY_T(%d) %s;\n' % (self.max_size, self.ctype) else: result = '' return result def get_dependencies(self): '''Get list of type names used by this field.''' if self.allocation == 'STATIC': return [str(self.ctype)] else: return [] def get_initializer(self, null_init, inner_init_only = False): '''Return literal expression for this field's default value. null_init: If True, initialize to a 0 value instead of default from .proto inner_init_only: If True, exclude initialization for any count/has fields ''' inner_init = None if self.pbtype in ['MESSAGE', 'MSG_W_CB']: if null_init: inner_init = '%s_init_zero' % self.ctype else: inner_init = '%s_init_default' % self.ctype elif self.default is None or null_init: if self.pbtype == 'STRING': inner_init = '""' elif self.pbtype == 'BYTES': inner_init = '{0, {0}}' elif self.pbtype == 'FIXED_LENGTH_BYTES': inner_init = '{0}' elif self.pbtype in ('ENUM', 'UENUM'): inner_init = '_%s_MIN' % self.ctype else: inner_init = '0' else: if self.pbtype == 'STRING': data = codecs.escape_encode(self.default.encode('utf-8'))[0] inner_init = '"' + data.decode('ascii') + '"' elif self.pbtype == 'BYTES': data = codecs.escape_decode(self.default)[0] data = ["0x%02x" % c for c in bytearray(data)] if len(data) == 0: inner_init = '{0, {0}}' else: inner_init = '{%d, {%s}}' % (len(data), ','.join(data)) elif self.pbtype == 'FIXED_LENGTH_BYTES': data = codecs.escape_decode(self.default)[0] data = ["0x%02x" % c for c in bytearray(data)] if len(data) == 0: inner_init = '{0}' else: inner_init = '{%s}' % ','.join(data) elif self.pbtype in ['FIXED32', 'UINT32']: inner_init = str(self.default) + 'u' elif self.pbtype in ['FIXED64', 'UINT64']: inner_init = str(self.default) + 'ull' elif self.pbtype in ['SFIXED64', 'INT64']: inner_init = str(self.default) + 'll' elif self.pbtype == 'FLOAT': inner_init = str(self.default) if not '.' in inner_init: inner_init += '.0f' else: inner_init += 'f' else: inner_init = str(self.default) if inner_init_only: return inner_init outer_init = None if self.allocation == 'STATIC': if self.rules == 'REPEATED': outer_init = '0, {' + ', '.join([inner_init] * self.max_count) + '}' elif self.rules == 'FIXARRAY': outer_init = '{' + ', '.join([inner_init] * self.max_count) + '}' elif self.rules == 'OPTIONAL': if null_init or not self.default_has: outer_init = 'false, ' + inner_init else: outer_init = 'true, ' + inner_init else: outer_init = inner_init elif self.allocation == 'POINTER': if self.rules == 'REPEATED': outer_init = '0, NULL' else: outer_init = 'NULL' elif self.allocation == 'CALLBACK': if self.pbtype == 'EXTENSION': outer_init = 'NULL' else: outer_init = '{{NULL}, NULL}' if self.pbtype == 'MSG_W_CB' and self.rules in ['REPEATED', 'OPTIONAL']: outer_init = '{{NULL}, NULL}, ' + outer_init return outer_init def tags(self): '''Return the #define for the tag number of this field.''' identifier = '%s_%s_tag' % (self.struct_name, self.name) return '#define %-40s %d\n' % (identifier, self.tag) def fieldlist(self): '''Return the FIELDLIST macro entry for this field. Format is: X(a, ATYPE, HTYPE, LTYPE, field_name, tag) ''' name = self.name if self.rules == "ONEOF": # For oneofs, make a tuple of the union name, union member name, # and the name inside the parent struct. if not self.anonymous: name = '(%s,%s,%s)' % (self.union_name, self.name, self.union_name + '.' + self.name) else: name = '(%s,%s,%s)' % (self.union_name, self.name, self.name) return 'X(a, %-9s %-9s %-9s %-16s %3d)' % (self.allocation + ',', self.rules + ',', self.pbtype + ',', name + ',', self.tag) def data_size(self, dependencies): '''Return estimated size of this field in the C struct. This is used to try to automatically pick right descriptor size. If the estimate is wrong, it will result in compile time error and user having to specify descriptor_width option. ''' if self.allocation == 'POINTER' or self.pbtype == 'EXTENSION': size = 8 elif self.allocation == 'CALLBACK': size = 16 elif self.pbtype in ['MESSAGE', 'MSG_W_CB']: if str(self.submsgname) in dependencies: size = dependencies[str(self.submsgname)].data_size(dependencies) else: size = 256 # Message is in other file, this is reasonable guess for most cases elif self.pbtype in ['STRING', 'FIXED_LENGTH_BYTES']: size = self.max_size elif self.pbtype == 'BYTES': size = self.max_size + 4 elif self.data_item_size is not None: size = self.data_item_size else: raise Exception("Unhandled field type: %s" % self.pbtype) if self.rules in ['REPEATED', 'FIXARRAY'] and self.allocation == 'STATIC': size *= self.max_count if self.rules not in ('REQUIRED', 'SINGULAR'): size += 4 if size % 4 != 0: # Estimate how much alignment requirements will increase the size. size += 4 - (size % 4) return size def encoded_size(self, dependencies): '''Return the maximum size that this field can take when encoded, including the field tag. If the size cannot be determined, returns None.''' if self.allocation != 'STATIC': return None if self.pbtype in ['MESSAGE', 'MSG_W_CB']: encsize = None if str(self.submsgname) in dependencies: submsg = dependencies[str(self.submsgname)] encsize = submsg.encoded_size(dependencies) if encsize is not None: # Include submessage length prefix encsize += varint_max_size(encsize.upperlimit()) else: my_msg = dependencies.get(str(self.struct_name)) if my_msg and submsg.protofile == my_msg.protofile: # The dependency is from the same file and size cannot be # determined for it, thus we know it will not be possible # in runtime either. return None if encsize is None: # Submessage or its size cannot be found. # This can occur if submessage is defined in different # file, and it or its .options could not be found. # Instead of direct numeric value, reference the size that # has been #defined in the other file. encsize = EncodedSize(self.submsgname + 'size') # We will have to make a conservative assumption on the length # prefix size, though. encsize += 5 elif self.pbtype in ['ENUM', 'UENUM']: if str(self.ctype) in dependencies: enumtype = dependencies[str(self.ctype)] encsize = enumtype.encoded_size() else: # Conservative assumption encsize = 10 elif self.enc_size is None: raise RuntimeError("Could not determine encoded size for %s.%s" % (self.struct_name, self.name)) else: encsize = EncodedSize(self.enc_size) encsize += varint_max_size(self.tag << 3) # Tag + wire type if self.rules in ['REPEATED', 'FIXARRAY']: # Decoders must be always able to handle unpacked arrays. # Therefore we have to reserve space for it, even though # we emit packed arrays ourselves. For length of 1, packed # arrays are larger however so we need to add allowance # for the length byte. encsize *= self.max_count if self.max_count == 1: encsize += 1 return encsize def has_callbacks(self): return self.allocation == 'CALLBACK' def requires_custom_field_callback(self): return self.allocation == 'CALLBACK' and self.callback_datatype != 'pb_callback_t' class ExtensionRange(Field): def __init__(self, struct_name, range_start, field_options): '''Implements a special pb_extension_t* field in an extensible message structure. The range_start signifies the index at which the extensions start. Not necessarily all tags above this are extensions, it is merely a speed optimization. ''' self.tag = range_start self.struct_name = struct_name self.name = 'extensions' self.pbtype = 'EXTENSION' self.rules = 'OPTIONAL' self.allocation = 'CALLBACK' self.ctype = 'pb_extension_t' self.array_decl = '' self.default = None self.max_size = 0 self.max_count = 0 self.data_item_size = 0 self.fixed_count = False self.callback_datatype = 'pb_extension_t*' def requires_custom_field_callback(self): return False def __str__(self): return ' pb_extension_t *extensions;' def types(self): return '' def tags(self): return '' def encoded_size(self, dependencies): # We exclude extensions from the count, because they cannot be known # until runtime. Other option would be to return None here, but this # way the value remains useful if extensions are not used. return EncodedSize(0) class ExtensionField(Field): def __init__(self, fullname, desc, field_options): self.fullname = fullname self.extendee_name = names_from_type_name(desc.extendee) Field.__init__(self, self.fullname + "extmsg", desc, field_options) if self.rules != 'OPTIONAL': self.skip = True else: self.skip = False self.rules = 'REQUIRED' # We don't really want the has_field for extensions self.msg = Message(self.fullname + "extmsg", None, field_options) self.msg.fields.append(self) def tags(self): '''Return the #define for the tag number of this field.''' identifier = '%s_tag' % self.fullname return '#define %-40s %d\n' % (identifier, self.tag) def extension_decl(self): '''Declaration of the extension type in the .pb.h file''' if self.skip: msg = '/* Extension field %s was skipped because only "optional"\n' % self.fullname msg +=' type of extension fields is currently supported. */\n' return msg return ('extern const pb_extension_type_t %s; /* field type: %s */\n' % (self.fullname, str(self).strip())) def extension_def(self, dependencies): '''Definition of the extension type in the .pb.c file''' if self.skip: return '' result = "/* Definition for extension field %s */\n" % self.fullname result += str(self.msg) result += self.msg.fields_declaration(dependencies) result += 'pb_byte_t %s_default[] = {0x00};\n' % self.msg.name result += self.msg.fields_definition(dependencies) result += 'const pb_extension_type_t %s = {\n' % self.fullname result += ' NULL,\n' result += ' NULL,\n' result += ' &%s_msg\n' % self.msg.name result += '};\n' return result # --------------------------------------------------------------------------- # Generation of oneofs (unions) # --------------------------------------------------------------------------- class OneOf(Field): def __init__(self, struct_name, oneof_desc): self.struct_name = struct_name self.name = oneof_desc.name self.ctype = 'union' self.pbtype = 'oneof' self.fields = [] self.allocation = 'ONEOF' self.default = None self.rules = 'ONEOF' self.anonymous = False self.has_msg_cb = False def add_field(self, field): field.union_name = self.name field.rules = 'ONEOF' field.anonymous = self.anonymous self.fields.append(field) self.fields.sort(key = lambda f: f.tag) if field.pbtype == 'MSG_W_CB': self.has_msg_cb = True # Sort by the lowest tag number inside union self.tag = min([f.tag for f in self.fields]) def __str__(self): result = '' if self.fields: if self.has_msg_cb: result += ' pb_callback_t cb_' + self.name + ';\n' result += ' pb_size_t which_' + self.name + ";\n" result += ' union {\n' for f in self.fields: result += ' ' + str(f).replace('\n', '\n ') + '\n' if self.anonymous: result += ' };' else: result += ' } ' + self.name + ';' return result def types(self): return ''.join([f.types() for f in self.fields]) def get_dependencies(self): deps = [] for f in self.fields: deps += f.get_dependencies() return deps def get_initializer(self, null_init): if self.has_msg_cb: return '{{NULL}, NULL}, 0, {' + self.fields[0].get_initializer(null_init) + '}' else: return '0, {' + self.fields[0].get_initializer(null_init) + '}' def tags(self): return ''.join([f.tags() for f in self.fields]) def fieldlist(self): return ' \\\n'.join(field.fieldlist() for field in self.fields) def data_size(self, dependencies): return max(f.data_size(dependencies) for f in self.fields) def encoded_size(self, dependencies): '''Returns the size of the largest oneof field.''' largest = 0 symbols = [] for f in self.fields: size = EncodedSize(f.encoded_size(dependencies)) if size is None or size.value is None: return None elif size.symbols: symbols.append((f.tag, size.symbols[0])) elif size.value > largest: largest = size.value if not symbols: # Simple case, all sizes were known at generator time return largest if largest > 0: # Some sizes were known, some were not symbols.insert(0, (0, largest)) if len(symbols) == 1: # Only one symbol was needed return EncodedSize(5, [symbols[0][1]]) else: # Use sizeof(union{}) construct to find the maximum size of # submessages. union_def = ' '.join('char f%d[%s];' % s for s in symbols) return EncodedSize(5, ['sizeof(union{%s})' % union_def]) def has_callbacks(self): return bool([f for f in self.fields if f.has_callbacks()]) def requires_custom_field_callback(self): return bool([f for f in self.fields if f.requires_custom_field_callback()]) # --------------------------------------------------------------------------- # Generation of messages (structures) # --------------------------------------------------------------------------- class Message: def __init__(self, names, desc, message_options): self.name = names self.fields = [] self.oneofs = {} self.desc = desc if message_options.msgid: self.msgid = message_options.msgid if desc is not None: self.load_fields(desc, message_options) self.callback_function = message_options.callback_function if not message_options.HasField('callback_function'): # Automatically assign a per-message callback if any field has # a special callback_datatype. for field in self.fields: if field.requires_custom_field_callback(): self.callback_function = "%s_callback" % self.name break self.packed = message_options.packed_struct self.descriptorsize = message_options.descriptorsize def load_fields(self, desc, message_options): '''Load field list from DescriptorProto''' no_unions = [] if hasattr(desc, 'oneof_decl'): for i, f in enumerate(desc.oneof_decl): oneof_options = get_nanopb_suboptions(desc, message_options, self.name + f.name) if oneof_options.no_unions: no_unions.append(i) # No union, but add fields normally elif oneof_options.type == nanopb_pb2.FT_IGNORE: pass # No union and skip fields also else: oneof = OneOf(self.name, f) if oneof_options.anonymous_oneof: oneof.anonymous = True self.oneofs[i] = oneof self.fields.append(oneof) else: sys.stderr.write('Note: This Python protobuf library has no OneOf support\n') for f in desc.field: field_options = get_nanopb_suboptions(f, message_options, self.name + f.name) if field_options.type == nanopb_pb2.FT_IGNORE: continue field = Field(self.name, f, field_options) if (hasattr(f, 'oneof_index') and f.HasField('oneof_index') and f.oneof_index not in no_unions): if f.oneof_index in self.oneofs: self.oneofs[f.oneof_index].add_field(field) else: self.fields.append(field) if len(desc.extension_range) > 0: field_options = get_nanopb_suboptions(desc, message_options, self.name + 'extensions') range_start = min([r.start for r in desc.extension_range]) if field_options.type != nanopb_pb2.FT_IGNORE: self.fields.append(ExtensionRange(self.name, range_start, field_options)) def get_dependencies(self): '''Get list of type names that this structure refers to.''' deps = [] for f in self.fields: deps += f.get_dependencies() return deps def __str__(self): result = 'typedef struct _%s {\n' % self.name if not self.fields: # Empty structs are not allowed in C standard. # Therefore add a dummy field if an empty message occurs. result += ' char dummy_field;' result += '\n'.join([str(f) for f in sorted(self.fields)]) if Globals.protoc_insertion_points: result += '\n/* @@protoc_insertion_point(struct:%s) */' % self.name result += '\n}' if self.packed: result += ' pb_packed' result += ' %s;' % self.name if self.packed: result = 'PB_PACKED_STRUCT_START\n' + result result += '\nPB_PACKED_STRUCT_END' return result + '\n' def types(self): return ''.join([f.types() for f in self.fields]) def get_initializer(self, null_init): if not self.fields: return '{0}' parts = [] for field in sorted(self.fields): parts.append(field.get_initializer(null_init)) return '{' + ', '.join(parts) + '}' def count_required_fields(self): '''Returns number of required fields inside this message''' count = 0 for f in self.fields: if not isinstance(f, OneOf): if f.rules == 'REQUIRED': count += 1 return count def all_fields(self): '''Iterate over all fields in this message, including nested OneOfs.''' for f in self.fields: if isinstance(f, OneOf): for f2 in f.fields: yield f2 else: yield f def field_for_tag(self, tag): '''Given a tag number, return the Field instance.''' for field in self.all_fields(): if field.tag == tag: return field return None def count_all_fields(self): '''Count the total number of fields in this message.''' count = 0 for f in self.fields: if isinstance(f, OneOf): count += len(f.fields) else: count += 1 return count def fields_declaration(self, dependencies): '''Return X-macro declaration of all fields in this message.''' result = '#define %s_FIELDLIST(X, a) \\\n' % (self.name) result += ' \\\n'.join(field.fieldlist() for field in sorted(self.fields)) result += '\n' has_callbacks = bool([f for f in self.fields if f.has_callbacks()]) if has_callbacks: if self.callback_function != 'pb_default_field_callback': result += "extern bool %s(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_t *field);\n" % self.callback_function result += "#define %s_CALLBACK %s\n" % (self.name, self.callback_function) else: result += "#define %s_CALLBACK NULL\n" % self.name defval = self.default_value(dependencies) if defval: hexcoded = ''.join("\\x%02x" % ord(defval[i:i+1]) for i in range(len(defval))) result += '#define %s_DEFAULT (const pb_byte_t*)"%s\\x00"\n' % (self.name, hexcoded) else: result += '#define %s_DEFAULT NULL\n' % self.name for field in sorted(self.fields): if field.pbtype in ['MESSAGE', 'MSG_W_CB']: result += "#define %s_%s_MSGTYPE %s\n" % (self.name, field.name, field.ctype) elif field.rules == 'ONEOF': for member in field.fields: if member.pbtype in ['MESSAGE', 'MSG_W_CB']: result += "#define %s_%s_%s_MSGTYPE %s\n" % (self.name, member.union_name, member.name, member.ctype) return result def fields_declaration_cpp_lookup(self): result = 'template <>\n' result += 'struct MessageDescriptor<%s> {\n' % (self.name) result += ' static PB_INLINE_CONSTEXPR const pb_size_t fields_array_length = %d;\n' % (self.count_all_fields()) result += ' static inline const pb_msgdesc_t* fields() {\n' result += ' return &%s_msg;\n' % (self.name) result += ' }\n' result += '};' return result def fields_definition(self, dependencies): '''Return the field descriptor definition that goes in .pb.c file.''' width = self.required_descriptor_width(dependencies) if width == 1: width = 'AUTO' result = 'PB_BIND(%s, %s, %s)\n' % (self.name, self.name, width) return result def required_descriptor_width(self, dependencies): '''Estimate how many words are necessary for each field descriptor.''' if self.descriptorsize != nanopb_pb2.DS_AUTO: return int(self.descriptorsize) if not self.fields: return 1 max_tag = max(field.tag for field in self.all_fields()) max_offset = self.data_size(dependencies) max_arraysize = max((field.max_count or 0) for field in self.all_fields()) max_datasize = max(field.data_size(dependencies) for field in self.all_fields()) if max_arraysize > 0xFFFF: return 8 elif (max_tag > 0x3FF or max_offset > 0xFFFF or max_arraysize > 0x0FFF or max_datasize > 0x0FFF): return 4 elif max_tag > 0x3F or max_offset > 0xFF: return 2 else: # NOTE: Macro logic in pb.h ensures that width 1 will # be raised to 2 automatically for string/submsg fields # and repeated fields. Thus only tag and offset need to # be checked. return 1 def data_size(self, dependencies): '''Return approximate sizeof(struct) in the compiled code.''' return sum(f.data_size(dependencies) for f in self.fields) def encoded_size(self, dependencies): '''Return the maximum size that this message can take when encoded. If the size cannot be determined, returns None. ''' size = EncodedSize(0) for field in self.fields: fsize = field.encoded_size(dependencies) if fsize is None: return None size += fsize return size def default_value(self, dependencies): '''Generate serialized protobuf message that contains the default values for optional fields.''' if not self.desc: return b'' if self.desc.options.map_entry: return b'' optional_only = copy.deepcopy(self.desc) enums = {} # Remove fields without default values # The iteration is done in reverse order to avoid remove() messing up iteration. for field in reversed(list(optional_only.field)): parsed_field = self.field_for_tag(field.number) if parsed_field is None or parsed_field.allocation != 'STATIC': optional_only.field.remove(field) elif (field.label == FieldD.LABEL_REPEATED or field.type == FieldD.TYPE_MESSAGE or not field.HasField('default_value')): optional_only.field.remove(field) elif hasattr(field, 'oneof_index') and field.HasField('oneof_index'): optional_only.field.remove(field) elif field.type == FieldD.TYPE_ENUM: # The partial descriptor doesn't include the enum type # so we fake it with int64. enums[field.name] = (names_from_type_name(field.type_name), field.default_value) field.type = FieldD.TYPE_INT64 field.ClearField(str('default_value')) field.ClearField(str('type_name')) if len(optional_only.field) == 0: return b'' optional_only.ClearField(str('oneof_decl')) desc = google.protobuf.descriptor.MakeDescriptor(optional_only) msg = reflection.MakeClass(desc)() for field in optional_only.field: if field.type == FieldD.TYPE_STRING: setattr(msg, field.name, field.default_value) elif field.type == FieldD.TYPE_BYTES: setattr(msg, field.name, codecs.escape_decode(field.default_value)[0]) elif field.type in [FieldD.TYPE_FLOAT, FieldD.TYPE_DOUBLE]: setattr(msg, field.name, float(field.default_value)) elif field.type == FieldD.TYPE_BOOL: setattr(msg, field.name, field.default_value == 'true') elif field.name in enums: # Lookup the enum default value enumname = enums[field.name][0] defval = enums[field.name][1] enumtype = dependencies[str(enumname)] defvals = [v for n,v in enumtype.values if n.parts[-1] == defval] if defvals: setattr(msg, field.name, defvals[0]) else: setattr(msg, field.name, int(field.default_value)) return msg.SerializeToString() # --------------------------------------------------------------------------- # Processing of entire .proto files # --------------------------------------------------------------------------- def iterate_messages(desc, flatten = False, names = Names()): '''Recursively find all messages. For each, yield name, DescriptorProto.''' if hasattr(desc, 'message_type'): submsgs = desc.message_type else: submsgs = desc.nested_type for submsg in submsgs: sub_names = names + submsg.name if flatten: yield Names(submsg.name), submsg else: yield sub_names, submsg for x in iterate_messages(submsg, flatten, sub_names): yield x def iterate_extensions(desc, flatten = False, names = Names()): '''Recursively find all extensions. For each, yield name, FieldDescriptorProto. ''' for extension in desc.extension: yield names, extension for subname, subdesc in iterate_messages(desc, flatten, names): for extension in subdesc.extension: yield subname, extension def toposort2(data): '''Topological sort. From http://code.activestate.com/recipes/577413-topological-sort/ This function is under the MIT license. ''' for k, v in list(data.items()): v.discard(k) # Ignore self dependencies extra_items_in_deps = reduce(set.union, list(data.values()), set()) - set(data.keys()) data.update(dict([(item, set()) for item in extra_items_in_deps])) while True: ordered = set(item for item,dep in list(data.items()) if not dep) if not ordered: break for item in sorted(ordered): yield item data = dict([(item, (dep - ordered)) for item,dep in list(data.items()) if item not in ordered]) assert not data, "A cyclic dependency exists amongst %r" % data def sort_dependencies(messages): '''Sort a list of Messages based on dependencies.''' dependencies = {} message_by_name = {} for message in messages: dependencies[str(message.name)] = set(message.get_dependencies()) message_by_name[str(message.name)] = message for msgname in toposort2(dependencies): if msgname in message_by_name: yield message_by_name[msgname] def make_identifier(headername): '''Make #ifndef identifier that contains uppercase A-Z and digits 0-9''' result = "" for c in headername.upper(): if c.isalnum(): result += c else: result += '_' return result class ProtoFile: def __init__(self, fdesc, file_options): '''Takes a FileDescriptorProto and parses it.''' self.fdesc = fdesc self.file_options = file_options self.dependencies = {} self.parse() # Some of types used in this file probably come from the file itself. # Thus it has implicit dependency on itself. self.add_dependency(self) def parse(self): self.enums = [] self.messages = [] self.extensions = [] mangle_names = self.file_options.mangle_names flatten = mangle_names == nanopb_pb2.M_FLATTEN strip_prefix = None replacement_prefix = None if mangle_names == nanopb_pb2.M_STRIP_PACKAGE: strip_prefix = "." + self.fdesc.package elif mangle_names == nanopb_pb2.M_PACKAGE_INITIALS: strip_prefix = "." + self.fdesc.package replacement_prefix = "" for part in self.fdesc.package.split("."): replacement_prefix += part[0] elif self.file_options.package: strip_prefix = "." + self.fdesc.package replacement_prefix = self.file_options.package def create_name(names): if mangle_names == nanopb_pb2.M_NONE or mangle_names == nanopb_pb2.M_PACKAGE_INITIALS: return base_name + names elif mangle_names == nanopb_pb2.M_STRIP_PACKAGE: return Names(names) else: single_name = names if isinstance(names, Names): single_name = names.parts[-1] return Names(single_name) def mangle_field_typename(typename): if mangle_names == nanopb_pb2.M_FLATTEN: return "." + typename.split(".")[-1] elif strip_prefix is not None and typename.startswith(strip_prefix): if replacement_prefix is not None: return "." + replacement_prefix + typename[len(strip_prefix):] else: return typename[len(strip_prefix):] elif self.file_options.package: return "." + replacement_prefix + typename else: return typename if replacement_prefix is not None: base_name = Names(replacement_prefix.split('.')) elif self.fdesc.package: base_name = Names(self.fdesc.package.split('.')) else: base_name = Names() for enum in self.fdesc.enum_type: name = create_name(enum.name) enum_options = get_nanopb_suboptions(enum, self.file_options, name) self.enums.append(Enum(name, enum, enum_options)) for names, message in iterate_messages(self.fdesc, flatten): name = create_name(names) message_options = get_nanopb_suboptions(message, self.file_options, name) if message_options.skip_message: continue message = copy.deepcopy(message) for field in message.field: if field.type in (FieldD.TYPE_MESSAGE, FieldD.TYPE_ENUM): field.type_name = mangle_field_typename(field.type_name) self.messages.append(Message(name, message, message_options)) for enum in message.enum_type: name = create_name(names + enum.name) enum_options = get_nanopb_suboptions(enum, message_options, name) self.enums.append(Enum(name, enum, enum_options)) for names, extension in iterate_extensions(self.fdesc, flatten): name = create_name(names + extension.name) field_options = get_nanopb_suboptions(extension, self.file_options, name) extension = copy.deepcopy(extension) if extension.type in (FieldD.TYPE_MESSAGE, FieldD.TYPE_ENUM): extension.type_name = mangle_field_typename(extension.type_name) if field_options.type != nanopb_pb2.FT_IGNORE: self.extensions.append(ExtensionField(name, extension, field_options)) def add_dependency(self, other): for enum in other.enums: self.dependencies[str(enum.names)] = enum enum.protofile = other for msg in other.messages: self.dependencies[str(msg.name)] = msg msg.protofile = other # Fix field default values where enum short names are used. for enum in other.enums: if not enum.options.long_names: for message in self.messages: for field in message.fields: if field.default in enum.value_longnames: idx = enum.value_longnames.index(field.default) field.default = enum.values[idx][0] # Fix field data types where enums have negative values. for enum in other.enums: if not enum.has_negative(): for message in self.messages: for field in message.fields: if field.pbtype == 'ENUM' and field.ctype == enum.names: field.pbtype = 'UENUM' def generate_header(self, includes, headername, options): '''Generate content for a header file. Generates strings, which should be concatenated and stored to file. ''' yield '/* Automatically generated nanopb header */\n' if options.notimestamp: yield '/* Generated by %s */\n\n' % (nanopb_version) else: yield '/* Generated by %s at %s. */\n\n' % (nanopb_version, time.asctime()) if self.fdesc.package: symbol = make_identifier(self.fdesc.package + '_' + headername) else: symbol = make_identifier(headername) yield '#ifndef PB_%s_INCLUDED\n' % symbol yield '#define PB_%s_INCLUDED\n' % symbol try: yield options.libformat % ('pb.h') except TypeError: # no %s specified - use whatever was passed in as options.libformat yield options.libformat yield '\n' for incfile in self.file_options.include: yield options.genformat % incfile yield '\n' for incfile in includes: noext = os.path.splitext(incfile)[0] yield options.genformat % (noext + options.extension + options.header_extension) yield '\n' if Globals.protoc_insertion_points: yield '/* @@protoc_insertion_point(includes) */\n' yield '\n' yield '#if PB_PROTO_HEADER_VERSION != 40\n' yield '#error Regenerate this file with the current version of nanopb generator.\n' yield '#endif\n' yield '\n' yield '#ifdef __cplusplus\n' yield 'extern "C" {\n' yield '#endif\n\n' if self.enums: yield '/* Enum definitions */\n' for enum in self.enums: yield str(enum) + '\n\n' if self.messages: yield '/* Struct definitions */\n' for msg in sort_dependencies(self.messages): yield msg.types() yield str(msg) + '\n' yield '\n' if self.extensions: yield '/* Extensions */\n' for extension in self.extensions: yield extension.extension_decl() yield '\n' if self.enums: yield '/* Helper constants for enums */\n' for enum in self.enums: yield enum.auxiliary_defines() + '\n' yield '\n' if self.messages: yield '/* Initializer values for message structs */\n' for msg in self.messages: identifier = '%s_init_default' % msg.name yield '#define %-40s %s\n' % (identifier, msg.get_initializer(False)) for msg in self.messages: identifier = '%s_init_zero' % msg.name yield '#define %-40s %s\n' % (identifier, msg.get_initializer(True)) yield '\n' yield '/* Field tags (for use in manual encoding/decoding) */\n' for msg in sort_dependencies(self.messages): for field in msg.fields: yield field.tags() for extension in self.extensions: yield extension.tags() yield '\n' yield '/* Struct field encoding specification for nanopb */\n' for msg in self.messages: yield msg.fields_declaration(self.dependencies) + '\n' for msg in self.messages: yield 'extern const pb_msgdesc_t %s_msg;\n' % msg.name yield '\n' yield '/* Defines for backwards compatibility with code written before nanopb-0.4.0 */\n' for msg in self.messages: yield '#define %s_fields &%s_msg\n' % (msg.name, msg.name) yield '\n' yield '/* Maximum encoded size of messages (where known) */\n' for msg in self.messages: msize = msg.encoded_size(self.dependencies) identifier = '%s_size' % msg.name if msize is not None: yield '#define %-40s %s\n' % (identifier, msize) else: yield '/* %s depends on runtime parameters */\n' % identifier yield '\n' if [msg for msg in self.messages if hasattr(msg,'msgid')]: yield '/* Message IDs (where set with "msgid" option) */\n' for msg in self.messages: if hasattr(msg,'msgid'): yield '#define PB_MSG_%d %s\n' % (msg.msgid, msg.name) yield '\n' symbol = make_identifier(headername.split('.')[0]) yield '#define %s_MESSAGES \\\n' % symbol for msg in self.messages: m = "-1" msize = msg.encoded_size(self.dependencies) if msize is not None: m = msize if hasattr(msg,'msgid'): yield '\tPB_MSG(%d,%s,%s) \\\n' % (msg.msgid, m, msg.name) yield '\n' for msg in self.messages: if hasattr(msg,'msgid'): yield '#define %s_msgid %d\n' % (msg.name, msg.msgid) yield '\n' yield '#ifdef __cplusplus\n' yield '} /* extern "C" */\n' yield '#endif\n' if options.cpp_descriptors: yield '\n' yield '#ifdef __cplusplus\n' yield '/* Message descriptors for nanopb */\n' yield 'namespace nanopb {\n' for msg in self.messages: yield msg.fields_declaration_cpp_lookup() + '\n' yield '} // namespace nanopb\n' yield '\n' yield '#endif /* __cplusplus */\n' yield '\n' if Globals.protoc_insertion_points: yield '/* @@protoc_insertion_point(eof) */\n' # End of header yield '\n#endif\n' def generate_source(self, headername, options): '''Generate content for a source file.''' yield '/* Automatically generated nanopb constant definitions */\n' if options.notimestamp: yield '/* Generated by %s */\n\n' % (nanopb_version) else: yield '/* Generated by %s at %s. */\n\n' % (nanopb_version, time.asctime()) yield options.genformat % (headername) yield '\n' if Globals.protoc_insertion_points: yield '/* @@protoc_insertion_point(includes) */\n' yield '#if PB_PROTO_HEADER_VERSION != 40\n' yield '#error Regenerate this file with the current version of nanopb generator.\n' yield '#endif\n' yield '\n' for msg in self.messages: yield msg.fields_definition(self.dependencies) + '\n\n' for ext in self.extensions: yield ext.extension_def(self.dependencies) + '\n' for enum in self.enums: yield enum.enum_to_string_definition() + '\n' # Add checks for numeric limits if self.messages: largest_msg = max(self.messages, key = lambda m: m.count_required_fields()) largest_count = largest_msg.count_required_fields() if largest_count > 64: yield '\n/* Check that missing required fields will be properly detected */\n' yield '#if PB_MAX_REQUIRED_FIELDS < %d\n' % largest_count yield '#error Properly detecting missing required fields in %s requires \\\n' % largest_msg.name yield ' setting PB_MAX_REQUIRED_FIELDS to %d or more.\n' % largest_count yield '#endif\n' # Add check for sizeof(double) has_double = False for msg in self.messages: for field in msg.fields: if field.ctype == 'double': has_double = True if has_double: yield '\n' yield '#ifndef PB_CONVERT_DOUBLE_FLOAT\n' yield '/* On some platforms (such as AVR), double is really float.\n' yield ' * To be able to encode/decode double on these platforms, you need.\n' yield ' * to define PB_CONVERT_DOUBLE_FLOAT in pb.h or compiler command line.\n' yield ' */\n' yield 'PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)\n' yield '#endif\n' yield '\n' if Globals.protoc_insertion_points: yield '/* @@protoc_insertion_point(eof) */\n' # --------------------------------------------------------------------------- # Options parsing for the .proto files # --------------------------------------------------------------------------- from fnmatch import fnmatchcase def read_options_file(infile): '''Parse a separate options file to list: [(namemask, options), ...] ''' results = [] data = infile.read() data = re.sub(r'/\*.*?\*/', '', data, flags = re.MULTILINE) data = re.sub(r'//.*?$', '', data, flags = re.MULTILINE) data = re.sub(r'#.*?$', '', data, flags = re.MULTILINE) for i, line in enumerate(data.split('\n')): line = line.strip() if not line: continue parts = line.split(None, 1) if len(parts) < 2: sys.stderr.write("%s:%d: " % (infile.name, i + 1) + "Option lines should have space between field name and options. " + "Skipping line: '%s'\n" % line) continue opts = nanopb_pb2.NanoPBOptions() try: text_format.Merge(parts[1], opts) except Exception as e: sys.stderr.write("%s:%d: " % (infile.name, i + 1) + "Unparseable option line: '%s'. " % line + "Error: %s\n" % str(e)) continue results.append((parts[0], opts)) return results def get_nanopb_suboptions(subdesc, options, name): '''Get copy of options, and merge information from subdesc.''' new_options = nanopb_pb2.NanoPBOptions() new_options.CopyFrom(options) if hasattr(subdesc, 'syntax') and subdesc.syntax == "proto3": new_options.proto3 = True # Handle options defined in a separate file dotname = '.'.join(name.parts) for namemask, options in Globals.separate_options: if fnmatchcase(dotname, namemask): Globals.matched_namemasks.add(namemask) new_options.MergeFrom(options) # Handle options defined in .proto if isinstance(subdesc.options, descriptor.FieldOptions): ext_type = nanopb_pb2.nanopb elif isinstance(subdesc.options, descriptor.FileOptions): ext_type = nanopb_pb2.nanopb_fileopt elif isinstance(subdesc.options, descriptor.MessageOptions): ext_type = nanopb_pb2.nanopb_msgopt elif isinstance(subdesc.options, descriptor.EnumOptions): ext_type = nanopb_pb2.nanopb_enumopt else: raise Exception("Unknown options type") if subdesc.options.HasExtension(ext_type): ext = subdesc.options.Extensions[ext_type] new_options.MergeFrom(ext) if Globals.verbose_options: sys.stderr.write("Options for " + dotname + ": ") sys.stderr.write(text_format.MessageToString(new_options) + "\n") return new_options # --------------------------------------------------------------------------- # Command line interface # --------------------------------------------------------------------------- import sys import os.path from optparse import OptionParser optparser = OptionParser( usage = "Usage: nanopb_generator.py [options] file.pb ...", epilog = "Compile file.pb from file.proto by: 'protoc -ofile.pb file.proto'. " + "Output will be written to file.pb.h and file.pb.c.") optparser.add_option("-x", dest="exclude", metavar="FILE", action="append", default=[], help="Exclude file from generated #include list.") optparser.add_option("-e", "--extension", dest="extension", metavar="EXTENSION", default=".pb", help="Set extension to use instead of '.pb' for generated files. [default: %default]") optparser.add_option("-H", "--header-extension", dest="header_extension", metavar="EXTENSION", default=".h", help="Set extension to use for generated header files. [default: %default]") optparser.add_option("-S", "--source-extension", dest="source_extension", metavar="EXTENSION", default=".c", help="Set extension to use for generated source files. [default: %default]") optparser.add_option("-f", "--options-file", dest="options_file", metavar="FILE", default="%s.options", help="Set name of a separate generator options file.") optparser.add_option("-I", "--options-path", dest="options_path", metavar="DIR", action="append", default = [], help="Search for .options files additionally in this path") optparser.add_option("--error-on-unmatched", dest="error_on_unmatched", action="store_true", default=False, help ="Stop generation if there are unmatched fields in options file") optparser.add_option("--no-error-on-unmatched", dest="error_on_unmatched", action="store_false", default=False, help ="Continue generation if there are unmatched fields in options file") optparser.add_option("-D", "--output-dir", dest="output_dir", metavar="OUTPUTDIR", default=None, help="Output directory of .pb.h and .pb.c files") optparser.add_option("-Q", "--generated-include-format", dest="genformat", metavar="FORMAT", default='#include "%s"', help="Set format string to use for including other .pb.h files. [default: %default]") optparser.add_option("-L", "--library-include-format", dest="libformat", metavar="FORMAT", default='#include <%s>', help="Set format string to use for including the nanopb pb.h header. [default: %default]") optparser.add_option("--strip-path", dest="strip_path", action="store_true", default=False, help="Strip directory path from #included .pb.h file name") optparser.add_option("--no-strip-path", dest="strip_path", action="store_false", help="Opposite of --strip-path (default since 0.4.0)") optparser.add_option("--cpp-descriptors", action="store_true", help="Generate C++ descriptors to lookup by type (e.g. pb_field_t for a message)") optparser.add_option("-T", "--no-timestamp", dest="notimestamp", action="store_true", default=True, help="Don't add timestamp to .pb.h and .pb.c preambles (default since 0.4.0)") optparser.add_option("-t", "--timestamp", dest="notimestamp", action="store_false", default=True, help="Add timestamp to .pb.h and .pb.c preambles") optparser.add_option("-q", "--quiet", dest="quiet", action="store_true", default=False, help="Don't print anything except errors.") optparser.add_option("-v", "--verbose", dest="verbose", action="store_true", default=False, help="Print more information.") optparser.add_option("-s", dest="settings", metavar="OPTION:VALUE", action="append", default=[], help="Set generator option (max_size, max_count etc.).") optparser.add_option("--protoc-insertion-points", dest="protoc_insertion_points", action="store_true", default=False, help="Include insertion point comments in output for use by custom protoc plugins") def parse_file(filename, fdesc, options): '''Parse a single file. Returns a ProtoFile instance.''' toplevel_options = nanopb_pb2.NanoPBOptions() for s in options.settings: text_format.Merge(s, toplevel_options) if not fdesc: data = open(filename, 'rb').read() fdesc = descriptor.FileDescriptorSet.FromString(data).file[0] # Check if there is a separate .options file had_abspath = False try: optfilename = options.options_file % os.path.splitext(filename)[0] except TypeError: # No %s specified, use the filename as-is optfilename = options.options_file had_abspath = True paths = ['.'] + options.options_path for p in paths: if os.path.isfile(os.path.join(p, optfilename)): optfilename = os.path.join(p, optfilename) if options.verbose: sys.stderr.write('Reading options from ' + optfilename + '\n') Globals.separate_options = read_options_file(open(optfilename, openmode_unicode)) break else: # If we are given a full filename and it does not exist, give an error. # However, don't give error when we automatically look for .options file # with the same name as .proto. if options.verbose or had_abspath: sys.stderr.write('Options file not found: ' + optfilename + '\n') Globals.separate_options = [] Globals.matched_namemasks = set() Globals.protoc_insertion_points = options.protoc_insertion_points # Parse the file file_options = get_nanopb_suboptions(fdesc, toplevel_options, Names([filename])) f = ProtoFile(fdesc, file_options) f.optfilename = optfilename return f def process_file(filename, fdesc, options, other_files = {}): '''Process a single file. filename: The full path to the .proto or .pb source file, as string. fdesc: The loaded FileDescriptorSet, or None to read from the input file. options: Command line options as they come from OptionsParser. Returns a dict: {'headername': Name of header file, 'headerdata': Data for the .h header file, 'sourcename': Name of the source code file, 'sourcedata': Data for the .c source code file } ''' f = parse_file(filename, fdesc, options) # Provide dependencies if available for dep in f.fdesc.dependency: if dep in other_files: f.add_dependency(other_files[dep]) # Decide the file names noext = os.path.splitext(filename)[0] headername = noext + options.extension + options.header_extension sourcename = noext + options.extension + options.source_extension if options.strip_path: headerbasename = os.path.basename(headername) else: headerbasename = headername # List of .proto files that should not be included in the C header file # even if they are mentioned in the source .proto. excludes = ['nanopb.proto', 'google/protobuf/descriptor.proto'] + options.exclude + list(f.file_options.exclude) includes = [d for d in f.fdesc.dependency if d not in excludes] headerdata = ''.join(f.generate_header(includes, headerbasename, options)) sourcedata = ''.join(f.generate_source(headerbasename, options)) # Check if there were any lines in .options that did not match a member unmatched = [n for n,o in Globals.separate_options if n not in Globals.matched_namemasks] if unmatched: if options.error_on_unmatched: raise Exception("Following patterns in " + f.optfilename + " did not match any fields: " + ', '.join(unmatched)); elif not options.quiet: sys.stderr.write("Following patterns in " + f.optfilename + " did not match any fields: " + ', '.join(unmatched) + "\n") if not Globals.verbose_options: sys.stderr.write("Use protoc --nanopb-out=-v:. to see a list of the field names.\n") return {'headername': headername, 'headerdata': headerdata, 'sourcename': sourcename, 'sourcedata': sourcedata} def main_cli(): '''Main function when invoked directly from the command line.''' options, filenames = optparser.parse_args() if not filenames: optparser.print_help() sys.exit(1) if options.quiet: options.verbose = False if options.output_dir and not os.path.exists(options.output_dir): optparser.print_help() sys.stderr.write("\noutput_dir does not exist: %s\n" % options.output_dir) sys.exit(1) if options.verbose: sys.stderr.write('Google Python protobuf library imported from %s, version %s\n' % (google.protobuf.__file__, google.protobuf.__version__)) # Load .pb files into memory and compile any .proto files. fdescs = {} include_path = ['-I%s' % p for p in options.options_path] for filename in filenames: if filename.endswith(".proto"): with tempfile.NamedTemporaryFile(suffix = ".pb") as tmp: invoke_protoc(["protoc"] + include_path + ['-o' + tmp.name, filename]) data = tmp.read() else: data = open(filename, 'rb').read() fdesc = descriptor.FileDescriptorSet.FromString(data).file[0] fdescs[fdesc.name] = fdesc # Process any include files first, in order to have them # available as dependencies other_files = {} for fdesc in fdescs.values(): other_files[fdesc.name] = parse_file(fdesc.name, fdesc, options) # Then generate the headers / sources Globals.verbose_options = options.verbose for fdesc in fdescs.values(): results = process_file(fdesc.name, fdesc, options, other_files) base_dir = options.output_dir or '' to_write = [ (os.path.join(base_dir, results['headername']), results['headerdata']), (os.path.join(base_dir, results['sourcename']), results['sourcedata']), ] if not options.quiet: paths = " and ".join([x[0] for x in to_write]) sys.stderr.write("Writing to %s\n" % paths) for path, data in to_write: with open(path, 'w') as f: f.write(data) def main_plugin(): '''Main function when invoked as a protoc plugin.''' import io, sys if sys.platform == "win32": import os, msvcrt # Set stdin and stdout to binary mode msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) data = io.open(sys.stdin.fileno(), "rb").read() request = plugin_pb2.CodeGeneratorRequest.FromString(data) try: # Versions of Python prior to 2.7.3 do not support unicode # input to shlex.split(). Try to convert to str if possible. params = str(request.parameter) except UnicodeEncodeError: params = request.parameter import shlex args = shlex.split(params) if len(args) == 1 and ',' in args[0]: # For compatibility with other protoc plugins, support options # separated by comma. lex = shlex.shlex(params) lex.whitespace_split = True lex.whitespace = ',' lex.commenters = '' args = list(lex) optparser.usage = "Usage: protoc --nanopb_out=[options][,more_options]:outdir file.proto" optparser.epilog = "Output will be written to file.pb.h and file.pb.c." if '-h' in args or '--help' in args: # By default optparser prints help to stdout, which doesn't work for # protoc plugins. optparser.print_help(sys.stderr) sys.exit(1) options, dummy = optparser.parse_args(args) Globals.verbose_options = options.verbose if options.verbose: sys.stderr.write('Google Python protobuf library imported from %s, version %s\n' % (google.protobuf.__file__, google.protobuf.__version__)) response = plugin_pb2.CodeGeneratorResponse() # Google's protoc does not currently indicate the full path of proto files. # Instead always add the main file path to the search dirs, that works for # the common case. import os.path options.options_path.append(os.path.dirname(request.file_to_generate[0])) # Process any include files first, in order to have them # available as dependencies other_files = {} for fdesc in request.proto_file: other_files[fdesc.name] = parse_file(fdesc.name, fdesc, options) for filename in request.file_to_generate: for fdesc in request.proto_file: if fdesc.name == filename: results = process_file(filename, fdesc, options, other_files) f = response.file.add() f.name = results['headername'] f.content = results['headerdata'] f = response.file.add() f.name = results['sourcename'] f.content = results['sourcedata'] io.open(sys.stdout.fileno(), "wb").write(response.SerializeToString()) if __name__ == '__main__': # Check if we are running as a plugin under protoc if 'protoc-gen-' in sys.argv[0] or '--protoc-plugin' in sys.argv: main_plugin() else: main_cli() nanopb-0.4.1/generator/proto/000077500000000000000000000000001361552131000161175ustar00rootroot00000000000000nanopb-0.4.1/generator/proto/Makefile000066400000000000000000000001231361552131000175530ustar00rootroot00000000000000PROTOC?=protoc all: nanopb_pb2.py %_pb2.py: %.proto $(PROTOC) --python_out=. $< nanopb-0.4.1/generator/proto/__init__.py000066400000000000000000000021471361552131000202340ustar00rootroot00000000000000'''This file automatically rebuilds the proto definitions for Python.''' from __future__ import absolute_import import os.path import sys import pkg_resources from ._utils import has_grpcio_protoc, invoke_protoc dirname = os.path.dirname(__file__) protosrc = os.path.join(dirname, "nanopb.proto") protodst = os.path.join(dirname, "nanopb_pb2.py") if os.path.isfile(protosrc): src_date = os.path.getmtime(protosrc) if not os.path.isfile(protodst) or os.path.getmtime(protodst) < src_date: cmd = [ "protoc", "--python_out={}".format(dirname), protosrc, "-I={}".format(dirname), ] if has_grpcio_protoc(): # grpcio-tools has an extra CLI argument # from grpc.tools.protoc __main__ invocation. _builtin_proto_include = pkg_resources.resource_filename('grpc_tools', '_proto') cmd.append("-I={}".format(_builtin_proto_include)) try: invoke_protoc(argv=cmd) except: sys.stderr.write("Failed to build nanopb_pb2.py: " + ' '.join(cmd) + "\n") raise nanopb-0.4.1/generator/proto/_utils.py000066400000000000000000000017731361552131000200000ustar00rootroot00000000000000import subprocess import os.path def has_grpcio_protoc(): # type: () -> bool """ checks if grpcio-tools protoc is installed""" try: import grpc_tools.protoc except ImportError: return False return True def invoke_protoc(argv): # type: (list) -> typing.Any """ Invoke protoc. This routine will use grpcio-provided protoc if it exists, using system-installed protoc as a fallback. Args: argv: protoc CLI invocation, first item must be 'protoc' """ if has_grpcio_protoc(): import grpc_tools.protoc as protoc import pkg_resources proto_include = pkg_resources.resource_filename('grpc_tools', '_proto') nanopb_include = os.path.dirname(os.path.abspath(__file__)) if not [x for x in argv if x.startswith('-I')]: argv = argv + ["-I."] argv = argv + ['-I' + proto_include, '-I' + nanopb_include] return protoc.main(argv) else: return subprocess.check_call(argv) nanopb-0.4.1/generator/proto/google/000077500000000000000000000000001361552131000173735ustar00rootroot00000000000000nanopb-0.4.1/generator/proto/google/protobuf/000077500000000000000000000000001361552131000212335ustar00rootroot00000000000000nanopb-0.4.1/generator/proto/google/protobuf/descriptor.proto000066400000000000000000001066651361552131000245140ustar00rootroot00000000000000// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Author: kenton@google.com (Kenton Varda) // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. // // The messages in this file describe the definitions found in .proto files. // A valid .proto file can be translated directly to a FileDescriptorProto // without any other information (e.g. without reading its imports). syntax = "proto2"; package google.protobuf; option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor"; option java_package = "com.google.protobuf"; option java_outer_classname = "DescriptorProtos"; option csharp_namespace = "Google.Protobuf.Reflection"; option objc_class_prefix = "GPB"; option cc_enable_arenas = true; // descriptor.proto must be optimized for speed because reflection-based // algorithms don't work during bootstrapping. option optimize_for = SPEED; // The protocol compiler can output a FileDescriptorSet containing the .proto // files it parses. message FileDescriptorSet { repeated FileDescriptorProto file = 1; } // Describes a complete .proto file. message FileDescriptorProto { optional string name = 1; // file name, relative to root of source tree optional string package = 2; // e.g. "foo", "foo.bar", etc. // Names of files imported by this file. repeated string dependency = 3; // Indexes of the public imported files in the dependency list above. repeated int32 public_dependency = 10; // Indexes of the weak imported files in the dependency list. // For Google-internal migration only. Do not use. repeated int32 weak_dependency = 11; // All top-level definitions in this file. repeated DescriptorProto message_type = 4; repeated EnumDescriptorProto enum_type = 5; repeated ServiceDescriptorProto service = 6; repeated FieldDescriptorProto extension = 7; optional FileOptions options = 8; // This field contains optional information about the original source code. // You may safely remove this entire field without harming runtime // functionality of the descriptors -- the information is needed only by // development tools. optional SourceCodeInfo source_code_info = 9; // The syntax of the proto file. // The supported values are "proto2" and "proto3". optional string syntax = 12; } // Describes a message type. message DescriptorProto { optional string name = 1; repeated FieldDescriptorProto field = 2; repeated FieldDescriptorProto extension = 6; repeated DescriptorProto nested_type = 3; repeated EnumDescriptorProto enum_type = 4; message ExtensionRange { optional int32 start = 1; optional int32 end = 2; optional ExtensionRangeOptions options = 3; } repeated ExtensionRange extension_range = 5; repeated OneofDescriptorProto oneof_decl = 8; optional MessageOptions options = 7; // Range of reserved tag numbers. Reserved tag numbers may not be used by // fields or extension ranges in the same message. Reserved ranges may // not overlap. message ReservedRange { optional int32 start = 1; // Inclusive. optional int32 end = 2; // Exclusive. } repeated ReservedRange reserved_range = 9; // Reserved field names, which may not be used by fields in the same message. // A given name may only be reserved once. repeated string reserved_name = 10; } message ExtensionRangeOptions { // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } // Describes a field within a message. message FieldDescriptorProto { enum Type { // 0 is reserved for errors. // Order is weird for historical reasons. TYPE_DOUBLE = 1; TYPE_FLOAT = 2; // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if // negative values are likely. TYPE_INT64 = 3; TYPE_UINT64 = 4; // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if // negative values are likely. TYPE_INT32 = 5; TYPE_FIXED64 = 6; TYPE_FIXED32 = 7; TYPE_BOOL = 8; TYPE_STRING = 9; // Tag-delimited aggregate. // Group type is deprecated and not supported in proto3. However, Proto3 // implementations should still be able to parse the group wire format and // treat group fields as unknown fields. TYPE_GROUP = 10; TYPE_MESSAGE = 11; // Length-delimited aggregate. // New in version 2. TYPE_BYTES = 12; TYPE_UINT32 = 13; TYPE_ENUM = 14; TYPE_SFIXED32 = 15; TYPE_SFIXED64 = 16; TYPE_SINT32 = 17; // Uses ZigZag encoding. TYPE_SINT64 = 18; // Uses ZigZag encoding. }; enum Label { // 0 is reserved for errors LABEL_OPTIONAL = 1; LABEL_REQUIRED = 2; LABEL_REPEATED = 3; }; optional string name = 1; optional int32 number = 3; optional Label label = 4; // If type_name is set, this need not be set. If both this and type_name // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. optional Type type = 5; // For message and enum types, this is the name of the type. If the name // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping // rules are used to find the type (i.e. first the nested types within this // message are searched, then within the parent, on up to the root // namespace). optional string type_name = 6; // For extensions, this is the name of the type being extended. It is // resolved in the same manner as type_name. optional string extendee = 2; // For numeric types, contains the original text representation of the value. // For booleans, "true" or "false". // For strings, contains the default text contents (not escaped in any way). // For bytes, contains the C escaped value. All bytes >= 128 are escaped. // TODO(kenton): Base-64 encode? optional string default_value = 7; // If set, gives the index of a oneof in the containing type's oneof_decl // list. This field is a member of that oneof. optional int32 oneof_index = 9; // JSON name of this field. The value is set by protocol compiler. If the // user has set a "json_name" option on this field, that option's value // will be used. Otherwise, it's deduced from the field's name by converting // it to camelCase. optional string json_name = 10; optional FieldOptions options = 8; } // Describes a oneof. message OneofDescriptorProto { optional string name = 1; optional OneofOptions options = 2; } // Describes an enum type. message EnumDescriptorProto { optional string name = 1; repeated EnumValueDescriptorProto value = 2; optional EnumOptions options = 3; // Range of reserved numeric values. Reserved values may not be used by // entries in the same enum. Reserved ranges may not overlap. // // Note that this is distinct from DescriptorProto.ReservedRange in that it // is inclusive such that it can appropriately represent the entire int32 // domain. message EnumReservedRange { optional int32 start = 1; // Inclusive. optional int32 end = 2; // Inclusive. } // Range of reserved numeric values. Reserved numeric values may not be used // by enum values in the same enum declaration. Reserved ranges may not // overlap. repeated EnumReservedRange reserved_range = 4; // Reserved enum value names, which may not be reused. A given name may only // be reserved once. repeated string reserved_name = 5; } // Describes a value within an enum. message EnumValueDescriptorProto { optional string name = 1; optional int32 number = 2; optional EnumValueOptions options = 3; } // Describes a service. message ServiceDescriptorProto { optional string name = 1; repeated MethodDescriptorProto method = 2; optional ServiceOptions options = 3; } // Describes a method of a service. message MethodDescriptorProto { optional string name = 1; // Input and output type names. These are resolved in the same way as // FieldDescriptorProto.type_name, but must refer to a message type. optional string input_type = 2; optional string output_type = 3; optional MethodOptions options = 4; // Identifies if client streams multiple client messages optional bool client_streaming = 5 [default=false]; // Identifies if server streams multiple server messages optional bool server_streaming = 6 [default=false]; } // =================================================================== // Options // Each of the definitions above may have "options" attached. These are // just annotations which may cause code to be generated slightly differently // or may contain hints for code that manipulates protocol messages. // // Clients may define custom options as extensions of the *Options messages. // These extensions may not yet be known at parsing time, so the parser cannot // store the values in them. Instead it stores them in a field in the *Options // message called uninterpreted_option. This field must have the same name // across all *Options messages. We then use this field to populate the // extensions when we build a descriptor, at which point all protos have been // parsed and so all extensions are known. // // Extension numbers for custom options may be chosen as follows: // * For options which will only be used within a single application or // organization, or for experimental options, use field numbers 50000 // through 99999. It is up to you to ensure that you do not use the // same number for multiple options. // * For options which will be published and used publicly by multiple // independent entities, e-mail protobuf-global-extension-registry@google.com // to reserve extension numbers. Simply provide your project name (e.g. // Objective-C plugin) and your project website (if available) -- there's no // need to explain how you intend to use them. Usually you only need one // extension number. You can declare multiple options with only one extension // number by putting them in a sub-message. See the Custom Options section of // the docs for examples: // https://developers.google.com/protocol-buffers/docs/proto#options // If this turns out to be popular, a web service will be set up // to automatically assign option numbers. message FileOptions { // Sets the Java package where classes generated from this .proto will be // placed. By default, the proto package is used, but this is often // inappropriate because proto packages do not normally start with backwards // domain names. optional string java_package = 1; // If set, all the classes from the .proto file are wrapped in a single // outer class with the given name. This applies to both Proto1 // (equivalent to the old "--one_java_file" option) and Proto2 (where // a .proto always translates to a single class, but you may want to // explicitly choose the class name). optional string java_outer_classname = 8; // If set true, then the Java code generator will generate a separate .java // file for each top-level message, enum, and service defined in the .proto // file. Thus, these types will *not* be nested inside the outer class // named by java_outer_classname. However, the outer class will still be // generated to contain the file's getDescriptor() method as well as any // top-level extensions defined in the file. optional bool java_multiple_files = 10 [default=false]; // This option does nothing. optional bool java_generate_equals_and_hash = 20 [deprecated=true]; // If set true, then the Java2 code generator will generate code that // throws an exception whenever an attempt is made to assign a non-UTF-8 // byte sequence to a string field. // Message reflection will do the same. // However, an extension field still accepts non-UTF-8 byte sequences. // This option has no effect on when used with the lite runtime. optional bool java_string_check_utf8 = 27 [default=false]; // Generated classes can be optimized for speed or code size. enum OptimizeMode { SPEED = 1; // Generate complete code for parsing, serialization, // etc. CODE_SIZE = 2; // Use ReflectionOps to implement these methods. LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. } optional OptimizeMode optimize_for = 9 [default=SPEED]; // Sets the Go package where structs generated from this .proto will be // placed. If omitted, the Go package will be derived from the following: // - The basename of the package import path, if provided. // - Otherwise, the package statement in the .proto file, if present. // - Otherwise, the basename of the .proto file, without extension. optional string go_package = 11; // Should generic services be generated in each language? "Generic" services // are not specific to any particular RPC system. They are generated by the // main code generators in each language (without additional plugins). // Generic services were the only kind of service generation supported by // early versions of google.protobuf. // // Generic services are now considered deprecated in favor of using plugins // that generate code specific to your particular RPC system. Therefore, // these default to false. Old code which depends on generic services should // explicitly set them to true. optional bool cc_generic_services = 16 [default=false]; optional bool java_generic_services = 17 [default=false]; optional bool py_generic_services = 18 [default=false]; optional bool php_generic_services = 42 [default=false]; // Is this file deprecated? // Depending on the target platform, this can emit Deprecated annotations // for everything in the file, or it will be completely ignored; in the very // least, this is a formalization for deprecating files. optional bool deprecated = 23 [default=false]; // Enables the use of arenas for the proto messages in this file. This applies // only to generated classes for C++. optional bool cc_enable_arenas = 31 [default=false]; // Sets the objective c class prefix which is prepended to all objective c // generated classes from this .proto. There is no default. optional string objc_class_prefix = 36; // Namespace for generated classes; defaults to the package. optional string csharp_namespace = 37; // By default Swift generators will take the proto package and CamelCase it // replacing '.' with underscore and use that to prefix the types/symbols // defined. When this options is provided, they will use this value instead // to prefix the types/symbols defined. optional string swift_prefix = 39; // Sets the php class prefix which is prepended to all php generated classes // from this .proto. Default is empty. optional string php_class_prefix = 40; // Use this option to change the namespace of php generated classes. Default // is empty. When this option is empty, the package name will be used for // determining the namespace. optional string php_namespace = 41; // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. // See the documentation for the "Options" section above. extensions 1000 to max; reserved 38; } message MessageOptions { // Set true to use the old proto1 MessageSet wire format for extensions. // This is provided for backwards-compatibility with the MessageSet wire // format. You should not use this for any other reason: It's less // efficient, has fewer features, and is more complicated. // // The message must be defined exactly as follows: // message Foo { // option message_set_wire_format = true; // extensions 4 to max; // } // Note that the message cannot have any defined fields; MessageSets only // have extensions. // // All extensions of your type must be singular messages; e.g. they cannot // be int32s, enums, or repeated messages. // // Because this is an option, the above two restrictions are not enforced by // the protocol compiler. optional bool message_set_wire_format = 1 [default=false]; // Disables the generation of the standard "descriptor()" accessor, which can // conflict with a field of the same name. This is meant to make migration // from proto1 easier; new code should avoid fields named "descriptor". optional bool no_standard_descriptor_accessor = 2 [default=false]; // Is this message deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the message, or it will be completely ignored; in the very least, // this is a formalization for deprecating messages. optional bool deprecated = 3 [default=false]; // Whether the message is an automatically generated map entry type for the // maps field. // // For maps fields: // map map_field = 1; // The parsed descriptor looks like: // message MapFieldEntry { // option map_entry = true; // optional KeyType key = 1; // optional ValueType value = 2; // } // repeated MapFieldEntry map_field = 1; // // Implementations may choose not to generate the map_entry=true message, but // use a native map in the target language to hold the keys and values. // The reflection APIs in such implementions still need to work as // if the field is a repeated message field. // // NOTE: Do not set the option in .proto files. Always use the maps syntax // instead. The option should only be implicitly set by the proto compiler // parser. optional bool map_entry = 7; reserved 8; // javalite_serializable reserved 9; // javanano_as_lite // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } message FieldOptions { // The ctype option instructs the C++ code generator to use a different // representation of the field than it normally would. See the specific // options below. This option is not yet implemented in the open source // release -- sorry, we'll try to include it in a future version! optional CType ctype = 1 [default = STRING]; enum CType { // Default mode. STRING = 0; CORD = 1; STRING_PIECE = 2; } // The packed option can be enabled for repeated primitive fields to enable // a more efficient representation on the wire. Rather than repeatedly // writing the tag and type for each element, the entire array is encoded as // a single length-delimited blob. In proto3, only explicit setting it to // false will avoid using packed encoding. optional bool packed = 2; // The jstype option determines the JavaScript type used for values of the // field. The option is permitted only for 64 bit integral and fixed types // (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING // is represented as JavaScript string, which avoids loss of precision that // can happen when a large value is converted to a floating point JavaScript. // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to // use the JavaScript "number" type. The behavior of the default option // JS_NORMAL is implementation dependent. // // This option is an enum to permit additional types to be added, e.g. // goog.math.Integer. optional JSType jstype = 6 [default = JS_NORMAL]; enum JSType { // Use the default type. JS_NORMAL = 0; // Use JavaScript strings. JS_STRING = 1; // Use JavaScript numbers. JS_NUMBER = 2; } // Should this field be parsed lazily? Lazy applies only to message-type // fields. It means that when the outer message is initially parsed, the // inner message's contents will not be parsed but instead stored in encoded // form. The inner message will actually be parsed when it is first accessed. // // This is only a hint. Implementations are free to choose whether to use // eager or lazy parsing regardless of the value of this option. However, // setting this option true suggests that the protocol author believes that // using lazy parsing on this field is worth the additional bookkeeping // overhead typically needed to implement it. // // This option does not affect the public interface of any generated code; // all method signatures remain the same. Furthermore, thread-safety of the // interface is not affected by this option; const methods remain safe to // call from multiple threads concurrently, while non-const methods continue // to require exclusive access. // // // Note that implementations may choose not to check required fields within // a lazy sub-message. That is, calling IsInitialized() on the outer message // may return true even if the inner message has missing required fields. // This is necessary because otherwise the inner message would have to be // parsed in order to perform the check, defeating the purpose of lazy // parsing. An implementation which chooses not to check required fields // must be consistent about it. That is, for any particular sub-message, the // implementation must either *always* check its required fields, or *never* // check its required fields, regardless of whether or not the message has // been parsed. optional bool lazy = 5 [default=false]; // Is this field deprecated? // Depending on the target platform, this can emit Deprecated annotations // for accessors, or it will be completely ignored; in the very least, this // is a formalization for deprecating fields. optional bool deprecated = 3 [default=false]; // For Google-internal migration only. Do not use. optional bool weak = 10 [default=false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; reserved 4; // removed jtype } message OneofOptions { // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } message EnumOptions { // Set this option to true to allow mapping different tag names to the same // value. optional bool allow_alias = 2; // Is this enum deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the enum, or it will be completely ignored; in the very least, this // is a formalization for deprecating enums. optional bool deprecated = 3 [default=false]; reserved 5; // javanano_as_lite // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } message EnumValueOptions { // Is this enum value deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the enum value, or it will be completely ignored; in the very least, // this is a formalization for deprecating enum values. optional bool deprecated = 1 [default=false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } message ServiceOptions { // Note: Field numbers 1 through 32 are reserved for Google's internal RPC // framework. We apologize for hoarding these numbers to ourselves, but // we were already using them long before we decided to release Protocol // Buffers. // Is this service deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the service, or it will be completely ignored; in the very least, // this is a formalization for deprecating services. optional bool deprecated = 33 [default=false]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } message MethodOptions { // Note: Field numbers 1 through 32 are reserved for Google's internal RPC // framework. We apologize for hoarding these numbers to ourselves, but // we were already using them long before we decided to release Protocol // Buffers. // Is this method deprecated? // Depending on the target platform, this can emit Deprecated annotations // for the method, or it will be completely ignored; in the very least, // this is a formalization for deprecating methods. optional bool deprecated = 33 [default=false]; // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, // or neither? HTTP based RPC implementation may choose GET verb for safe // methods, and PUT verb for idempotent methods instead of the default POST. enum IdempotencyLevel { IDEMPOTENCY_UNKNOWN = 0; NO_SIDE_EFFECTS = 1; // implies idempotent IDEMPOTENT = 2; // idempotent, but may have side effects } optional IdempotencyLevel idempotency_level = 34 [default=IDEMPOTENCY_UNKNOWN]; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; } // A message representing a option the parser does not recognize. This only // appears in options protos created by the compiler::Parser class. // DescriptorPool resolves these when building Descriptor objects. Therefore, // options protos in descriptor objects (e.g. returned by Descriptor::options(), // or produced by Descriptor::CopyTo()) will never have UninterpretedOptions // in them. message UninterpretedOption { // The name of the uninterpreted option. Each string represents a segment in // a dot-separated name. is_extension is true iff a segment represents an // extension (denoted with parentheses in options specs in .proto files). // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents // "foo.(bar.baz).qux". message NamePart { required string name_part = 1; required bool is_extension = 2; } repeated NamePart name = 2; // The value of the uninterpreted option, in whatever type the tokenizer // identified it as during parsing. Exactly one of these should be set. optional string identifier_value = 3; optional uint64 positive_int_value = 4; optional int64 negative_int_value = 5; optional double double_value = 6; optional bytes string_value = 7; optional string aggregate_value = 8; } // =================================================================== // Optional source code info // Encapsulates information about the original source file from which a // FileDescriptorProto was generated. message SourceCodeInfo { // A Location identifies a piece of source code in a .proto file which // corresponds to a particular definition. This information is intended // to be useful to IDEs, code indexers, documentation generators, and similar // tools. // // For example, say we have a file like: // message Foo { // optional string foo = 1; // } // Let's look at just the field definition: // optional string foo = 1; // ^ ^^ ^^ ^ ^^^ // a bc de f ghi // We have the following locations: // span path represents // [a,i) [ 4, 0, 2, 0 ] The whole field definition. // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). // // Notes: // - A location may refer to a repeated field itself (i.e. not to any // particular index within it). This is used whenever a set of elements are // logically enclosed in a single code segment. For example, an entire // extend block (possibly containing multiple extension definitions) will // have an outer location whose path refers to the "extensions" repeated // field without an index. // - Multiple locations may have the same path. This happens when a single // logical declaration is spread out across multiple places. The most // obvious example is the "extend" block again -- there may be multiple // extend blocks in the same scope, each of which will have the same path. // - A location's span is not always a subset of its parent's span. For // example, the "extendee" of an extension declaration appears at the // beginning of the "extend" block and is shared by all extensions within // the block. // - Just because a location's span is a subset of some other location's span // does not mean that it is a descendent. For example, a "group" defines // both a type and a field in a single declaration. Thus, the locations // corresponding to the type and field and their components will overlap. // - Code which tries to interpret locations should probably be designed to // ignore those that it doesn't understand, as more types of locations could // be recorded in the future. repeated Location location = 1; message Location { // Identifies which part of the FileDescriptorProto was defined at this // location. // // Each element is a field number or an index. They form a path from // the root FileDescriptorProto to the place where the definition. For // example, this path: // [ 4, 3, 2, 7, 1 ] // refers to: // file.message_type(3) // 4, 3 // .field(7) // 2, 7 // .name() // 1 // This is because FileDescriptorProto.message_type has field number 4: // repeated DescriptorProto message_type = 4; // and DescriptorProto.field has field number 2: // repeated FieldDescriptorProto field = 2; // and FieldDescriptorProto.name has field number 1: // optional string name = 1; // // Thus, the above path gives the location of a field name. If we removed // the last element: // [ 4, 3, 2, 7 ] // this path refers to the whole field declaration (from the beginning // of the label to the terminating semicolon). repeated int32 path = 1 [packed=true]; // Always has exactly three or four elements: start line, start column, // end line (optional, otherwise assumed same as start line), end column. // These are packed into a single field for efficiency. Note that line // and column numbers are zero-based -- typically you will want to add // 1 to each before displaying to a user. repeated int32 span = 2 [packed=true]; // If this SourceCodeInfo represents a complete declaration, these are any // comments appearing before and after the declaration which appear to be // attached to the declaration. // // A series of line comments appearing on consecutive lines, with no other // tokens appearing on those lines, will be treated as a single comment. // // leading_detached_comments will keep paragraphs of comments that appear // before (but not connected to) the current element. Each paragraph, // separated by empty lines, will be one comment element in the repeated // field. // // Only the comment content is provided; comment markers (e.g. //) are // stripped out. For block comments, leading whitespace and an asterisk // will be stripped from the beginning of each line other than the first. // Newlines are included in the output. // // Examples: // // optional int32 foo = 1; // Comment attached to foo. // // Comment attached to bar. // optional int32 bar = 2; // // optional string baz = 3; // // Comment attached to baz. // // Another line attached to baz. // // // Comment attached to qux. // // // // Another line attached to qux. // optional double qux = 4; // // // Detached comment for corge. This is not leading or trailing comments // // to qux or corge because there are blank lines separating it from // // both. // // // Detached comment for corge paragraph 2. // // optional string corge = 5; // /* Block comment attached // * to corge. Leading asterisks // * will be removed. */ // /* Block comment attached to // * grault. */ // optional int32 grault = 6; // // // ignored detached comments. optional string leading_comments = 3; optional string trailing_comments = 4; repeated string leading_detached_comments = 6; } } // Describes the relationship between generated code and its original source // file. A GeneratedCodeInfo message is associated with only one generated // source file, but may contain references to different source .proto files. message GeneratedCodeInfo { // An Annotation connects some span of text in generated code to an element // of its generating .proto file. repeated Annotation annotation = 1; message Annotation { // Identifies the element in the original source .proto file. This field // is formatted the same as SourceCodeInfo.Location.path. repeated int32 path = 1 [packed=true]; // Identifies the filesystem path to the original source .proto. optional string source_file = 2; // Identifies the starting offset in bytes in the generated code // that relates to the identified object. optional int32 begin = 3; // Identifies the ending offset in bytes in the generated code that // relates to the identified offset. The end offset should be one past // the last relevant byte (so the length of the text = end - begin). optional int32 end = 4; } } nanopb-0.4.1/generator/proto/nanopb.proto000066400000000000000000000136721361552131000204720ustar00rootroot00000000000000// Custom options for defining: // - Maximum size of string/bytes // - Maximum number of elements in array // // These are used by nanopb to generate statically allocable structures // for memory-limited environments. syntax = "proto2"; import "google/protobuf/descriptor.proto"; option java_package = "fi.kapsi.koti.jpa.nanopb"; enum FieldType { FT_DEFAULT = 0; // Automatically decide field type, generate static field if possible. FT_CALLBACK = 1; // Always generate a callback field. FT_POINTER = 4; // Always generate a dynamically allocated field. FT_STATIC = 2; // Generate a static field or raise an exception if not possible. FT_IGNORE = 3; // Ignore the field completely. FT_INLINE = 5; // Legacy option, use the separate 'fixed_length' option instead } enum IntSize { IS_DEFAULT = 0; // Default, 32/64bit based on type in .proto IS_8 = 8; IS_16 = 16; IS_32 = 32; IS_64 = 64; } enum TypenameMangling { M_NONE = 0; // Default, no typename mangling M_STRIP_PACKAGE = 1; // Strip current package name M_FLATTEN = 2; // Only use last path component M_PACKAGE_INITIALS = 3; // Replace the package name by the initials } enum DescriptorSize { DS_AUTO = 0; // Select minimal size based on field type DS_1 = 1; // 1 word; up to 15 byte fields, no arrays DS_2 = 2; // 2 words; up to 4095 byte fields, 4095 entry arrays DS_4 = 4; // 4 words; up to 2^32-1 byte fields, 2^16-1 entry arrays DS_8 = 8; // 8 words; up to 2^32-1 entry arrays } // This is the inner options message, which basically defines options for // a field. When it is used in message or file scope, it applies to all // fields. message NanoPBOptions { // Allocated size for 'bytes' and 'string' fields. // For string fields, this should include the space for null terminator. optional int32 max_size = 1; // Maximum length for 'string' fields. Setting this is equivalent // to setting max_size to a value of length+1. optional int32 max_length = 14; // Allocated number of entries in arrays ('repeated' fields) optional int32 max_count = 2; // Size of integer fields. Can save some memory if you don't need // full 32 bits for the value. optional IntSize int_size = 7 [default = IS_DEFAULT]; // Force type of field (callback or static allocation) optional FieldType type = 3 [default = FT_DEFAULT]; // Use long names for enums, i.e. EnumName_EnumValue. optional bool long_names = 4 [default = true]; // Add 'packed' attribute to generated structs. // Note: this cannot be used on CPUs that break on unaligned // accesses to variables. optional bool packed_struct = 5 [default = false]; // Add 'packed' attribute to generated enums. optional bool packed_enum = 10 [default = false]; // Skip this message optional bool skip_message = 6 [default = false]; // Generate oneof fields as normal optional fields instead of union. optional bool no_unions = 8 [default = false]; // integer type tag for a message optional uint32 msgid = 9; // decode oneof as anonymous union optional bool anonymous_oneof = 11 [default = false]; // Proto3 singular field does not generate a "has_" flag optional bool proto3 = 12 [default = false]; // Force proto3 messages to have no "has_" flag. // This was default behavior until nanopb-0.4.0. optional bool proto3_singular_msgs = 21 [default = false]; // Generate an enum->string mapping function (can take up lots of space). optional bool enum_to_string = 13 [default = false]; // Generate bytes arrays with fixed length optional bool fixed_length = 15 [default = false]; // Generate repeated field with fixed count optional bool fixed_count = 16 [default = false]; // Generate message-level callback that is called before decoding submessages. // This can be used to set callback fields for submsgs inside oneofs. optional bool submsg_callback = 22 [default = false]; // Mangle long names optional TypenameMangling mangle_names = 17 [default = M_NONE]; // Data type for storage associated with callback fields. optional string callback_datatype = 18 [default = "pb_callback_t"]; // Callback function used for encoding and decoding. // Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t // structure. This is still supported, but does not work inside e.g. oneof or pointer // fields. Instead, a new method allows specifying a per-message callback that // will be called for all callback fields in a message type. optional string callback_function = 19 [default = "pb_default_field_callback"]; // Select the size of field descriptors. This option has to be defined // for the whole message, not per-field. Usually automatic selection is // ok, but if it results in compilation errors you can increase the field // size here. optional DescriptorSize descriptorsize = 20 [default = DS_AUTO]; // Set default value for has_ fields. optional bool default_has = 23 [default = false]; // Extra files to include in generated `.pb.h` repeated string include = 24; // Automatic includes to exlude from generated `.pb.h` // Same as nanopb_generator.py command line flag -x. repeated string exclude = 26; // Package name that applies only for nanopb. optional string package = 25; } // Extensions to protoc 'Descriptor' type in order to define options // inside a .proto file. // // Protocol Buffers extension number registry // -------------------------------- // Project: Nanopb // Contact: Petteri Aimonen // Web site: http://kapsi.fi/~jpa/nanopb // Extensions: 1010 (all types) // -------------------------------- extend google.protobuf.FileOptions { optional NanoPBOptions nanopb_fileopt = 1010; } extend google.protobuf.MessageOptions { optional NanoPBOptions nanopb_msgopt = 1010; } extend google.protobuf.EnumOptions { optional NanoPBOptions nanopb_enumopt = 1010; } extend google.protobuf.FieldOptions { optional NanoPBOptions nanopb = 1010; } nanopb-0.4.1/generator/protoc000077500000000000000000000002641361552131000162120ustar00rootroot00000000000000#!/usr/bin/env python import sys from nanopb_generator import invoke_protoc if __name__ == '__main__': status = invoke_protoc(['protoc'] + sys.argv[1:]) sys.exit(status) nanopb-0.4.1/generator/protoc-gen-nanopb000077500000000000000000000007231361552131000202340ustar00rootroot00000000000000#!/bin/sh # This file is used to invoke nanopb_generator.py as a plugin # to protoc on Linux and other *nix-style systems. # Use it like this: # protoc --plugin=protoc-gen-nanopb=..../protoc-gen-nanopb --nanopb_out=dir foo.proto # # Note that if you use the binary package of nanopb, the protoc # path is already set up properly and there is no need to give # --plugin= on the command line. MYPATH=$(dirname "$0") exec "$MYPATH/nanopb_generator.py" --protoc-plugin nanopb-0.4.1/generator/protoc-gen-nanopb.bat000066400000000000000000000006761361552131000210050ustar00rootroot00000000000000@echo off :: This file is used to invoke nanopb_generator.py as a plugin :: to protoc on Windows. :: Use it like this: :: protoc --plugin=protoc-gen-nanopb=..../protoc-gen-nanopb.bat --nanopb_out=dir foo.proto :: :: Note that if you use the binary package of nanopb, the protoc :: path is already set up properly and there is no need to give :: --plugin= on the command line. set mydir=%~dp0 python "%mydir%\nanopb_generator.py" --protoc-plugin nanopb-0.4.1/generator/protoc.bat000066400000000000000000000004561361552131000167570ustar00rootroot00000000000000@echo off :: This file acts as a drop-in replacement of binary protoc.exe. :: It will use either Python-based protoc from grpcio-tools package, :: or if it is not available, protoc.exe from path if found. setLocal enableDelayedExpansion set mydir=%~dp0 python "%mydir%\protoc" %* exit /b %ERRORLEVEL% nanopb-0.4.1/library.json000066400000000000000000000013441361552131000153270ustar00rootroot00000000000000{ "name": "Nanopb", "version": "0.4.1", "keywords": "protocol buffers, protobuf, google", "description": "Nanopb is a plain-C implementation of Google's Protocol Buffers data format. It is targeted at 32 bit microcontrollers, but is also fit for other embedded systems with tight (<10 kB ROM, <1 kB RAM) memory constraints.", "repository": { "type": "git", "url": "https://github.com/nanopb/nanopb.git" }, "authors": [{ "name": "Petteri Aimonen", "email": "jpa@nanopb.mail.kapsi.fi", "url": "http://koti.kapsi.fi/jpa/nanopb/" }], "export": { "include": [ "*.c", "*.cpp", "*.h", "examples" ] }, "examples": "examples/*/*.c", "frameworks": "*", "platforms": "*" } nanopb-0.4.1/pb.h000066400000000000000000001124231361552131000135430ustar00rootroot00000000000000/* Common parts of the nanopb library. Most of these are quite low-level * stuff. For the high-level interface, see pb_encode.h and pb_decode.h. */ #ifndef PB_H_INCLUDED #define PB_H_INCLUDED /***************************************************************** * Nanopb compilation time options. You can change these here by * * uncommenting the lines, or on the compiler command line. * *****************************************************************/ /* Enable support for dynamically allocated fields */ /* #define PB_ENABLE_MALLOC 1 */ /* Define this if your CPU / compiler combination does not support * unaligned memory access to packed structures. */ /* #define PB_NO_PACKED_STRUCTS 1 */ /* Increase the number of required fields that are tracked. * A compiler warning will tell if you need this. */ /* #define PB_MAX_REQUIRED_FIELDS 256 */ /* Add support for tag numbers > 65536 and fields larger than 65536 bytes. */ /* #define PB_FIELD_32BIT 1 */ /* Disable support for error messages in order to save some code space. */ /* #define PB_NO_ERRMSG 1 */ /* Disable support for custom streams (support only memory buffers). */ /* #define PB_BUFFER_ONLY 1 */ /* Disable support for 64-bit datatypes, for compilers without int64_t or to save some code space. */ /* #define PB_WITHOUT_64BIT 1 */ /* Don't encode scalar arrays as packed. This is only to be used when * the decoder on the receiving side cannot process packed scalar arrays. * Such example is older protobuf.js. */ /* #define PB_ENCODE_ARRAYS_UNPACKED 1 */ /* Enable conversion of doubles to floats for platforms that do not * support 64-bit doubles. Most commonly AVR. */ /* #define PB_CONVERT_DOUBLE_FLOAT 1 */ /* Check whether incoming strings are valid UTF-8 sequences. Slows down * the string processing slightly and slightly increases code size. */ /* #define PB_VALIDATE_UTF8 1 */ /****************************************************************** * You usually don't need to change anything below this line. * * Feel free to look around and use the defined macros, though. * ******************************************************************/ /* Version of the nanopb library. Just in case you want to check it in * your own program. */ #define NANOPB_VERSION nanopb-0.4.1 /* Include all the system headers needed by nanopb. You will need the * definitions of the following: * - strlen, memcpy, memset functions * - [u]int_least8_t, uint_fast8_t, [u]int_least16_t, [u]int32_t, [u]int64_t * - size_t * - bool * * If you don't have the standard header files, you can instead provide * a custom header that defines or includes all this. In that case, * define PB_SYSTEM_HEADER to the path of this file. */ #ifdef PB_SYSTEM_HEADER #include PB_SYSTEM_HEADER #else #include #include #include #include #include #ifdef PB_ENABLE_MALLOC #include #endif #endif #ifdef __cplusplus extern "C" { #endif /* Macro for defining packed structures (compiler dependent). * This just reduces memory requirements, but is not required. */ #if defined(PB_NO_PACKED_STRUCTS) /* Disable struct packing */ # define PB_PACKED_STRUCT_START # define PB_PACKED_STRUCT_END # define pb_packed #elif defined(__GNUC__) || defined(__clang__) /* For GCC and clang */ # define PB_PACKED_STRUCT_START # define PB_PACKED_STRUCT_END # define pb_packed __attribute__((packed)) #elif defined(__ICCARM__) || defined(__CC_ARM) /* For IAR ARM and Keil MDK-ARM compilers */ # define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)") # define PB_PACKED_STRUCT_END _Pragma("pack(pop)") # define pb_packed #elif defined(_MSC_VER) && (_MSC_VER >= 1500) /* For Microsoft Visual C++ */ # define PB_PACKED_STRUCT_START __pragma(pack(push, 1)) # define PB_PACKED_STRUCT_END __pragma(pack(pop)) # define pb_packed #else /* Unknown compiler */ # define PB_PACKED_STRUCT_START # define PB_PACKED_STRUCT_END # define pb_packed #endif /* Handly macro for suppressing unreferenced-parameter compiler warnings. */ #ifndef PB_UNUSED #define PB_UNUSED(x) (void)(x) #endif /* Harvard-architecture processors may need special attributes for storing * field information in program memory. */ #ifndef PB_PROGMEM #ifdef __AVR__ #include #define PB_PROGMEM PROGMEM #define PB_PROGMEM_READU32(x) pgm_read_dword(&x) #else #define PB_PROGMEM #define PB_PROGMEM_READU32(x) (x) #endif #endif /* Compile-time assertion, used for checking compatible compilation options. * If this does not work properly on your compiler, use * #define PB_NO_STATIC_ASSERT to disable it. * * But before doing that, check carefully the error message / place where it * comes from to see if the error has a real cause. Unfortunately the error * message is not always very clear to read, but you can see the reason better * in the place where the PB_STATIC_ASSERT macro was called. */ #ifndef PB_NO_STATIC_ASSERT # ifndef PB_STATIC_ASSERT # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L /* C11 standard _Static_assert mechanism */ # define PB_STATIC_ASSERT(COND,MSG) _Static_assert(COND,#MSG); # else /* Classic negative-size-array static assert mechanism */ # define PB_STATIC_ASSERT(COND,MSG) typedef char PB_STATIC_ASSERT_MSG(MSG, __LINE__, __COUNTER__)[(COND)?1:-1]; # define PB_STATIC_ASSERT_MSG(MSG, LINE, COUNTER) PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) # define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##_##LINE##_##COUNTER # endif # endif #else /* Static asserts disabled by PB_NO_STATIC_ASSERT */ # define PB_STATIC_ASSERT(COND,MSG) #endif /* Number of required fields to keep track of. */ #ifndef PB_MAX_REQUIRED_FIELDS #define PB_MAX_REQUIRED_FIELDS 64 #endif #if PB_MAX_REQUIRED_FIELDS < 64 #error You should not lower PB_MAX_REQUIRED_FIELDS from the default value (64). #endif #ifdef PB_WITHOUT_64BIT #ifdef PB_CONVERT_DOUBLE_FLOAT /* Cannot use doubles without 64-bit types */ #undef PB_CONVERT_DOUBLE_FLOAT #endif #endif /* List of possible field types. These are used in the autogenerated code. * Least-significant 4 bits tell the scalar type * Most-significant 4 bits specify repeated/required/packed etc. */ typedef uint_least8_t pb_type_t; /**** Field data types ****/ /* Numeric types */ #define PB_LTYPE_BOOL 0x00U /* bool */ #define PB_LTYPE_VARINT 0x01U /* int32, int64, enum, bool */ #define PB_LTYPE_UVARINT 0x02U /* uint32, uint64 */ #define PB_LTYPE_SVARINT 0x03U /* sint32, sint64 */ #define PB_LTYPE_FIXED32 0x04U /* fixed32, sfixed32, float */ #define PB_LTYPE_FIXED64 0x05U /* fixed64, sfixed64, double */ /* Marker for last packable field type. */ #define PB_LTYPE_LAST_PACKABLE 0x05U /* Byte array with pre-allocated buffer. * data_size is the length of the allocated PB_BYTES_ARRAY structure. */ #define PB_LTYPE_BYTES 0x06U /* String with pre-allocated buffer. * data_size is the maximum length. */ #define PB_LTYPE_STRING 0x07U /* Submessage * submsg_fields is pointer to field descriptions */ #define PB_LTYPE_SUBMESSAGE 0x08U /* Submessage with pre-decoding callback * The pre-decoding callback is stored as pb_callback_t right before pSize. * submsg_fields is pointer to field descriptions */ #define PB_LTYPE_SUBMSG_W_CB 0x09U /* Extension pseudo-field * The field contains a pointer to pb_extension_t */ #define PB_LTYPE_EXTENSION 0x0AU /* Byte array with inline, pre-allocated byffer. * data_size is the length of the inline, allocated buffer. * This differs from PB_LTYPE_BYTES by defining the element as * pb_byte_t[data_size] rather than pb_bytes_array_t. */ #define PB_LTYPE_FIXED_LENGTH_BYTES 0x0BU /* Number of declared LTYPES */ #define PB_LTYPES_COUNT 0x0CU #define PB_LTYPE_MASK 0x0FU /**** Field repetition rules ****/ #define PB_HTYPE_REQUIRED 0x00U #define PB_HTYPE_OPTIONAL 0x10U #define PB_HTYPE_SINGULAR 0x10U #define PB_HTYPE_REPEATED 0x20U #define PB_HTYPE_FIXARRAY 0x20U #define PB_HTYPE_ONEOF 0x30U #define PB_HTYPE_MASK 0x30U /**** Field allocation types ****/ #define PB_ATYPE_STATIC 0x00U #define PB_ATYPE_POINTER 0x80U #define PB_ATYPE_CALLBACK 0x40U #define PB_ATYPE_MASK 0xC0U #define PB_ATYPE(x) ((x) & PB_ATYPE_MASK) #define PB_HTYPE(x) ((x) & PB_HTYPE_MASK) #define PB_LTYPE(x) ((x) & PB_LTYPE_MASK) #define PB_LTYPE_IS_SUBMSG(x) (PB_LTYPE(x) == PB_LTYPE_SUBMESSAGE || \ PB_LTYPE(x) == PB_LTYPE_SUBMSG_W_CB) /* Data type used for storing sizes of struct fields * and array counts. */ #if defined(PB_FIELD_32BIT) typedef uint32_t pb_size_t; typedef int32_t pb_ssize_t; #else typedef uint_least16_t pb_size_t; typedef int_least16_t pb_ssize_t; #endif #define PB_SIZE_MAX ((pb_size_t)-1) /* Data type for storing encoded data and other byte streams. * This typedef exists to support platforms where uint8_t does not exist. * You can regard it as equivalent on uint8_t on other platforms. */ typedef uint_least8_t pb_byte_t; /* Forward declaration of struct types */ typedef struct pb_istream_s pb_istream_t; typedef struct pb_ostream_s pb_ostream_t; typedef struct pb_field_iter_s pb_field_iter_t; /* This structure is used in auto-generated constants * to specify struct fields. */ PB_PACKED_STRUCT_START typedef struct pb_msgdesc_s pb_msgdesc_t; struct pb_msgdesc_s { pb_size_t field_count; const uint32_t *field_info; const pb_msgdesc_t * const * submsg_info; const pb_byte_t *default_value; bool (*field_callback)(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_iter_t *field); } pb_packed; PB_PACKED_STRUCT_END /* Iterator for message descriptor */ struct pb_field_iter_s { const pb_msgdesc_t *descriptor; /* Pointer to message descriptor constant */ void *message; /* Pointer to start of the structure */ pb_size_t index; /* Index of the field */ pb_size_t field_info_index; /* Index to descriptor->field_info array */ pb_size_t required_field_index; /* Index that counts only the required fields */ pb_size_t submessage_index; /* Index that counts only submessages */ pb_size_t tag; /* Tag of current field */ pb_size_t data_size; /* sizeof() of a single item */ pb_size_t array_size; /* Number of array entries */ pb_type_t type; /* Type of current field */ void *pField; /* Pointer to current field in struct */ void *pData; /* Pointer to current data contents. Different than pField for arrays and pointers. */ void *pSize; /* Pointer to count/has field */ const pb_msgdesc_t *submsg_desc; /* For submessage fields, pointer to field descriptor for the submessage. */ }; /* For compatibility with legacy code */ typedef pb_field_iter_t pb_field_t; /* Make sure that the standard integer types are of the expected sizes. * Otherwise fixed32/fixed64 fields can break. * * If you get errors here, it probably means that your stdint.h is not * correct for your platform. */ #ifndef PB_WITHOUT_64BIT PB_STATIC_ASSERT(sizeof(int64_t) == 2 * sizeof(int32_t), INT64_T_WRONG_SIZE) PB_STATIC_ASSERT(sizeof(uint64_t) == 2 * sizeof(uint32_t), UINT64_T_WRONG_SIZE) #endif /* This structure is used for 'bytes' arrays. * It has the number of bytes in the beginning, and after that an array. * Note that actual structs used will have a different length of bytes array. */ #define PB_BYTES_ARRAY_T(n) struct { pb_size_t size; pb_byte_t bytes[n]; } #define PB_BYTES_ARRAY_T_ALLOCSIZE(n) ((size_t)n + offsetof(pb_bytes_array_t, bytes)) struct pb_bytes_array_s { pb_size_t size; pb_byte_t bytes[1]; }; typedef struct pb_bytes_array_s pb_bytes_array_t; /* This structure is used for giving the callback function. * It is stored in the message structure and filled in by the method that * calls pb_decode. * * The decoding callback will be given a limited-length stream * If the wire type was string, the length is the length of the string. * If the wire type was a varint/fixed32/fixed64, the length is the length * of the actual value. * The function may be called multiple times (especially for repeated types, * but also otherwise if the message happens to contain the field multiple * times.) * * The encoding callback will receive the actual output stream. * It should write all the data in one call, including the field tag and * wire type. It can write multiple fields. * * The callback can be null if you want to skip a field. */ typedef struct pb_callback_s pb_callback_t; struct pb_callback_s { /* Callback functions receive a pointer to the arg field. * You can access the value of the field as *arg, and modify it if needed. */ union { bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg); bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg); } funcs; /* Free arg for use by callback */ void *arg; }; extern bool pb_default_field_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_t *field); /* Wire types. Library user needs these only in encoder callbacks. */ typedef enum { PB_WT_VARINT = 0, PB_WT_64BIT = 1, PB_WT_STRING = 2, PB_WT_32BIT = 5 } pb_wire_type_t; /* Structure for defining the handling of unknown/extension fields. * Usually the pb_extension_type_t structure is automatically generated, * while the pb_extension_t structure is created by the user. However, * if you want to catch all unknown fields, you can also create a custom * pb_extension_type_t with your own callback. */ typedef struct pb_extension_type_s pb_extension_type_t; typedef struct pb_extension_s pb_extension_t; struct pb_extension_type_s { /* Called for each unknown field in the message. * If you handle the field, read off all of its data and return true. * If you do not handle the field, do not read anything and return true. * If you run into an error, return false. * Set to NULL for default handler. */ bool (*decode)(pb_istream_t *stream, pb_extension_t *extension, uint32_t tag, pb_wire_type_t wire_type); /* Called once after all regular fields have been encoded. * If you have something to write, do so and return true. * If you do not have anything to write, just return true. * If you run into an error, return false. * Set to NULL for default handler. */ bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension); /* Free field for use by the callback. */ const void *arg; }; struct pb_extension_s { /* Type describing the extension field. Usually you'll initialize * this to a pointer to the automatically generated structure. */ const pb_extension_type_t *type; /* Destination for the decoded data. This must match the datatype * of the extension field. */ void *dest; /* Pointer to the next extension handler, or NULL. * If this extension does not match a field, the next handler is * automatically called. */ pb_extension_t *next; /* The decoder sets this to true if the extension was found. * Ignored for encoding. */ bool found; }; #define pb_extension_init_zero {NULL,NULL,NULL,false} /* Memory allocation functions to use. You can define pb_realloc and * pb_free to custom functions if you want. */ #ifdef PB_ENABLE_MALLOC # ifndef pb_realloc # define pb_realloc(ptr, size) realloc(ptr, size) # endif # ifndef pb_free # define pb_free(ptr) free(ptr) # endif #endif /* This is used to inform about need to regenerate .pb.h/.pb.c files. */ #define PB_PROTO_HEADER_VERSION 40 /* These macros are used to declare pb_field_t's in the constant array. */ /* Size of a structure member, in bytes. */ #define pb_membersize(st, m) (sizeof ((st*)0)->m) /* Number of entries in an array. */ #define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0])) /* Delta from start of one member to the start of another member. */ #define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2)) /* Force expansion of macro value */ #define PB_EXPAND(x) x /* Binding of a message field set into a specific structure */ #define PB_BIND(msgname, structname, width) \ const uint32_t structname ## _field_info[] PB_PROGMEM = \ { \ msgname ## _FIELDLIST(PB_GEN_FIELD_INFO_ ## width, structname) \ 0 \ }; \ const pb_msgdesc_t* const structname ## _submsg_info[] = \ { \ msgname ## _FIELDLIST(PB_GEN_SUBMSG_INFO, structname) \ NULL \ }; \ const pb_msgdesc_t structname ## _msg = \ { \ 0 msgname ## _FIELDLIST(PB_GEN_FIELD_COUNT, structname), \ structname ## _field_info, \ structname ## _submsg_info, \ msgname ## _DEFAULT, \ msgname ## _CALLBACK, \ }; \ msgname ## _FIELDLIST(PB_GEN_FIELD_INFO_ASSERT_ ## width, structname) #define PB_GEN_FIELD_COUNT(structname, atype, htype, ltype, fieldname, tag) +1 #define PB_GEN_FIELD_INFO_1(structname, atype, htype, ltype, fieldname, tag) \ PB_GEN_FIELD_INFO(1, structname, atype, htype, ltype, fieldname, tag) #define PB_GEN_FIELD_INFO_2(structname, atype, htype, ltype, fieldname, tag) \ PB_GEN_FIELD_INFO(2, structname, atype, htype, ltype, fieldname, tag) #define PB_GEN_FIELD_INFO_4(structname, atype, htype, ltype, fieldname, tag) \ PB_GEN_FIELD_INFO(4, structname, atype, htype, ltype, fieldname, tag) #define PB_GEN_FIELD_INFO_8(structname, atype, htype, ltype, fieldname, tag) \ PB_GEN_FIELD_INFO(8, structname, atype, htype, ltype, fieldname, tag) #define PB_GEN_FIELD_INFO_AUTO(structname, atype, htype, ltype, fieldname, tag) \ PB_GEN_FIELD_INFO_AUTO2(PB_FIELDINFO_WIDTH_AUTO(atype, htype, ltype), structname, atype, htype, ltype, fieldname, tag) #define PB_GEN_FIELD_INFO_AUTO2(width, structname, atype, htype, ltype, fieldname, tag) \ PB_GEN_FIELD_INFO(width, structname, atype, htype, ltype, fieldname, tag) #define PB_GEN_FIELD_INFO(width, structname, atype, htype, ltype, fieldname, tag) \ PB_FIELDINFO_ ## width(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \ PB_DATA_OFFSET_ ## atype(htype, structname, fieldname), \ PB_DATA_SIZE_ ## atype(htype, structname, fieldname), \ PB_SIZE_OFFSET_ ## atype(htype, structname, fieldname), \ PB_ARRAY_SIZE_ ## atype(htype, structname, fieldname)) #define PB_GEN_FIELD_INFO_ASSERT_1(structname, atype, htype, ltype, fieldname, tag) \ PB_GEN_FIELD_INFO_ASSERT(1, structname, atype, htype, ltype, fieldname, tag) #define PB_GEN_FIELD_INFO_ASSERT_2(structname, atype, htype, ltype, fieldname, tag) \ PB_GEN_FIELD_INFO_ASSERT(2, structname, atype, htype, ltype, fieldname, tag) #define PB_GEN_FIELD_INFO_ASSERT_4(structname, atype, htype, ltype, fieldname, tag) \ PB_GEN_FIELD_INFO_ASSERT(4, structname, atype, htype, ltype, fieldname, tag) #define PB_GEN_FIELD_INFO_ASSERT_8(structname, atype, htype, ltype, fieldname, tag) \ PB_GEN_FIELD_INFO_ASSERT(8, structname, atype, htype, ltype, fieldname, tag) #define PB_GEN_FIELD_INFO_ASSERT_AUTO(structname, atype, htype, ltype, fieldname, tag) \ PB_GEN_FIELD_INFO_ASSERT_AUTO2(PB_FIELDINFO_WIDTH_AUTO(atype, htype, ltype), structname, atype, htype, ltype, fieldname, tag) #define PB_GEN_FIELD_INFO_ASSERT_AUTO2(width, structname, atype, htype, ltype, fieldname, tag) \ PB_GEN_FIELD_INFO_ASSERT(width, structname, atype, htype, ltype, fieldname, tag) #define PB_GEN_FIELD_INFO_ASSERT(width, structname, atype, htype, ltype, fieldname, tag) \ PB_FIELDINFO_ASSERT_ ## width(tag, PB_ATYPE_ ## atype | PB_HTYPE_ ## htype | PB_LTYPE_MAP_ ## ltype, \ PB_DATA_OFFSET_ ## atype(htype, structname, fieldname), \ PB_DATA_SIZE_ ## atype(htype, structname, fieldname), \ PB_SIZE_OFFSET_ ## atype(htype, structname, fieldname), \ PB_ARRAY_SIZE_ ## atype(htype, structname, fieldname)) #define PB_DATA_OFFSET_STATIC(htype, structname, fieldname) PB_DATA_OFFSET_ ## htype(structname, fieldname) #define PB_DATA_OFFSET_POINTER(htype, structname, fieldname) PB_DATA_OFFSET_ ## htype(structname, fieldname) #define PB_DATA_OFFSET_CALLBACK(htype, structname, fieldname) PB_DATA_OFFSET_ ## htype(structname, fieldname) #define PB_DATA_OFFSET_REQUIRED(structname, fieldname) offsetof(structname, fieldname) #define PB_DATA_OFFSET_SINGULAR(structname, fieldname) offsetof(structname, fieldname) #define PB_DATA_OFFSET_ONEOF(structname, fieldname) offsetof(structname, PB_ONEOF_NAME(FULL, fieldname)) #define PB_DATA_OFFSET_OPTIONAL(structname, fieldname) offsetof(structname, fieldname) #define PB_DATA_OFFSET_REPEATED(structname, fieldname) offsetof(structname, fieldname) #define PB_DATA_OFFSET_FIXARRAY(structname, fieldname) offsetof(structname, fieldname) #define PB_SIZE_OFFSET_STATIC(htype, structname, fieldname) PB_SIZE_OFFSET_ ## htype(structname, fieldname) #define PB_SIZE_OFFSET_POINTER(htype, structname, fieldname) PB_SIZE_OFFSET_PTR_ ## htype(structname, fieldname) #define PB_SIZE_OFFSET_CALLBACK(htype, structname, fieldname) PB_SIZE_OFFSET_CB_ ## htype(structname, fieldname) #define PB_SIZE_OFFSET_REQUIRED(structname, fieldname) 0 #define PB_SIZE_OFFSET_SINGULAR(structname, fieldname) 0 #define PB_SIZE_OFFSET_ONEOF(structname, fieldname) PB_SIZE_OFFSET_ONEOF2(structname, PB_ONEOF_NAME(FULL, fieldname), PB_ONEOF_NAME(UNION, fieldname)) #define PB_SIZE_OFFSET_ONEOF2(structname, fullname, unionname) PB_SIZE_OFFSET_ONEOF3(structname, fullname, unionname) #define PB_SIZE_OFFSET_ONEOF3(structname, fullname, unionname) pb_delta(structname, fullname, which_ ## unionname) #define PB_SIZE_OFFSET_OPTIONAL(structname, fieldname) pb_delta(structname, fieldname, has_ ## fieldname) #define PB_SIZE_OFFSET_REPEATED(structname, fieldname) pb_delta(structname, fieldname, fieldname ## _count) #define PB_SIZE_OFFSET_FIXARRAY(structname, fieldname) 0 #define PB_SIZE_OFFSET_PTR_REQUIRED(structname, fieldname) 0 #define PB_SIZE_OFFSET_PTR_SINGULAR(structname, fieldname) 0 #define PB_SIZE_OFFSET_PTR_ONEOF(structname, fieldname) PB_SIZE_OFFSET_ONEOF(structname, fieldname) #define PB_SIZE_OFFSET_PTR_OPTIONAL(structname, fieldname) 0 #define PB_SIZE_OFFSET_PTR_REPEATED(structname, fieldname) PB_SIZE_OFFSET_REPEATED(structname, fieldname) #define PB_SIZE_OFFSET_PTR_FIXARRAY(structname, fieldname) 0 #define PB_SIZE_OFFSET_CB_REQUIRED(structname, fieldname) 0 #define PB_SIZE_OFFSET_CB_SINGULAR(structname, fieldname) 0 #define PB_SIZE_OFFSET_CB_ONEOF(structname, fieldname) PB_SIZE_OFFSET_ONEOF(structname, fieldname) #define PB_SIZE_OFFSET_CB_OPTIONAL(structname, fieldname) 0 #define PB_SIZE_OFFSET_CB_REPEATED(structname, fieldname) 0 #define PB_SIZE_OFFSET_CB_FIXARRAY(structname, fieldname) 0 #define PB_ARRAY_SIZE_STATIC(htype, structname, fieldname) PB_ARRAY_SIZE_ ## htype(structname, fieldname) #define PB_ARRAY_SIZE_POINTER(htype, structname, fieldname) PB_ARRAY_SIZE_PTR_ ## htype(structname, fieldname) #define PB_ARRAY_SIZE_CALLBACK(htype, structname, fieldname) 1 #define PB_ARRAY_SIZE_REQUIRED(structname, fieldname) 1 #define PB_ARRAY_SIZE_SINGULAR(structname, fieldname) 1 #define PB_ARRAY_SIZE_OPTIONAL(structname, fieldname) 1 #define PB_ARRAY_SIZE_ONEOF(structname, fieldname) 1 #define PB_ARRAY_SIZE_REPEATED(structname, fieldname) pb_arraysize(structname, fieldname) #define PB_ARRAY_SIZE_FIXARRAY(structname, fieldname) pb_arraysize(structname, fieldname) #define PB_ARRAY_SIZE_PTR_REQUIRED(structname, fieldname) 1 #define PB_ARRAY_SIZE_PTR_SINGULAR(structname, fieldname) 1 #define PB_ARRAY_SIZE_PTR_OPTIONAL(structname, fieldname) 1 #define PB_ARRAY_SIZE_PTR_ONEOF(structname, fieldname) 1 #define PB_ARRAY_SIZE_PTR_REPEATED(structname, fieldname) 1 #define PB_ARRAY_SIZE_PTR_FIXARRAY(structname, fieldname) pb_arraysize(structname, fieldname[0]) #define PB_DATA_SIZE_STATIC(htype, structname, fieldname) PB_DATA_SIZE_ ## htype(structname, fieldname) #define PB_DATA_SIZE_POINTER(htype, structname, fieldname) PB_DATA_SIZE_PTR_ ## htype(structname, fieldname) #define PB_DATA_SIZE_CALLBACK(htype, structname, fieldname) PB_DATA_SIZE_CB_ ## htype(structname, fieldname) #define PB_DATA_SIZE_REQUIRED(structname, fieldname) pb_membersize(structname, fieldname) #define PB_DATA_SIZE_SINGULAR(structname, fieldname) pb_membersize(structname, fieldname) #define PB_DATA_SIZE_OPTIONAL(structname, fieldname) pb_membersize(structname, fieldname) #define PB_DATA_SIZE_ONEOF(structname, fieldname) pb_membersize(structname, PB_ONEOF_NAME(FULL, fieldname)) #define PB_DATA_SIZE_REPEATED(structname, fieldname) pb_membersize(structname, fieldname[0]) #define PB_DATA_SIZE_FIXARRAY(structname, fieldname) pb_membersize(structname, fieldname[0]) #define PB_DATA_SIZE_PTR_REQUIRED(structname, fieldname) pb_membersize(structname, fieldname[0]) #define PB_DATA_SIZE_PTR_SINGULAR(structname, fieldname) pb_membersize(structname, fieldname[0]) #define PB_DATA_SIZE_PTR_OPTIONAL(structname, fieldname) pb_membersize(structname, fieldname[0]) #define PB_DATA_SIZE_PTR_ONEOF(structname, fieldname) pb_membersize(structname, PB_ONEOF_NAME(FULL, fieldname)[0]) #define PB_DATA_SIZE_PTR_REPEATED(structname, fieldname) pb_membersize(structname, fieldname[0]) #define PB_DATA_SIZE_PTR_FIXARRAY(structname, fieldname) pb_membersize(structname, fieldname[0][0]) #define PB_DATA_SIZE_CB_REQUIRED(structname, fieldname) pb_membersize(structname, fieldname) #define PB_DATA_SIZE_CB_SINGULAR(structname, fieldname) pb_membersize(structname, fieldname) #define PB_DATA_SIZE_CB_OPTIONAL(structname, fieldname) pb_membersize(structname, fieldname) #define PB_DATA_SIZE_CB_ONEOF(structname, fieldname) pb_membersize(structname, PB_ONEOF_NAME(FULL, fieldname)) #define PB_DATA_SIZE_CB_REPEATED(structname, fieldname) pb_membersize(structname, fieldname) #define PB_DATA_SIZE_CB_FIXARRAY(structname, fieldname) pb_membersize(structname, fieldname) #define PB_ONEOF_NAME(type, tuple) PB_EXPAND(PB_ONEOF_NAME_ ## type tuple) #define PB_ONEOF_NAME_UNION(unionname,membername,fullname) unionname #define PB_ONEOF_NAME_MEMBER(unionname,membername,fullname) membername #define PB_ONEOF_NAME_FULL(unionname,membername,fullname) fullname #define PB_GEN_SUBMSG_INFO(structname, atype, htype, ltype, fieldname, tag) \ PB_SUBMSG_INFO_ ## htype(ltype, structname, fieldname) #define PB_SUBMSG_INFO_REQUIRED(ltype, structname, fieldname) PB_SUBMSG_INFO_ ## ltype(structname ## _ ## fieldname ## _MSGTYPE) #define PB_SUBMSG_INFO_SINGULAR(ltype, structname, fieldname) PB_SUBMSG_INFO_ ## ltype(structname ## _ ## fieldname ## _MSGTYPE) #define PB_SUBMSG_INFO_OPTIONAL(ltype, structname, fieldname) PB_SUBMSG_INFO_ ## ltype(structname ## _ ## fieldname ## _MSGTYPE) #define PB_SUBMSG_INFO_ONEOF(ltype, structname, fieldname) PB_SUBMSG_INFO_ONEOF2(ltype, structname, PB_ONEOF_NAME(UNION, fieldname), PB_ONEOF_NAME(MEMBER, fieldname)) #define PB_SUBMSG_INFO_ONEOF2(ltype, structname, unionname, membername) PB_SUBMSG_INFO_ONEOF3(ltype, structname, unionname, membername) #define PB_SUBMSG_INFO_ONEOF3(ltype, structname, unionname, membername) PB_SUBMSG_INFO_ ## ltype(structname ## _ ## unionname ## _ ## membername ## _MSGTYPE) #define PB_SUBMSG_INFO_REPEATED(ltype, structname, fieldname) PB_SUBMSG_INFO_ ## ltype(structname ## _ ## fieldname ## _MSGTYPE) #define PB_SUBMSG_INFO_FIXARRAY(ltype, structname, fieldname) PB_SUBMSG_INFO_ ## ltype(structname ## _ ## fieldname ## _MSGTYPE) #define PB_SUBMSG_INFO_BOOL(t) #define PB_SUBMSG_INFO_BYTES(t) #define PB_SUBMSG_INFO_DOUBLE(t) #define PB_SUBMSG_INFO_ENUM(t) #define PB_SUBMSG_INFO_UENUM(t) #define PB_SUBMSG_INFO_FIXED32(t) #define PB_SUBMSG_INFO_FIXED64(t) #define PB_SUBMSG_INFO_FLOAT(t) #define PB_SUBMSG_INFO_INT32(t) #define PB_SUBMSG_INFO_INT64(t) #define PB_SUBMSG_INFO_MESSAGE(t) PB_SUBMSG_DESCRIPTOR(t) #define PB_SUBMSG_INFO_MSG_W_CB(t) PB_SUBMSG_DESCRIPTOR(t) #define PB_SUBMSG_INFO_SFIXED32(t) #define PB_SUBMSG_INFO_SFIXED64(t) #define PB_SUBMSG_INFO_SINT32(t) #define PB_SUBMSG_INFO_SINT64(t) #define PB_SUBMSG_INFO_STRING(t) #define PB_SUBMSG_INFO_UINT32(t) #define PB_SUBMSG_INFO_UINT64(t) #define PB_SUBMSG_INFO_EXTENSION(t) #define PB_SUBMSG_INFO_FIXED_LENGTH_BYTES(t) #define PB_SUBMSG_DESCRIPTOR(t) &(t ## _msg), /* The field descriptors use a variable width format, with width of either * 1, 2, 4 or 8 of 32-bit words. The two lowest bytes of the first byte always * encode the descriptor size, 6 lowest bits of field tag number, and 8 bits * of the field type. * * Descriptor size is encoded as 0 = 1 word, 1 = 2 words, 2 = 4 words, 3 = 8 words. * * Formats, listed starting with the least significant bit of the first word. * 1 word: [2-bit len] [6-bit tag] [8-bit type] [8-bit data_offset] [4-bit size_offset] [4-bit data_size] * * 2 words: [2-bit len] [6-bit tag] [8-bit type] [12-bit array_size] [4-bit size_offset] * [16-bit data_offset] [12-bit data_size] [4-bit tag>>6] * * 4 words: [2-bit len] [6-bit tag] [8-bit type] [16-bit array_size] * [8-bit size_offset] [24-bit tag>>6] * [32-bit data_offset] * [32-bit data_size] * * 8 words: [2-bit len] [6-bit tag] [8-bit type] [16-bit reserved] * [8-bit size_offset] [24-bit tag>>6] * [32-bit data_offset] * [32-bit data_size] * [32-bit array_size] * [32-bit reserved] * [32-bit reserved] * [32-bit reserved] */ #define PB_FIELDINFO_1(tag, type, data_offset, data_size, size_offset, array_size) \ (0 | (((tag) << 2) & 0xFF) | ((type) << 8) | (((uint32_t)(data_offset) & 0xFF) << 16) | \ (((uint32_t)(size_offset) & 0x0F) << 24) | (((uint32_t)(data_size) & 0x0F) << 28)), #define PB_FIELDINFO_2(tag, type, data_offset, data_size, size_offset, array_size) \ (1 | (((tag) << 2) & 0xFF) | ((type) << 8) | (((uint32_t)(array_size) & 0xFFF) << 16) | (((uint32_t)(size_offset) & 0x0F) << 28)), \ (((uint32_t)(data_offset) & 0xFFFF) | (((uint32_t)(data_size) & 0xFFF) << 16) | (((uint32_t)(tag) & 0x3c0) << 22)), #define PB_FIELDINFO_4(tag, type, data_offset, data_size, size_offset, array_size) \ (2 | (((tag) << 2) & 0xFF) | ((type) << 8) | (((uint32_t)(array_size) & 0xFFFF) << 16)), \ ((uint32_t)(int_least8_t)(size_offset) | (((uint32_t)(tag) << 2) & 0xFFFFFF00)), \ (data_offset), (data_size), #define PB_FIELDINFO_8(tag, type, data_offset, data_size, size_offset, array_size) \ (3 | (((tag) << 2) & 0xFF) | ((type) << 8)), \ ((uint32_t)(int_least8_t)(size_offset) | (((uint32_t)(tag) << 2) & 0xFFFFFF00)), \ (data_offset), (data_size), (array_size), 0, 0, 0, /* These assertions verify that the field information fits in the allocated space. * The generator tries to automatically determine the correct width that can fit all * data associated with a message. These asserts will fail only if there has been a * problem in the automatic logic - this may be worth reporting as a bug. As a workaround, * you can increase the descriptor width by defining PB_FIELDINFO_WIDTH or by setting * descriptorsize option in .options file. */ #define PB_FITS(value,bits) ((uint32_t)(value) < ((uint32_t)1<2GB messages with nanopb anyway. */ #define PB_FIELDINFO_ASSERT_4(tag, type, data_offset, data_size, size_offset, array_size) \ PB_STATIC_ASSERT(PB_FITS(tag,30) && PB_FITS(data_offset,31) && PB_FITS(size_offset,8) && PB_FITS(data_size,31) && PB_FITS(array_size,16), FIELDINFO_DOES_NOT_FIT_width4_field ## tag) #define PB_FIELDINFO_ASSERT_8(tag, type, data_offset, data_size, size_offset, array_size) \ PB_STATIC_ASSERT(PB_FITS(tag,30) && PB_FITS(data_offset,31) && PB_FITS(size_offset,8) && PB_FITS(data_size,31) && PB_FITS(array_size,31), FIELDINFO_DOES_NOT_FIT_width8_field ## tag) #endif /* Automatic picking of FIELDINFO width: * Uses width 1 when possible, otherwise resorts to width 2. * This is used when PB_BIND() is called with "AUTO" as the argument. * The generator will give explicit size argument when it knows that a message * structure grows beyond 1-word format limits. */ #define PB_FIELDINFO_WIDTH_AUTO(atype, htype, ltype) PB_FIELDINFO_WIDTH_ ## atype(htype, ltype) #define PB_FIELDINFO_WIDTH_STATIC(htype, ltype) PB_FIELDINFO_WIDTH_ ## htype(ltype) #define PB_FIELDINFO_WIDTH_POINTER(htype, ltype) PB_FIELDINFO_WIDTH_ ## htype(ltype) #define PB_FIELDINFO_WIDTH_CALLBACK(htype, ltype) 2 #define PB_FIELDINFO_WIDTH_REQUIRED(ltype) PB_FIELDINFO_WIDTH_ ## ltype #define PB_FIELDINFO_WIDTH_SINGULAR(ltype) PB_FIELDINFO_WIDTH_ ## ltype #define PB_FIELDINFO_WIDTH_OPTIONAL(ltype) PB_FIELDINFO_WIDTH_ ## ltype #define PB_FIELDINFO_WIDTH_ONEOF(ltype) PB_FIELDINFO_WIDTH_ ## ltype #define PB_FIELDINFO_WIDTH_REPEATED(ltype) 2 #define PB_FIELDINFO_WIDTH_FIXARRAY(ltype) 2 #define PB_FIELDINFO_WIDTH_BOOL 1 #define PB_FIELDINFO_WIDTH_BYTES 2 #define PB_FIELDINFO_WIDTH_DOUBLE 1 #define PB_FIELDINFO_WIDTH_ENUM 1 #define PB_FIELDINFO_WIDTH_UENUM 1 #define PB_FIELDINFO_WIDTH_FIXED32 1 #define PB_FIELDINFO_WIDTH_FIXED64 1 #define PB_FIELDINFO_WIDTH_FLOAT 1 #define PB_FIELDINFO_WIDTH_INT32 1 #define PB_FIELDINFO_WIDTH_INT64 1 #define PB_FIELDINFO_WIDTH_MESSAGE 2 #define PB_FIELDINFO_WIDTH_MSG_W_CB 2 #define PB_FIELDINFO_WIDTH_SFIXED32 1 #define PB_FIELDINFO_WIDTH_SFIXED64 1 #define PB_FIELDINFO_WIDTH_SINT32 1 #define PB_FIELDINFO_WIDTH_SINT64 1 #define PB_FIELDINFO_WIDTH_STRING 2 #define PB_FIELDINFO_WIDTH_UINT32 1 #define PB_FIELDINFO_WIDTH_UINT64 1 #define PB_FIELDINFO_WIDTH_EXTENSION 1 #define PB_FIELDINFO_WIDTH_FIXED_LENGTH_BYTES 2 /* The mapping from protobuf types to LTYPEs is done using these macros. */ #define PB_LTYPE_MAP_BOOL PB_LTYPE_BOOL #define PB_LTYPE_MAP_BYTES PB_LTYPE_BYTES #define PB_LTYPE_MAP_DOUBLE PB_LTYPE_FIXED64 #define PB_LTYPE_MAP_ENUM PB_LTYPE_VARINT #define PB_LTYPE_MAP_UENUM PB_LTYPE_UVARINT #define PB_LTYPE_MAP_FIXED32 PB_LTYPE_FIXED32 #define PB_LTYPE_MAP_FIXED64 PB_LTYPE_FIXED64 #define PB_LTYPE_MAP_FLOAT PB_LTYPE_FIXED32 #define PB_LTYPE_MAP_INT32 PB_LTYPE_VARINT #define PB_LTYPE_MAP_INT64 PB_LTYPE_VARINT #define PB_LTYPE_MAP_MESSAGE PB_LTYPE_SUBMESSAGE #define PB_LTYPE_MAP_MSG_W_CB PB_LTYPE_SUBMSG_W_CB #define PB_LTYPE_MAP_SFIXED32 PB_LTYPE_FIXED32 #define PB_LTYPE_MAP_SFIXED64 PB_LTYPE_FIXED64 #define PB_LTYPE_MAP_SINT32 PB_LTYPE_SVARINT #define PB_LTYPE_MAP_SINT64 PB_LTYPE_SVARINT #define PB_LTYPE_MAP_STRING PB_LTYPE_STRING #define PB_LTYPE_MAP_UINT32 PB_LTYPE_UVARINT #define PB_LTYPE_MAP_UINT64 PB_LTYPE_UVARINT #define PB_LTYPE_MAP_EXTENSION PB_LTYPE_EXTENSION #define PB_LTYPE_MAP_FIXED_LENGTH_BYTES PB_LTYPE_FIXED_LENGTH_BYTES /* These macros are used for giving out error messages. * They are mostly a debugging aid; the main error information * is the true/false return value from functions. * Some code space can be saved by disabling the error * messages if not used. * * PB_SET_ERROR() sets the error message if none has been set yet. * msg must be a constant string literal. * PB_GET_ERROR() always returns a pointer to a string. * PB_RETURN_ERROR() sets the error and returns false from current * function. */ #ifdef PB_NO_ERRMSG #define PB_SET_ERROR(stream, msg) PB_UNUSED(stream) #define PB_GET_ERROR(stream) "(errmsg disabled)" #else #define PB_SET_ERROR(stream, msg) (stream->errmsg = (stream)->errmsg ? (stream)->errmsg : (msg)) #define PB_GET_ERROR(stream) ((stream)->errmsg ? (stream)->errmsg : "(none)") #endif #define PB_RETURN_ERROR(stream, msg) return PB_SET_ERROR(stream, msg), false #ifdef __cplusplus } /* extern "C" */ #endif #ifdef __cplusplus #if __cplusplus >= 201103L #define PB_CONSTEXPR constexpr #else // __cplusplus >= 201103L #define PB_CONSTEXPR #endif // __cplusplus >= 201103L #if __cplusplus >= 201703L #define PB_INLINE_CONSTEXPR inline constexpr #else // __cplusplus >= 201703L #define PB_INLINE_CONSTEXPR PB_CONSTEXPR #endif // __cplusplus >= 201703L namespace nanopb { // Each type will be partially specialized by the generator. template struct MessageDescriptor; } // namespace nanopb #endif /* __cplusplus */ #endif nanopb-0.4.1/pb_common.c000066400000000000000000000237201361552131000151070ustar00rootroot00000000000000/* pb_common.c: Common support functions for pb_encode.c and pb_decode.c. * * 2014 Petteri Aimonen */ #include "pb_common.h" static bool load_descriptor_values(pb_field_iter_t *iter) { uint32_t word0; uint32_t data_offset; uint_least8_t format; int_least8_t size_offset; if (iter->index >= iter->descriptor->field_count) return false; word0 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index]); format = word0 & 3; iter->tag = (pb_size_t)((word0 >> 2) & 0x3F); iter->type = (pb_type_t)((word0 >> 8) & 0xFF); if (format == 0) { /* 1-word format */ iter->array_size = 1; size_offset = (int_least8_t)((word0 >> 24) & 0x0F); data_offset = (word0 >> 16) & 0xFF; iter->data_size = (pb_size_t)((word0 >> 28) & 0x0F); } else if (format == 1) { /* 2-word format */ uint32_t word1 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 1]); iter->array_size = (pb_size_t)((word0 >> 16) & 0x0FFF); iter->tag = (pb_size_t)(iter->tag | ((word1 >> 28) << 6)); size_offset = (int_least8_t)((word0 >> 28) & 0x0F); data_offset = word1 & 0xFFFF; iter->data_size = (pb_size_t)((word1 >> 16) & 0x0FFF); } else if (format == 2) { /* 4-word format */ uint32_t word1 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 1]); uint32_t word2 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 2]); uint32_t word3 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 3]); iter->array_size = (pb_size_t)(word0 >> 16); iter->tag = (pb_size_t)(iter->tag | ((word1 >> 8) << 6)); size_offset = (int_least8_t)(word1 & 0xFF); data_offset = word2; iter->data_size = (pb_size_t)word3; } else { /* 8-word format */ uint32_t word1 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 1]); uint32_t word2 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 2]); uint32_t word3 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 3]); uint32_t word4 = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index + 4]); iter->array_size = (pb_size_t)word4; iter->tag = (pb_size_t)(iter->tag | ((word1 >> 8) << 6)); size_offset = (int_least8_t)(word1 & 0xFF); data_offset = word2; iter->data_size = (pb_size_t)word3; } iter->pField = (char*)iter->message + data_offset; if (size_offset) { iter->pSize = (char*)iter->pField - size_offset; } else if (PB_HTYPE(iter->type) == PB_HTYPE_REPEATED && (PB_ATYPE(iter->type) == PB_ATYPE_STATIC || PB_ATYPE(iter->type) == PB_ATYPE_POINTER)) { /* Fixed count array */ iter->pSize = &iter->array_size; } else { iter->pSize = NULL; } if (PB_ATYPE(iter->type) == PB_ATYPE_POINTER && iter->pField != NULL) { iter->pData = *(void**)iter->pField; } else { iter->pData = iter->pField; } if (PB_LTYPE_IS_SUBMSG(iter->type)) { iter->submsg_desc = iter->descriptor->submsg_info[iter->submessage_index]; } else { iter->submsg_desc = NULL; } return true; } static void advance_iterator(pb_field_iter_t *iter) { iter->index++; if (iter->index >= iter->descriptor->field_count) { /* Restart */ iter->index = 0; iter->field_info_index = 0; iter->submessage_index = 0; iter->required_field_index = 0; } else { /* Increment indexes based on previous field type. * All field info formats have the following fields: * - lowest 2 bits tell the amount of words in the descriptor (2^n words) * - bits 2..7 give the lowest bits of tag number. * - bits 8..15 give the field type. */ uint32_t prev_descriptor = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index]); pb_type_t prev_type = (prev_descriptor >> 8) & 0xFF; pb_size_t descriptor_len = (pb_size_t)(1 << (prev_descriptor & 3)); iter->field_info_index = (pb_size_t)(iter->field_info_index + descriptor_len); if (PB_HTYPE(prev_type) == PB_HTYPE_REQUIRED) { iter->required_field_index++; } if (PB_LTYPE_IS_SUBMSG(prev_type)) { iter->submessage_index++; } } } bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_msgdesc_t *desc, void *message) { memset(iter, 0, sizeof(*iter)); iter->descriptor = desc; iter->message = message; return load_descriptor_values(iter); } bool pb_field_iter_begin_extension(pb_field_iter_t *iter, pb_extension_t *extension) { const pb_msgdesc_t *msg = (const pb_msgdesc_t*)extension->type->arg; bool status; uint32_t word0 = PB_PROGMEM_READU32(msg->field_info[0]); if (PB_ATYPE(word0 >> 8) == PB_ATYPE_POINTER) { /* For pointer extensions, the pointer is stored directly * in the extension structure. This avoids having an extra * indirection. */ status = pb_field_iter_begin(iter, msg, &extension->dest); } else { status = pb_field_iter_begin(iter, msg, extension->dest); } iter->pSize = &extension->found; return status; } bool pb_field_iter_next(pb_field_iter_t *iter) { advance_iterator(iter); (void)load_descriptor_values(iter); return iter->index != 0; } bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag) { if (iter->tag == tag) { return true; /* Nothing to do, correct field already. */ } else { pb_size_t start = iter->index; uint32_t fieldinfo; do { /* Advance iterator but don't load values yet */ advance_iterator(iter); /* Do fast check for tag number match */ fieldinfo = PB_PROGMEM_READU32(iter->descriptor->field_info[iter->field_info_index]); if (((fieldinfo >> 2) & 0x3F) == (tag & 0x3F)) { /* Good candidate, check further */ (void)load_descriptor_values(iter); if (iter->tag == tag && PB_LTYPE(iter->type) != PB_LTYPE_EXTENSION) { /* Found it */ return true; } } } while (iter->index != start); /* Searched all the way back to start, and found nothing. */ (void)load_descriptor_values(iter); return false; } } static void *pb_const_cast(const void *p) { /* Note: this casts away const, in order to use the common field iterator * logic for both encoding and decoding. The cast is done using union * to avoid spurious compiler warnings. */ union { void *p1; const void *p2; } t; t.p2 = p; return t.p1; } bool pb_field_iter_begin_const(pb_field_iter_t *iter, const pb_msgdesc_t *desc, const void *message) { return pb_field_iter_begin(iter, desc, pb_const_cast(message)); } bool pb_field_iter_begin_extension_const(pb_field_iter_t *iter, const pb_extension_t *extension) { return pb_field_iter_begin_extension(iter, (pb_extension_t*)pb_const_cast(extension)); } bool pb_default_field_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_t *field) { if (field->data_size == sizeof(pb_callback_t)) { pb_callback_t *pCallback = (pb_callback_t*)field->pData; if (pCallback != NULL) { if (istream != NULL && pCallback->funcs.decode != NULL) { return pCallback->funcs.decode(istream, field, &pCallback->arg); } if (ostream != NULL && pCallback->funcs.encode != NULL) { return pCallback->funcs.encode(ostream, field, &pCallback->arg); } } } return true; /* Success, but didn't do anything */ } #ifdef PB_VALIDATE_UTF8 /* This function checks whether a string is valid UTF-8 text. * * Algorithm is adapted from https://www.cl.cam.ac.uk/~mgk25/ucs/utf8_check.c * Original copyright: Markus Kuhn 2005-03-30 * Licensed under "Short code license", which allows use under MIT license or * any compatible with it. */ bool pb_validate_utf8(const char *str) { const pb_byte_t *s = (const pb_byte_t*)str; while (*s) { if (*s < 0x80) { /* 0xxxxxxx */ s++; } else if ((s[0] & 0xe0) == 0xc0) { /* 110XXXXx 10xxxxxx */ if ((s[1] & 0xc0) != 0x80 || (s[0] & 0xfe) == 0xc0) /* overlong? */ return false; else s += 2; } else if ((s[0] & 0xf0) == 0xe0) { /* 1110XXXX 10Xxxxxx 10xxxxxx */ if ((s[1] & 0xc0) != 0x80 || (s[2] & 0xc0) != 0x80 || (s[0] == 0xe0 && (s[1] & 0xe0) == 0x80) || /* overlong? */ (s[0] == 0xed && (s[1] & 0xe0) == 0xa0) || /* surrogate? */ (s[0] == 0xef && s[1] == 0xbf && (s[2] & 0xfe) == 0xbe)) /* U+FFFE or U+FFFF? */ return false; else s += 3; } else if ((s[0] & 0xf8) == 0xf0) { /* 11110XXX 10XXxxxx 10xxxxxx 10xxxxxx */ if ((s[1] & 0xc0) != 0x80 || (s[2] & 0xc0) != 0x80 || (s[3] & 0xc0) != 0x80 || (s[0] == 0xf0 && (s[1] & 0xf0) == 0x80) || /* overlong? */ (s[0] == 0xf4 && s[1] > 0x8f) || s[0] > 0xf4) /* > U+10FFFF? */ return false; else s += 4; } else { return false; } } return true; } #endif nanopb-0.4.1/pb_common.h000066400000000000000000000027071361552131000151160ustar00rootroot00000000000000/* pb_common.h: Common support functions for pb_encode.c and pb_decode.c. * These functions are rarely needed by applications directly. */ #ifndef PB_COMMON_H_INCLUDED #define PB_COMMON_H_INCLUDED #include "pb.h" #ifdef __cplusplus extern "C" { #endif /* Initialize the field iterator structure to beginning. * Returns false if the message type is empty. */ bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_msgdesc_t *desc, void *message); /* Get a field iterator for extension field. */ bool pb_field_iter_begin_extension(pb_field_iter_t *iter, pb_extension_t *extension); /* Same as pb_field_iter_begin(), but for const message pointer. * Note that the pointers in pb_field_iter_t will be non-const but shouldn't * be written to when using these functions. */ bool pb_field_iter_begin_const(pb_field_iter_t *iter, const pb_msgdesc_t *desc, const void *message); bool pb_field_iter_begin_extension_const(pb_field_iter_t *iter, const pb_extension_t *extension); /* Advance the iterator to the next field. * Returns false when the iterator wraps back to the first field. */ bool pb_field_iter_next(pb_field_iter_t *iter); /* Advance the iterator until it points at a field with the given tag. * Returns false if no such field exists. */ bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag); #ifdef PB_VALIDATE_UTF8 /* Validate UTF-8 text string */ bool pb_validate_utf8(const char *s); #endif #ifdef __cplusplus } /* extern "C" */ #endif #endif nanopb-0.4.1/pb_decode.c000066400000000000000000001503301361552131000150400ustar00rootroot00000000000000/* pb_decode.c -- decode a protobuf using minimal resources * * 2011 Petteri Aimonen */ /* Use the GCC warn_unused_result attribute to check that all return values * are propagated correctly. On other compilers and gcc before 3.4.0 just * ignore the annotation. */ #if !defined(__GNUC__) || ( __GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) #define checkreturn #else #define checkreturn __attribute__((warn_unused_result)) #endif #include "pb.h" #include "pb_decode.h" #include "pb_common.h" /************************************** * Declarations internal to this file * **************************************/ static bool checkreturn buf_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); static bool checkreturn pb_decode_varint32_eof(pb_istream_t *stream, uint32_t *dest, bool *eof); static bool checkreturn read_raw_value(pb_istream_t *stream, pb_wire_type_t wire_type, pb_byte_t *buf, size_t *size); static bool checkreturn check_wire_type(pb_wire_type_t wire_type, pb_field_iter_t *field); static bool checkreturn decode_basic_field(pb_istream_t *stream, pb_field_iter_t *field); static bool checkreturn decode_static_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field); static bool checkreturn decode_pointer_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field); static bool checkreturn decode_callback_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field); static bool checkreturn decode_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field); static bool checkreturn default_extension_decoder(pb_istream_t *stream, pb_extension_t *extension, uint32_t tag, pb_wire_type_t wire_type); static bool checkreturn decode_extension(pb_istream_t *stream, uint32_t tag, pb_wire_type_t wire_type, pb_field_iter_t *iter); static bool checkreturn find_extension_field(pb_field_iter_t *iter); static bool pb_message_set_to_defaults(pb_field_iter_t *iter); static bool checkreturn pb_dec_bool(pb_istream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_dec_varint(pb_istream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_dec_fixed(pb_istream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_dec_bytes(pb_istream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_dec_string(pb_istream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_dec_submessage(pb_istream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_dec_fixed_length_bytes(pb_istream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_skip_varint(pb_istream_t *stream); static bool checkreturn pb_skip_string(pb_istream_t *stream); #ifdef PB_ENABLE_MALLOC static bool checkreturn allocate_field(pb_istream_t *stream, void *pData, size_t data_size, size_t array_size); static void initialize_pointer_field(void *pItem, pb_field_iter_t *field); static bool checkreturn pb_release_union_field(pb_istream_t *stream, pb_field_iter_t *field); static void pb_release_single_field(pb_field_iter_t *field); #endif #ifdef PB_WITHOUT_64BIT #define pb_int64_t int32_t #define pb_uint64_t uint32_t #else #define pb_int64_t int64_t #define pb_uint64_t uint64_t #endif typedef struct { uint32_t bitfield[(PB_MAX_REQUIRED_FIELDS + 31) / 32]; } pb_fields_seen_t; /******************************* * pb_istream_t implementation * *******************************/ static bool checkreturn buf_read(pb_istream_t *stream, pb_byte_t *buf, size_t count) { size_t i; const pb_byte_t *source = (const pb_byte_t*)stream->state; stream->state = (pb_byte_t*)stream->state + count; if (buf != NULL) { for (i = 0; i < count; i++) buf[i] = source[i]; } return true; } bool checkreturn pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count) { if (count == 0) return true; #ifndef PB_BUFFER_ONLY if (buf == NULL && stream->callback != buf_read) { /* Skip input bytes */ pb_byte_t tmp[16]; while (count > 16) { if (!pb_read(stream, tmp, 16)) return false; count -= 16; } return pb_read(stream, tmp, count); } #endif if (stream->bytes_left < count) PB_RETURN_ERROR(stream, "end-of-stream"); #ifndef PB_BUFFER_ONLY if (!stream->callback(stream, buf, count)) PB_RETURN_ERROR(stream, "io error"); #else if (!buf_read(stream, buf, count)) return false; #endif stream->bytes_left -= count; return true; } /* Read a single byte from input stream. buf may not be NULL. * This is an optimization for the varint decoding. */ static bool checkreturn pb_readbyte(pb_istream_t *stream, pb_byte_t *buf) { if (stream->bytes_left == 0) PB_RETURN_ERROR(stream, "end-of-stream"); #ifndef PB_BUFFER_ONLY if (!stream->callback(stream, buf, 1)) PB_RETURN_ERROR(stream, "io error"); #else *buf = *(const pb_byte_t*)stream->state; stream->state = (pb_byte_t*)stream->state + 1; #endif stream->bytes_left--; return true; } pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t bufsize) { pb_istream_t stream; /* Cast away the const from buf without a compiler error. We are * careful to use it only in a const manner in the callbacks. */ union { void *state; const void *c_state; } state; #ifdef PB_BUFFER_ONLY stream.callback = NULL; #else stream.callback = &buf_read; #endif state.c_state = buf; stream.state = state.state; stream.bytes_left = bufsize; #ifndef PB_NO_ERRMSG stream.errmsg = NULL; #endif return stream; } /******************** * Helper functions * ********************/ static bool checkreturn pb_decode_varint32_eof(pb_istream_t *stream, uint32_t *dest, bool *eof) { pb_byte_t byte; uint32_t result; if (!pb_readbyte(stream, &byte)) { if (stream->bytes_left == 0) { if (eof) { *eof = true; } } return false; } if ((byte & 0x80) == 0) { /* Quick case, 1 byte value */ result = byte; } else { /* Multibyte case */ uint_fast8_t bitpos = 7; result = byte & 0x7F; do { if (!pb_readbyte(stream, &byte)) return false; if (bitpos >= 32) { /* Note: The varint could have trailing 0x80 bytes, or 0xFF for negative. */ pb_byte_t sign_extension = (bitpos < 63) ? 0xFF : 0x01; if ((byte & 0x7F) != 0x00 && ((result >> 31) == 0 || byte != sign_extension)) { PB_RETURN_ERROR(stream, "varint overflow"); } } else { result |= (uint32_t)(byte & 0x7F) << bitpos; } bitpos = (uint_fast8_t)(bitpos + 7); } while (byte & 0x80); if (bitpos == 35 && (byte & 0x70) != 0) { /* The last byte was at bitpos=28, so only bottom 4 bits fit. */ PB_RETURN_ERROR(stream, "varint overflow"); } } *dest = result; return true; } bool checkreturn pb_decode_varint32(pb_istream_t *stream, uint32_t *dest) { return pb_decode_varint32_eof(stream, dest, NULL); } #ifndef PB_WITHOUT_64BIT bool checkreturn pb_decode_varint(pb_istream_t *stream, uint64_t *dest) { pb_byte_t byte; uint_fast8_t bitpos = 0; uint64_t result = 0; do { if (bitpos >= 64) PB_RETURN_ERROR(stream, "varint overflow"); if (!pb_readbyte(stream, &byte)) return false; result |= (uint64_t)(byte & 0x7F) << bitpos; bitpos = (uint_fast8_t)(bitpos + 7); } while (byte & 0x80); *dest = result; return true; } #endif bool checkreturn pb_skip_varint(pb_istream_t *stream) { pb_byte_t byte; do { if (!pb_read(stream, &byte, 1)) return false; } while (byte & 0x80); return true; } bool checkreturn pb_skip_string(pb_istream_t *stream) { uint32_t length; if (!pb_decode_varint32(stream, &length)) return false; if ((size_t)length != length) { PB_RETURN_ERROR(stream, "size too large"); } return pb_read(stream, NULL, (size_t)length); } bool checkreturn pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof) { uint32_t temp; *eof = false; *wire_type = (pb_wire_type_t) 0; *tag = 0; if (!pb_decode_varint32_eof(stream, &temp, eof)) { return false; } *tag = temp >> 3; *wire_type = (pb_wire_type_t)(temp & 7); return true; } bool checkreturn pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type) { switch (wire_type) { case PB_WT_VARINT: return pb_skip_varint(stream); case PB_WT_64BIT: return pb_read(stream, NULL, 8); case PB_WT_STRING: return pb_skip_string(stream); case PB_WT_32BIT: return pb_read(stream, NULL, 4); default: PB_RETURN_ERROR(stream, "invalid wire_type"); } } /* Read a raw value to buffer, for the purpose of passing it to callback as * a substream. Size is maximum size on call, and actual size on return. */ static bool checkreturn read_raw_value(pb_istream_t *stream, pb_wire_type_t wire_type, pb_byte_t *buf, size_t *size) { size_t max_size = *size; switch (wire_type) { case PB_WT_VARINT: *size = 0; do { (*size)++; if (*size > max_size) PB_RETURN_ERROR(stream, "varint overflow"); if (!pb_read(stream, buf, 1)) return false; } while (*buf++ & 0x80); return true; case PB_WT_64BIT: *size = 8; return pb_read(stream, buf, 8); case PB_WT_32BIT: *size = 4; return pb_read(stream, buf, 4); case PB_WT_STRING: /* Calling read_raw_value with a PB_WT_STRING is an error. * Explicitly handle this case and fallthrough to default to avoid * compiler warnings. */ default: PB_RETURN_ERROR(stream, "invalid wire_type"); } } /* Decode string length from stream and return a substream with limited length. * Remember to close the substream using pb_close_string_substream(). */ bool checkreturn pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream) { uint32_t size; if (!pb_decode_varint32(stream, &size)) return false; *substream = *stream; if (substream->bytes_left < size) PB_RETURN_ERROR(stream, "parent stream too short"); substream->bytes_left = (size_t)size; stream->bytes_left -= (size_t)size; return true; } bool checkreturn pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream) { if (substream->bytes_left) { if (!pb_read(substream, NULL, substream->bytes_left)) return false; } stream->state = substream->state; #ifndef PB_NO_ERRMSG stream->errmsg = substream->errmsg; #endif return true; } /************************* * Decode a single field * *************************/ static bool checkreturn check_wire_type(pb_wire_type_t wire_type, pb_field_iter_t *field) { switch (PB_LTYPE(field->type)) { case PB_LTYPE_BOOL: case PB_LTYPE_VARINT: case PB_LTYPE_UVARINT: case PB_LTYPE_SVARINT: return wire_type == PB_WT_VARINT; case PB_LTYPE_FIXED32: return wire_type == PB_WT_32BIT; case PB_LTYPE_FIXED64: return wire_type == PB_WT_64BIT; case PB_LTYPE_BYTES: case PB_LTYPE_STRING: case PB_LTYPE_SUBMESSAGE: case PB_LTYPE_SUBMSG_W_CB: case PB_LTYPE_FIXED_LENGTH_BYTES: return wire_type == PB_WT_STRING; default: return false; } } static bool checkreturn decode_basic_field(pb_istream_t *stream, pb_field_iter_t *field) { switch (PB_LTYPE(field->type)) { case PB_LTYPE_BOOL: return pb_dec_bool(stream, field); case PB_LTYPE_VARINT: case PB_LTYPE_UVARINT: case PB_LTYPE_SVARINT: return pb_dec_varint(stream, field); case PB_LTYPE_FIXED32: case PB_LTYPE_FIXED64: return pb_dec_fixed(stream, field); case PB_LTYPE_BYTES: return pb_dec_bytes(stream, field); case PB_LTYPE_STRING: return pb_dec_string(stream, field); case PB_LTYPE_SUBMESSAGE: case PB_LTYPE_SUBMSG_W_CB: return pb_dec_submessage(stream, field); case PB_LTYPE_FIXED_LENGTH_BYTES: return pb_dec_fixed_length_bytes(stream, field); default: PB_RETURN_ERROR(stream, "invalid field type"); } } static bool checkreturn decode_static_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) { switch (PB_HTYPE(field->type)) { case PB_HTYPE_REQUIRED: if (!check_wire_type(wire_type, field)) PB_RETURN_ERROR(stream, "wrong wire type"); return decode_basic_field(stream, field); case PB_HTYPE_OPTIONAL: if (!check_wire_type(wire_type, field)) PB_RETURN_ERROR(stream, "wrong wire type"); if (field->pSize != NULL) *(bool*)field->pSize = true; return decode_basic_field(stream, field); case PB_HTYPE_REPEATED: if (wire_type == PB_WT_STRING && PB_LTYPE(field->type) <= PB_LTYPE_LAST_PACKABLE) { /* Packed array */ bool status = true; pb_istream_t substream; pb_size_t *size = (pb_size_t*)field->pSize; field->pData = (char*)field->pField + field->data_size * (*size); if (!pb_make_string_substream(stream, &substream)) return false; while (substream.bytes_left > 0 && *size < field->array_size) { if (!decode_basic_field(&substream, field)) { status = false; break; } (*size)++; field->pData = (char*)field->pData + field->data_size; } if (substream.bytes_left != 0) PB_RETURN_ERROR(stream, "array overflow"); if (!pb_close_string_substream(stream, &substream)) return false; return status; } else { /* Repeated field */ pb_size_t *size = (pb_size_t*)field->pSize; field->pData = (char*)field->pField + field->data_size * (*size); if (!check_wire_type(wire_type, field)) PB_RETURN_ERROR(stream, "wrong wire type"); if ((*size)++ >= field->array_size) PB_RETURN_ERROR(stream, "array overflow"); return decode_basic_field(stream, field); } case PB_HTYPE_ONEOF: *(pb_size_t*)field->pSize = field->tag; if (PB_LTYPE_IS_SUBMSG(field->type)) { /* We memset to zero so that any callbacks are set to NULL. * This is because the callbacks might otherwise have values * from some other union field. * If callbacks are needed inside oneof field, use .proto * option submsg_callback to have a separate callback function * that can set the fields before submessage is decoded. * pb_dec_submessage() will set any default values. */ memset(field->pData, 0, (size_t)field->data_size); } if (!check_wire_type(wire_type, field)) PB_RETURN_ERROR(stream, "wrong wire type"); return decode_basic_field(stream, field); default: PB_RETURN_ERROR(stream, "invalid field type"); } } #ifdef PB_ENABLE_MALLOC /* Allocate storage for the field and store the pointer at iter->pData. * array_size is the number of entries to reserve in an array. * Zero size is not allowed, use pb_free() for releasing. */ static bool checkreturn allocate_field(pb_istream_t *stream, void *pData, size_t data_size, size_t array_size) { void *ptr = *(void**)pData; if (data_size == 0 || array_size == 0) PB_RETURN_ERROR(stream, "invalid size"); #ifdef __AVR__ /* Workaround for AVR libc bug 53284: http://savannah.nongnu.org/bugs/?53284 * Realloc to size of 1 byte can cause corruption of the malloc structures. */ if (data_size == 1 && array_size == 1) { data_size = 2; } #endif /* Check for multiplication overflows. * This code avoids the costly division if the sizes are small enough. * Multiplication is safe as long as only half of bits are set * in either multiplicand. */ { const size_t check_limit = (size_t)1 << (sizeof(size_t) * 4); if (data_size >= check_limit || array_size >= check_limit) { const size_t size_max = (size_t)-1; if (size_max / array_size < data_size) { PB_RETURN_ERROR(stream, "size too large"); } } } /* Allocate new or expand previous allocation */ /* Note: on failure the old pointer will remain in the structure, * the message must be freed by caller also on error return. */ ptr = pb_realloc(ptr, array_size * data_size); if (ptr == NULL) PB_RETURN_ERROR(stream, "realloc failed"); *(void**)pData = ptr; return true; } /* Clear a newly allocated item in case it contains a pointer, or is a submessage. */ static void initialize_pointer_field(void *pItem, pb_field_iter_t *field) { if (PB_LTYPE(field->type) == PB_LTYPE_STRING || PB_LTYPE(field->type) == PB_LTYPE_BYTES) { *(void**)pItem = NULL; } else if (PB_LTYPE_IS_SUBMSG(field->type)) { /* We memset to zero so that any callbacks are set to NULL. * Then set any default values. */ pb_field_iter_t submsg_iter; memset(pItem, 0, field->data_size); if (pb_field_iter_begin(&submsg_iter, field->submsg_desc, pItem)) { (void)pb_message_set_to_defaults(&submsg_iter); } } } #endif static bool checkreturn decode_pointer_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) { #ifndef PB_ENABLE_MALLOC PB_UNUSED(wire_type); PB_UNUSED(field); PB_RETURN_ERROR(stream, "no malloc support"); #else switch (PB_HTYPE(field->type)) { case PB_HTYPE_REQUIRED: case PB_HTYPE_OPTIONAL: case PB_HTYPE_ONEOF: if (!check_wire_type(wire_type, field)) PB_RETURN_ERROR(stream, "wrong wire type"); if (PB_LTYPE_IS_SUBMSG(field->type) && *(void**)field->pField != NULL) { /* Duplicate field, have to release the old allocation first. */ /* FIXME: Does this work correctly for oneofs? */ pb_release_single_field(field); } if (PB_HTYPE(field->type) == PB_HTYPE_ONEOF) { *(pb_size_t*)field->pSize = field->tag; } if (PB_LTYPE(field->type) == PB_LTYPE_STRING || PB_LTYPE(field->type) == PB_LTYPE_BYTES) { /* pb_dec_string and pb_dec_bytes handle allocation themselves */ field->pData = field->pField; return decode_basic_field(stream, field); } else { if (!allocate_field(stream, field->pField, field->data_size, 1)) return false; field->pData = *(void**)field->pField; initialize_pointer_field(field->pData, field); return decode_basic_field(stream, field); } case PB_HTYPE_REPEATED: if (wire_type == PB_WT_STRING && PB_LTYPE(field->type) <= PB_LTYPE_LAST_PACKABLE) { /* Packed array, multiple items come in at once. */ bool status = true; pb_size_t *size = (pb_size_t*)field->pSize; size_t allocated_size = *size; pb_istream_t substream; if (!pb_make_string_substream(stream, &substream)) return false; while (substream.bytes_left) { if (*size == PB_SIZE_MAX) { #ifndef PB_NO_ERRMSG stream->errmsg = "too many array entries"; #endif status = false; break; } if ((size_t)*size + 1 > allocated_size) { /* Allocate more storage. This tries to guess the * number of remaining entries. Round the division * upwards. */ size_t remain = (substream.bytes_left - 1) / field->data_size + 1; if (remain < PB_SIZE_MAX - allocated_size) allocated_size += remain; else allocated_size += 1; if (!allocate_field(&substream, field->pField, field->data_size, allocated_size)) { status = false; break; } } /* Decode the array entry */ field->pData = *(char**)field->pField + field->data_size * (*size); initialize_pointer_field(field->pData, field); if (!decode_basic_field(&substream, field)) { status = false; break; } (*size)++; } if (!pb_close_string_substream(stream, &substream)) return false; return status; } else { /* Normal repeated field, i.e. only one item at a time. */ pb_size_t *size = (pb_size_t*)field->pSize; if (*size == PB_SIZE_MAX) PB_RETURN_ERROR(stream, "too many array entries"); if (!check_wire_type(wire_type, field)) PB_RETURN_ERROR(stream, "wrong wire type"); if (!allocate_field(stream, field->pField, field->data_size, (size_t)(*size + 1))) return false; field->pData = *(char**)field->pField + field->data_size * (*size); (*size)++; initialize_pointer_field(field->pData, field); return decode_basic_field(stream, field); } default: PB_RETURN_ERROR(stream, "invalid field type"); } #endif } static bool checkreturn decode_callback_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) { if (!field->descriptor->field_callback) return pb_skip_field(stream, wire_type); if (wire_type == PB_WT_STRING) { pb_istream_t substream; size_t prev_bytes_left; if (!pb_make_string_substream(stream, &substream)) return false; do { prev_bytes_left = substream.bytes_left; if (!field->descriptor->field_callback(&substream, NULL, field)) PB_RETURN_ERROR(stream, "callback failed"); } while (substream.bytes_left > 0 && substream.bytes_left < prev_bytes_left); if (!pb_close_string_substream(stream, &substream)) return false; return true; } else { /* Copy the single scalar value to stack. * This is required so that we can limit the stream length, * which in turn allows to use same callback for packed and * not-packed fields. */ pb_istream_t substream; pb_byte_t buffer[10]; size_t size = sizeof(buffer); if (!read_raw_value(stream, wire_type, buffer, &size)) return false; substream = pb_istream_from_buffer(buffer, size); return field->descriptor->field_callback(&substream, NULL, field); } } static bool checkreturn decode_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) { #ifdef PB_ENABLE_MALLOC /* When decoding an oneof field, check if there is old data that must be * released first. */ if (PB_HTYPE(field->type) == PB_HTYPE_ONEOF) { if (!pb_release_union_field(stream, field)) return false; } #endif switch (PB_ATYPE(field->type)) { case PB_ATYPE_STATIC: return decode_static_field(stream, wire_type, field); case PB_ATYPE_POINTER: return decode_pointer_field(stream, wire_type, field); case PB_ATYPE_CALLBACK: return decode_callback_field(stream, wire_type, field); default: PB_RETURN_ERROR(stream, "invalid field type"); } } /* Default handler for extension fields. Expects to have a pb_msgdesc_t * pointer in the extension->type->arg field, pointing to a message with * only one field in it. */ static bool checkreturn default_extension_decoder(pb_istream_t *stream, pb_extension_t *extension, uint32_t tag, pb_wire_type_t wire_type) { pb_field_iter_t iter; if (!pb_field_iter_begin_extension(&iter, extension)) PB_RETURN_ERROR(stream, "invalid extension"); if (iter.tag != tag) return true; extension->found = true; return decode_field(stream, wire_type, &iter); } /* Try to decode an unknown field as an extension field. Tries each extension * decoder in turn, until one of them handles the field or loop ends. */ static bool checkreturn decode_extension(pb_istream_t *stream, uint32_t tag, pb_wire_type_t wire_type, pb_field_iter_t *iter) { pb_extension_t *extension = *(pb_extension_t* const *)iter->pData; size_t pos = stream->bytes_left; while (extension != NULL && pos == stream->bytes_left) { bool status; if (extension->type->decode) status = extension->type->decode(stream, extension, tag, wire_type); else status = default_extension_decoder(stream, extension, tag, wire_type); if (!status) return false; extension = extension->next; } return true; } /* Step through the iterator until an extension field is found or until all * entries have been checked. There can be only one extension field per * message. Returns false if no extension field is found. */ static bool checkreturn find_extension_field(pb_field_iter_t *iter) { pb_size_t start = iter->index; do { if (PB_LTYPE(iter->type) == PB_LTYPE_EXTENSION) return true; (void)pb_field_iter_next(iter); } while (iter->index != start); return false; } /* Initialize message fields to default values, recursively */ static bool pb_field_set_to_default(pb_field_iter_t *field) { pb_type_t type; type = field->type; if (PB_LTYPE(type) == PB_LTYPE_EXTENSION) { pb_extension_t *ext = *(pb_extension_t* const *)field->pData; while (ext != NULL) { pb_field_iter_t ext_iter; if (pb_field_iter_begin_extension(&ext_iter, ext)) { ext->found = false; if (!pb_message_set_to_defaults(&ext_iter)) return false; } ext = ext->next; } } else if (PB_ATYPE(type) == PB_ATYPE_STATIC) { bool init_data = true; if (PB_HTYPE(type) == PB_HTYPE_OPTIONAL && field->pSize != NULL) { /* Set has_field to false. Still initialize the optional field * itself also. */ *(bool*)field->pSize = false; } else if (PB_HTYPE(type) == PB_HTYPE_REPEATED || PB_HTYPE(type) == PB_HTYPE_ONEOF) { /* REPEATED: Set array count to 0, no need to initialize contents. ONEOF: Set which_field to 0. */ *(pb_size_t*)field->pSize = 0; init_data = false; } if (init_data) { if (PB_LTYPE_IS_SUBMSG(field->type)) { /* Initialize submessage to defaults */ pb_field_iter_t submsg_iter; if (pb_field_iter_begin(&submsg_iter, field->submsg_desc, field->pData)) { if (!pb_message_set_to_defaults(&submsg_iter)) return false; } } else { /* Initialize to zeros */ memset(field->pData, 0, (size_t)field->data_size); } } } else if (PB_ATYPE(type) == PB_ATYPE_POINTER) { /* Initialize the pointer to NULL. */ *(void**)field->pField = NULL; /* Initialize array count to 0. */ if (PB_HTYPE(type) == PB_HTYPE_REPEATED || PB_HTYPE(type) == PB_HTYPE_ONEOF) { *(pb_size_t*)field->pSize = 0; } } else if (PB_ATYPE(type) == PB_ATYPE_CALLBACK) { /* Don't overwrite callback */ } return true; } static bool pb_message_set_to_defaults(pb_field_iter_t *iter) { pb_istream_t defstream = PB_ISTREAM_EMPTY; uint32_t tag = 0; pb_wire_type_t wire_type = PB_WT_VARINT; bool eof; if (iter->descriptor->default_value) { defstream = pb_istream_from_buffer(iter->descriptor->default_value, (size_t)-1); if (!pb_decode_tag(&defstream, &wire_type, &tag, &eof)) return false; } do { if (!pb_field_set_to_default(iter)) return false; if (tag != 0 && iter->tag == tag) { /* We have a default value for this field in the defstream */ if (!decode_field(&defstream, wire_type, iter)) return false; if (!pb_decode_tag(&defstream, &wire_type, &tag, &eof)) return false; if (iter->pSize) *(bool*)iter->pSize = false; } } while (pb_field_iter_next(iter)); return true; } /********************* * Decode all fields * *********************/ static bool checkreturn pb_decode_inner(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct, unsigned int flags) { uint32_t extension_range_start = 0; /* 'fixed_count_field' and 'fixed_count_size' track position of a repeated fixed * count field. This can only handle _one_ repeated fixed count field that * is unpacked and unordered among other (non repeated fixed count) fields. */ pb_size_t fixed_count_field = PB_SIZE_MAX; pb_size_t fixed_count_size = 0; pb_size_t fixed_count_total_size = 0; pb_fields_seen_t fields_seen = {{0, 0}}; const uint32_t allbits = ~(uint32_t)0; pb_field_iter_t iter; if (pb_field_iter_begin(&iter, fields, dest_struct)) { if ((flags & PB_DECODE_NOINIT) == 0) { if (!pb_message_set_to_defaults(&iter)) PB_RETURN_ERROR(stream, "failed to set defaults"); } } while (stream->bytes_left) { uint32_t tag; pb_wire_type_t wire_type; bool eof; if (!pb_decode_tag(stream, &wire_type, &tag, &eof)) { if (eof) break; else return false; } if (tag == 0) { if (flags & PB_DECODE_NULLTERMINATED) { break; } else { PB_RETURN_ERROR(stream, "zero tag"); } } if (!pb_field_iter_find(&iter, tag) || PB_LTYPE(iter.type) == PB_LTYPE_EXTENSION) { /* No match found, check if it matches an extension. */ if (tag >= extension_range_start) { if (!find_extension_field(&iter)) extension_range_start = (uint32_t)-1; else extension_range_start = iter.tag; if (tag >= extension_range_start) { size_t pos = stream->bytes_left; if (!decode_extension(stream, tag, wire_type, &iter)) return false; if (pos != stream->bytes_left) { /* The field was handled */ continue; } } } /* No match found, skip data */ if (!pb_skip_field(stream, wire_type)) return false; continue; } /* If a repeated fixed count field was found, get size from * 'fixed_count_field' as there is no counter contained in the struct. */ if (PB_HTYPE(iter.type) == PB_HTYPE_REPEATED && iter.pSize == &iter.array_size) { if (fixed_count_field != iter.index) { /* If the new fixed count field does not match the previous one, * check that the previous one is NULL or that it finished * receiving all the expected data. */ if (fixed_count_field != PB_SIZE_MAX && fixed_count_size != fixed_count_total_size) { PB_RETURN_ERROR(stream, "wrong size for fixed count field"); } fixed_count_field = iter.index; fixed_count_size = 0; fixed_count_total_size = iter.array_size; } iter.pSize = &fixed_count_size; } if (PB_HTYPE(iter.type) == PB_HTYPE_REQUIRED && iter.required_field_index < PB_MAX_REQUIRED_FIELDS) { uint32_t tmp = ((uint32_t)1 << (iter.required_field_index & 31)); fields_seen.bitfield[iter.required_field_index >> 5] |= tmp; } if (!decode_field(stream, wire_type, &iter)) return false; } /* Check that all elements of the last decoded fixed count field were present. */ if (fixed_count_field != PB_SIZE_MAX && fixed_count_size != fixed_count_total_size) { PB_RETURN_ERROR(stream, "wrong size for fixed count field"); } /* Check that all required fields were present. */ { /* First figure out the number of required fields by * seeking to the end of the field array. Usually we * are already close to end after decoding. */ pb_size_t req_field_count; pb_type_t last_type; pb_size_t i; do { req_field_count = iter.required_field_index; last_type = iter.type; } while (pb_field_iter_next(&iter)); /* Fixup if last field was also required. */ if (PB_HTYPE(last_type) == PB_HTYPE_REQUIRED && iter.tag != 0) req_field_count++; if (req_field_count > PB_MAX_REQUIRED_FIELDS) req_field_count = PB_MAX_REQUIRED_FIELDS; if (req_field_count > 0) { /* Check the whole words */ for (i = 0; i < (req_field_count >> 5); i++) { if (fields_seen.bitfield[i] != allbits) PB_RETURN_ERROR(stream, "missing required field"); } /* Check the remaining bits (if any) */ if ((req_field_count & 31) != 0) { if (fields_seen.bitfield[req_field_count >> 5] != (allbits >> (uint_least8_t)(32 - (req_field_count & 31)))) { PB_RETURN_ERROR(stream, "missing required field"); } } } } return true; } bool checkreturn pb_decode_ex(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct, unsigned int flags) { bool status; if ((flags & PB_DECODE_DELIMITED) == 0) { status = pb_decode_inner(stream, fields, dest_struct, flags); } else { pb_istream_t substream; if (!pb_make_string_substream(stream, &substream)) return false; status = pb_decode_inner(&substream, fields, dest_struct, flags); if (!pb_close_string_substream(stream, &substream)) return false; } #ifdef PB_ENABLE_MALLOC if (!status) pb_release(fields, dest_struct); #endif return status; } bool checkreturn pb_decode(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct) { bool status; status = pb_decode_inner(stream, fields, dest_struct, 0); #ifdef PB_ENABLE_MALLOC if (!status) pb_release(fields, dest_struct); #endif return status; } #ifdef PB_ENABLE_MALLOC /* Given an oneof field, if there has already been a field inside this oneof, * release it before overwriting with a different one. */ static bool pb_release_union_field(pb_istream_t *stream, pb_field_iter_t *field) { pb_field_iter_t old_field = *field; pb_size_t old_tag = *(pb_size_t*)field->pSize; /* Previous which_ value */ pb_size_t new_tag = field->tag; /* New which_ value */ if (old_tag == 0) return true; /* Ok, no old data in union */ if (old_tag == new_tag) return true; /* Ok, old data is of same type => merge */ /* Release old data. The find can fail if the message struct contains * invalid data. */ if (!pb_field_iter_find(&old_field, old_tag)) PB_RETURN_ERROR(stream, "invalid union tag"); pb_release_single_field(&old_field); return true; } static void pb_release_single_field(pb_field_iter_t *field) { pb_type_t type; type = field->type; if (PB_HTYPE(type) == PB_HTYPE_ONEOF) { if (*(pb_size_t*)field->pSize != field->tag) return; /* This is not the current field in the union */ } /* Release anything contained inside an extension or submsg. * This has to be done even if the submsg itself is statically * allocated. */ if (PB_LTYPE(type) == PB_LTYPE_EXTENSION) { /* Release fields from all extensions in the linked list */ pb_extension_t *ext = *(pb_extension_t**)field->pData; while (ext != NULL) { pb_field_iter_t ext_iter; if (pb_field_iter_begin_extension(&ext_iter, ext)) { pb_release_single_field(&ext_iter); } ext = ext->next; } } else if (PB_LTYPE_IS_SUBMSG(type) && PB_ATYPE(type) != PB_ATYPE_CALLBACK) { /* Release fields in submessage or submsg array */ pb_size_t count = 1; if (PB_ATYPE(type) == PB_ATYPE_POINTER) { field->pData = *(void**)field->pField; } else { field->pData = field->pField; } if (PB_HTYPE(type) == PB_HTYPE_REPEATED) { count = *(pb_size_t*)field->pSize; if (PB_ATYPE(type) == PB_ATYPE_STATIC && count > field->array_size) { /* Protect against corrupted _count fields */ count = field->array_size; } } if (field->pData) { while (count--) { pb_release(field->submsg_desc, field->pData); field->pData = (char*)field->pData + field->data_size; } } } if (PB_ATYPE(type) == PB_ATYPE_POINTER) { if (PB_HTYPE(type) == PB_HTYPE_REPEATED && (PB_LTYPE(type) == PB_LTYPE_STRING || PB_LTYPE(type) == PB_LTYPE_BYTES)) { /* Release entries in repeated string or bytes array */ void **pItem = *(void***)field->pField; pb_size_t count = *(pb_size_t*)field->pSize; while (count--) { pb_free(*pItem); *pItem++ = NULL; } } if (PB_HTYPE(type) == PB_HTYPE_REPEATED) { /* We are going to release the array, so set the size to 0 */ *(pb_size_t*)field->pSize = 0; } /* Release main pointer */ pb_free(*(void**)field->pField); *(void**)field->pField = NULL; } } void pb_release(const pb_msgdesc_t *fields, void *dest_struct) { pb_field_iter_t iter; if (!dest_struct) return; /* Ignore NULL pointers, similar to free() */ if (!pb_field_iter_begin(&iter, fields, dest_struct)) return; /* Empty message type */ do { pb_release_single_field(&iter); } while (pb_field_iter_next(&iter)); } #endif /* Field decoders */ bool pb_decode_bool(pb_istream_t *stream, bool *dest) { uint32_t value; if (!pb_decode_varint32(stream, &value)) return false; *(bool*)dest = (value != 0); return true; } bool pb_decode_svarint(pb_istream_t *stream, pb_int64_t *dest) { pb_uint64_t value; if (!pb_decode_varint(stream, &value)) return false; if (value & 1) *dest = (pb_int64_t)(~(value >> 1)); else *dest = (pb_int64_t)(value >> 1); return true; } bool pb_decode_fixed32(pb_istream_t *stream, void *dest) { union { uint32_t fixed32; pb_byte_t bytes[4]; } u; if (!pb_read(stream, u.bytes, 4)) return false; #if defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN && CHAR_BIT == 8 /* fast path - if we know that we're on little endian, assign directly */ *(uint32_t*)dest = u.fixed32; #else *(uint32_t*)dest = ((uint32_t)u.bytes[0] << 0) | ((uint32_t)u.bytes[1] << 8) | ((uint32_t)u.bytes[2] << 16) | ((uint32_t)u.bytes[3] << 24); #endif return true; } #ifndef PB_WITHOUT_64BIT bool pb_decode_fixed64(pb_istream_t *stream, void *dest) { union { uint64_t fixed64; pb_byte_t bytes[8]; } u; if (!pb_read(stream, u.bytes, 8)) return false; #if defined(__BYTE_ORDER) && __BYTE_ORDER == __LITTLE_ENDIAN && CHAR_BIT == 8 /* fast path - if we know that we're on little endian, assign directly */ *(uint64_t*)dest = u.fixed64; #else *(uint64_t*)dest = ((uint64_t)u.bytes[0] << 0) | ((uint64_t)u.bytes[1] << 8) | ((uint64_t)u.bytes[2] << 16) | ((uint64_t)u.bytes[3] << 24) | ((uint64_t)u.bytes[4] << 32) | ((uint64_t)u.bytes[5] << 40) | ((uint64_t)u.bytes[6] << 48) | ((uint64_t)u.bytes[7] << 56); #endif return true; } #endif static bool checkreturn pb_dec_bool(pb_istream_t *stream, const pb_field_iter_t *field) { return pb_decode_bool(stream, (bool*)field->pData); } static bool checkreturn pb_dec_varint(pb_istream_t *stream, const pb_field_iter_t *field) { if (PB_LTYPE(field->type) == PB_LTYPE_UVARINT) { pb_uint64_t value, clamped; if (!pb_decode_varint(stream, &value)) return false; /* Cast to the proper field size, while checking for overflows */ if (field->data_size == sizeof(pb_uint64_t)) clamped = *(pb_uint64_t*)field->pData = value; else if (field->data_size == sizeof(uint32_t)) clamped = *(uint32_t*)field->pData = (uint32_t)value; else if (field->data_size == sizeof(uint_least16_t)) clamped = *(uint_least16_t*)field->pData = (uint_least16_t)value; else if (field->data_size == sizeof(uint_least8_t)) clamped = *(uint_least8_t*)field->pData = (uint_least8_t)value; else PB_RETURN_ERROR(stream, "invalid data_size"); if (clamped != value) PB_RETURN_ERROR(stream, "integer too large"); return true; } else { pb_uint64_t value; pb_int64_t svalue; pb_int64_t clamped; if (PB_LTYPE(field->type) == PB_LTYPE_SVARINT) { if (!pb_decode_svarint(stream, &svalue)) return false; } else { if (!pb_decode_varint(stream, &value)) return false; /* See issue 97: Google's C++ protobuf allows negative varint values to * be cast as int32_t, instead of the int64_t that should be used when * encoding. Previous nanopb versions had a bug in encoding. In order to * not break decoding of such messages, we cast <=32 bit fields to * int32_t first to get the sign correct. */ if (field->data_size == sizeof(pb_int64_t)) svalue = (pb_int64_t)value; else svalue = (int32_t)value; } /* Cast to the proper field size, while checking for overflows */ if (field->data_size == sizeof(pb_int64_t)) clamped = *(pb_int64_t*)field->pData = svalue; else if (field->data_size == sizeof(int32_t)) clamped = *(int32_t*)field->pData = (int32_t)svalue; else if (field->data_size == sizeof(int_least16_t)) clamped = *(int_least16_t*)field->pData = (int_least16_t)svalue; else if (field->data_size == sizeof(int_least8_t)) clamped = *(int_least8_t*)field->pData = (int_least8_t)svalue; else PB_RETURN_ERROR(stream, "invalid data_size"); if (clamped != svalue) PB_RETURN_ERROR(stream, "integer too large"); return true; } } static bool checkreturn pb_dec_fixed(pb_istream_t *stream, const pb_field_iter_t *field) { #ifdef PB_CONVERT_DOUBLE_FLOAT if (field->data_size == sizeof(float) && PB_LTYPE(field->type) == PB_LTYPE_FIXED64) { return pb_decode_double_as_float(stream, (float*)field->pData); } #endif if (field->data_size == sizeof(uint32_t)) { return pb_decode_fixed32(stream, field->pData); } #ifndef PB_WITHOUT_64BIT else if (field->data_size == sizeof(uint64_t)) { return pb_decode_fixed64(stream, field->pData); } #endif else { PB_RETURN_ERROR(stream, "invalid data_size"); } } static bool checkreturn pb_dec_bytes(pb_istream_t *stream, const pb_field_iter_t *field) { uint32_t size; size_t alloc_size; pb_bytes_array_t *dest; if (!pb_decode_varint32(stream, &size)) return false; if (size > PB_SIZE_MAX) PB_RETURN_ERROR(stream, "bytes overflow"); alloc_size = PB_BYTES_ARRAY_T_ALLOCSIZE(size); if (size > alloc_size) PB_RETURN_ERROR(stream, "size too large"); if (PB_ATYPE(field->type) == PB_ATYPE_POINTER) { #ifndef PB_ENABLE_MALLOC PB_RETURN_ERROR(stream, "no malloc support"); #else if (stream->bytes_left < size) PB_RETURN_ERROR(stream, "end-of-stream"); if (!allocate_field(stream, field->pData, alloc_size, 1)) return false; dest = *(pb_bytes_array_t**)field->pData; #endif } else { if (alloc_size > field->data_size) PB_RETURN_ERROR(stream, "bytes overflow"); dest = (pb_bytes_array_t*)field->pData; } dest->size = (pb_size_t)size; return pb_read(stream, dest->bytes, (size_t)size); } static bool checkreturn pb_dec_string(pb_istream_t *stream, const pb_field_iter_t *field) { uint32_t size; size_t alloc_size; pb_byte_t *dest = (pb_byte_t*)field->pData; if (!pb_decode_varint32(stream, &size)) return false; if (size == (uint32_t)-1) PB_RETURN_ERROR(stream, "size too large"); /* Space for null terminator */ alloc_size = (size_t)(size + 1); if (alloc_size < size) PB_RETURN_ERROR(stream, "size too large"); if (PB_ATYPE(field->type) == PB_ATYPE_POINTER) { #ifndef PB_ENABLE_MALLOC PB_RETURN_ERROR(stream, "no malloc support"); #else if (stream->bytes_left < size) PB_RETURN_ERROR(stream, "end-of-stream"); if (!allocate_field(stream, field->pData, alloc_size, 1)) return false; dest = *(pb_byte_t**)field->pData; #endif } else { if (alloc_size > field->data_size) PB_RETURN_ERROR(stream, "string overflow"); } dest[size] = 0; if (!pb_read(stream, dest, (size_t)size)) return false; #ifdef PB_VALIDATE_UTF8 if (!pb_validate_utf8((const char*)dest)) PB_RETURN_ERROR(stream, "invalid utf8"); #endif return true; } static bool checkreturn pb_dec_submessage(pb_istream_t *stream, const pb_field_iter_t *field) { bool status = true; pb_istream_t substream; if (!pb_make_string_substream(stream, &substream)) return false; if (field->submsg_desc == NULL) PB_RETURN_ERROR(stream, "invalid field descriptor"); /* New array entries need to be initialized, while required and optional * submessages have already been initialized in the top-level pb_decode. */ if (PB_HTYPE(field->type) == PB_HTYPE_REPEATED || PB_HTYPE(field->type) == PB_HTYPE_ONEOF) { pb_field_iter_t submsg_iter; if (pb_field_iter_begin(&submsg_iter, field->submsg_desc, field->pData)) { if (!pb_message_set_to_defaults(&submsg_iter)) PB_RETURN_ERROR(stream, "failed to set defaults"); } } /* Submessages can have a separate message-level callback that is called * before decoding the message. Typically it is used to set callback fields * inside oneofs. */ if (PB_LTYPE(field->type) == PB_LTYPE_SUBMSG_W_CB && field->pSize != NULL) { /* Message callback is stored right before pSize. */ pb_callback_t *callback = (pb_callback_t*)field->pSize - 1; if (callback->funcs.decode) { status = callback->funcs.decode(&substream, field, &callback->arg); } } /* Now decode the submessage contents */ if (status) { status = pb_decode_inner(&substream, field->submsg_desc, field->pData, 0); } if (!pb_close_string_substream(stream, &substream)) return false; return status; } static bool checkreturn pb_dec_fixed_length_bytes(pb_istream_t *stream, const pb_field_iter_t *field) { uint32_t size; if (!pb_decode_varint32(stream, &size)) return false; if (size > PB_SIZE_MAX) PB_RETURN_ERROR(stream, "bytes overflow"); if (size == 0) { /* As a special case, treat empty bytes string as all zeros for fixed_length_bytes. */ memset(field->pData, 0, (size_t)field->data_size); return true; } if (size != field->data_size) PB_RETURN_ERROR(stream, "incorrect fixed length bytes size"); return pb_read(stream, (pb_byte_t*)field->pData, (size_t)field->data_size); } #ifdef PB_CONVERT_DOUBLE_FLOAT bool pb_decode_double_as_float(pb_istream_t *stream, float *dest) { uint_least8_t sign; int exponent; uint32_t mantissa; uint64_t value; union { float f; uint32_t i; } out; if (!pb_decode_fixed64(stream, &value)) return false; /* Decompose input value */ sign = (uint_least8_t)((value >> 63) & 1); exponent = (int)((value >> 52) & 0x7FF) - 1023; mantissa = (value >> 28) & 0xFFFFFF; /* Highest 24 bits */ /* Figure if value is in range representable by floats. */ if (exponent == 1024) { /* Special value */ exponent = 128; } else if (exponent > 127) { /* Too large, convert to infinity */ exponent = 128; mantissa = 0; } else if (exponent < -150) { /* Too small, convert to zero */ exponent = -127; mantissa = 0; } else if (exponent < -126) { /* Denormalized */ mantissa |= 0x1000000; mantissa >>= (-126 - exponent); exponent = -127; } /* Round off mantissa */ mantissa = (mantissa + 1) >> 1; /* Check if mantissa went over 2.0 */ if (mantissa & 0x800000) { exponent += 1; mantissa &= 0x7FFFFF; mantissa >>= 1; } /* Combine fields */ out.i = mantissa; out.i |= (uint32_t)(exponent + 127) << 23; out.i |= (uint32_t)sign << 31; *dest = out.f; return true; } #endif nanopb-0.4.1/pb_decode.h000066400000000000000000000162201361552131000150440ustar00rootroot00000000000000/* pb_decode.h: Functions to decode protocol buffers. Depends on pb_decode.c. * The main function is pb_decode. You also need an input stream, and the * field descriptions created by nanopb_generator.py. */ #ifndef PB_DECODE_H_INCLUDED #define PB_DECODE_H_INCLUDED #include "pb.h" #ifdef __cplusplus extern "C" { #endif /* Structure for defining custom input streams. You will need to provide * a callback function to read the bytes from your storage, which can be * for example a file or a network socket. * * The callback must conform to these rules: * * 1) Return false on IO errors. This will cause decoding to abort. * 2) You can use state to store your own data (e.g. buffer pointer), * and rely on pb_read to verify that no-body reads past bytes_left. * 3) Your callback may be used with substreams, in which case bytes_left * is different than from the main stream. Don't use bytes_left to compute * any pointers. */ struct pb_istream_s { #ifdef PB_BUFFER_ONLY /* Callback pointer is not used in buffer-only configuration. * Having an int pointer here allows binary compatibility but * gives an error if someone tries to assign callback function. */ int *callback; #else bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count); #endif void *state; /* Free field for use by callback implementation */ size_t bytes_left; #ifndef PB_NO_ERRMSG const char *errmsg; #endif }; #ifndef PB_NO_ERRMSG #define PB_ISTREAM_EMPTY {0,0,0,0} #else #define PB_ISTREAM_EMPTY {0,0,0} #endif /*************************** * Main decoding functions * ***************************/ /* Decode a single protocol buffers message from input stream into a C structure. * Returns true on success, false on any failure. * The actual struct pointed to by dest must match the description in fields. * Callback fields of the destination structure must be initialized by caller. * All other fields will be initialized by this function. * * Example usage: * MyMessage msg = {}; * uint8_t buffer[64]; * pb_istream_t stream; * * // ... read some data into buffer ... * * stream = pb_istream_from_buffer(buffer, count); * pb_decode(&stream, MyMessage_fields, &msg); */ bool pb_decode(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct); /* Extended version of pb_decode, with several options to control * the decoding process: * * PB_DECODE_NOINIT: Do not initialize the fields to default values. * This is slightly faster if you do not need the default * values and instead initialize the structure to 0 using * e.g. memset(). This can also be used for merging two * messages, i.e. combine already existing data with new * values. * * PB_DECODE_DELIMITED: Input message starts with the message size as varint. * Corresponds to parseDelimitedFrom() in Google's * protobuf API. * * PB_DECODE_NULLTERMINATED: Stop reading when field tag is read as 0. This allows * reading null terminated messages. * NOTE: Until nanopb-0.4.0, pb_decode() also allows * null-termination. This behaviour is not supported in * most other protobuf implementations, so PB_DECODE_DELIMITED * is a better option for compatibility. * * Multiple flags can be combined with bitwise or (| operator) */ #define PB_DECODE_NOINIT 0x01U #define PB_DECODE_DELIMITED 0x02U #define PB_DECODE_NULLTERMINATED 0x04U bool pb_decode_ex(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct, unsigned int flags); /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ #define pb_decode_noinit(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_NOINIT) #define pb_decode_delimited(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_DELIMITED) #define pb_decode_delimited_noinit(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_DELIMITED | PB_DECODE_NOINIT) #define pb_decode_nullterminated(s,f,d) pb_decode_ex(s,f,d, PB_DECODE_NULLTERMINATED) #ifdef PB_ENABLE_MALLOC /* Release any allocated pointer fields. If you use dynamic allocation, you should * call this for any successfully decoded message when you are done with it. If * pb_decode() returns with an error, the message is already released. */ void pb_release(const pb_msgdesc_t *fields, void *dest_struct); #endif /************************************** * Functions for manipulating streams * **************************************/ /* Create an input stream for reading from a memory buffer. * * Alternatively, you can use a custom stream that reads directly from e.g. * a file or a network socket. */ pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t bufsize); /* Function to read from a pb_istream_t. You can use this if you need to * read some custom header data, or to read data in field callbacks. */ bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count); /************************************************ * Helper functions for writing field callbacks * ************************************************/ /* Decode the tag for the next field in the stream. Gives the wire type and * field tag. At end of the message, returns false and sets eof to true. */ bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof); /* Skip the field payload data, given the wire type. */ bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type); /* Decode an integer in the varint format. This works for enum, int32, * int64, uint32 and uint64 field types. */ #ifndef PB_WITHOUT_64BIT bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest); #else #define pb_decode_varint pb_decode_varint32 #endif /* Decode an integer in the varint format. This works for enum, int32, * and uint32 field types. */ bool pb_decode_varint32(pb_istream_t *stream, uint32_t *dest); /* Decode a bool value in varint format. */ bool pb_decode_bool(pb_istream_t *stream, bool *dest); /* Decode an integer in the zig-zagged svarint format. This works for sint32 * and sint64. */ #ifndef PB_WITHOUT_64BIT bool pb_decode_svarint(pb_istream_t *stream, int64_t *dest); #else bool pb_decode_svarint(pb_istream_t *stream, int32_t *dest); #endif /* Decode a fixed32, sfixed32 or float value. You need to pass a pointer to * a 4-byte wide C variable. */ bool pb_decode_fixed32(pb_istream_t *stream, void *dest); #ifndef PB_WITHOUT_64BIT /* Decode a fixed64, sfixed64 or double value. You need to pass a pointer to * a 8-byte wide C variable. */ bool pb_decode_fixed64(pb_istream_t *stream, void *dest); #endif #ifdef PB_CONVERT_DOUBLE_FLOAT /* Decode a double value into float variable. */ bool pb_decode_double_as_float(pb_istream_t *stream, float *dest); #endif /* Make a limited-length substream for reading a PB_WT_STRING field. */ bool pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream); bool pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream); #ifdef __cplusplus } /* extern "C" */ #endif #endif nanopb-0.4.1/pb_encode.c000066400000000000000000000677311361552131000150660ustar00rootroot00000000000000/* pb_encode.c -- encode a protobuf using minimal resources * * 2011 Petteri Aimonen */ #include "pb.h" #include "pb_encode.h" #include "pb_common.h" /* Use the GCC warn_unused_result attribute to check that all return values * are propagated correctly. On other compilers and gcc before 3.4.0 just * ignore the annotation. */ #if !defined(__GNUC__) || ( __GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) #define checkreturn #else #define checkreturn __attribute__((warn_unused_result)) #endif /************************************** * Declarations internal to this file * **************************************/ static bool checkreturn buf_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); static bool checkreturn encode_array(pb_ostream_t *stream, pb_field_iter_t *field); static bool checkreturn pb_check_proto3_default_value(const pb_field_iter_t *field); static bool checkreturn encode_basic_field(pb_ostream_t *stream, const pb_field_iter_t *field); static bool checkreturn encode_callback_field(pb_ostream_t *stream, const pb_field_iter_t *field); static bool checkreturn encode_field(pb_ostream_t *stream, pb_field_iter_t *field); static bool checkreturn encode_extension_field(pb_ostream_t *stream, const pb_field_iter_t *field); static bool checkreturn default_extension_encoder(pb_ostream_t *stream, const pb_extension_t *extension); static bool checkreturn pb_encode_varint_32(pb_ostream_t *stream, uint32_t low, uint32_t high); static bool checkreturn pb_enc_bool(pb_ostream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_enc_varint(pb_ostream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_enc_fixed(pb_ostream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_enc_bytes(pb_ostream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_enc_string(pb_ostream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_enc_submessage(pb_ostream_t *stream, const pb_field_iter_t *field); static bool checkreturn pb_enc_fixed_length_bytes(pb_ostream_t *stream, const pb_field_iter_t *field); #ifdef PB_WITHOUT_64BIT #define pb_int64_t int32_t #define pb_uint64_t uint32_t #else #define pb_int64_t int64_t #define pb_uint64_t uint64_t #endif /******************************* * pb_ostream_t implementation * *******************************/ static bool checkreturn buf_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count) { size_t i; pb_byte_t *dest = (pb_byte_t*)stream->state; stream->state = dest + count; for (i = 0; i < count; i++) dest[i] = buf[i]; return true; } pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize) { pb_ostream_t stream; #ifdef PB_BUFFER_ONLY stream.callback = (void*)1; /* Just a marker value */ #else stream.callback = &buf_write; #endif stream.state = buf; stream.max_size = bufsize; stream.bytes_written = 0; #ifndef PB_NO_ERRMSG stream.errmsg = NULL; #endif return stream; } bool checkreturn pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count) { if (count > 0 && stream->callback != NULL) { if (stream->bytes_written + count > stream->max_size) PB_RETURN_ERROR(stream, "stream full"); #ifdef PB_BUFFER_ONLY if (!buf_write(stream, buf, count)) PB_RETURN_ERROR(stream, "io error"); #else if (!stream->callback(stream, buf, count)) PB_RETURN_ERROR(stream, "io error"); #endif } stream->bytes_written += count; return true; } /************************* * Encode a single field * *************************/ /* Read a bool value without causing undefined behavior even if the value * is invalid. See issue #434 and * https://stackoverflow.com/questions/27661768/weird-results-for-conditional */ static bool safe_read_bool(const void *pSize) { const char *p = (const char *)pSize; size_t i; for (i = 0; i < sizeof(bool); i++) { if (p[i] != 0) return true; } return false; } /* Encode a static array. Handles the size calculations and possible packing. */ static bool checkreturn encode_array(pb_ostream_t *stream, pb_field_iter_t *field) { pb_size_t i; pb_size_t count; #ifndef PB_ENCODE_ARRAYS_UNPACKED size_t size; #endif count = *(pb_size_t*)field->pSize; if (count == 0) return true; if (PB_ATYPE(field->type) != PB_ATYPE_POINTER && count > field->array_size) PB_RETURN_ERROR(stream, "array max size exceeded"); #ifndef PB_ENCODE_ARRAYS_UNPACKED /* We always pack arrays if the datatype allows it. */ if (PB_LTYPE(field->type) <= PB_LTYPE_LAST_PACKABLE) { if (!pb_encode_tag(stream, PB_WT_STRING, field->tag)) return false; /* Determine the total size of packed array. */ if (PB_LTYPE(field->type) == PB_LTYPE_FIXED32) { size = 4 * (size_t)count; } else if (PB_LTYPE(field->type) == PB_LTYPE_FIXED64) { size = 8 * (size_t)count; } else { pb_ostream_t sizestream = PB_OSTREAM_SIZING; void *pData_orig = field->pData; for (i = 0; i < count; i++) { if (!pb_enc_varint(&sizestream, field)) PB_RETURN_ERROR(stream, PB_GET_ERROR(&sizestream)); field->pData = (char*)field->pData + field->data_size; } field->pData = pData_orig; size = sizestream.bytes_written; } if (!pb_encode_varint(stream, (pb_uint64_t)size)) return false; if (stream->callback == NULL) return pb_write(stream, NULL, size); /* Just sizing.. */ /* Write the data */ for (i = 0; i < count; i++) { if (PB_LTYPE(field->type) == PB_LTYPE_FIXED32 || PB_LTYPE(field->type) == PB_LTYPE_FIXED64) { if (!pb_enc_fixed(stream, field)) return false; } else { if (!pb_enc_varint(stream, field)) return false; } field->pData = (char*)field->pData + field->data_size; } } else /* Unpacked fields */ #endif { for (i = 0; i < count; i++) { /* Normally the data is stored directly in the array entries, but * for pointer-type string and bytes fields, the array entries are * actually pointers themselves also. So we have to dereference once * more to get to the actual data. */ if (PB_ATYPE(field->type) == PB_ATYPE_POINTER && (PB_LTYPE(field->type) == PB_LTYPE_STRING || PB_LTYPE(field->type) == PB_LTYPE_BYTES)) { bool status; void *pData_orig = field->pData; field->pData = *(void* const*)field->pData; if (!field->pData) { /* Null pointer in array is treated as empty string / bytes */ status = pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, 0); } else { status = encode_basic_field(stream, field); } field->pData = pData_orig; if (!status) return false; } else { if (!encode_basic_field(stream, field)) return false; } field->pData = (char*)field->pData + field->data_size; } } return true; } /* In proto3, all fields are optional and are only encoded if their value is "non-zero". * This function implements the check for the zero value. */ static bool checkreturn pb_check_proto3_default_value(const pb_field_iter_t *field) { pb_type_t type = field->type; if (PB_ATYPE(type) == PB_ATYPE_STATIC) { if (PB_HTYPE(type) == PB_HTYPE_REQUIRED) { /* Required proto2 fields inside proto3 submessage, pretty rare case */ return false; } else if (PB_HTYPE(type) == PB_HTYPE_REPEATED) { /* Repeated fields inside proto3 submessage: present if count != 0 */ return *(const pb_size_t*)field->pSize == 0; } else if (PB_HTYPE(type) == PB_HTYPE_ONEOF) { /* Oneof fields */ return *(const pb_size_t*)field->pSize == 0; } else if (PB_HTYPE(type) == PB_HTYPE_OPTIONAL && field->pSize != NULL) { /* Proto2 optional fields inside proto3 message, or proto3 * submessage fields. */ return safe_read_bool(field->pSize) == false; } /* Rest is proto3 singular fields */ if (PB_LTYPE(type) == PB_LTYPE_BYTES) { const pb_bytes_array_t *bytes = (const pb_bytes_array_t*)field->pData; return bytes->size == 0; } else if (PB_LTYPE(type) == PB_LTYPE_STRING) { return *(const char*)field->pData == '\0'; } else if (PB_LTYPE(type) == PB_LTYPE_FIXED_LENGTH_BYTES) { /* Fixed length bytes is only empty if its length is fixed * as 0. Which would be pretty strange, but we can check * it anyway. */ return field->data_size == 0; } else if (PB_LTYPE_IS_SUBMSG(type)) { /* Check all fields in the submessage to find if any of them * are non-zero. The comparison cannot be done byte-per-byte * because the C struct may contain padding bytes that must * be skipped. Note that usually proto3 submessages have * a separate has_field that is checked earlier in this if. */ pb_field_iter_t iter; if (pb_field_iter_begin(&iter, field->submsg_desc, field->pData)) { do { if (!pb_check_proto3_default_value(&iter)) { return false; } } while (pb_field_iter_next(&iter)); } return true; } } { /* Catch-all branch that does byte-per-byte comparison for zero value. * * This is for all pointer fields, and for static PB_LTYPE_VARINT, * UVARINT, SVARINT, FIXED32, FIXED64, EXTENSION fields, and also * callback fields. These all have integer or pointer value which * can be compared with 0. */ pb_size_t i; const char *p = (const char*)field->pData; for (i = 0; i < field->data_size; i++) { if (p[i] != 0) { return false; } } return true; } } /* Encode a field with static or pointer allocation, i.e. one whose data * is available to the encoder directly. */ static bool checkreturn encode_basic_field(pb_ostream_t *stream, const pb_field_iter_t *field) { if (!field->pData) { /* Missing pointer field */ return true; } if (!pb_encode_tag_for_field(stream, field)) return false; switch (PB_LTYPE(field->type)) { case PB_LTYPE_BOOL: return pb_enc_bool(stream, field); case PB_LTYPE_VARINT: case PB_LTYPE_UVARINT: case PB_LTYPE_SVARINT: return pb_enc_varint(stream, field); case PB_LTYPE_FIXED32: case PB_LTYPE_FIXED64: return pb_enc_fixed(stream, field); case PB_LTYPE_BYTES: return pb_enc_bytes(stream, field); case PB_LTYPE_STRING: return pb_enc_string(stream, field); case PB_LTYPE_SUBMESSAGE: case PB_LTYPE_SUBMSG_W_CB: return pb_enc_submessage(stream, field); case PB_LTYPE_FIXED_LENGTH_BYTES: return pb_enc_fixed_length_bytes(stream, field); default: PB_RETURN_ERROR(stream, "invalid field type"); } } /* Encode a field with callback semantics. This means that a user function is * called to provide and encode the actual data. */ static bool checkreturn encode_callback_field(pb_ostream_t *stream, const pb_field_iter_t *field) { if (field->descriptor->field_callback != NULL) { if (!field->descriptor->field_callback(NULL, stream, field)) PB_RETURN_ERROR(stream, "callback error"); } return true; } /* Encode a single field of any callback, pointer or static type. */ static bool checkreturn encode_field(pb_ostream_t *stream, pb_field_iter_t *field) { /* Check field presence */ if (PB_HTYPE(field->type) == PB_HTYPE_ONEOF) { if (*(const pb_size_t*)field->pSize != field->tag) { /* Different type oneof field */ return true; } } else if (PB_HTYPE(field->type) == PB_HTYPE_OPTIONAL) { if (field->pSize) { if (safe_read_bool(field->pSize) == false) { /* Missing optional field */ return true; } } else if (PB_ATYPE(field->type) == PB_ATYPE_STATIC) { /* Proto3 singular field */ if (pb_check_proto3_default_value(field)) return true; } } if (!field->pData) { if (PB_HTYPE(field->type) == PB_HTYPE_REQUIRED) PB_RETURN_ERROR(stream, "missing required field"); /* Pointer field set to NULL */ return true; } /* Then encode field contents */ if (PB_ATYPE(field->type) == PB_ATYPE_CALLBACK) { return encode_callback_field(stream, field); } else if (PB_HTYPE(field->type) == PB_HTYPE_REPEATED) { return encode_array(stream, field); } else { return encode_basic_field(stream, field); } } /* Default handler for extension fields. Expects to have a pb_msgdesc_t * pointer in the extension->type->arg field, pointing to a message with * only one field in it. */ static bool checkreturn default_extension_encoder(pb_ostream_t *stream, const pb_extension_t *extension) { pb_field_iter_t iter; if (!pb_field_iter_begin_extension_const(&iter, extension)) PB_RETURN_ERROR(stream, "invalid extension"); return encode_field(stream, &iter); } /* Walk through all the registered extensions and give them a chance * to encode themselves. */ static bool checkreturn encode_extension_field(pb_ostream_t *stream, const pb_field_iter_t *field) { const pb_extension_t *extension = *(const pb_extension_t* const *)field->pData; while (extension) { bool status; if (extension->type->encode) status = extension->type->encode(stream, extension); else status = default_extension_encoder(stream, extension); if (!status) return false; extension = extension->next; } return true; } /********************* * Encode all fields * *********************/ bool checkreturn pb_encode(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct) { pb_field_iter_t iter; if (!pb_field_iter_begin_const(&iter, fields, src_struct)) return true; /* Empty message type */ do { if (PB_LTYPE(iter.type) == PB_LTYPE_EXTENSION) { /* Special case for the extension field placeholder */ if (!encode_extension_field(stream, &iter)) return false; } else { /* Regular field */ if (!encode_field(stream, &iter)) return false; } } while (pb_field_iter_next(&iter)); return true; } bool checkreturn pb_encode_ex(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct, unsigned int flags) { if ((flags & PB_ENCODE_DELIMITED) != 0) { return pb_encode_submessage(stream, fields, src_struct); } else if ((flags & PB_ENCODE_NULLTERMINATED) != 0) { const pb_byte_t zero = 0; if (!pb_encode(stream, fields, src_struct)) return false; return pb_write(stream, &zero, 1); } else { return pb_encode(stream, fields, src_struct); } } bool pb_get_encoded_size(size_t *size, const pb_msgdesc_t *fields, const void *src_struct) { pb_ostream_t stream = PB_OSTREAM_SIZING; if (!pb_encode(&stream, fields, src_struct)) return false; *size = stream.bytes_written; return true; } /******************** * Helper functions * ********************/ /* This function avoids 64-bit shifts as they are quite slow on many platforms. */ static bool checkreturn pb_encode_varint_32(pb_ostream_t *stream, uint32_t low, uint32_t high) { size_t i = 0; pb_byte_t buffer[10]; pb_byte_t byte = (pb_byte_t)(low & 0x7F); low >>= 7; while (i < 4 && (low != 0 || high != 0)) { byte |= 0x80; buffer[i++] = byte; byte = (pb_byte_t)(low & 0x7F); low >>= 7; } if (high) { byte = (pb_byte_t)(byte | ((high & 0x07) << 4)); high >>= 3; while (high) { byte |= 0x80; buffer[i++] = byte; byte = (pb_byte_t)(high & 0x7F); high >>= 7; } } buffer[i++] = byte; return pb_write(stream, buffer, i); } bool checkreturn pb_encode_varint(pb_ostream_t *stream, pb_uint64_t value) { if (value <= 0x7F) { /* Fast path: single byte */ pb_byte_t byte = (pb_byte_t)value; return pb_write(stream, &byte, 1); } else { #ifdef PB_WITHOUT_64BIT return pb_encode_varint_32(stream, value, 0); #else return pb_encode_varint_32(stream, (uint32_t)value, (uint32_t)(value >> 32)); #endif } } bool checkreturn pb_encode_svarint(pb_ostream_t *stream, pb_int64_t value) { pb_uint64_t zigzagged; if (value < 0) zigzagged = ~((pb_uint64_t)value << 1); else zigzagged = (pb_uint64_t)value << 1; return pb_encode_varint(stream, zigzagged); } bool checkreturn pb_encode_fixed32(pb_ostream_t *stream, const void *value) { uint32_t val = *(const uint32_t*)value; pb_byte_t bytes[4]; bytes[0] = (pb_byte_t)(val & 0xFF); bytes[1] = (pb_byte_t)((val >> 8) & 0xFF); bytes[2] = (pb_byte_t)((val >> 16) & 0xFF); bytes[3] = (pb_byte_t)((val >> 24) & 0xFF); return pb_write(stream, bytes, 4); } #ifndef PB_WITHOUT_64BIT bool checkreturn pb_encode_fixed64(pb_ostream_t *stream, const void *value) { uint64_t val = *(const uint64_t*)value; pb_byte_t bytes[8]; bytes[0] = (pb_byte_t)(val & 0xFF); bytes[1] = (pb_byte_t)((val >> 8) & 0xFF); bytes[2] = (pb_byte_t)((val >> 16) & 0xFF); bytes[3] = (pb_byte_t)((val >> 24) & 0xFF); bytes[4] = (pb_byte_t)((val >> 32) & 0xFF); bytes[5] = (pb_byte_t)((val >> 40) & 0xFF); bytes[6] = (pb_byte_t)((val >> 48) & 0xFF); bytes[7] = (pb_byte_t)((val >> 56) & 0xFF); return pb_write(stream, bytes, 8); } #endif bool checkreturn pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number) { pb_uint64_t tag = ((pb_uint64_t)field_number << 3) | wiretype; return pb_encode_varint(stream, tag); } bool pb_encode_tag_for_field ( pb_ostream_t* stream, const pb_field_iter_t* field ) { pb_wire_type_t wiretype; switch (PB_LTYPE(field->type)) { case PB_LTYPE_BOOL: case PB_LTYPE_VARINT: case PB_LTYPE_UVARINT: case PB_LTYPE_SVARINT: wiretype = PB_WT_VARINT; break; case PB_LTYPE_FIXED32: wiretype = PB_WT_32BIT; break; case PB_LTYPE_FIXED64: wiretype = PB_WT_64BIT; break; case PB_LTYPE_BYTES: case PB_LTYPE_STRING: case PB_LTYPE_SUBMESSAGE: case PB_LTYPE_SUBMSG_W_CB: case PB_LTYPE_FIXED_LENGTH_BYTES: wiretype = PB_WT_STRING; break; default: PB_RETURN_ERROR(stream, "invalid field type"); } return pb_encode_tag(stream, wiretype, field->tag); } bool checkreturn pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size) { if (!pb_encode_varint(stream, (pb_uint64_t)size)) return false; return pb_write(stream, buffer, size); } bool checkreturn pb_encode_submessage(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct) { /* First calculate the message size using a non-writing substream. */ pb_ostream_t substream = PB_OSTREAM_SIZING; size_t size; bool status; if (!pb_encode(&substream, fields, src_struct)) { #ifndef PB_NO_ERRMSG stream->errmsg = substream.errmsg; #endif return false; } size = substream.bytes_written; if (!pb_encode_varint(stream, (pb_uint64_t)size)) return false; if (stream->callback == NULL) return pb_write(stream, NULL, size); /* Just sizing */ if (stream->bytes_written + size > stream->max_size) PB_RETURN_ERROR(stream, "stream full"); /* Use a substream to verify that a callback doesn't write more than * what it did the first time. */ substream.callback = stream->callback; substream.state = stream->state; substream.max_size = size; substream.bytes_written = 0; #ifndef PB_NO_ERRMSG substream.errmsg = NULL; #endif status = pb_encode(&substream, fields, src_struct); stream->bytes_written += substream.bytes_written; stream->state = substream.state; #ifndef PB_NO_ERRMSG stream->errmsg = substream.errmsg; #endif if (substream.bytes_written != size) PB_RETURN_ERROR(stream, "submsg size changed"); return status; } /* Field encoders */ static bool checkreturn pb_enc_bool(pb_ostream_t *stream, const pb_field_iter_t *field) { uint32_t value = safe_read_bool(field->pData) ? 1 : 0; PB_UNUSED(field); return pb_encode_varint(stream, value); } static bool checkreturn pb_enc_varint(pb_ostream_t *stream, const pb_field_iter_t *field) { if (PB_LTYPE(field->type) == PB_LTYPE_UVARINT) { /* Perform unsigned integer extension */ pb_uint64_t value = 0; if (field->data_size == sizeof(uint_least8_t)) value = *(const uint_least8_t*)field->pData; else if (field->data_size == sizeof(uint_least16_t)) value = *(const uint_least16_t*)field->pData; else if (field->data_size == sizeof(uint32_t)) value = *(const uint32_t*)field->pData; else if (field->data_size == sizeof(pb_uint64_t)) value = *(const pb_uint64_t*)field->pData; else PB_RETURN_ERROR(stream, "invalid data_size"); return pb_encode_varint(stream, value); } else { /* Perform signed integer extension */ pb_int64_t value = 0; if (field->data_size == sizeof(int_least8_t)) value = *(const int_least8_t*)field->pData; else if (field->data_size == sizeof(int_least16_t)) value = *(const int_least16_t*)field->pData; else if (field->data_size == sizeof(int32_t)) value = *(const int32_t*)field->pData; else if (field->data_size == sizeof(pb_int64_t)) value = *(const pb_int64_t*)field->pData; else PB_RETURN_ERROR(stream, "invalid data_size"); if (PB_LTYPE(field->type) == PB_LTYPE_SVARINT) return pb_encode_svarint(stream, value); #ifdef PB_WITHOUT_64BIT else if (value < 0) return pb_encode_varint_32(stream, (uint32_t)value, (uint32_t)-1); #endif else return pb_encode_varint(stream, (pb_uint64_t)value); } } static bool checkreturn pb_enc_fixed(pb_ostream_t *stream, const pb_field_iter_t *field) { #ifdef PB_CONVERT_DOUBLE_FLOAT if (field->data_size == sizeof(float) && PB_LTYPE(field->type) == PB_LTYPE_FIXED64) { return pb_encode_float_as_double(stream, *(float*)field->pData); } #endif if (field->data_size == sizeof(uint32_t)) { return pb_encode_fixed32(stream, field->pData); } #ifndef PB_WITHOUT_64BIT else if (field->data_size == sizeof(uint64_t)) { return pb_encode_fixed64(stream, field->pData); } #endif else { PB_RETURN_ERROR(stream, "invalid data_size"); } } static bool checkreturn pb_enc_bytes(pb_ostream_t *stream, const pb_field_iter_t *field) { const pb_bytes_array_t *bytes = NULL; bytes = (const pb_bytes_array_t*)field->pData; if (bytes == NULL) { /* Treat null pointer as an empty bytes field */ return pb_encode_string(stream, NULL, 0); } if (PB_ATYPE(field->type) == PB_ATYPE_STATIC && PB_BYTES_ARRAY_T_ALLOCSIZE(bytes->size) > field->data_size) { PB_RETURN_ERROR(stream, "bytes size exceeded"); } return pb_encode_string(stream, bytes->bytes, (size_t)bytes->size); } static bool checkreturn pb_enc_string(pb_ostream_t *stream, const pb_field_iter_t *field) { size_t size = 0; size_t max_size = (size_t)field->data_size; const char *str = (const char*)field->pData; if (PB_ATYPE(field->type) == PB_ATYPE_POINTER) { max_size = (size_t)-1; } else { /* pb_dec_string() assumes string fields end with a null * terminator when the type isn't PB_ATYPE_POINTER, so we * shouldn't allow more than max-1 bytes to be written to * allow space for the null terminator. */ if (max_size == 0) PB_RETURN_ERROR(stream, "zero-length string"); max_size -= 1; } if (str == NULL) { size = 0; /* Treat null pointer as an empty string */ } else { const char *p = str; /* strnlen() is not always available, so just use a loop */ while (size < max_size && *p != '\0') { size++; p++; } if (*p != '\0') { PB_RETURN_ERROR(stream, "unterminated string"); } } #ifdef PB_VALIDATE_UTF8 if (!pb_validate_utf8(str)) PB_RETURN_ERROR(stream, "invalid utf8"); #endif return pb_encode_string(stream, (const pb_byte_t*)str, size); } static bool checkreturn pb_enc_submessage(pb_ostream_t *stream, const pb_field_iter_t *field) { if (field->submsg_desc == NULL) PB_RETURN_ERROR(stream, "invalid field descriptor"); if (PB_LTYPE(field->type) == PB_LTYPE_SUBMSG_W_CB && field->pSize != NULL) { /* Message callback is stored right before pSize. */ pb_callback_t *callback = (pb_callback_t*)field->pSize - 1; if (callback->funcs.encode) { if (!callback->funcs.encode(stream, field, &callback->arg)) return false; } } return pb_encode_submessage(stream, field->submsg_desc, field->pData); } static bool checkreturn pb_enc_fixed_length_bytes(pb_ostream_t *stream, const pb_field_iter_t *field) { return pb_encode_string(stream, (const pb_byte_t*)field->pData, (size_t)field->data_size); } #ifdef PB_CONVERT_DOUBLE_FLOAT bool pb_encode_float_as_double(pb_ostream_t *stream, float value) { union { float f; uint32_t i; } in; uint_least8_t sign; int exponent; uint64_t mantissa; in.f = value; /* Decompose input value */ sign = (uint_least8_t)((in.i >> 31) & 1); exponent = (int)((in.i >> 23) & 0xFF) - 127; mantissa = in.i & 0x7FFFFF; if (exponent == 128) { /* Special value (NaN etc.) */ exponent = 1024; } else if (exponent == -127) { if (!mantissa) { /* Zero */ exponent = -1023; } else { /* Denormalized */ mantissa <<= 1; while (!(mantissa & 0x800000)) { mantissa <<= 1; exponent--; } mantissa &= 0x7FFFFF; } } /* Combine fields */ mantissa <<= 29; mantissa |= (uint64_t)(exponent + 1023) << 52; mantissa |= (uint64_t)sign << 63; return pb_encode_fixed64(stream, &mantissa); } #endif nanopb-0.4.1/pb_encode.h000066400000000000000000000154471361552131000150700ustar00rootroot00000000000000/* pb_encode.h: Functions to encode protocol buffers. Depends on pb_encode.c. * The main function is pb_encode. You also need an output stream, and the * field descriptions created by nanopb_generator.py. */ #ifndef PB_ENCODE_H_INCLUDED #define PB_ENCODE_H_INCLUDED #include "pb.h" #ifdef __cplusplus extern "C" { #endif /* Structure for defining custom output streams. You will need to provide * a callback function to write the bytes to your storage, which can be * for example a file or a network socket. * * The callback must conform to these rules: * * 1) Return false on IO errors. This will cause encoding to abort. * 2) You can use state to store your own data (e.g. buffer pointer). * 3) pb_write will update bytes_written after your callback runs. * 4) Substreams will modify max_size and bytes_written. Don't use them * to calculate any pointers. */ struct pb_ostream_s { #ifdef PB_BUFFER_ONLY /* Callback pointer is not used in buffer-only configuration. * Having an int pointer here allows binary compatibility but * gives an error if someone tries to assign callback function. * Also, NULL pointer marks a 'sizing stream' that does not * write anything. */ int *callback; #else bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); #endif void *state; /* Free field for use by callback implementation. */ size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */ size_t bytes_written; /* Number of bytes written so far. */ #ifndef PB_NO_ERRMSG const char *errmsg; #endif }; /*************************** * Main encoding functions * ***************************/ /* Encode a single protocol buffers message from C structure into a stream. * Returns true on success, false on any failure. * The actual struct pointed to by src_struct must match the description in fields. * All required fields in the struct are assumed to have been filled in. * * Example usage: * MyMessage msg = {}; * uint8_t buffer[64]; * pb_ostream_t stream; * * msg.field1 = 42; * stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); * pb_encode(&stream, MyMessage_fields, &msg); */ bool pb_encode(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct); /* Extended version of pb_encode, with several options to control the * encoding process: * * PB_ENCODE_DELIMITED: Prepend the length of message as a varint. * Corresponds to writeDelimitedTo() in Google's * protobuf API. * * PB_ENCODE_NULLTERMINATED: Append a null byte to the message for termination. * NOTE: This behaviour is not supported in most other * protobuf implementations, so PB_ENCODE_DELIMITED * is a better option for compatibility. */ #define PB_ENCODE_DELIMITED 0x02U #define PB_ENCODE_NULLTERMINATED 0x04U bool pb_encode_ex(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct, unsigned int flags); /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ #define pb_encode_delimited(s,f,d) pb_encode_ex(s,f,d, PB_ENCODE_DELIMITED) #define pb_encode_nullterminated(s,f,d) pb_encode_ex(s,f,d, PB_ENCODE_NULLTERMINATED) /* Encode the message to get the size of the encoded data, but do not store * the data. */ bool pb_get_encoded_size(size_t *size, const pb_msgdesc_t *fields, const void *src_struct); /************************************** * Functions for manipulating streams * **************************************/ /* Create an output stream for writing into a memory buffer. * The number of bytes written can be found in stream.bytes_written after * encoding the message. * * Alternatively, you can use a custom stream that writes directly to e.g. * a file or a network socket. */ pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize); /* Pseudo-stream for measuring the size of a message without actually storing * the encoded data. * * Example usage: * MyMessage msg = {}; * pb_ostream_t stream = PB_OSTREAM_SIZING; * pb_encode(&stream, MyMessage_fields, &msg); * printf("Message size is %d\n", stream.bytes_written); */ #ifndef PB_NO_ERRMSG #define PB_OSTREAM_SIZING {0,0,0,0,0} #else #define PB_OSTREAM_SIZING {0,0,0,0} #endif /* Function to write into a pb_ostream_t stream. You can use this if you need * to append or prepend some custom headers to the message. */ bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count); /************************************************ * Helper functions for writing field callbacks * ************************************************/ /* Encode field header based on type and field number defined in the field * structure. Call this from the callback before writing out field contents. */ bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_iter_t *field); /* Encode field header by manually specifing wire type. You need to use this * if you want to write out packed arrays from a callback field. */ bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number); /* Encode an integer in the varint format. * This works for bool, enum, int32, int64, uint32 and uint64 field types. */ #ifndef PB_WITHOUT_64BIT bool pb_encode_varint(pb_ostream_t *stream, uint64_t value); #else bool pb_encode_varint(pb_ostream_t *stream, uint32_t value); #endif /* Encode an integer in the zig-zagged svarint format. * This works for sint32 and sint64. */ #ifndef PB_WITHOUT_64BIT bool pb_encode_svarint(pb_ostream_t *stream, int64_t value); #else bool pb_encode_svarint(pb_ostream_t *stream, int32_t value); #endif /* Encode a string or bytes type field. For strings, pass strlen(s) as size. */ bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size); /* Encode a fixed32, sfixed32 or float value. * You need to pass a pointer to a 4-byte wide C variable. */ bool pb_encode_fixed32(pb_ostream_t *stream, const void *value); #ifndef PB_WITHOUT_64BIT /* Encode a fixed64, sfixed64 or double value. * You need to pass a pointer to a 8-byte wide C variable. */ bool pb_encode_fixed64(pb_ostream_t *stream, const void *value); #endif #ifdef PB_CONVERT_DOUBLE_FLOAT /* Encode a float value so that it appears like a double in the encoded * message. */ bool pb_encode_float_as_double(pb_ostream_t *stream, float value); #endif /* Encode a submessage field. * You need to pass the pb_field_t array and pointer to struct, just like * with pb_encode(). This internally encodes the submessage twice, first to * calculate message size and then to actually write it out. */ bool pb_encode_submessage(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct); #ifdef __cplusplus } /* extern "C" */ #endif #endif nanopb-0.4.1/tests/000077500000000000000000000000001361552131000141305ustar00rootroot00000000000000nanopb-0.4.1/tests/Makefile000066400000000000000000000007221361552131000155710ustar00rootroot00000000000000all: scons clean: scons -c coverage: rm -rf build coverage # LCOV does not like the newer gcov format scons CC=gcc-4.6 CXX=gcc-4.6 # Collect the data mkdir build/coverage lcov --base-directory . --directory build/ --gcov-tool gcov-4.6 -c -o build/coverage/nanopb.info # Remove the test code from results lcov -r build/coverage/nanopb.info '*tests*' -o build/coverage/nanopb.info # Generate HTML genhtml -o build/coverage build/coverage/nanopb.info nanopb-0.4.1/tests/SConstruct000066400000000000000000000214421361552131000161650ustar00rootroot00000000000000Help(''' Type 'scons' to build and run all the available test cases. It will automatically detect your platform and C compiler and build appropriately. You can modify the behavious using following options: CC Name of C compiler CXX Name of C++ compiler CCFLAGS Flags to pass to the C compiler CXXFLAGS Flags to pass to the C++ compiler LINK Name of linker (usually same as CC) LINKFLAGS Flags to pass to linker LINKLIBS Flags to pass to linker after object files PROTOC Path to protoc binary PROTOCFLAGS Arguments to pass protoc NODEFARGS Do not add the default CCFLAGS For example, for a clang build, use: scons CC=clang CXX=clang++ ''') import os env = Environment(ENV = os.environ, tools = ['default', 'nanopb']) env.SConsignFile("build/sconsign") env.Replace(CONFIGUREDIR = "build/config") if ARGUMENTS.get('PLATFORM') == 'STM32': set_stm32_platform(env) elif ARGUMENTS.get('PLATFORM') == 'AVR': set_avr_platform(env) # Limit memory usage. This is to catch problems like issue #338 try: import resource soft, hard = resource.getrlimit(resourse.RLIMIT_AS) resource.setrlimit(resource.RLIMIT_AS, (100*1024*1024, hard)) except: pass # Allow overriding the compiler with scons CC=??? if 'CC' in ARGUMENTS: env.Replace(CC = ARGUMENTS['CC']) if 'CXX' in ARGUMENTS: env.Replace(CXX = ARGUMENTS['CXX']) if 'LINK' in ARGUMENTS: env.Replace(LINK = ARGUMENTS['LINK']) if 'CCFLAGS' in ARGUMENTS: env.Append(CCFLAGS = ARGUMENTS['CCFLAGS']) if 'CXXFLAGS' in ARGUMENTS: env.Append(CXXFLAGS = ARGUMENTS['CXXFLAGS']) if 'LINKFLAGS' in ARGUMENTS: env.Append(LINKFLAGS = ARGUMENTS['LINKFLAGS']) if 'LINKLIBS' in ARGUMENTS: env.Append(LINKLIBS = ARGUMENTS['LINKLIBS']) if 'PROTOC' in ARGUMENTS: env.Replace(PROTOC = ARGUMENTS['PROTOC']) if 'PROTOCFLAGS' in ARGUMENTS: env.Replace(PROTOCFLAGS = ARGUMENTS['PROTOCFLAGS']) if 'NODEFARGS' in ARGUMENTS: env.Replace(NODEFARGS = ARGUMENTS['NODEFARGS']) # Add the builders defined in site_init.py add_nanopb_builders(env) # Path to the files shared by tests, and to the nanopb core. env.Append(CPPPATH = ["#../", "$COMMON"]) # Path for finding nanopb.proto env.Append(PROTOCPATH = '#../generator') # Check the compilation environment, unless we are just cleaning up. if not env.GetOption('clean'): def check_ccflags(context, flags, linkflags = ''): '''Check if given CCFLAGS are supported''' context.Message('Checking support for CCFLAGS="%s"... ' % flags) oldflags = context.env['CCFLAGS'] oldlinkflags = context.env['LINKFLAGS'] context.env.Append(CCFLAGS = flags) context.env.Append(LINKFLAGS = linkflags) result = context.TryCompile("int main() {return 0;}", '.c') context.env.Replace(CCFLAGS = oldflags) context.env.Replace(LINKFLAGS = oldlinkflags) context.Result(result) return result def check_protocversion(context): context.Display("Checking protoc version... ") status, output = context.TryAction('$PROTOC --version > $TARGET') if status: context.Result(str(output.strip())) else: context.Display("error: %s\n" % output.strip()) context.did_show_result = 1 context.Result("3.6.1") # Assumption conf = Configure(env, custom_tests = {'CheckCCFLAGS': check_ccflags, 'CheckProtocVersion': check_protocversion}) # If the platform doesn't support C99, use our own header file instead. stdbool = conf.CheckCHeader('stdbool.h') stdint = conf.CheckCHeader('stdint.h') stddef = conf.CheckCHeader('stddef.h') string = conf.CheckCHeader('string.h') stdlib = conf.CheckCHeader('stdlib.h') limits = conf.CheckCHeader('limits.h') if not stdbool or not stdint or not stddef or not string or not limits: conf.env.Append(CPPDEFINES = {'PB_SYSTEM_HEADER': '\\"pb_syshdr.h\\"'}) conf.env.Append(CPPPATH = "#../extra") conf.env.Append(SYSHDR = '\\"pb_syshdr.h\\"') if stdbool: conf.env.Append(CPPDEFINES = {'HAVE_STDBOOL_H': 1}) if stdint: conf.env.Append(CPPDEFINES = {'HAVE_STDINT_H': 1}) if stddef: conf.env.Append(CPPDEFINES = {'HAVE_STDDEF_H': 1}) if string: conf.env.Append(CPPDEFINES = {'HAVE_STRING_H': 1}) if stdlib: conf.env.Append(CPPDEFINES = {'HAVE_STDLIB_H': 1}) if limits: conf.env.Append(CPPDEFINES = {'HAVE_LIMITS_H': 1}) # Check protoc version conf.env['PROTOC_VERSION'] = conf.CheckProtocVersion() # Initialize compiler arguments with defaults, unless overridden on # command line. if not env.get('NODEFARGS'): # Check if libmudflap is available (only with GCC) if 'gcc' in env['CC']: if conf.CheckLib('mudflap'): conf.env.Append(CCFLAGS = '-fmudflap') conf.env.Append(LINKFLAGS = '-fmudflap') # Check if we can use extra strict warning flags (only with GCC) extra = '-Wcast-qual -Wlogical-op -Wconversion' extra += ' -fstrict-aliasing -Wstrict-aliasing=1' extra += ' -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls' extra += ' -Wstack-protector ' if 'gcc' in env['CC']: if conf.CheckCCFLAGS(extra): conf.env.Append(CORECFLAGS = extra) # Check if we can use undefined behaviour sanitizer (only with clang) # TODO: Fuzz test triggers the bool sanitizer, figure out whether to # modify the fuzz test or to keep ignoring the check. extra = '-fsanitize=undefined,integer -fno-sanitize-recover=undefined,integer ' if 'clang' in env['CC']: if conf.CheckCCFLAGS(extra, linkflags = extra): conf.env.Append(CORECFLAGS = extra) conf.env.Append(LINKFLAGS = extra) # End the config stuff env = conf.Finish() if not env.get('NODEFARGS'): # Initialize the CCFLAGS according to the compiler if 'gcc' in env['CC']: # GNU Compiler Collection # Debug info, warnings as errors env.Append(CFLAGS = '-g -Wall -Werror ') env.Append(CORECFLAGS = '-Wextra') # Pedantic ANSI C. On AVR this doesn't work because we use large # enums in some of the tests. if env.get("EMBEDDED") != "AVR": env.Append(CFLAGS = '-ansi -pedantic') # Profiling and coverage if not env.get("EMBEDDED"): env.Append(CFLAGS = '-fprofile-arcs -ftest-coverage ') env.Append(LINKFLAGS = '-g --coverage') # We currently need uint64_t anyway, even though ANSI C90 otherwise.. env.Append(CFLAGS = '-Wno-long-long') elif 'clang' in env['CC']: # CLang env.Append(CFLAGS = '-ansi -g -Wall -Werror') env.Append(CORECFLAGS = ' -Wextra -Wcast-qual -Wconversion') elif 'cl' in env['CC']: # Microsoft Visual C++ # Debug info on, warning level 2 for tests, warnings as errors env.Append(CFLAGS = '/Zi /W2 /WX') env.Append(LINKFLAGS = '/DEBUG') # More strict checks on the nanopb core env.Append(CORECFLAGS = '/W4') # Disable warning about sizeof(union{}) construct that is used in # message size macros, in e.g. multiple_files testcase. The C construct # itself is valid, but quite rare, which causes Visual C++ to give a warning # about it. env.Append(CFLAGS = '/wd4116') elif 'tcc' in env['CC']: # Tiny C Compiler env.Append(CFLAGS = '-Wall -Werror -g') if 'clang' in env['CXX']: env.Append(CXXFLAGS = '-g -Wall -Werror -Wextra -Wno-missing-field-initializers') elif 'g++' in env['CXX'] or 'gcc' in env['CXX']: env.Append(CXXFLAGS = '-g -Wall -Werror -Wextra -Wno-missing-field-initializers') elif 'cl' in env['CXX']: env.Append(CXXFLAGS = '/Zi /W2 /WX /wd4116 /wd4127') env.SetDefault(CORECFLAGS = '') if not env.get("EMBEDDED"): valgrind = env.WhereIs('valgrind') if valgrind: env.SetDefault(VALGRIND = valgrind) # Make it possible to add commands to the end of linker line env.SetDefault(LINKLIBS = '') env.Replace(LINKCOM = env['LINKCOM'] + " $LINKLIBS") # Place build files under separate folder import os.path env['VARIANT_DIR'] = 'build' env['BUILD'] = '#' + env['VARIANT_DIR'] env['COMMON'] = '#' + env['VARIANT_DIR'] + '/common' # Include common/SConscript first to make sure its exports are available # to other SConscripts. SConscript("common/SConscript", exports = 'env', variant_dir = env['VARIANT_DIR'] + '/common') # Now include the SConscript files from all subdirectories for subdir in Glob('*/SConscript') + Glob('regression/*/SConscript'): if str(subdir).startswith("common/"): continue if str(subdir).startswith("common\\"): continue SConscript(subdir, exports = 'env', variant_dir = env['VARIANT_DIR'] + '/' + os.path.dirname(str(subdir))) nanopb-0.4.1/tests/alltypes/000077500000000000000000000000001361552131000157655ustar00rootroot00000000000000nanopb-0.4.1/tests/alltypes/SConscript000066400000000000000000000036131361552131000200020ustar00rootroot00000000000000# Build and run a test that encodes and decodes a message that contains # all of the Protocol Buffers data types. Import("env") env.NanopbProto(["alltypes", "alltypes.options"]) enc = env.Program(["encode_alltypes.c", "alltypes.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) dec = env.Program(["decode_alltypes.c", "alltypes.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) # Test the round-trip from nanopb encoder to nanopb decoder env.RunTest(enc) env.RunTest([dec, "encode_alltypes.output"]) # Re-encode the data using protoc, and check that the results from nanopb # match byte-per-byte to the protoc output. env.Decode("encode_alltypes.output.decoded", ["encode_alltypes.output", "alltypes.proto"], MESSAGE='AllTypes') env.Encode("encode_alltypes.output.recoded", ["encode_alltypes.output.decoded", "alltypes.proto"], MESSAGE='AllTypes') env.Compare(["encode_alltypes.output", "encode_alltypes.output.recoded"]) # Do the same checks with the optional fields present. env.RunTest("optionals.output", enc, ARGS = ['1']) env.RunTest("optionals.decout", [dec, "optionals.output"], ARGS = ['1']) env.Decode("optionals.output.decoded", ["optionals.output", "alltypes.proto"], MESSAGE='AllTypes') env.Encode("optionals.output.recoded", ["optionals.output.decoded", "alltypes.proto"], MESSAGE='AllTypes') env.Compare(["optionals.output", "optionals.output.recoded"]) # And for the _zero initializer env.RunTest("zeroinit.output", enc, ARGS = ['2']) env.RunTest("zeroinit.decout", [dec, "zeroinit.output"], ARGS = ['2']) env.Decode("zeroinit.output.decoded", ["zeroinit.output", "alltypes.proto"], MESSAGE='AllTypes') env.Encode("zeroinit.output.recoded", ["zeroinit.output.decoded", "alltypes.proto"], MESSAGE='AllTypes') env.Compare(["zeroinit.output", "zeroinit.output.recoded"]) nanopb-0.4.1/tests/alltypes/alltypes.options000066400000000000000000000003121361552131000212330ustar00rootroot00000000000000* max_size:16 * max_count:5 *.*fbytes fixed_length:true max_size:4 *.*farray fixed_count:true max_count:5 IntSizes.*int8 int_size:IS_8 IntSizes.*int16 int_size:IS_16 DescriptorSize8 descriptorsize:DS_8 nanopb-0.4.1/tests/alltypes/alltypes.proto000066400000000000000000000123621361552131000207130ustar00rootroot00000000000000syntax = "proto2"; // package name placeholder message SubMessage { required string substuff1 = 1 [default = "1"]; required int32 substuff2 = 2 [default = 2]; optional fixed32 substuff3 = 3 [default = 3]; } message EmptyMessage { } enum HugeEnum { Negative = -2147483647; /* protoc doesn't accept -2147483648 here */ Positive = 2147483647; } message Limits { required int32 int32_min = 1 [default = 2147483647]; required int32 int32_max = 2 [default = -2147483647]; required uint32 uint32_min = 3 [default = 4294967295]; required uint32 uint32_max = 4 [default = 0]; required int64 int64_min = 5 [default = 9223372036854775807]; required int64 int64_max = 6 [default = -9223372036854775807]; required uint64 uint64_min = 7 [default = 18446744073709551615]; required uint64 uint64_max = 8 [default = 0]; required HugeEnum enum_min = 9 [default = Positive]; required HugeEnum enum_max = 10 [default = Negative]; required int32 largetag = 65535 [default = 0]; } message IntSizes { required int32 req_int8 = 1 ; required uint32 req_uint8 = 2 ; required sint32 req_sint8 = 3 ; required int32 req_int16 = 4 ; required uint32 req_uint16 = 5 ; required sint32 req_sint16 = 6 ; } message DescriptorSize8 { required int32 first = 1; required int32 second = 22222; } enum MyEnum { Zero = 0; First = 1; Second = 2; Truth = 42; } message AllTypes { required int32 req_int32 = 1; required int64 req_int64 = 2; required uint32 req_uint32 = 3; required uint64 req_uint64 = 4; required sint32 req_sint32 = 5; required sint64 req_sint64 = 6; required bool req_bool = 7; required fixed32 req_fixed32 = 8; required sfixed32 req_sfixed32= 9; required float req_float = 10; required fixed64 req_fixed64 = 11; required sfixed64 req_sfixed64= 12; required double req_double = 13; required string req_string = 14; required bytes req_bytes = 15; required SubMessage req_submsg = 16; required MyEnum req_enum = 17; required EmptyMessage req_emptymsg = 18; required bytes req_fbytes = 19; repeated int32 rep_int32 = 21 [packed = true]; repeated int64 rep_int64 = 22 [packed = true]; repeated uint32 rep_uint32 = 23 [packed = true]; repeated uint64 rep_uint64 = 24 [packed = true]; repeated sint32 rep_sint32 = 25 [packed = true]; repeated sint64 rep_sint64 = 26 [packed = true]; repeated bool rep_bool = 27 [packed = true]; repeated fixed32 rep_fixed32 = 28 [packed = true]; repeated sfixed32 rep_sfixed32= 29 [packed = true]; repeated float rep_float = 30 [packed = true]; repeated fixed64 rep_fixed64 = 31 [packed = true]; repeated sfixed64 rep_sfixed64= 32 [packed = true]; repeated double rep_double = 33 [packed = true]; repeated string rep_string = 34; repeated bytes rep_bytes = 35; repeated SubMessage rep_submsg = 36; repeated MyEnum rep_enum = 37 [packed = true]; repeated EmptyMessage rep_emptymsg = 38; repeated bytes rep_fbytes = 39; repeated int32 rep_farray = 40 [packed = true]; optional int32 opt_int32 = 41 [default = 4041]; optional int64 opt_int64 = 42 [default = 4042]; optional uint32 opt_uint32 = 43 [default = 4043]; optional uint64 opt_uint64 = 44 [default = 4044]; optional sint32 opt_sint32 = 45 [default = 4045]; optional sint64 opt_sint64 = 46 [default = 4046]; optional bool opt_bool = 47 [default = false]; optional fixed32 opt_fixed32 = 48 [default = 4048]; optional sfixed32 opt_sfixed32= 49 [default = 4049]; optional float opt_float = 50 [default = 4050]; optional fixed64 opt_fixed64 = 51 [default = 4051]; optional sfixed64 opt_sfixed64= 52 [default = 4052]; optional double opt_double = 53 [default = 4053]; optional string opt_string = 54 [default = "4054"]; optional bytes opt_bytes = 55 [default = "\x34\x5C\x00\xff"]; optional SubMessage opt_submsg = 56; optional MyEnum opt_enum = 57 [default = Second]; optional EmptyMessage opt_emptymsg = 58; optional bytes opt_fbytes = 59 [default = "4059"]; oneof oneof { SubMessage oneof_msg1 = 60; EmptyMessage oneof_msg2 = 61; } // Check support for custom integer sizes required IntSizes req_intsizes = 96; // Check support for 8-word descriptors required DescriptorSize8 req_ds8 = 97; // Check that extreme integer values are handled correctly // Also checks support for 4-word descriptors required Limits req_limits = 98; // Just to make sure that the size of the fields has been calculated // properly, i.e. otherwise a bug in last field might not be detected. required int32 end = 999; extensions 200 to 255; } message TestExtension { extend AllTypes { optional TestExtension testextension = 250; } optional string strval = 1; } nanopb-0.4.1/tests/alltypes/decode_alltypes.c000066400000000000000000000333001361552131000212700ustar00rootroot00000000000000/* Tests the decoding of all types. * This is the counterpart of test_encode3. * Run e.g. ./test_encode3 | ./test_decode3 */ #include #include #include #include #include "alltypes.pb.h" #include "unittests.h" #include "test_helpers.h" /* This function is called once from main(), it handles the decoding and checks the fields. */ bool check_alltypes(pb_istream_t *stream, int mode) { int status = 0; /* Uses _init_default to just make sure that the macro works. */ AllTypes alltypes = AllTypes_init_default; /* Fill with garbage to better detect initialization errors */ memset(&alltypes, 0xAA, sizeof(alltypes)); alltypes.extensions = 0; if (!pb_decode(stream, AllTypes_fields, &alltypes)) return false; if (mode == 0 || mode == 1) { TEST(alltypes.req_int32 == -1001); TEST(alltypes.req_int64 == -1002); TEST(alltypes.req_uint32 == 1003); TEST(alltypes.req_uint64 == 1004); TEST(alltypes.req_sint32 == -1005); TEST(alltypes.req_sint64 == -1006); TEST(alltypes.req_bool == true); TEST(alltypes.req_fixed32 == 1008); TEST(alltypes.req_sfixed32 == -1009); TEST(alltypes.req_float == 1010.0f); TEST(alltypes.req_fixed64 == 1011); TEST(alltypes.req_sfixed64 == -1012); TEST(alltypes.req_double == 1013.0f); TEST(strcmp(alltypes.req_string, "1014") == 0); TEST(alltypes.req_bytes.size == 4); TEST(memcmp(alltypes.req_bytes.bytes, "1015", 4) == 0); TEST(strcmp(alltypes.req_submsg.substuff1, "1016") == 0); TEST(alltypes.req_submsg.substuff2 == 1016); TEST(alltypes.req_submsg.substuff3 == 3); TEST(alltypes.req_enum == MyEnum_Truth); TEST(memcmp(alltypes.req_fbytes, "1019", 4) == 0); TEST(alltypes.rep_int32_count == 5 && alltypes.rep_int32[4] == -2001 && alltypes.rep_int32[0] == 0); TEST(alltypes.rep_int64_count == 5 && alltypes.rep_int64[4] == -2002 && alltypes.rep_int64[0] == 0); TEST(alltypes.rep_uint32_count == 5 && alltypes.rep_uint32[4] == 2003 && alltypes.rep_uint32[0] == 0); TEST(alltypes.rep_uint64_count == 5 && alltypes.rep_uint64[4] == 2004 && alltypes.rep_uint64[0] == 0); TEST(alltypes.rep_sint32_count == 5 && alltypes.rep_sint32[4] == -2005 && alltypes.rep_sint32[0] == 0); TEST(alltypes.rep_sint64_count == 5 && alltypes.rep_sint64[4] == -2006 && alltypes.rep_sint64[0] == 0); TEST(alltypes.rep_bool_count == 5 && alltypes.rep_bool[4] == true && alltypes.rep_bool[0] == false); TEST(alltypes.rep_fixed32_count == 5 && alltypes.rep_fixed32[4] == 2008 && alltypes.rep_fixed32[0] == 0); TEST(alltypes.rep_sfixed32_count == 5 && alltypes.rep_sfixed32[4] == -2009 && alltypes.rep_sfixed32[0] == 0); TEST(alltypes.rep_float_count == 5 && alltypes.rep_float[4] == 2010.0f && alltypes.rep_float[0] == 0.0f); TEST(alltypes.rep_fixed64_count == 5 && alltypes.rep_fixed64[4] == 2011 && alltypes.rep_fixed64[0] == 0); TEST(alltypes.rep_sfixed64_count == 5 && alltypes.rep_sfixed64[4] == -2012 && alltypes.rep_sfixed64[0] == 0); TEST(alltypes.rep_double_count == 5 && alltypes.rep_double[4] == 2013.0 && alltypes.rep_double[0] == 0.0); TEST(alltypes.rep_string_count == 5 && strcmp(alltypes.rep_string[4], "2014") == 0 && alltypes.rep_string[0][0] == '\0'); TEST(alltypes.rep_bytes_count == 5 && alltypes.rep_bytes[4].size == 4 && alltypes.rep_bytes[0].size == 0); TEST(memcmp(alltypes.rep_bytes[4].bytes, "2015", 4) == 0); TEST(alltypes.rep_submsg_count == 5); TEST(strcmp(alltypes.rep_submsg[4].substuff1, "2016") == 0 && alltypes.rep_submsg[0].substuff1[0] == '\0'); TEST(alltypes.rep_submsg[4].substuff2 == 2016 && alltypes.rep_submsg[0].substuff2 == 0); TEST(alltypes.rep_submsg[4].substuff3 == 2016 && alltypes.rep_submsg[0].substuff3 == 3); TEST(alltypes.rep_enum_count == 5 && alltypes.rep_enum[4] == MyEnum_Truth && alltypes.rep_enum[0] == MyEnum_Zero); TEST(alltypes.rep_emptymsg_count == 5); TEST(alltypes.rep_fbytes_count == 5); TEST(alltypes.rep_fbytes[0][0] == 0 && alltypes.rep_fbytes[0][3] == 0); TEST(memcmp(alltypes.rep_fbytes[4], "2019", 4) == 0); TEST(alltypes.rep_farray[0] == 0 && alltypes.rep_farray[4] == 2040); TEST(alltypes.req_limits.int32_min == INT32_MIN); TEST(alltypes.req_limits.int32_max == INT32_MAX); TEST(alltypes.req_limits.uint32_min == 0); TEST(alltypes.req_limits.uint32_max == UINT32_MAX); TEST(alltypes.req_limits.int64_min == INT64_MIN); TEST(alltypes.req_limits.int64_max == INT64_MAX); TEST(alltypes.req_limits.uint64_min == 0); TEST(alltypes.req_limits.uint64_max == UINT64_MAX); TEST(alltypes.req_limits.enum_min == HugeEnum_Negative); TEST(alltypes.req_limits.enum_max == HugeEnum_Positive); TEST(alltypes.req_limits.largetag == 1001); TEST(alltypes.req_ds8.first == 9991); TEST(alltypes.req_ds8.second == 9992); TEST(alltypes.req_intsizes.req_int8 == -128); TEST(alltypes.req_intsizes.req_uint8 == 255); TEST(alltypes.req_intsizes.req_sint8 == -128); TEST(alltypes.req_intsizes.req_int16 == -32768); TEST(alltypes.req_intsizes.req_uint16 == 65535); TEST(alltypes.req_intsizes.req_sint16 == -32768); } if (mode == 0) { /* Expect default values */ TEST(alltypes.has_opt_int32 == false); TEST(alltypes.opt_int32 == 4041); TEST(alltypes.has_opt_int64 == false); TEST(alltypes.opt_int64 == 4042); TEST(alltypes.has_opt_uint32 == false); TEST(alltypes.opt_uint32 == 4043); TEST(alltypes.has_opt_uint64 == false); TEST(alltypes.opt_uint64 == 4044); TEST(alltypes.has_opt_sint32 == false); TEST(alltypes.opt_sint32 == 4045); TEST(alltypes.has_opt_sint64 == false); TEST(alltypes.opt_sint64 == 4046); TEST(alltypes.has_opt_bool == false); TEST(alltypes.opt_bool == false); TEST(alltypes.has_opt_fixed32 == false); TEST(alltypes.opt_fixed32 == 4048); TEST(alltypes.has_opt_sfixed32 == false); TEST(alltypes.opt_sfixed32 == 4049); TEST(alltypes.has_opt_float == false); TEST(alltypes.opt_float == 4050.0f); TEST(alltypes.has_opt_fixed64 == false); TEST(alltypes.opt_fixed64 == 4051); TEST(alltypes.has_opt_sfixed64 == false); TEST(alltypes.opt_sfixed64 == 4052); TEST(alltypes.has_opt_double == false); TEST(alltypes.opt_double == 4053.0); TEST(alltypes.has_opt_string == false); TEST(strcmp(alltypes.opt_string, "4054") == 0); TEST(alltypes.has_opt_bytes == false); TEST(alltypes.opt_bytes.size == 4); TEST(memcmp(alltypes.opt_bytes.bytes, "\x34\x5C\x00\xff", 4) == 0); TEST(alltypes.has_opt_submsg == false); TEST(strcmp(alltypes.opt_submsg.substuff1, "1") == 0); TEST(alltypes.opt_submsg.substuff2 == 2); TEST(alltypes.opt_submsg.substuff3 == 3); TEST(alltypes.has_opt_enum == false); TEST(alltypes.opt_enum == MyEnum_Second); TEST(alltypes.has_opt_emptymsg == false); TEST(alltypes.has_opt_fbytes == false); TEST(memcmp(alltypes.opt_fbytes, "4059", 4) == 0); TEST(alltypes.which_oneof == 0); } else if (mode == 1) { /* Expect filled-in values */ TEST(alltypes.has_opt_int32 == true); TEST(alltypes.opt_int32 == 3041); TEST(alltypes.has_opt_int64 == true); TEST(alltypes.opt_int64 == 3042); TEST(alltypes.has_opt_uint32 == true); TEST(alltypes.opt_uint32 == 3043); TEST(alltypes.has_opt_uint64 == true); TEST(alltypes.opt_uint64 == 3044); TEST(alltypes.has_opt_sint32 == true); TEST(alltypes.opt_sint32 == 3045); TEST(alltypes.has_opt_sint64 == true); TEST(alltypes.opt_sint64 == 3046); TEST(alltypes.has_opt_bool == true); TEST(alltypes.opt_bool == true); TEST(alltypes.has_opt_fixed32 == true); TEST(alltypes.opt_fixed32 == 3048); TEST(alltypes.has_opt_sfixed32 == true); TEST(alltypes.opt_sfixed32 == 3049); TEST(alltypes.has_opt_float == true); TEST(alltypes.opt_float == 3050.0f); TEST(alltypes.has_opt_fixed64 == true); TEST(alltypes.opt_fixed64 == 3051); TEST(alltypes.has_opt_sfixed64 == true); TEST(alltypes.opt_sfixed64 == 3052); TEST(alltypes.has_opt_double == true); TEST(alltypes.opt_double == 3053.0); TEST(alltypes.has_opt_string == true); TEST(strcmp(alltypes.opt_string, "3054") == 0); TEST(alltypes.has_opt_bytes == true); TEST(alltypes.opt_bytes.size == 4); TEST(memcmp(alltypes.opt_bytes.bytes, "3055", 4) == 0); TEST(alltypes.has_opt_submsg == true); TEST(strcmp(alltypes.opt_submsg.substuff1, "3056") == 0); TEST(alltypes.opt_submsg.substuff2 == 3056); TEST(alltypes.opt_submsg.substuff3 == 3); TEST(alltypes.has_opt_enum == true); TEST(alltypes.opt_enum == MyEnum_Truth); TEST(alltypes.has_opt_emptymsg == true); TEST(alltypes.has_opt_fbytes == true); TEST(memcmp(alltypes.opt_fbytes, "3059", 4) == 0); TEST(alltypes.which_oneof == AllTypes_oneof_msg1_tag); TEST(strcmp(alltypes.oneof.oneof_msg1.substuff1, "4059") == 0); TEST(alltypes.oneof.oneof_msg1.substuff2 == 4059); } else if (mode == 2) { /* Expect zero values */ TEST(alltypes.req_int32 == 0); TEST(alltypes.req_int64 == 0); TEST(alltypes.req_uint32 == 0); TEST(alltypes.req_uint64 == 0); TEST(alltypes.req_sint32 == 0); TEST(alltypes.req_sint64 == 0); TEST(alltypes.req_bool == false); TEST(alltypes.req_fixed32 == 0); TEST(alltypes.req_sfixed32 == 0); TEST(alltypes.req_float == 0.0f); TEST(alltypes.req_fixed64 == 0); TEST(alltypes.req_sfixed64 == 0); TEST(alltypes.req_double == 0.0f); TEST(strcmp(alltypes.req_string, "") == 0); TEST(alltypes.req_bytes.size == 0); TEST(strcmp(alltypes.req_submsg.substuff1, "") == 0); TEST(alltypes.req_submsg.substuff2 == 0); TEST(alltypes.req_enum == MyEnum_Zero); TEST(alltypes.rep_int32_count == 0); TEST(alltypes.rep_int64_count == 0); TEST(alltypes.rep_uint32_count == 0); TEST(alltypes.rep_uint64_count == 0); TEST(alltypes.rep_sint32_count == 0); TEST(alltypes.rep_sint64_count == 0); TEST(alltypes.rep_bool_count == 0); TEST(alltypes.rep_fixed32_count == 0); TEST(alltypes.rep_sfixed32_count == 0); TEST(alltypes.rep_float_count == 0); TEST(alltypes.rep_fixed64_count == 0); TEST(alltypes.rep_sfixed64_count == 0); TEST(alltypes.rep_double_count == 0); TEST(alltypes.rep_string_count == 0); TEST(alltypes.rep_bytes_count == 0); TEST(alltypes.rep_submsg_count == 0); TEST(alltypes.rep_enum_count == 0); TEST(alltypes.rep_emptymsg_count == 0); TEST(alltypes.rep_fbytes_count == 0); TEST(alltypes.rep_farray[0] == 0 && alltypes.rep_farray[4] == 0); TEST(alltypes.has_opt_int32 == false); TEST(alltypes.has_opt_int64 == false); TEST(alltypes.has_opt_uint32 == false); TEST(alltypes.has_opt_uint64 == false); TEST(alltypes.has_opt_sint32 == false); TEST(alltypes.has_opt_sint64 == false); TEST(alltypes.has_opt_bool == false); TEST(alltypes.has_opt_fixed32 == false); TEST(alltypes.has_opt_sfixed32 == false); TEST(alltypes.has_opt_float == false); TEST(alltypes.has_opt_fixed64 == false); TEST(alltypes.has_opt_sfixed64 == false); TEST(alltypes.has_opt_double == false); TEST(alltypes.has_opt_string == false); TEST(alltypes.has_opt_bytes == false); TEST(alltypes.has_opt_submsg == false); TEST(alltypes.has_opt_enum == false); TEST(alltypes.has_opt_emptymsg == false); TEST(alltypes.has_opt_fbytes == false); TEST(alltypes.which_oneof == 0); } TEST(alltypes.end == 1099); return status == 0; } #ifdef __cplusplus extern "C" #endif int main(int argc, char **argv) { uint8_t buffer[1024]; size_t count; pb_istream_t stream; /* Whether to expect the optional values or the default values. */ int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Read the data into buffer */ SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); /* Construct a pb_istream_t for reading from the buffer */ stream = pb_istream_from_buffer(buffer, count); /* Decode and print out the stuff */ if (!check_alltypes(&stream, mode)) { printf("Parsing failed: %s\n", PB_GET_ERROR(&stream)); return 1; } else { return 0; } } nanopb-0.4.1/tests/alltypes/encode_alltypes.c000066400000000000000000000146131361552131000213100ustar00rootroot00000000000000/* Attempts to test all the datatypes supported by ProtoBuf. */ #include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" #ifdef __cplusplus extern "C" #endif int main(int argc, char **argv) { int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Initialize the structure with constants */ AllTypes alltypes = AllTypes_init_zero; if (mode == 0 || mode == 1) { alltypes.req_int32 = -1001; alltypes.req_int64 = -1002; alltypes.req_uint32 = 1003; alltypes.req_uint64 = 1004; alltypes.req_sint32 = -1005; alltypes.req_sint64 = -1006; alltypes.req_bool = true; alltypes.req_fixed32 = 1008; alltypes.req_sfixed32 = -1009; alltypes.req_float = 1010.0f; alltypes.req_fixed64 = 1011; alltypes.req_sfixed64 = -1012; alltypes.req_double = 1013.0; strcpy(alltypes.req_string, "1014"); alltypes.req_bytes.size = 4; memcpy(alltypes.req_bytes.bytes, "1015", 4); strcpy(alltypes.req_submsg.substuff1, "1016"); alltypes.req_submsg.substuff2 = 1016; alltypes.req_enum = MyEnum_Truth; memcpy(alltypes.req_fbytes, "1019", 4); alltypes.rep_int32_count = 5; alltypes.rep_int32[4] = -2001; alltypes.rep_int64_count = 5; alltypes.rep_int64[4] = -2002; alltypes.rep_uint32_count = 5; alltypes.rep_uint32[4] = 2003; alltypes.rep_uint64_count = 5; alltypes.rep_uint64[4] = 2004; alltypes.rep_sint32_count = 5; alltypes.rep_sint32[4] = -2005; alltypes.rep_sint64_count = 5; alltypes.rep_sint64[4] = -2006; alltypes.rep_bool_count = 5; alltypes.rep_bool[4] = true; alltypes.rep_fixed32_count = 5; alltypes.rep_fixed32[4] = 2008; alltypes.rep_sfixed32_count = 5; alltypes.rep_sfixed32[4] = -2009; alltypes.rep_float_count = 5; alltypes.rep_float[4] = 2010.0f; alltypes.rep_fixed64_count = 5; alltypes.rep_fixed64[4] = 2011; alltypes.rep_sfixed64_count = 5; alltypes.rep_sfixed64[4] = -2012; alltypes.rep_double_count = 5; alltypes.rep_double[4] = 2013.0; alltypes.rep_string_count = 5; strcpy(alltypes.rep_string[4], "2014"); alltypes.rep_bytes_count = 5; alltypes.rep_bytes[4].size = 4; memcpy(alltypes.rep_bytes[4].bytes, "2015", 4); alltypes.rep_submsg_count = 5; strcpy(alltypes.rep_submsg[4].substuff1, "2016"); alltypes.rep_submsg[4].substuff2 = 2016; alltypes.rep_submsg[4].has_substuff3 = true; alltypes.rep_submsg[4].substuff3 = 2016; alltypes.rep_enum_count = 5; alltypes.rep_enum[4] = MyEnum_Truth; alltypes.rep_emptymsg_count = 5; alltypes.rep_fbytes_count = 5; memcpy(alltypes.rep_fbytes[4], "2019", 4); alltypes.rep_farray[4] = 2040; alltypes.req_limits.int32_min = INT32_MIN; alltypes.req_limits.int32_max = INT32_MAX; alltypes.req_limits.uint32_min = 0; alltypes.req_limits.uint32_max = UINT32_MAX; alltypes.req_limits.int64_min = INT64_MIN; alltypes.req_limits.int64_max = INT64_MAX; alltypes.req_limits.uint64_min = 0; alltypes.req_limits.uint64_max = UINT64_MAX; alltypes.req_limits.enum_min = HugeEnum_Negative; alltypes.req_limits.enum_max = HugeEnum_Positive; alltypes.req_limits.largetag = 1001; alltypes.req_ds8.first = 9991; alltypes.req_ds8.second = 9992; alltypes.req_intsizes.req_int8 = -128; alltypes.req_intsizes.req_uint8 = 255; alltypes.req_intsizes.req_sint8 = -128; alltypes.req_intsizes.req_int16 = -32768; alltypes.req_intsizes.req_uint16 = 65535; alltypes.req_intsizes.req_sint16 = -32768; } if (mode == 1) { /* Fill in values for optional fields */ alltypes.has_opt_int32 = true; alltypes.opt_int32 = 3041; alltypes.has_opt_int64 = true; alltypes.opt_int64 = 3042; alltypes.has_opt_uint32 = true; alltypes.opt_uint32 = 3043; alltypes.has_opt_uint64 = true; alltypes.opt_uint64 = 3044; alltypes.has_opt_sint32 = true; alltypes.opt_sint32 = 3045; alltypes.has_opt_sint64 = true; alltypes.opt_sint64 = 3046; alltypes.has_opt_bool = true; alltypes.opt_bool = true; alltypes.has_opt_fixed32 = true; alltypes.opt_fixed32 = 3048; alltypes.has_opt_sfixed32 = true; alltypes.opt_sfixed32 = 3049; alltypes.has_opt_float = true; alltypes.opt_float = 3050.0f; alltypes.has_opt_fixed64 = true; alltypes.opt_fixed64 = 3051; alltypes.has_opt_sfixed64 = true; alltypes.opt_sfixed64 = 3052; alltypes.has_opt_double = true; alltypes.opt_double = 3053.0; alltypes.has_opt_string = true; strcpy(alltypes.opt_string, "3054"); alltypes.has_opt_bytes = true; alltypes.opt_bytes.size = 4; memcpy(alltypes.opt_bytes.bytes, "3055", 4); alltypes.has_opt_submsg = true; strcpy(alltypes.opt_submsg.substuff1, "3056"); alltypes.opt_submsg.substuff2 = 3056; alltypes.has_opt_enum = true; alltypes.opt_enum = MyEnum_Truth; alltypes.has_opt_emptymsg = true; alltypes.has_opt_fbytes = true; memcpy(alltypes.opt_fbytes, "3059", 4); alltypes.which_oneof = AllTypes_oneof_msg1_tag; strcpy(alltypes.oneof.oneof_msg1.substuff1, "4059"); alltypes.oneof.oneof_msg1.substuff2 = 4059; } alltypes.end = 1099; { uint8_t buffer[AllTypes_size]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Now encode it and check if we succeeded. */ if (pb_encode(&stream, AllTypes_fields, &alltypes)) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; /* Success */ } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; /* Failure */ } } } nanopb-0.4.1/tests/alltypes_callback/000077500000000000000000000000001361552131000176015ustar00rootroot00000000000000nanopb-0.4.1/tests/alltypes_callback/SConscript000066400000000000000000000026621361552131000216210ustar00rootroot00000000000000# Test the AllTypes encoding & decoding using callbacks for all fields. Import("env", "malloc_env") c = Copy("$TARGET", "$SOURCE") env.Command("alltypes.proto", "#alltypes/alltypes.proto", c) env.NanopbProto(["alltypes", "alltypes.options"]) enc = env.Program(["encode_alltypes_callback.c", "alltypes.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) dec = env.Program(["decode_alltypes_callback.c", "alltypes.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) refdec = "$BUILD/alltypes/decode_alltypes$PROGSUFFIX" # Encode and compare results env.RunTest(enc) env.RunTest("decode_alltypes.output", [refdec, "encode_alltypes_callback.output"]) env.RunTest("decode_alltypes_callback.output", [dec, "encode_alltypes_callback.output"]) # Do the same thing with the optional fields present env.RunTest("optionals.output", enc, ARGS = ['1']) env.RunTest("optionals.refdecout", [refdec, "optionals.output"], ARGS = ['1']) env.RunTest("optionals.decout", [dec, "optionals.output"], ARGS = ['1']) # Try with malloc support also mallocbin1 = malloc_env.Object("decode_with_malloc.o", "decode_alltypes_callback.c") mallocbin2 = malloc_env.Object("alltypes_malloc.pb.o", "alltypes.pb.c") mallocdec = malloc_env.Program("decode_with_malloc", [mallocbin1, mallocbin2, "$COMMON/pb_decode_with_malloc.o", "$COMMON/pb_common_with_malloc.o", "$COMMON/malloc_wrappers.o"]) env.RunTest("decode_with_malloc.output", [mallocdec, "encode_alltypes_callback.output"]) nanopb-0.4.1/tests/alltypes_callback/alltypes.options000066400000000000000000000005011361552131000230470ustar00rootroot00000000000000# Generate all fields as callbacks. AllTypes.* type:FT_CALLBACK SubMessage.substuff1 max_size:16 AllTypes.oneof no_unions:true DescriptorSize8 descriptorsize:DS_8 # With FT_CALLBACK, these options should get ignored *.*fbytes fixed_length:true max_size:4 *.*farray fixed_count:true max_count:5 nanopb-0.4.1/tests/alltypes_callback/decode_alltypes_callback.c000066400000000000000000000361711361552131000247310ustar00rootroot00000000000000/* Attempts to test all the datatypes supported by ProtoBuf when used as callback fields. * Note that normally there would be no reason to use callback fields for this, * because each encoder defined here only gives a single field. */ #include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" #define TEST(x) if (!(x)) { \ printf("Test %s failed (in field %d).\n", #x, field->tag); \ return false; \ } static bool read_varint(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint64_t value; if (!pb_decode_varint(stream, &value)) return false; TEST((int64_t)value == (intptr_t)*arg); return true; } static bool read_svarint(pb_istream_t *stream, const pb_field_t *field, void **arg) { int64_t value; if (!pb_decode_svarint(stream, &value)) return false; TEST(value == (intptr_t)*arg); return true; } static bool read_fixed32(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint32_t value; if (!pb_decode_fixed32(stream, &value)) return false; TEST(value == *(uint32_t*)*arg); return true; } static bool read_fixed64(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint64_t value; if (!pb_decode_fixed64(stream, &value)) return false; TEST(value == *(uint64_t*)*arg); return true; } static bool read_double(pb_istream_t *stream, const pb_field_t *field, void **arg) { #ifdef PB_CONVERT_DOUBLE_FLOAT if (sizeof(double) == sizeof(float)) { float value; if (!pb_decode_double_as_float(stream, &value)) return false; TEST(memcmp(&value, *arg, sizeof(float)) == 0); return true; } #endif uint64_t value; if (!pb_decode_fixed64(stream, &value)) return false; TEST(value == *(uint64_t*)*arg); return true; } static bool read_string(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint8_t buf[16] = {0}; size_t len = stream->bytes_left; if (len > sizeof(buf) - 1 || !pb_read(stream, buf, len)) return false; TEST(strcmp((char*)buf, *arg) == 0); return true; } static bool read_submsg(pb_istream_t *stream, const pb_field_t *field, void **arg) { SubMessage submsg = {""}; SubMessage *ref = *arg; if (!pb_decode(stream, SubMessage_fields, &submsg)) return false; TEST(strcmp(submsg.substuff1, ref->substuff1) == 0); TEST(submsg.substuff2 == ref->substuff2); TEST(submsg.has_substuff3 == ref->has_substuff3); TEST(submsg.substuff3 == ref->substuff3); return true; } static bool read_emptymsg(pb_istream_t *stream, const pb_field_t *field, void **arg) { EmptyMessage emptymsg = {0}; return pb_decode(stream, EmptyMessage_fields, &emptymsg); } static bool read_repeated_varint(pb_istream_t *stream, const pb_field_t *field, void **arg) { int32_t** expected = (int32_t**)arg; uint64_t value; if (!pb_decode_varint(stream, &value)) return false; TEST(*(*expected)++ == value); return true; } static bool read_repeated_svarint(pb_istream_t *stream, const pb_field_t *field, void **arg) { int32_t** expected = (int32_t**)arg; int64_t value; if (!pb_decode_svarint(stream, &value)) return false; TEST(*(*expected)++ == value); return true; } static bool read_repeated_fixed32(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint32_t** expected = (uint32_t**)arg; uint32_t value; if (!pb_decode_fixed32(stream, &value)) return false; TEST(*(*expected)++ == value); return true; } static bool read_repeated_fixed64(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint64_t** expected = (uint64_t**)arg; uint64_t value; if (!pb_decode_fixed64(stream, &value)) return false; TEST(*(*expected)++ == value); return true; } static bool read_repeated_double(pb_istream_t *stream, const pb_field_t *field, void **arg) { #ifdef PB_CONVERT_DOUBLE_FLOAT if (sizeof(double) == sizeof(float)) { float** expectedf = (float**)arg; float value; if (!pb_decode_double_as_float(stream, &value)) return false; TEST(memcmp(&value, (*expectedf)++, sizeof(float)) == 0); return true; } #endif uint64_t** expected = (uint64_t**)arg; uint64_t value; if (!pb_decode_fixed64(stream, &value)) return false; TEST(*(*expected)++ == value); return true; } static bool read_repeated_string(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint8_t*** expected = (uint8_t***)arg; uint8_t buf[16] = {0}; size_t len = stream->bytes_left; if (len > sizeof(buf) - 1 || !pb_read(stream, buf, len)) return false; TEST(strcmp((char*)*(*expected)++, (char*)buf) == 0); return true; } static bool read_repeated_submsg(pb_istream_t *stream, const pb_field_t *field, void **arg) { SubMessage** expected = (SubMessage**)arg; SubMessage submsg = {""}; if (!pb_decode(stream, SubMessage_fields, &submsg)) return false; TEST(strcmp(submsg.substuff1, (*expected)->substuff1) == 0); TEST(submsg.substuff2 == (*expected)->substuff2); TEST(submsg.has_substuff3 == (*expected)->has_substuff3); TEST(submsg.substuff3 == (*expected)->substuff3); (*expected)++; return true; } static bool read_limits(pb_istream_t *stream, const pb_field_t *field, void **arg) { Limits decoded = {0}; if (!pb_decode(stream, Limits_fields, &decoded)) return false; TEST(decoded.int32_min == INT32_MIN); TEST(decoded.int32_max == INT32_MAX); TEST(decoded.uint32_min == 0); TEST(decoded.uint32_max == UINT32_MAX); TEST(decoded.int64_min == INT64_MIN); TEST(decoded.int64_max == INT64_MAX); TEST(decoded.uint64_min == 0); TEST(decoded.uint64_max == UINT64_MAX); TEST(decoded.enum_min == HugeEnum_Negative); TEST(decoded.enum_max == HugeEnum_Positive); TEST(decoded.largetag == 1001); return true; } /* This function is called once from main(), it handles the decoding and checks the fields. */ bool check_alltypes(pb_istream_t *stream, int mode) { /* Values for use from callbacks through pointers. */ bool status; uint32_t req_fixed32 = 1008; int32_t req_sfixed32 = -1009; float req_float = 1010.0f; uint64_t req_fixed64 = 1011; int64_t req_sfixed64 = -1012; double req_double = 1013.0; SubMessage req_submsg = {"1016", 1016, false, 3}; int32_t rep_int32[5] = {0, 0, 0, 0, -2001}; int32_t rep_int64[5] = {0, 0, 0, 0, -2002}; int32_t rep_uint32[5] = {0, 0, 0, 0, 2003}; int32_t rep_uint64[5] = {0, 0, 0, 0, 2004}; int32_t rep_sint32[5] = {0, 0, 0, 0, -2005}; int32_t rep_sint64[5] = {0, 0, 0, 0, -2006}; int32_t rep_bool[5] = {false, false, false, false, true}; uint32_t rep_fixed32[5] = {0, 0, 0, 0, 2008}; int32_t rep_sfixed32[5] = {0, 0, 0, 0, -2009}; float rep_float[5] = {0, 0, 0, 0, 2010.0f}; uint64_t rep_fixed64[5] = {0, 0, 0, 0, 2011}; int64_t rep_sfixed64[5] = {0, 0, 0, 0, -2012}; double rep_double[5] = {0, 0, 0, 0, 2013.0}; char* rep_string[5] = {"", "", "", "", "2014"}; char* rep_bytes[5] = {"", "", "", "", "2015"}; SubMessage rep_submsg[5] = {{"", 0, 0, 3}, {"", 0, 0, 3}, {"", 0, 0, 3}, {"", 0, 0, 3}, {"2016", 2016, true, 2016}}; int32_t rep_enum[5] = {0, 0, 0, 0, MyEnum_Truth}; uint32_t opt_fixed32 = 3048; int32_t opt_sfixed32 = 3049; float opt_float = 3050.0f; uint64_t opt_fixed64 = 3051; int64_t opt_sfixed64 = 3052; double opt_double = 3053.0f; SubMessage opt_submsg = {"3056", 3056, false, 3}; SubMessage oneof_msg1 = {"4059", 4059, false, 3}; /* Bind callbacks for required fields */ AllTypes alltypes = AllTypes_init_zero; alltypes.req_int32.funcs.decode = &read_varint; alltypes.req_int32.arg = (void*)-1001; alltypes.req_int64.funcs.decode = &read_varint; alltypes.req_int64.arg = (void*)-1002; alltypes.req_uint32.funcs.decode = &read_varint; alltypes.req_uint32.arg = (void*)1003; alltypes.req_uint32.funcs.decode = &read_varint; alltypes.req_uint32.arg = (void*)1003; alltypes.req_uint64.funcs.decode = &read_varint; alltypes.req_uint64.arg = (void*)1004; alltypes.req_sint32.funcs.decode = &read_svarint; alltypes.req_sint32.arg = (void*)-1005; alltypes.req_sint64.funcs.decode = &read_svarint; alltypes.req_sint64.arg = (void*)-1006; alltypes.req_bool.funcs.decode = &read_varint; alltypes.req_bool.arg = (void*)true; alltypes.req_fixed32.funcs.decode = &read_fixed32; alltypes.req_fixed32.arg = &req_fixed32; alltypes.req_sfixed32.funcs.decode = &read_fixed32; alltypes.req_sfixed32.arg = &req_sfixed32; alltypes.req_float.funcs.decode = &read_fixed32; alltypes.req_float.arg = &req_float; alltypes.req_fixed64.funcs.decode = &read_fixed64; alltypes.req_fixed64.arg = &req_fixed64; alltypes.req_sfixed64.funcs.decode = &read_fixed64; alltypes.req_sfixed64.arg = &req_sfixed64; alltypes.req_double.funcs.decode = &read_double; alltypes.req_double.arg = &req_double; alltypes.req_string.funcs.decode = &read_string; alltypes.req_string.arg = "1014"; alltypes.req_bytes.funcs.decode = &read_string; alltypes.req_bytes.arg = "1015"; alltypes.req_submsg.funcs.decode = &read_submsg; alltypes.req_submsg.arg = &req_submsg; alltypes.req_enum.funcs.decode = &read_varint; alltypes.req_enum.arg = (void*)MyEnum_Truth; alltypes.req_emptymsg.funcs.decode = &read_emptymsg; /* Bind callbacks for repeated fields */ alltypes.rep_int32.funcs.decode = &read_repeated_varint; alltypes.rep_int32.arg = rep_int32; alltypes.rep_int64.funcs.decode = &read_repeated_varint; alltypes.rep_int64.arg = rep_int64; alltypes.rep_uint32.funcs.decode = &read_repeated_varint; alltypes.rep_uint32.arg = rep_uint32; alltypes.rep_uint64.funcs.decode = &read_repeated_varint; alltypes.rep_uint64.arg = rep_uint64; alltypes.rep_sint32.funcs.decode = &read_repeated_svarint; alltypes.rep_sint32.arg = rep_sint32; alltypes.rep_sint64.funcs.decode = &read_repeated_svarint; alltypes.rep_sint64.arg = rep_sint64; alltypes.rep_bool.funcs.decode = &read_repeated_varint; alltypes.rep_bool.arg = rep_bool; alltypes.rep_fixed32.funcs.decode = &read_repeated_fixed32; alltypes.rep_fixed32.arg = rep_fixed32; alltypes.rep_sfixed32.funcs.decode = &read_repeated_fixed32; alltypes.rep_sfixed32.arg = rep_sfixed32; alltypes.rep_float.funcs.decode = &read_repeated_fixed32; alltypes.rep_float.arg = rep_float; alltypes.rep_fixed64.funcs.decode = &read_repeated_fixed64; alltypes.rep_fixed64.arg = rep_fixed64; alltypes.rep_sfixed64.funcs.decode = &read_repeated_fixed64; alltypes.rep_sfixed64.arg = rep_sfixed64; alltypes.rep_double.funcs.decode = &read_repeated_double; alltypes.rep_double.arg = rep_double; alltypes.rep_string.funcs.decode = &read_repeated_string; alltypes.rep_string.arg = rep_string; alltypes.rep_bytes.funcs.decode = &read_repeated_string; alltypes.rep_bytes.arg = rep_bytes; alltypes.rep_submsg.funcs.decode = &read_repeated_submsg; alltypes.rep_submsg.arg = rep_submsg; alltypes.rep_enum.funcs.decode = &read_repeated_varint; alltypes.rep_enum.arg = rep_enum; alltypes.rep_emptymsg.funcs.decode = &read_emptymsg; alltypes.req_limits.funcs.decode = &read_limits; alltypes.end.funcs.decode = &read_varint; alltypes.end.arg = (void*)1099; /* Bind callbacks for optional fields */ if (mode == 1) { alltypes.opt_int32.funcs.decode = &read_varint; alltypes.opt_int32.arg = (void*)3041; alltypes.opt_int64.funcs.decode = &read_varint; alltypes.opt_int64.arg = (void*)3042; alltypes.opt_uint32.funcs.decode = &read_varint; alltypes.opt_uint32.arg = (void*)3043; alltypes.opt_uint64.funcs.decode = &read_varint; alltypes.opt_uint64.arg = (void*)3044; alltypes.opt_sint32.funcs.decode = &read_svarint; alltypes.opt_sint32.arg = (void*)3045; alltypes.opt_sint64.funcs.decode = &read_svarint; alltypes.opt_sint64.arg = (void*)3046; alltypes.opt_bool.funcs.decode = &read_varint; alltypes.opt_bool.arg = (void*)true; alltypes.opt_fixed32.funcs.decode = &read_fixed32; alltypes.opt_fixed32.arg = &opt_fixed32; alltypes.opt_sfixed32.funcs.decode = &read_fixed32; alltypes.opt_sfixed32.arg = &opt_sfixed32; alltypes.opt_float.funcs.decode = &read_fixed32; alltypes.opt_float.arg = &opt_float; alltypes.opt_fixed64.funcs.decode = &read_fixed64; alltypes.opt_fixed64.arg = &opt_fixed64; alltypes.opt_sfixed64.funcs.decode = &read_fixed64; alltypes.opt_sfixed64.arg = &opt_sfixed64; alltypes.opt_double.funcs.decode = &read_double; alltypes.opt_double.arg = &opt_double; alltypes.opt_string.funcs.decode = &read_string; alltypes.opt_string.arg = "3054"; alltypes.opt_bytes.funcs.decode = &read_string; alltypes.opt_bytes.arg = "3055"; alltypes.opt_submsg.funcs.decode = &read_submsg; alltypes.opt_submsg.arg = &opt_submsg; alltypes.opt_enum.funcs.decode = &read_varint; alltypes.opt_enum.arg = (void*)MyEnum_Truth; alltypes.opt_emptymsg.funcs.decode = &read_emptymsg; alltypes.oneof_msg1.funcs.decode = &read_submsg; alltypes.oneof_msg1.arg = &oneof_msg1; } status = pb_decode(stream, AllTypes_fields, &alltypes); #ifdef PB_ENABLE_MALLOC /* Just to check for any interference between pb_release() and callback fields */ pb_release(AllTypes_fields, &alltypes); #endif return status; } int main(int argc, char **argv) { uint8_t buffer[1024]; size_t count; pb_istream_t stream; /* Whether to expect the optional values or the default values. */ int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Read the data into buffer */ SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); /* Construct a pb_istream_t for reading from the buffer */ stream = pb_istream_from_buffer(buffer, count); /* Decode and print out the stuff */ if (!check_alltypes(&stream, mode)) { printf("Parsing failed: %s\n", PB_GET_ERROR(&stream)); return 1; } else { return 0; } } nanopb-0.4.1/tests/alltypes_callback/encode_alltypes_callback.c000066400000000000000000000417041361552131000247410ustar00rootroot00000000000000/* Attempts to test all the datatypes supported by ProtoBuf when used as callback fields. * Note that normally there would be no reason to use callback fields for this, * because each encoder defined here only gives a single field. */ #include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" static bool write_varint(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, (intptr_t)*arg); } static bool write_svarint(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_svarint(stream, (intptr_t)*arg); } static bool write_fixed32(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_fixed32(stream, *arg); } static bool write_fixed64(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_fixed64(stream, *arg); } static bool write_double(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { #ifdef PB_CONVERT_DOUBLE_FLOAT if (sizeof(double) == sizeof(float)) return pb_encode_tag_for_field(stream, field) && pb_encode_float_as_double(stream, *(float*)*arg); #endif return pb_encode_tag_for_field(stream, field) && pb_encode_fixed64(stream, *arg); } static bool write_string(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, *arg, strlen(*arg)); } static bool write_submsg(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, SubMessage_fields, *arg); } static bool write_emptymsg(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { EmptyMessage emptymsg = {0}; return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, EmptyMessage_fields, &emptymsg); } static bool write_repeated_varint(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, (intptr_t)*arg); } static bool write_repeated_svarint(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_svarint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_svarint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_svarint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_svarint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_svarint(stream, (intptr_t)*arg); } static bool write_repeated_fixed32(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { uint32_t dummy = 0; /* Make it a packed field */ return pb_encode_tag(stream, PB_WT_STRING, field->tag) && pb_encode_varint(stream, 5 * 4) && /* Number of bytes */ pb_encode_fixed32(stream, &dummy) && pb_encode_fixed32(stream, &dummy) && pb_encode_fixed32(stream, &dummy) && pb_encode_fixed32(stream, &dummy) && pb_encode_fixed32(stream, *arg); } static bool write_repeated_fixed64(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { uint64_t dummy = 0; /* Make it a packed field */ return pb_encode_tag(stream, PB_WT_STRING, field->tag) && pb_encode_varint(stream, 5 * 8) && /* Number of bytes */ pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, *arg); } static bool write_repeated_double(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { uint64_t dummy = 0; #ifdef PB_CONVERT_DOUBLE_FLOAT if (sizeof(double) == sizeof(float)) return pb_encode_tag(stream, PB_WT_STRING, field->tag) && pb_encode_varint(stream, 5 * 8) && /* Number of bytes */ pb_encode_float_as_double(stream, 0.0f) && pb_encode_float_as_double(stream, 0.0f) && pb_encode_float_as_double(stream, 0.0f) && pb_encode_float_as_double(stream, 0.0f) && pb_encode_float_as_double(stream, *(float*)*arg); #endif /* Make it a packed field */ return pb_encode_tag(stream, PB_WT_STRING, field->tag) && pb_encode_varint(stream, 5 * 8) && /* Number of bytes */ pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, *arg); } static bool write_repeated_string(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, 0, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, 0, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, 0, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, 0, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, *arg, strlen(*arg)); } static bool write_repeated_submsg(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { SubMessage dummy = {""}; return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, SubMessage_fields, &dummy) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, SubMessage_fields, &dummy) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, SubMessage_fields, &dummy) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, SubMessage_fields, &dummy) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, SubMessage_fields, *arg); } static bool write_limits(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { Limits limits = {0}; limits.int32_min = INT32_MIN; limits.int32_max = INT32_MAX; limits.uint32_min = 0; limits.uint32_max = UINT32_MAX; limits.int64_min = INT64_MIN; limits.int64_max = INT64_MAX; limits.uint64_min = 0; limits.uint64_max = UINT64_MAX; limits.enum_min = HugeEnum_Negative; limits.enum_max = HugeEnum_Positive; limits.largetag = 1001; return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, Limits_fields, &limits); } static bool write_ds8(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { DescriptorSize8 ds8 = {9991,9992}; return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, DescriptorSize8_fields, &ds8); } static bool write_intsizes(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { IntSizes intsizes = {-128, 255, -128, -32768, 65535, -32768}; return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, IntSizes_fields, &intsizes); } static bool write_repeated_emptymsg(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { EmptyMessage emptymsg = {0}; return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, EmptyMessage_fields, &emptymsg) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, EmptyMessage_fields, &emptymsg) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, EmptyMessage_fields, &emptymsg) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, EmptyMessage_fields, &emptymsg) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, EmptyMessage_fields, &emptymsg); } int main(int argc, char **argv) { int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Values for use from callbacks through pointers. */ uint32_t req_fixed32 = 1008; int32_t req_sfixed32 = -1009; float req_float = 1010.0f; uint64_t req_fixed64 = 1011; int64_t req_sfixed64 = -1012; double req_double = 1013.0; SubMessage req_submsg = {"1016", 1016}; uint32_t rep_fixed32 = 2008; int32_t rep_sfixed32 = -2009; float rep_float = 2010.0f; uint64_t rep_fixed64 = 2011; int64_t rep_sfixed64 = -2012; double rep_double = 2013.0; SubMessage rep_submsg = {"2016", 2016, true, 2016}; uint32_t opt_fixed32 = 3048; int32_t opt_sfixed32 = 3049; float opt_float = 3050.0f; uint64_t opt_fixed64 = 3051; int64_t opt_sfixed64 = 3052; double opt_double = 3053.0f; SubMessage opt_submsg = {"3056", 3056}; SubMessage oneof_msg1 = {"4059", 4059}; /* Bind callbacks for required fields */ AllTypes alltypes = {{{0}}}; alltypes.req_int32.funcs.encode = &write_varint; alltypes.req_int32.arg = (void*)-1001; alltypes.req_int64.funcs.encode = &write_varint; alltypes.req_int64.arg = (void*)-1002; alltypes.req_uint32.funcs.encode = &write_varint; alltypes.req_uint32.arg = (void*)1003; alltypes.req_uint32.funcs.encode = &write_varint; alltypes.req_uint32.arg = (void*)1003; alltypes.req_uint64.funcs.encode = &write_varint; alltypes.req_uint64.arg = (void*)1004; alltypes.req_sint32.funcs.encode = &write_svarint; alltypes.req_sint32.arg = (void*)-1005; alltypes.req_sint64.funcs.encode = &write_svarint; alltypes.req_sint64.arg = (void*)-1006; alltypes.req_bool.funcs.encode = &write_varint; alltypes.req_bool.arg = (void*)true; alltypes.req_fixed32.funcs.encode = &write_fixed32; alltypes.req_fixed32.arg = &req_fixed32; alltypes.req_sfixed32.funcs.encode = &write_fixed32; alltypes.req_sfixed32.arg = &req_sfixed32; alltypes.req_float.funcs.encode = &write_fixed32; alltypes.req_float.arg = &req_float; alltypes.req_fixed64.funcs.encode = &write_fixed64; alltypes.req_fixed64.arg = &req_fixed64; alltypes.req_sfixed64.funcs.encode = &write_fixed64; alltypes.req_sfixed64.arg = &req_sfixed64; alltypes.req_double.funcs.encode = &write_double; alltypes.req_double.arg = &req_double; alltypes.req_string.funcs.encode = &write_string; alltypes.req_string.arg = "1014"; alltypes.req_bytes.funcs.encode = &write_string; alltypes.req_bytes.arg = "1015"; alltypes.req_submsg.funcs.encode = &write_submsg; alltypes.req_submsg.arg = &req_submsg; alltypes.req_enum.funcs.encode = &write_varint; alltypes.req_enum.arg = (void*)MyEnum_Truth; alltypes.req_emptymsg.funcs.encode = &write_emptymsg; alltypes.req_fbytes.funcs.encode = &write_string; alltypes.req_fbytes.arg = "1019"; /* Bind callbacks for repeated fields */ alltypes.rep_int32.funcs.encode = &write_repeated_varint; alltypes.rep_int32.arg = (void*)-2001; alltypes.rep_int64.funcs.encode = &write_repeated_varint; alltypes.rep_int64.arg = (void*)-2002; alltypes.rep_uint32.funcs.encode = &write_repeated_varint; alltypes.rep_uint32.arg = (void*)2003; alltypes.rep_uint64.funcs.encode = &write_repeated_varint; alltypes.rep_uint64.arg = (void*)2004; alltypes.rep_sint32.funcs.encode = &write_repeated_svarint; alltypes.rep_sint32.arg = (void*)-2005; alltypes.rep_sint64.funcs.encode = &write_repeated_svarint; alltypes.rep_sint64.arg = (void*)-2006; alltypes.rep_bool.funcs.encode = &write_repeated_varint; alltypes.rep_bool.arg = (void*)true; alltypes.rep_fixed32.funcs.encode = &write_repeated_fixed32; alltypes.rep_fixed32.arg = &rep_fixed32; alltypes.rep_sfixed32.funcs.encode = &write_repeated_fixed32; alltypes.rep_sfixed32.arg = &rep_sfixed32; alltypes.rep_float.funcs.encode = &write_repeated_fixed32; alltypes.rep_float.arg = &rep_float; alltypes.rep_fixed64.funcs.encode = &write_repeated_fixed64; alltypes.rep_fixed64.arg = &rep_fixed64; alltypes.rep_sfixed64.funcs.encode = &write_repeated_fixed64; alltypes.rep_sfixed64.arg = &rep_sfixed64; alltypes.rep_double.funcs.encode = &write_repeated_double; alltypes.rep_double.arg = &rep_double; alltypes.rep_string.funcs.encode = &write_repeated_string; alltypes.rep_string.arg = "2014"; alltypes.rep_bytes.funcs.encode = &write_repeated_string; alltypes.rep_bytes.arg = "2015"; alltypes.rep_submsg.funcs.encode = &write_repeated_submsg; alltypes.rep_submsg.arg = &rep_submsg; alltypes.rep_enum.funcs.encode = &write_repeated_varint; alltypes.rep_enum.arg = (void*)MyEnum_Truth; alltypes.rep_emptymsg.funcs.encode = &write_repeated_emptymsg; alltypes.rep_fbytes.funcs.encode = &write_repeated_string; alltypes.rep_fbytes.arg = "2019"; alltypes.rep_farray.funcs.encode = &write_repeated_varint; alltypes.rep_farray.arg = (void*)2040; alltypes.req_limits.funcs.encode = &write_limits; alltypes.req_ds8.funcs.encode = &write_ds8; alltypes.req_intsizes.funcs.encode = &write_intsizes; /* Bind callbacks for optional fields */ if (mode != 0) { alltypes.opt_int32.funcs.encode = &write_varint; alltypes.opt_int32.arg = (void*)3041; alltypes.opt_int64.funcs.encode = &write_varint; alltypes.opt_int64.arg = (void*)3042; alltypes.opt_uint32.funcs.encode = &write_varint; alltypes.opt_uint32.arg = (void*)3043; alltypes.opt_uint64.funcs.encode = &write_varint; alltypes.opt_uint64.arg = (void*)3044; alltypes.opt_sint32.funcs.encode = &write_svarint; alltypes.opt_sint32.arg = (void*)3045; alltypes.opt_sint64.funcs.encode = &write_svarint; alltypes.opt_sint64.arg = (void*)3046; alltypes.opt_bool.funcs.encode = &write_varint; alltypes.opt_bool.arg = (void*)true; alltypes.opt_fixed32.funcs.encode = &write_fixed32; alltypes.opt_fixed32.arg = &opt_fixed32; alltypes.opt_sfixed32.funcs.encode = &write_fixed32; alltypes.opt_sfixed32.arg = &opt_sfixed32; alltypes.opt_float.funcs.encode = &write_fixed32; alltypes.opt_float.arg = &opt_float; alltypes.opt_fixed64.funcs.encode = &write_fixed64; alltypes.opt_fixed64.arg = &opt_fixed64; alltypes.opt_sfixed64.funcs.encode = &write_fixed64; alltypes.opt_sfixed64.arg = &opt_sfixed64; alltypes.opt_double.funcs.encode = &write_double; alltypes.opt_double.arg = &opt_double; alltypes.opt_string.funcs.encode = &write_string; alltypes.opt_string.arg = "3054"; alltypes.opt_bytes.funcs.encode = &write_string; alltypes.opt_bytes.arg = "3055"; alltypes.opt_submsg.funcs.encode = &write_submsg; alltypes.opt_submsg.arg = &opt_submsg; alltypes.opt_enum.funcs.encode = &write_varint; alltypes.opt_enum.arg = (void*)MyEnum_Truth; alltypes.opt_emptymsg.funcs.encode = &write_emptymsg; alltypes.opt_fbytes.funcs.encode = &write_string; alltypes.opt_fbytes.arg = "3059"; alltypes.oneof_msg1.funcs.encode = &write_submsg; alltypes.oneof_msg1.arg = &oneof_msg1; } alltypes.end.funcs.encode = &write_varint; alltypes.end.arg = (void*)1099; { uint8_t buffer[2048]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Now encode it and check if we succeeded. */ if (pb_encode(&stream, AllTypes_fields, &alltypes)) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; /* Success */ } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; /* Failure */ } } } nanopb-0.4.1/tests/alltypes_pointer/000077500000000000000000000000001361552131000175255ustar00rootroot00000000000000nanopb-0.4.1/tests/alltypes_pointer/SConscript000066400000000000000000000030631361552131000215410ustar00rootroot00000000000000# Encode the AllTypes message using pointers for all fields, and verify the # output against the normal AllTypes test case. Import("env", "malloc_env") c = Copy("$TARGET", "$SOURCE") env.Command("alltypes.proto", "#alltypes/alltypes.proto", c) env.NanopbProto(["alltypes", "alltypes.options"]) enc = malloc_env.Program(["encode_alltypes_pointer.c", "alltypes.pb.c", "$COMMON/pb_encode_with_malloc.o", "$COMMON/pb_common_with_malloc.o", "$COMMON/malloc_wrappers.o"]) dec = malloc_env.Program(["decode_alltypes_pointer.c", "alltypes.pb.c", "$COMMON/pb_decode_with_malloc.o", "$COMMON/pb_common_with_malloc.o", "$COMMON/malloc_wrappers.o"]) # Encode and compare results to non-pointer alltypes test case env.RunTest(enc) env.Compare(["encode_alltypes_pointer.output", "$BUILD/alltypes/encode_alltypes.output"]) # Decode (under valgrind if available) kwargs = {} if env.get("VALGRIND"): kwargs['COMMAND'] = env['VALGRIND'] kwargs['ARGS'] = ["-q", "--error-exitcode=99", dec[0].abspath] env.RunTest("decode_alltypes.output", [dec, "encode_alltypes_pointer.output"], **kwargs) # Do the same thing with the optional fields present env.RunTest("optionals.output", enc, ARGS = ['1']) env.Compare(["optionals.output", "$BUILD/alltypes/optionals.output"]) kwargs['ARGS'] = kwargs.get('ARGS', []) + ['1'] env.RunTest("optionals.decout", [dec, "optionals.output"], **kwargs) nanopb-0.4.1/tests/alltypes_pointer/alltypes.options000066400000000000000000000003441361552131000230000ustar00rootroot00000000000000# Generate all fields as pointers. * type:FT_POINTER *.*fbytes fixed_length:true max_size:4 *.*farray fixed_count:true max_count:5 IntSizes.*int8 int_size:IS_8 IntSizes.*int16 int_size:IS_16 DescriptorSize8 descriptorsize:DS_8 nanopb-0.4.1/tests/alltypes_pointer/decode_alltypes_pointer.c000066400000000000000000000234731361552131000246020ustar00rootroot00000000000000#include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" #include "unittests.h" /* This function is called once from main(), it handles the decoding and checks the fields. */ bool check_alltypes(pb_istream_t *stream, int mode) { int status = 0; AllTypes alltypes; /* Fill with garbage to better detect initialization errors */ memset(&alltypes, 0xAA, sizeof(alltypes)); alltypes.extensions = 0; if (!pb_decode(stream, AllTypes_fields, &alltypes)) return false; TEST(alltypes.req_int32 && *alltypes.req_int32 == -1001); TEST(alltypes.req_int64 && *alltypes.req_int64 == -1002); TEST(alltypes.req_uint32 && *alltypes.req_uint32 == 1003); TEST(alltypes.req_uint64 && *alltypes.req_uint64 == 1004); TEST(alltypes.req_sint32 && *alltypes.req_sint32 == -1005); TEST(alltypes.req_sint64 && *alltypes.req_sint64 == -1006); TEST(alltypes.req_bool && *alltypes.req_bool == true); TEST(alltypes.req_fixed32 && *alltypes.req_fixed32 == 1008); TEST(alltypes.req_sfixed32 && *alltypes.req_sfixed32 == -1009); TEST(alltypes.req_float && *alltypes.req_float == 1010.0f); TEST(alltypes.req_fixed64 && *alltypes.req_fixed64 == 1011); TEST(alltypes.req_sfixed64 && *alltypes.req_sfixed64 == -1012); TEST(alltypes.req_double && *alltypes.req_double == 1013.0f); TEST(alltypes.req_string && strcmp(alltypes.req_string, "1014") == 0); TEST(alltypes.req_bytes && alltypes.req_bytes->size == 4); TEST(alltypes.req_bytes && memcmp(&alltypes.req_bytes->bytes, "1015", 4) == 0); TEST(alltypes.req_submsg && alltypes.req_submsg->substuff1 && strcmp(alltypes.req_submsg->substuff1, "1016") == 0); TEST(alltypes.req_submsg && alltypes.req_submsg->substuff2 && *alltypes.req_submsg->substuff2 == 1016); TEST(alltypes.req_enum && *alltypes.req_enum == MyEnum_Truth); TEST(alltypes.req_fbytes && memcmp(alltypes.req_fbytes, "1019", 4) == 0); TEST(alltypes.rep_int32_count == 5 && alltypes.rep_int32[4] == -2001 && alltypes.rep_int32[0] == 0); TEST(alltypes.rep_int64_count == 5 && alltypes.rep_int64[4] == -2002 && alltypes.rep_int64[0] == 0); TEST(alltypes.rep_uint32_count == 5 && alltypes.rep_uint32[4] == 2003 && alltypes.rep_uint32[0] == 0); TEST(alltypes.rep_uint64_count == 5 && alltypes.rep_uint64[4] == 2004 && alltypes.rep_uint64[0] == 0); TEST(alltypes.rep_sint32_count == 5 && alltypes.rep_sint32[4] == -2005 && alltypes.rep_sint32[0] == 0); TEST(alltypes.rep_sint64_count == 5 && alltypes.rep_sint64[4] == -2006 && alltypes.rep_sint64[0] == 0); TEST(alltypes.rep_bool_count == 5 && alltypes.rep_bool[4] == true && alltypes.rep_bool[0] == false); TEST(alltypes.rep_fixed32_count == 5 && alltypes.rep_fixed32[4] == 2008 && alltypes.rep_fixed32[0] == 0); TEST(alltypes.rep_sfixed32_count == 5 && alltypes.rep_sfixed32[4] == -2009 && alltypes.rep_sfixed32[0] == 0); TEST(alltypes.rep_float_count == 5 && alltypes.rep_float[4] == 2010.0f && alltypes.rep_float[0] == 0.0f); TEST(alltypes.rep_fixed64_count == 5 && alltypes.rep_fixed64[4] == 2011 && alltypes.rep_fixed64[0] == 0); TEST(alltypes.rep_sfixed64_count == 5 && alltypes.rep_sfixed64[4] == -2012 && alltypes.rep_sfixed64[0] == 0); TEST(alltypes.rep_double_count == 5 && alltypes.rep_double[4] == 2013.0 && alltypes.rep_double[0] == 0.0); TEST(alltypes.rep_string_count == 5 && strcmp(alltypes.rep_string[4], "2014") == 0 && alltypes.rep_string[0][0] == '\0'); TEST(alltypes.rep_bytes_count == 5 && alltypes.rep_bytes[4]->size == 4 && alltypes.rep_bytes[0]->size == 0); TEST(memcmp(&alltypes.rep_bytes[4]->bytes, "2015", 4) == 0); TEST(alltypes.rep_submsg_count == 5); TEST(strcmp(alltypes.rep_submsg[4].substuff1, "2016") == 0 && alltypes.rep_submsg[0].substuff1[0] == '\0'); TEST(*alltypes.rep_submsg[4].substuff2 == 2016 && *alltypes.rep_submsg[0].substuff2 == 0); TEST(*alltypes.rep_submsg[4].substuff3 == 2016 && alltypes.rep_submsg[0].substuff3 == NULL); TEST(alltypes.rep_enum_count == 5 && alltypes.rep_enum[4] == MyEnum_Truth && alltypes.rep_enum[0] == MyEnum_Zero); TEST(alltypes.rep_emptymsg_count == 5); TEST(alltypes.rep_fbytes_count == 5); TEST(alltypes.rep_fbytes[0][0] == 0 && alltypes.rep_fbytes[0][3] == 0); TEST(memcmp(alltypes.rep_fbytes[4], "2019", 4) == 0); TEST(alltypes.rep_farray && (*alltypes.rep_farray)[0] == 0 && (*alltypes.rep_farray)[4] == 2040); if (mode == 0) { /* Expect that optional values are not present */ TEST(alltypes.opt_int32 == NULL); TEST(alltypes.opt_int64 == NULL); TEST(alltypes.opt_uint32 == NULL); TEST(alltypes.opt_uint64 == NULL); TEST(alltypes.opt_sint32 == NULL); TEST(alltypes.opt_sint64 == NULL); TEST(alltypes.opt_bool == NULL); TEST(alltypes.opt_fixed32 == NULL); TEST(alltypes.opt_sfixed32 == NULL); TEST(alltypes.opt_float == NULL); TEST(alltypes.opt_fixed64 == NULL); TEST(alltypes.opt_sfixed64 == NULL); TEST(alltypes.opt_double == NULL); TEST(alltypes.opt_string == NULL); TEST(alltypes.opt_bytes == NULL); TEST(alltypes.opt_submsg == NULL); TEST(alltypes.opt_enum == NULL); TEST(alltypes.opt_fbytes == NULL); TEST(alltypes.which_oneof == 0); } else { /* Expect filled-in values */ TEST(alltypes.opt_int32 && *alltypes.opt_int32 == 3041); TEST(alltypes.opt_int64 && *alltypes.opt_int64 == 3042); TEST(alltypes.opt_uint32 && *alltypes.opt_uint32 == 3043); TEST(alltypes.opt_uint64 && *alltypes.opt_uint64 == 3044); TEST(alltypes.opt_sint32 && *alltypes.opt_sint32 == 3045); TEST(alltypes.opt_sint64 && *alltypes.opt_sint64 == 3046); TEST(alltypes.opt_bool && *alltypes.opt_bool == true); TEST(alltypes.opt_fixed32 && *alltypes.opt_fixed32 == 3048); TEST(alltypes.opt_sfixed32 && *alltypes.opt_sfixed32== 3049); TEST(alltypes.opt_float && *alltypes.opt_float == 3050.0f); TEST(alltypes.opt_fixed64 && *alltypes.opt_fixed64 == 3051); TEST(alltypes.opt_sfixed64 && *alltypes.opt_sfixed64== 3052); TEST(alltypes.opt_double && *alltypes.opt_double == 3053.0); TEST(alltypes.opt_string && strcmp(alltypes.opt_string, "3054") == 0); TEST(alltypes.opt_bytes && alltypes.opt_bytes->size == 4); TEST(alltypes.opt_bytes && memcmp(&alltypes.opt_bytes->bytes, "3055", 4) == 0); TEST(alltypes.opt_submsg && strcmp(alltypes.opt_submsg->substuff1, "3056") == 0); TEST(alltypes.opt_submsg && *alltypes.opt_submsg->substuff2 == 3056); TEST(alltypes.opt_enum && *alltypes.opt_enum == MyEnum_Truth); TEST(alltypes.opt_emptymsg); TEST(alltypes.opt_fbytes && memcmp(alltypes.opt_fbytes, "3059", 4) == 0); TEST(alltypes.which_oneof == AllTypes_oneof_msg1_tag); TEST(alltypes.oneof.oneof_msg1 && strcmp(alltypes.oneof.oneof_msg1->substuff1, "4059") == 0); TEST(alltypes.oneof.oneof_msg1->substuff2 && *alltypes.oneof.oneof_msg1->substuff2 == 4059); } TEST(alltypes.req_limits->int32_min && *alltypes.req_limits->int32_min == INT32_MIN); TEST(alltypes.req_limits->int32_max && *alltypes.req_limits->int32_max == INT32_MAX); TEST(alltypes.req_limits->uint32_min && *alltypes.req_limits->uint32_min == 0); TEST(alltypes.req_limits->uint32_max && *alltypes.req_limits->uint32_max == UINT32_MAX); TEST(alltypes.req_limits->int64_min && *alltypes.req_limits->int64_min == INT64_MIN); TEST(alltypes.req_limits->int64_max && *alltypes.req_limits->int64_max == INT64_MAX); TEST(alltypes.req_limits->uint64_min && *alltypes.req_limits->uint64_min == 0); TEST(alltypes.req_limits->uint64_max && *alltypes.req_limits->uint64_max == UINT64_MAX); TEST(alltypes.req_limits->enum_min && *alltypes.req_limits->enum_min == HugeEnum_Negative); TEST(alltypes.req_limits->enum_max && *alltypes.req_limits->enum_max == HugeEnum_Positive); TEST(alltypes.req_limits->largetag && *alltypes.req_limits->largetag == 1001); TEST(alltypes.req_ds8); TEST(alltypes.req_ds8->first && *alltypes.req_ds8->first == 9991); TEST(alltypes.req_ds8->first && *alltypes.req_ds8->second == 9992); TEST(alltypes.req_intsizes); TEST(*alltypes.req_intsizes->req_int8 == -128); TEST(*alltypes.req_intsizes->req_uint8 == 255); TEST(*alltypes.req_intsizes->req_sint8 == -128); TEST(*alltypes.req_intsizes->req_int16 == -32768); TEST(*alltypes.req_intsizes->req_uint16 == 65535); TEST(*alltypes.req_intsizes->req_sint16 == -32768); TEST(alltypes.end && *alltypes.end == 1099); pb_release(AllTypes_fields, &alltypes); return status == 0; } int main(int argc, char **argv) { uint8_t buffer[1024]; size_t count; pb_istream_t stream; /* Whether to expect the optional values or the default values. */ int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Read the data into buffer */ SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); /* Construct a pb_istream_t for reading from the buffer */ stream = pb_istream_from_buffer(buffer, count); /* Decode and verify the message */ if (!check_alltypes(&stream, mode)) { fprintf(stderr, "Test failed: %s\n", PB_GET_ERROR(&stream)); return 1; } else { return 0; } } nanopb-0.4.1/tests/alltypes_pointer/encode_alltypes_pointer.c000066400000000000000000000230421361552131000246040ustar00rootroot00000000000000/* Attempts to test all the datatypes supported by ProtoBuf. */ #include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" int main(int argc, char **argv) { int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Values for required fields */ int32_t req_int32 = -1001; int64_t req_int64 = -1002; uint32_t req_uint32 = 1003; uint64_t req_uint64 = 1004; int32_t req_sint32 = -1005; int64_t req_sint64 = -1006; bool req_bool = true; uint32_t req_fixed32 = 1008; int32_t req_sfixed32 = -1009; float req_float = 1010.0f; uint64_t req_fixed64 = 1011; int64_t req_sfixed64 = -1012; double req_double = 1013.0; char* req_string = "1014"; PB_BYTES_ARRAY_T(4) req_bytes = {4, {'1', '0', '1', '5'}}; static int32_t req_substuff = 1016; SubMessage req_submsg = {"1016", &req_substuff}; MyEnum req_enum = MyEnum_Truth; EmptyMessage req_emptymsg = {0}; pb_byte_t req_fbytes[4] = {'1', '0', '1', '9'}; int32_t end = 1099; /* Values for repeated fields */ int32_t rep_int32[5] = {0, 0, 0, 0, -2001}; int64_t rep_int64[5] = {0, 0, 0, 0, -2002}; uint32_t rep_uint32[5] = {0, 0, 0, 0, 2003}; uint64_t rep_uint64[5] = {0, 0, 0, 0, 2004}; int32_t rep_sint32[5] = {0, 0, 0, 0, -2005}; int64_t rep_sint64[5] = {0, 0, 0, 0, -2006}; bool rep_bool[5] = {false, false, false, false, true}; uint32_t rep_fixed32[5] = {0, 0, 0, 0, 2008}; int32_t rep_sfixed32[5] = {0, 0, 0, 0, -2009}; float rep_float[5] = {0, 0, 0, 0, 2010.0f}; uint64_t rep_fixed64[5] = {0, 0, 0, 0, 2011}; int64_t rep_sfixed64[5] = {0, 0, 0, 0, -2012}; double rep_double[5] = {0, 0, 0, 0, 2013.0f}; char* rep_string[5] = {"", "", "", "", "2014"}; static PB_BYTES_ARRAY_T(4) rep_bytes_4 = {4, {'2', '0', '1', '5'}}; pb_bytes_array_t *rep_bytes[5]= {NULL, NULL, NULL, NULL, (pb_bytes_array_t*)&rep_bytes_4}; static int32_t rep_sub2zero = 0; static int32_t rep_substuff2 = 2016; static uint32_t rep_substuff3 = 2016; SubMessage rep_submsg[5] = {{"", &rep_sub2zero}, {"", &rep_sub2zero}, {"", &rep_sub2zero}, {"", &rep_sub2zero}, {"2016", &rep_substuff2, &rep_substuff3}}; MyEnum rep_enum[5] = {0, 0, 0, 0, MyEnum_Truth}; EmptyMessage rep_emptymsg[5] = {{0}, {0}, {0}, {0}, {0}}; pb_byte_t rep_fbytes[5][4] = {{0}, {0}, {0}, {0}, {'2', '0', '1', '9'}}; int32_t rep_farray[5] = {0, 0, 0, 0, 2040}; /* Values for optional fields */ int32_t opt_int32 = 3041; int64_t opt_int64 = 3042; uint32_t opt_uint32 = 3043; uint64_t opt_uint64 = 3044; int32_t opt_sint32 = 3045; int64_t opt_sint64 = 3046; bool opt_bool = true; uint32_t opt_fixed32 = 3048; int32_t opt_sfixed32 = 3049; float opt_float = 3050.0f; uint64_t opt_fixed64 = 3051; int64_t opt_sfixed64 = 3052; double opt_double = 3053.0; char* opt_string = "3054"; PB_BYTES_ARRAY_T(4) opt_bytes = {4, {'3', '0', '5', '5'}}; static int32_t opt_substuff = 3056; SubMessage opt_submsg = {"3056", &opt_substuff}; MyEnum opt_enum = MyEnum_Truth; EmptyMessage opt_emptymsg = {0}; pb_byte_t opt_fbytes[4] = {'3', '0', '5', '9'}; static int32_t oneof_substuff = 4059; SubMessage oneof_msg1 = {"4059", &oneof_substuff}; /* Values for the Limits message. */ static int32_t int32_min = INT32_MIN; static int32_t int32_max = INT32_MAX; static uint32_t uint32_min = 0; static uint32_t uint32_max = UINT32_MAX; static int64_t int64_min = INT64_MIN; static int64_t int64_max = INT64_MAX; static uint64_t uint64_min = 0; static uint64_t uint64_max = UINT64_MAX; static HugeEnum enum_min = HugeEnum_Negative; static HugeEnum enum_max = HugeEnum_Positive; static int32_t largetag = 1001; Limits req_limits = {&int32_min, &int32_max, &uint32_min, &uint32_max, &int64_min, &int64_max, &uint64_min, &uint64_max, &enum_min, &enum_max, &largetag}; /* Values for DescriptorSize8 message. */ static int32_t first = 9991; static int32_t second = 9992; DescriptorSize8 req_ds8 = {&first, &second}; /* Values for IntSizes message. */ static int8_t req_int8 = -128; static uint8_t req_uint8 = 255; static int8_t req_sint8 = -128; static int16_t req_int16 = -32768; static uint16_t req_uint16 = 65535; static int16_t req_sint16 = -32768; IntSizes req_intsizes = {&req_int8, &req_uint8, &req_sint8, &req_int16, &req_uint16, &req_sint16}; /* Initialize the message struct with pointers to the fields. */ AllTypes alltypes = {0}; alltypes.req_int32 = &req_int32; alltypes.req_int64 = &req_int64; alltypes.req_uint32 = &req_uint32; alltypes.req_uint64 = &req_uint64; alltypes.req_sint32 = &req_sint32; alltypes.req_sint64 = &req_sint64; alltypes.req_bool = &req_bool; alltypes.req_fixed32 = &req_fixed32; alltypes.req_sfixed32 = &req_sfixed32; alltypes.req_float = &req_float; alltypes.req_fixed64 = &req_fixed64; alltypes.req_sfixed64 = &req_sfixed64; alltypes.req_double = &req_double; alltypes.req_string = req_string; alltypes.req_bytes = (pb_bytes_array_t*)&req_bytes; alltypes.req_submsg = &req_submsg; alltypes.req_enum = &req_enum; alltypes.req_emptymsg = &req_emptymsg; alltypes.req_fbytes = &req_fbytes; alltypes.req_limits = &req_limits; alltypes.req_ds8 = &req_ds8; alltypes.req_intsizes = &req_intsizes; alltypes.rep_int32_count = 5; alltypes.rep_int32 = rep_int32; alltypes.rep_int64_count = 5; alltypes.rep_int64 = rep_int64; alltypes.rep_uint32_count = 5; alltypes.rep_uint32 = rep_uint32; alltypes.rep_uint64_count = 5; alltypes.rep_uint64 = rep_uint64; alltypes.rep_sint32_count = 5; alltypes.rep_sint32 = rep_sint32; alltypes.rep_sint64_count = 5; alltypes.rep_sint64 = rep_sint64; alltypes.rep_bool_count = 5; alltypes.rep_bool = rep_bool; alltypes.rep_fixed32_count = 5; alltypes.rep_fixed32 = rep_fixed32; alltypes.rep_sfixed32_count = 5; alltypes.rep_sfixed32 = rep_sfixed32; alltypes.rep_float_count = 5; alltypes.rep_float = rep_float; alltypes.rep_fixed64_count = 5; alltypes.rep_fixed64 = rep_fixed64; alltypes.rep_sfixed64_count = 5; alltypes.rep_sfixed64 = rep_sfixed64; alltypes.rep_double_count = 5; alltypes.rep_double = rep_double; alltypes.rep_string_count = 5; alltypes.rep_string = rep_string; alltypes.rep_bytes_count = 5; alltypes.rep_bytes = rep_bytes; alltypes.rep_submsg_count = 5; alltypes.rep_submsg = rep_submsg; alltypes.rep_enum_count = 5; alltypes.rep_enum = rep_enum; alltypes.rep_emptymsg_count = 5; alltypes.rep_emptymsg = rep_emptymsg; alltypes.rep_fbytes_count = 5; alltypes.rep_fbytes = rep_fbytes; alltypes.rep_farray = &rep_farray; if (mode != 0) { /* Fill in values for optional fields */ alltypes.opt_int32 = &opt_int32; alltypes.opt_int64 = &opt_int64; alltypes.opt_uint32 = &opt_uint32; alltypes.opt_uint64 = &opt_uint64; alltypes.opt_sint32 = &opt_sint32; alltypes.opt_sint64 = &opt_sint64; alltypes.opt_bool = &opt_bool; alltypes.opt_fixed32 = &opt_fixed32; alltypes.opt_sfixed32 = &opt_sfixed32; alltypes.opt_float = &opt_float; alltypes.opt_fixed64 = &opt_fixed64; alltypes.opt_sfixed64 = &opt_sfixed64; alltypes.opt_double = &opt_double; alltypes.opt_string = opt_string; alltypes.opt_bytes = (pb_bytes_array_t*)&opt_bytes; alltypes.opt_submsg = &opt_submsg; alltypes.opt_enum = &opt_enum; alltypes.opt_emptymsg = &opt_emptymsg; alltypes.opt_fbytes = &opt_fbytes; alltypes.which_oneof = AllTypes_oneof_msg1_tag; alltypes.oneof.oneof_msg1 = &oneof_msg1; } alltypes.end = &end; { uint8_t buffer[4096]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Now encode it and check if we succeeded. */ if (pb_encode(&stream, AllTypes_fields, &alltypes)) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; /* Success */ } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; /* Failure */ } } } nanopb-0.4.1/tests/alltypes_proto3/000077500000000000000000000000001361552131000172735ustar00rootroot00000000000000nanopb-0.4.1/tests/alltypes_proto3/SConscript000066400000000000000000000026121361552131000213060ustar00rootroot00000000000000# Version of AllTypes test case for protobuf 3 file format. Import("env") env.NanopbProto(["alltypes", "alltypes.options"]) enc = env.Program(["encode_alltypes.c", "alltypes.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) dec = env.Program(["decode_alltypes.c", "alltypes.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) # Test the round-trip from nanopb encoder to nanopb decoder env.RunTest(enc) env.RunTest([dec, "encode_alltypes.output"]) # Re-encode the data using protoc, and check that the results from nanopb # match byte-per-byte to the protoc output. env.Decode("encode_alltypes.output.decoded", ["encode_alltypes.output", "alltypes.proto"], MESSAGE='AllTypes') env.Encode("encode_alltypes.output.recoded", ["encode_alltypes.output.decoded", "alltypes.proto"], MESSAGE='AllTypes') env.Compare(["encode_alltypes.output", "encode_alltypes.output.recoded"]) # Do the same checks with the optional fields present. env.RunTest("optionals.output", enc, ARGS = ['1']) env.RunTest("optionals.decout", [dec, "optionals.output"], ARGS = ['1']) env.Decode("optionals.output.decoded", ["optionals.output", "alltypes.proto"], MESSAGE='AllTypes') env.Encode("optionals.output.recoded", ["optionals.output.decoded", "alltypes.proto"], MESSAGE='AllTypes') env.Compare(["optionals.output", "optionals.output.recoded"]) nanopb-0.4.1/tests/alltypes_proto3/alltypes.options000066400000000000000000000001531361552131000225440ustar00rootroot00000000000000* max_size:16 * max_count:5 *.*fbytes fixed_length:true max_size:4 *.req_limits proto3_singular_msgs:true nanopb-0.4.1/tests/alltypes_proto3/alltypes.proto000066400000000000000000000053751361552131000222270ustar00rootroot00000000000000syntax = "proto3"; // package name placeholder message SubMessage { string substuff1 = 1; int32 substuff2 = 2; fixed32 substuff3 = 3; } message EmptyMessage { } enum HugeEnum { HE_Zero = 0; Negative = -2147483647; /* protoc doesn't accept -2147483648 here */ Positive = 2147483647; } message Limits { int32 int32_min = 1; int32 int32_max = 2; uint32 uint32_min = 3; uint32 uint32_max = 4; int64 int64_min = 5; int64 int64_max = 6; uint64 uint64_min = 7; uint64 uint64_max = 8; HugeEnum enum_min = 9; HugeEnum enum_max = 10; } enum MyEnum { Zero = 0; First = 1; Second = 2; Truth = 42; } message AllTypes { int32 sng_int32 = 1; int64 sng_int64 = 2; uint32 sng_uint32 = 3; uint64 sng_uint64 = 4; sint32 sng_sint32 = 5; sint64 sng_sint64 = 6; bool sng_bool = 7; fixed32 sng_fixed32 = 8; sfixed32 sng_sfixed32= 9; float sng_float = 10; fixed64 sng_fixed64 = 11; sfixed64 sng_sfixed64= 12; double sng_double = 13; string sng_string = 14; bytes sng_bytes = 15; SubMessage sng_submsg = 16; MyEnum sng_enum = 17; EmptyMessage sng_emptymsg = 18; bytes sng_fbytes = 19; repeated int32 rep_int32 = 21 [packed = true]; repeated int64 rep_int64 = 22 [packed = true]; repeated uint32 rep_uint32 = 23 [packed = true]; repeated uint64 rep_uint64 = 24 [packed = true]; repeated sint32 rep_sint32 = 25 [packed = true]; repeated sint64 rep_sint64 = 26 [packed = true]; repeated bool rep_bool = 27 [packed = true]; repeated fixed32 rep_fixed32 = 28 [packed = true]; repeated sfixed32 rep_sfixed32= 29 [packed = true]; repeated float rep_float = 30 [packed = true]; repeated fixed64 rep_fixed64 = 31 [packed = true]; repeated sfixed64 rep_sfixed64= 32 [packed = true]; repeated double rep_double = 33 [packed = true]; repeated string rep_string = 34; repeated bytes rep_bytes = 35; repeated SubMessage rep_submsg = 36; repeated MyEnum rep_enum = 37 [packed = true]; repeated EmptyMessage rep_emptymsg = 38; repeated bytes rep_fbytes = 39; oneof oneof { SubMessage oneof_msg1 = 60; EmptyMessage oneof_msg2 = 61; } // Check that extreme integer values are handled correctly Limits req_limits = 98; // Just to make sure that the size of the fields has been calculated // properly, i.e. otherwise a bug in last field might not be detected. int32 end = 999; } nanopb-0.4.1/tests/alltypes_proto3/decode_alltypes.c000066400000000000000000000155741361552131000226130ustar00rootroot00000000000000/* Tests the decoding of all types. * This is the counterpart of test_encode3. * Run e.g. ./test_encode3 | ./test_decode3 */ #include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" #include "unittests.h" /* This function is called once from main(), it handles the decoding and checks the fields. */ bool check_alltypes(pb_istream_t *stream, int mode) { int status = 0; AllTypes alltypes = AllTypes_init_zero; /* Fill with garbage to better detect initialization errors */ memset(&alltypes, 0xAA, sizeof(alltypes)); if (!pb_decode(stream, AllTypes_fields, &alltypes)) return false; TEST(alltypes.rep_int32_count == 5 && alltypes.rep_int32[4] == -2001 && alltypes.rep_int32[0] == 0); TEST(alltypes.rep_int64_count == 5 && alltypes.rep_int64[4] == -2002 && alltypes.rep_int64[0] == 0); TEST(alltypes.rep_uint32_count == 5 && alltypes.rep_uint32[4] == 2003 && alltypes.rep_uint32[0] == 0); TEST(alltypes.rep_uint64_count == 5 && alltypes.rep_uint64[4] == 2004 && alltypes.rep_uint64[0] == 0); TEST(alltypes.rep_sint32_count == 5 && alltypes.rep_sint32[4] == -2005 && alltypes.rep_sint32[0] == 0); TEST(alltypes.rep_sint64_count == 5 && alltypes.rep_sint64[4] == -2006 && alltypes.rep_sint64[0] == 0); TEST(alltypes.rep_bool_count == 5 && alltypes.rep_bool[4] == true && alltypes.rep_bool[0] == false); TEST(alltypes.rep_fixed32_count == 5 && alltypes.rep_fixed32[4] == 2008 && alltypes.rep_fixed32[0] == 0); TEST(alltypes.rep_sfixed32_count == 5 && alltypes.rep_sfixed32[4] == -2009 && alltypes.rep_sfixed32[0] == 0); TEST(alltypes.rep_float_count == 5 && alltypes.rep_float[4] == 2010.0f && alltypes.rep_float[0] == 0.0f); TEST(alltypes.rep_fixed64_count == 5 && alltypes.rep_fixed64[4] == 2011 && alltypes.rep_fixed64[0] == 0); TEST(alltypes.rep_sfixed64_count == 5 && alltypes.rep_sfixed64[4] == -2012 && alltypes.rep_sfixed64[0] == 0); TEST(alltypes.rep_double_count == 5 && alltypes.rep_double[4] == 2013.0 && alltypes.rep_double[0] == 0.0); TEST(alltypes.rep_string_count == 5 && strcmp(alltypes.rep_string[4], "2014") == 0 && alltypes.rep_string[0][0] == '\0'); TEST(alltypes.rep_bytes_count == 5 && alltypes.rep_bytes[4].size == 4 && alltypes.rep_bytes[0].size == 0); TEST(memcmp(alltypes.rep_bytes[4].bytes, "2015", 4) == 0); TEST(alltypes.rep_submsg_count == 5); TEST(strcmp(alltypes.rep_submsg[4].substuff1, "2016") == 0 && alltypes.rep_submsg[0].substuff1[0] == '\0'); TEST(alltypes.rep_submsg[4].substuff2 == 2016 && alltypes.rep_submsg[0].substuff2 == 0); TEST(alltypes.rep_submsg[4].substuff3 == 2016 && alltypes.rep_submsg[0].substuff3 == 0); TEST(alltypes.rep_enum_count == 5 && alltypes.rep_enum[4] == MyEnum_Truth && alltypes.rep_enum[0] == MyEnum_Zero); TEST(alltypes.rep_emptymsg_count == 5); TEST(alltypes.rep_fbytes_count == 5); TEST(alltypes.rep_fbytes[0][0] == 0 && alltypes.rep_fbytes[0][3] == 0); TEST(memcmp(alltypes.rep_fbytes[4], "2019", 4) == 0); if (mode == 0) { /* Expect default values */ TEST(alltypes.sng_int32 == 0); TEST(alltypes.sng_int64 == 0); TEST(alltypes.sng_uint32 == 0); TEST(alltypes.sng_uint64 == 0); TEST(alltypes.sng_sint32 == 0); TEST(alltypes.sng_sint64 == 0); TEST(alltypes.sng_bool == false); TEST(alltypes.sng_fixed32 == 0); TEST(alltypes.sng_sfixed32 == 0); TEST(alltypes.sng_float == 0.0f); TEST(alltypes.sng_fixed64 == 0); TEST(alltypes.sng_sfixed64 == 0); TEST(alltypes.sng_double == 0.0); TEST(strcmp(alltypes.sng_string, "") == 0); TEST(alltypes.sng_bytes.size == 0); TEST(alltypes.has_sng_submsg == false); TEST(strcmp(alltypes.sng_submsg.substuff1, "") == 0); TEST(alltypes.sng_submsg.substuff2 == 0); TEST(alltypes.sng_submsg.substuff3 == 0); TEST(alltypes.sng_enum == MyEnum_Zero); TEST(alltypes.sng_fbytes[0] == 0 && alltypes.sng_fbytes[1] == 0 && alltypes.sng_fbytes[2] == 0 && alltypes.sng_fbytes[3] == 0); TEST(alltypes.which_oneof == 0); } else { /* Expect filled-in values */ TEST(alltypes.sng_int32 == 3041); TEST(alltypes.sng_int64 == 3042); TEST(alltypes.sng_uint32 == 3043); TEST(alltypes.sng_uint64 == 3044); TEST(alltypes.sng_sint32 == 3045); TEST(alltypes.sng_sint64 == 3046); TEST(alltypes.sng_bool == true); TEST(alltypes.sng_fixed32 == 3048); TEST(alltypes.sng_sfixed32 == 3049); TEST(alltypes.sng_float == 3050.0f); TEST(alltypes.sng_fixed64 == 3051); TEST(alltypes.sng_sfixed64 == 3052); TEST(alltypes.sng_double == 3053.0); TEST(strcmp(alltypes.sng_string, "3054") == 0); TEST(alltypes.sng_bytes.size == 4); TEST(memcmp(alltypes.sng_bytes.bytes, "3055", 4) == 0); TEST(alltypes.has_sng_submsg == true); TEST(strcmp(alltypes.sng_submsg.substuff1, "3056") == 0); TEST(alltypes.sng_submsg.substuff2 == 3056); TEST(alltypes.sng_submsg.substuff3 == 0); TEST(alltypes.sng_enum == MyEnum_Truth); TEST(memcmp(alltypes.sng_fbytes, "3059", 4) == 0); TEST(alltypes.which_oneof == AllTypes_oneof_msg1_tag); TEST(strcmp(alltypes.oneof.oneof_msg1.substuff1, "4059") == 0); TEST(alltypes.oneof.oneof_msg1.substuff2 == 4059); } TEST(alltypes.req_limits.int32_min == INT32_MIN); TEST(alltypes.req_limits.int32_max == INT32_MAX); TEST(alltypes.req_limits.uint32_min == 0); TEST(alltypes.req_limits.uint32_max == UINT32_MAX); TEST(alltypes.req_limits.int64_min == INT64_MIN); TEST(alltypes.req_limits.int64_max == INT64_MAX); TEST(alltypes.req_limits.uint64_min == 0); TEST(alltypes.req_limits.uint64_max == UINT64_MAX); TEST(alltypes.req_limits.enum_min == HugeEnum_Negative); TEST(alltypes.req_limits.enum_max == HugeEnum_Positive); TEST(alltypes.end == 1099); return status == 0; } int main(int argc, char **argv) { uint8_t buffer[1024]; size_t count; pb_istream_t stream; /* Whether to expect the optional values or the default values. */ int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Read the data into buffer */ SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); /* Construct a pb_istream_t for reading from the buffer */ stream = pb_istream_from_buffer(buffer, count); /* Decode and print out the stuff */ if (!check_alltypes(&stream, mode)) { printf("Parsing failed: %s\n", PB_GET_ERROR(&stream)); return 1; } else { return 0; } } nanopb-0.4.1/tests/alltypes_proto3/encode_alltypes.c000066400000000000000000000077311361552131000226210ustar00rootroot00000000000000/* Attempts to test all the datatypes supported by ProtoBuf3. */ #include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" int main(int argc, char **argv) { int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Initialize the structure with constants */ AllTypes alltypes = AllTypes_init_zero; alltypes.rep_int32_count = 5; alltypes.rep_int32[4] = -2001; alltypes.rep_int64_count = 5; alltypes.rep_int64[4] = -2002; alltypes.rep_uint32_count = 5; alltypes.rep_uint32[4] = 2003; alltypes.rep_uint64_count = 5; alltypes.rep_uint64[4] = 2004; alltypes.rep_sint32_count = 5; alltypes.rep_sint32[4] = -2005; alltypes.rep_sint64_count = 5; alltypes.rep_sint64[4] = -2006; alltypes.rep_bool_count = 5; alltypes.rep_bool[4] = true; alltypes.rep_fixed32_count = 5; alltypes.rep_fixed32[4] = 2008; alltypes.rep_sfixed32_count = 5; alltypes.rep_sfixed32[4] = -2009; alltypes.rep_float_count = 5; alltypes.rep_float[4] = 2010.0f; alltypes.rep_fixed64_count = 5; alltypes.rep_fixed64[4] = 2011; alltypes.rep_sfixed64_count = 5; alltypes.rep_sfixed64[4] = -2012; alltypes.rep_double_count = 5; alltypes.rep_double[4] = 2013.0; alltypes.rep_string_count = 5; strcpy(alltypes.rep_string[4], "2014"); alltypes.rep_bytes_count = 5; alltypes.rep_bytes[4].size = 4; memcpy(alltypes.rep_bytes[4].bytes, "2015", 4); alltypes.rep_submsg_count = 5; strcpy(alltypes.rep_submsg[4].substuff1, "2016"); alltypes.rep_submsg[4].substuff2 = 2016; alltypes.rep_submsg[4].substuff3 = 2016; alltypes.rep_enum_count = 5; alltypes.rep_enum[4] = MyEnum_Truth; alltypes.rep_emptymsg_count = 5; alltypes.rep_fbytes_count = 5; memcpy(alltypes.rep_fbytes[4], "2019", 4); alltypes.req_limits.int32_min = INT32_MIN; alltypes.req_limits.int32_max = INT32_MAX; alltypes.req_limits.uint32_min = 0; alltypes.req_limits.uint32_max = UINT32_MAX; alltypes.req_limits.int64_min = INT64_MIN; alltypes.req_limits.int64_max = INT64_MAX; alltypes.req_limits.uint64_min = 0; alltypes.req_limits.uint64_max = UINT64_MAX; alltypes.req_limits.enum_min = HugeEnum_Negative; alltypes.req_limits.enum_max = HugeEnum_Positive; if (mode != 0) { /* Fill in values for singular fields */ alltypes.sng_int32 = 3041; alltypes.sng_int64 = 3042; alltypes.sng_uint32 = 3043; alltypes.sng_uint64 = 3044; alltypes.sng_sint32 = 3045; alltypes.sng_sint64 = 3046; alltypes.sng_bool = true; alltypes.sng_fixed32 = 3048; alltypes.sng_sfixed32 = 3049; alltypes.sng_float = 3050.0f; alltypes.sng_fixed64 = 3051; alltypes.sng_sfixed64 = 3052; alltypes.sng_double = 3053.0; strcpy(alltypes.sng_string, "3054"); alltypes.sng_bytes.size = 4; memcpy(alltypes.sng_bytes.bytes, "3055", 4); alltypes.has_sng_submsg = true; strcpy(alltypes.sng_submsg.substuff1, "3056"); alltypes.sng_submsg.substuff2 = 3056; alltypes.sng_enum = MyEnum_Truth; memcpy(alltypes.sng_fbytes, "3059", 4); alltypes.which_oneof = AllTypes_oneof_msg1_tag; strcpy(alltypes.oneof.oneof_msg1.substuff1, "4059"); alltypes.oneof.oneof_msg1.substuff2 = 4059; } alltypes.end = 1099; { uint8_t buffer[AllTypes_size]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Now encode it and check if we succeeded. */ if (pb_encode(&stream, AllTypes_fields, &alltypes)) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; /* Success */ } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; /* Failure */ } } } nanopb-0.4.1/tests/alltypes_proto3_callback/000077500000000000000000000000001361552131000211075ustar00rootroot00000000000000nanopb-0.4.1/tests/alltypes_proto3_callback/SConscript000066400000000000000000000017711361552131000231270ustar00rootroot00000000000000# Test the AllTypes encoding & decoding using callbacks for all fields. Import("env", "malloc_env") c = Copy("$TARGET", "$SOURCE") env.Command("alltypes.proto", "#alltypes_proto3/alltypes.proto", c) env.NanopbProto(["alltypes", "alltypes.options"]) enc = env.Program(["encode_alltypes_callback.c", "alltypes.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) dec = env.Program(["decode_alltypes_callback.c", "alltypes.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) refdec = "$BUILD/alltypes_proto3/decode_alltypes$PROGSUFFIX" # Encode and compare results env.RunTest(enc) env.RunTest("decode_alltypes.output", [refdec, "encode_alltypes_callback.output"]) env.RunTest("decode_alltypes_callback.output", [dec, "encode_alltypes_callback.output"]) # Do the same thing with the optional fields present env.RunTest("optionals.output", enc, ARGS = ['1']) env.RunTest("optionals.refdecout", [refdec, "optionals.output"], ARGS = ['1']) env.RunTest("optionals.decout", [dec, "optionals.output"], ARGS = ['1']) nanopb-0.4.1/tests/alltypes_proto3_callback/alltypes.options000066400000000000000000000003661361552131000243660ustar00rootroot00000000000000# Generate all fields as callbacks. AllTypes.* type:FT_CALLBACK SubMessage.substuff1 max_size:16 AllTypes.oneof no_unions:true # With FT_CALLBACK, these options should get ignored *.*fbytes fixed_length:true max_size:4 nanopb-0.4.1/tests/alltypes_proto3_callback/decode_alltypes_callback.c000066400000000000000000000313521361552131000262330ustar00rootroot00000000000000/* Attempts to test all the datatypes supported by ProtoBuf when used as callback fields. * Note that normally there would be no reason to use callback fields for this, * because each encoder defined here only gives a single field. */ #include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" #define TEST(x) if (!(x)) { \ printf("Test %s failed (in field %d).\n", #x, field->tag); \ return false; \ } static bool read_varint(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint64_t value; if (!pb_decode_varint(stream, &value)) return false; TEST((int64_t)value == (intptr_t)*arg); return true; } static bool read_svarint(pb_istream_t *stream, const pb_field_t *field, void **arg) { int64_t value; if (!pb_decode_svarint(stream, &value)) return false; TEST(value == (intptr_t)*arg); return true; } static bool read_fixed32(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint32_t value; if (!pb_decode_fixed32(stream, &value)) return false; TEST(value == *(uint32_t*)*arg); return true; } static bool read_fixed64(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint64_t value; if (!pb_decode_fixed64(stream, &value)) return false; TEST(value == *(uint64_t*)*arg); return true; } static bool read_double(pb_istream_t *stream, const pb_field_t *field, void **arg) { #ifdef PB_CONVERT_DOUBLE_FLOAT if (sizeof(double) == sizeof(float)) { float value; if (!pb_decode_double_as_float(stream, &value)) return false; TEST(memcmp(&value, *arg, sizeof(float)) == 0); return true; } #endif uint64_t value; if (!pb_decode_fixed64(stream, &value)) return false; TEST(value == *(uint64_t*)*arg); return true; } static bool read_string(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint8_t buf[16] = {0}; size_t len = stream->bytes_left; if (len > sizeof(buf) - 1 || !pb_read(stream, buf, len)) return false; TEST(strcmp((char*)buf, *arg) == 0); return true; } static bool read_submsg(pb_istream_t *stream, const pb_field_t *field, void **arg) { SubMessage submsg = {""}; SubMessage *ref = *arg; if (!pb_decode(stream, SubMessage_fields, &submsg)) return false; TEST(strcmp(submsg.substuff1, ref->substuff1) == 0); TEST(submsg.substuff2 == ref->substuff2); TEST(submsg.substuff3 == ref->substuff3); return true; } static bool read_emptymsg(pb_istream_t *stream, const pb_field_t *field, void **arg) { EmptyMessage emptymsg = {0}; return pb_decode(stream, EmptyMessage_fields, &emptymsg); } static bool read_repeated_varint(pb_istream_t *stream, const pb_field_t *field, void **arg) { int32_t** expected = (int32_t**)arg; uint64_t value; if (!pb_decode_varint(stream, &value)) return false; TEST(*(*expected)++ == value); return true; } static bool read_repeated_svarint(pb_istream_t *stream, const pb_field_t *field, void **arg) { int32_t** expected = (int32_t**)arg; int64_t value; if (!pb_decode_svarint(stream, &value)) return false; TEST(*(*expected)++ == value); return true; } static bool read_repeated_fixed32(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint32_t** expected = (uint32_t**)arg; uint32_t value; if (!pb_decode_fixed32(stream, &value)) return false; TEST(*(*expected)++ == value); return true; } static bool read_repeated_fixed64(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint64_t** expected = (uint64_t**)arg; uint64_t value; if (!pb_decode_fixed64(stream, &value)) return false; TEST(*(*expected)++ == value); return true; } static bool read_repeated_double(pb_istream_t *stream, const pb_field_t *field, void **arg) { #ifdef PB_CONVERT_DOUBLE_FLOAT if (sizeof(double) == sizeof(float)) { float** expectedf = (float**)arg; float value; if (!pb_decode_double_as_float(stream, &value)) return false; TEST(memcmp(&value, (*expectedf)++, sizeof(float)) == 0); return true; } #endif uint64_t** expected = (uint64_t**)arg; uint64_t value; if (!pb_decode_fixed64(stream, &value)) return false; TEST(*(*expected)++ == value); return true; } static bool read_repeated_string(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint8_t*** expected = (uint8_t***)arg; uint8_t buf[16] = {0}; size_t len = stream->bytes_left; if (len > sizeof(buf) - 1 || !pb_read(stream, buf, len)) return false; TEST(strcmp((char*)*(*expected)++, (char*)buf) == 0); return true; } static bool read_repeated_submsg(pb_istream_t *stream, const pb_field_t *field, void **arg) { SubMessage** expected = (SubMessage**)arg; SubMessage submsg = {""}; if (!pb_decode(stream, SubMessage_fields, &submsg)) return false; TEST(strcmp(submsg.substuff1, (*expected)->substuff1) == 0); TEST(submsg.substuff2 == (*expected)->substuff2); TEST(submsg.substuff3 == (*expected)->substuff3); (*expected)++; return true; } static bool read_limits(pb_istream_t *stream, const pb_field_t *field, void **arg) { Limits decoded = {0}; if (!pb_decode(stream, Limits_fields, &decoded)) return false; TEST(decoded.int32_min == INT32_MIN); TEST(decoded.int32_max == INT32_MAX); TEST(decoded.uint32_min == 0); TEST(decoded.uint32_max == UINT32_MAX); TEST(decoded.int64_min == INT64_MIN); TEST(decoded.int64_max == INT64_MAX); TEST(decoded.uint64_min == 0); TEST(decoded.uint64_max == UINT64_MAX); TEST(decoded.enum_min == HugeEnum_Negative); TEST(decoded.enum_max == HugeEnum_Positive); return true; } /* This function is called once from main(), it handles the decoding and checks the fields. */ bool check_alltypes(pb_istream_t *stream, int mode) { /* Values for use from callbacks through pointers. */ bool status; int32_t rep_int32[5] = {0, 0, 0, 0, -2001}; int32_t rep_int64[5] = {0, 0, 0, 0, -2002}; int32_t rep_uint32[5] = {0, 0, 0, 0, 2003}; int32_t rep_uint64[5] = {0, 0, 0, 0, 2004}; int32_t rep_sint32[5] = {0, 0, 0, 0, -2005}; int32_t rep_sint64[5] = {0, 0, 0, 0, -2006}; int32_t rep_bool[5] = {false, false, false, false, true}; uint32_t rep_fixed32[5] = {0, 0, 0, 0, 2008}; int32_t rep_sfixed32[5] = {0, 0, 0, 0, -2009}; float rep_float[5] = {0, 0, 0, 0, 2010.0f}; uint64_t rep_fixed64[5] = {0, 0, 0, 0, 2011}; int64_t rep_sfixed64[5] = {0, 0, 0, 0, -2012}; double rep_double[5] = {0, 0, 0, 0, 2013.0}; char* rep_string[5] = {"", "", "", "", "2014"}; char* rep_bytes[5] = {"", "", "", "", "2015"}; SubMessage rep_submsg[5] = {{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"2016", 2016, 2016}}; int32_t rep_enum[5] = {0, 0, 0, 0, MyEnum_Truth}; uint32_t sng_fixed32 = 3048; int32_t sng_sfixed32 = 3049; float sng_float = 3050.0f; uint64_t sng_fixed64 = 3051; int64_t sng_sfixed64 = 3052; double sng_double = 3053.0f; SubMessage sng_submsg = {"3056", 3056}; SubMessage oneof_msg1 = {"4059", 4059}; AllTypes alltypes = AllTypes_init_zero; /* Bind callbacks for repeated fields */ alltypes.rep_int32.funcs.decode = &read_repeated_varint; alltypes.rep_int32.arg = rep_int32; alltypes.rep_int64.funcs.decode = &read_repeated_varint; alltypes.rep_int64.arg = rep_int64; alltypes.rep_uint32.funcs.decode = &read_repeated_varint; alltypes.rep_uint32.arg = rep_uint32; alltypes.rep_uint64.funcs.decode = &read_repeated_varint; alltypes.rep_uint64.arg = rep_uint64; alltypes.rep_sint32.funcs.decode = &read_repeated_svarint; alltypes.rep_sint32.arg = rep_sint32; alltypes.rep_sint64.funcs.decode = &read_repeated_svarint; alltypes.rep_sint64.arg = rep_sint64; alltypes.rep_bool.funcs.decode = &read_repeated_varint; alltypes.rep_bool.arg = rep_bool; alltypes.rep_fixed32.funcs.decode = &read_repeated_fixed32; alltypes.rep_fixed32.arg = rep_fixed32; alltypes.rep_sfixed32.funcs.decode = &read_repeated_fixed32; alltypes.rep_sfixed32.arg = rep_sfixed32; alltypes.rep_float.funcs.decode = &read_repeated_fixed32; alltypes.rep_float.arg = rep_float; alltypes.rep_fixed64.funcs.decode = &read_repeated_fixed64; alltypes.rep_fixed64.arg = rep_fixed64; alltypes.rep_sfixed64.funcs.decode = &read_repeated_fixed64; alltypes.rep_sfixed64.arg = rep_sfixed64; alltypes.rep_double.funcs.decode = &read_repeated_double; alltypes.rep_double.arg = rep_double; alltypes.rep_string.funcs.decode = &read_repeated_string; alltypes.rep_string.arg = rep_string; alltypes.rep_bytes.funcs.decode = &read_repeated_string; alltypes.rep_bytes.arg = rep_bytes; alltypes.rep_submsg.funcs.decode = &read_repeated_submsg; alltypes.rep_submsg.arg = rep_submsg; alltypes.rep_enum.funcs.decode = &read_repeated_varint; alltypes.rep_enum.arg = rep_enum; alltypes.rep_emptymsg.funcs.decode = &read_emptymsg; alltypes.req_limits.funcs.decode = &read_limits; alltypes.end.funcs.decode = &read_varint; alltypes.end.arg = (void*)1099; /* Bind callbacks for optional fields */ if (mode == 1) { alltypes.sng_int32.funcs.decode = &read_varint; alltypes.sng_int32.arg = (void*)3041; alltypes.sng_int64.funcs.decode = &read_varint; alltypes.sng_int64.arg = (void*)3042; alltypes.sng_uint32.funcs.decode = &read_varint; alltypes.sng_uint32.arg = (void*)3043; alltypes.sng_uint64.funcs.decode = &read_varint; alltypes.sng_uint64.arg = (void*)3044; alltypes.sng_sint32.funcs.decode = &read_svarint; alltypes.sng_sint32.arg = (void*)3045; alltypes.sng_sint64.funcs.decode = &read_svarint; alltypes.sng_sint64.arg = (void*)3046; alltypes.sng_bool.funcs.decode = &read_varint; alltypes.sng_bool.arg = (void*)true; alltypes.sng_fixed32.funcs.decode = &read_fixed32; alltypes.sng_fixed32.arg = &sng_fixed32; alltypes.sng_sfixed32.funcs.decode = &read_fixed32; alltypes.sng_sfixed32.arg = &sng_sfixed32; alltypes.sng_float.funcs.decode = &read_fixed32; alltypes.sng_float.arg = &sng_float; alltypes.sng_fixed64.funcs.decode = &read_fixed64; alltypes.sng_fixed64.arg = &sng_fixed64; alltypes.sng_sfixed64.funcs.decode = &read_fixed64; alltypes.sng_sfixed64.arg = &sng_sfixed64; alltypes.sng_double.funcs.decode = &read_double; alltypes.sng_double.arg = &sng_double; alltypes.sng_string.funcs.decode = &read_string; alltypes.sng_string.arg = "3054"; alltypes.sng_bytes.funcs.decode = &read_string; alltypes.sng_bytes.arg = "3055"; alltypes.sng_submsg.funcs.decode = &read_submsg; alltypes.sng_submsg.arg = &sng_submsg; alltypes.sng_enum.funcs.decode = &read_varint; alltypes.sng_enum.arg = (void*)MyEnum_Truth; alltypes.sng_emptymsg.funcs.decode = &read_emptymsg; alltypes.oneof_msg1.funcs.decode = &read_submsg; alltypes.oneof_msg1.arg = &oneof_msg1; } status = pb_decode(stream, AllTypes_fields, &alltypes); #ifdef PB_ENABLE_MALLOC /* Just to check for any interference between pb_release() and callback fields */ pb_release(AllTypes_fields, &alltypes); #endif return status; } int main(int argc, char **argv) { uint8_t buffer[1024]; size_t count; pb_istream_t stream; /* Whether to expect the optional values or the default values. */ int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Read the data into buffer */ SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); /* Construct a pb_istream_t for reading from the buffer */ stream = pb_istream_from_buffer(buffer, count); /* Decode and print out the stuff */ if (!check_alltypes(&stream, mode)) { printf("Parsing failed: %s\n", PB_GET_ERROR(&stream)); return 1; } else { return 0; } } nanopb-0.4.1/tests/alltypes_proto3_callback/encode_alltypes_callback.c000066400000000000000000000335721361552131000262530ustar00rootroot00000000000000/* Attempts to test all the datatypes supported by ProtoBuf when used as callback fields. * Note that normally there would be no reason to use callback fields for this, * because each encoder defined here only gives a single field. */ #include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" static bool write_varint(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, (intptr_t)*arg); } static bool write_svarint(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_svarint(stream, (intptr_t)*arg); } static bool write_fixed32(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_fixed32(stream, *arg); } static bool write_fixed64(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_fixed64(stream, *arg); } static bool write_double(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { #ifdef PB_CONVERT_DOUBLE_FLOAT if (sizeof(double) == sizeof(float)) return pb_encode_tag_for_field(stream, field) && pb_encode_float_as_double(stream, *(float*)*arg); #endif return pb_encode_tag_for_field(stream, field) && pb_encode_fixed64(stream, *arg); } static bool write_string(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, *arg, strlen(*arg)); } static bool write_submsg(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, SubMessage_fields, *arg); } static bool write_emptymsg(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { EmptyMessage emptymsg = {0}; return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, EmptyMessage_fields, &emptymsg); } static bool write_repeated_varint(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_varint(stream, (intptr_t)*arg); } static bool write_repeated_svarint(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_svarint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_svarint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_svarint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_svarint(stream, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_svarint(stream, (intptr_t)*arg); } static bool write_repeated_fixed32(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { uint32_t dummy = 0; /* Make it a packed field */ return pb_encode_tag(stream, PB_WT_STRING, field->tag) && pb_encode_varint(stream, 5 * 4) && /* Number of bytes */ pb_encode_fixed32(stream, &dummy) && pb_encode_fixed32(stream, &dummy) && pb_encode_fixed32(stream, &dummy) && pb_encode_fixed32(stream, &dummy) && pb_encode_fixed32(stream, *arg); } static bool write_repeated_fixed64(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { uint64_t dummy = 0; /* Make it a packed field */ return pb_encode_tag(stream, PB_WT_STRING, field->tag) && pb_encode_varint(stream, 5 * 8) && /* Number of bytes */ pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, *arg); } static bool write_repeated_double(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { uint64_t dummy = 0; #ifdef PB_CONVERT_DOUBLE_FLOAT if (sizeof(double) == sizeof(float)) return pb_encode_tag(stream, PB_WT_STRING, field->tag) && pb_encode_varint(stream, 5 * 8) && /* Number of bytes */ pb_encode_float_as_double(stream, 0.0f) && pb_encode_float_as_double(stream, 0.0f) && pb_encode_float_as_double(stream, 0.0f) && pb_encode_float_as_double(stream, 0.0f) && pb_encode_float_as_double(stream, *(float*)*arg); #endif /* Make it a packed field */ return pb_encode_tag(stream, PB_WT_STRING, field->tag) && pb_encode_varint(stream, 5 * 8) && /* Number of bytes */ pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, &dummy) && pb_encode_fixed64(stream, *arg); } static bool write_repeated_string(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, 0, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, 0, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, 0, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, 0, 0) && pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, *arg, strlen(*arg)); } static bool write_repeated_submsg(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { SubMessage dummy = {""}; return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, SubMessage_fields, &dummy) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, SubMessage_fields, &dummy) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, SubMessage_fields, &dummy) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, SubMessage_fields, &dummy) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, SubMessage_fields, *arg); } static bool write_limits(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { Limits limits = {0}; limits.int32_min = INT32_MIN; limits.int32_max = INT32_MAX; limits.uint32_min = 0; limits.uint32_max = UINT32_MAX; limits.int64_min = INT64_MIN; limits.int64_max = INT64_MAX; limits.uint64_min = 0; limits.uint64_max = UINT64_MAX; limits.enum_min = HugeEnum_Negative; limits.enum_max = HugeEnum_Positive; return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, Limits_fields, &limits); } static bool write_repeated_emptymsg(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { EmptyMessage emptymsg = {0}; return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, EmptyMessage_fields, &emptymsg) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, EmptyMessage_fields, &emptymsg) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, EmptyMessage_fields, &emptymsg) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, EmptyMessage_fields, &emptymsg) && pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, EmptyMessage_fields, &emptymsg); } int main(int argc, char **argv) { int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Values for use from callbacks through pointers. */ uint32_t rep_fixed32 = 2008; int32_t rep_sfixed32 = -2009; float rep_float = 2010.0f; uint64_t rep_fixed64 = 2011; int64_t rep_sfixed64 = -2012; double rep_double = 2013.0; SubMessage rep_submsg = {"2016", 2016, 2016}; uint32_t sng_fixed32 = 3048; int32_t sng_sfixed32 = 3049; float sng_float = 3050.0f; uint64_t sng_fixed64 = 3051; int64_t sng_sfixed64 = 3052; double sng_double = 3053.0f; SubMessage sng_submsg = {"3056", 3056}; SubMessage oneof_msg1 = {"4059", 4059}; AllTypes alltypes = AllTypes_init_zero; /* Bind callbacks for repeated fields */ alltypes.rep_int32.funcs.encode = &write_repeated_varint; alltypes.rep_int32.arg = (void*)-2001; alltypes.rep_int64.funcs.encode = &write_repeated_varint; alltypes.rep_int64.arg = (void*)-2002; alltypes.rep_uint32.funcs.encode = &write_repeated_varint; alltypes.rep_uint32.arg = (void*)2003; alltypes.rep_uint64.funcs.encode = &write_repeated_varint; alltypes.rep_uint64.arg = (void*)2004; alltypes.rep_sint32.funcs.encode = &write_repeated_svarint; alltypes.rep_sint32.arg = (void*)-2005; alltypes.rep_sint64.funcs.encode = &write_repeated_svarint; alltypes.rep_sint64.arg = (void*)-2006; alltypes.rep_bool.funcs.encode = &write_repeated_varint; alltypes.rep_bool.arg = (void*)true; alltypes.rep_fixed32.funcs.encode = &write_repeated_fixed32; alltypes.rep_fixed32.arg = &rep_fixed32; alltypes.rep_sfixed32.funcs.encode = &write_repeated_fixed32; alltypes.rep_sfixed32.arg = &rep_sfixed32; alltypes.rep_float.funcs.encode = &write_repeated_fixed32; alltypes.rep_float.arg = &rep_float; alltypes.rep_fixed64.funcs.encode = &write_repeated_fixed64; alltypes.rep_fixed64.arg = &rep_fixed64; alltypes.rep_sfixed64.funcs.encode = &write_repeated_fixed64; alltypes.rep_sfixed64.arg = &rep_sfixed64; alltypes.rep_double.funcs.encode = &write_repeated_double; alltypes.rep_double.arg = &rep_double; alltypes.rep_string.funcs.encode = &write_repeated_string; alltypes.rep_string.arg = "2014"; alltypes.rep_bytes.funcs.encode = &write_repeated_string; alltypes.rep_bytes.arg = "2015"; alltypes.rep_submsg.funcs.encode = &write_repeated_submsg; alltypes.rep_submsg.arg = &rep_submsg; alltypes.rep_enum.funcs.encode = &write_repeated_varint; alltypes.rep_enum.arg = (void*)MyEnum_Truth; alltypes.rep_emptymsg.funcs.encode = &write_repeated_emptymsg; alltypes.rep_fbytes.funcs.encode = &write_repeated_string; alltypes.rep_fbytes.arg = "2019"; alltypes.req_limits.funcs.encode = &write_limits; /* Bind callbacks for singular fields */ if (mode != 0) { alltypes.sng_int32.funcs.encode = &write_varint; alltypes.sng_int32.arg = (void*)3041; alltypes.sng_int64.funcs.encode = &write_varint; alltypes.sng_int64.arg = (void*)3042; alltypes.sng_uint32.funcs.encode = &write_varint; alltypes.sng_uint32.arg = (void*)3043; alltypes.sng_uint64.funcs.encode = &write_varint; alltypes.sng_uint64.arg = (void*)3044; alltypes.sng_sint32.funcs.encode = &write_svarint; alltypes.sng_sint32.arg = (void*)3045; alltypes.sng_sint64.funcs.encode = &write_svarint; alltypes.sng_sint64.arg = (void*)3046; alltypes.sng_bool.funcs.encode = &write_varint; alltypes.sng_bool.arg = (void*)true; alltypes.sng_fixed32.funcs.encode = &write_fixed32; alltypes.sng_fixed32.arg = &sng_fixed32; alltypes.sng_sfixed32.funcs.encode = &write_fixed32; alltypes.sng_sfixed32.arg = &sng_sfixed32; alltypes.sng_float.funcs.encode = &write_fixed32; alltypes.sng_float.arg = &sng_float; alltypes.sng_fixed64.funcs.encode = &write_fixed64; alltypes.sng_fixed64.arg = &sng_fixed64; alltypes.sng_sfixed64.funcs.encode = &write_fixed64; alltypes.sng_sfixed64.arg = &sng_sfixed64; alltypes.sng_double.funcs.encode = &write_double; alltypes.sng_double.arg = &sng_double; alltypes.sng_string.funcs.encode = &write_string; alltypes.sng_string.arg = "3054"; alltypes.sng_bytes.funcs.encode = &write_string; alltypes.sng_bytes.arg = "3055"; alltypes.sng_submsg.funcs.encode = &write_submsg; alltypes.sng_submsg.arg = &sng_submsg; alltypes.sng_enum.funcs.encode = &write_varint; alltypes.sng_enum.arg = (void*)MyEnum_Truth; alltypes.sng_emptymsg.funcs.encode = &write_emptymsg; alltypes.sng_fbytes.funcs.encode = &write_string; alltypes.sng_fbytes.arg = "3059"; alltypes.oneof_msg1.funcs.encode = &write_submsg; alltypes.oneof_msg1.arg = &oneof_msg1; } alltypes.end.funcs.encode = &write_varint; alltypes.end.arg = (void*)1099; { uint8_t buffer[2048]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Now encode it and check if we succeeded. */ if (pb_encode(&stream, AllTypes_fields, &alltypes)) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; /* Success */ } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; /* Failure */ } } } nanopb-0.4.1/tests/anonymous_oneof/000077500000000000000000000000001361552131000173465ustar00rootroot00000000000000nanopb-0.4.1/tests/anonymous_oneof/SConscript000066400000000000000000000013061361552131000213600ustar00rootroot00000000000000# Test anonymous_oneof generator option Import('env') # Anonymous oneofs are supported by clang and gcc if 'clang' in env['CC'] or 'gcc' in env['CC']: env2 = env.Clone() if '-pedantic' in env2['CFLAGS']: env2['CFLAGS'].remove('-pedantic') env2.NanopbProto('oneof') dec = env2.Program(['decode_oneof.c', 'oneof.pb.c', '$COMMON/pb_decode.o', '$COMMON/pb_common.o']) env2.RunTest("message1.txt", [dec, '$BUILD/oneof/message1.pb'], ARGS = ['1']) env2.RunTest("message2.txt", [dec, '$BUILD/oneof/message2.pb'], ARGS = ['2']) env2.RunTest("message3.txt", [dec, '$BUILD/oneof/message3.pb'], ARGS = ['3']) nanopb-0.4.1/tests/anonymous_oneof/decode_oneof.c000066400000000000000000000040071361552131000221240ustar00rootroot00000000000000/* Decode a message using oneof fields */ #include #include #include #include #include "oneof.pb.h" #include "test_helpers.h" #include "unittests.h" /* Test the 'AnonymousOneOfMessage' */ int test_oneof_1(pb_istream_t *stream, int option) { AnonymousOneOfMessage msg; int status = 0; /* To better catch initialization errors */ memset(&msg, 0xAA, sizeof(msg)); if (!pb_decode(stream, AnonymousOneOfMessage_fields, &msg)) { printf("Decoding failed: %s\n", PB_GET_ERROR(stream)); return 1; } /* Check that the basic fields work normally */ TEST(msg.prefix == 123); TEST(msg.suffix == 321); /* Check that we got the right oneof according to command line */ if (option == 1) { TEST(msg.which_values == AnonymousOneOfMessage_first_tag); TEST(msg.first == 999); } else if (option == 2) { TEST(msg.which_values == AnonymousOneOfMessage_second_tag); TEST(strcmp(msg.second, "abcd") == 0); } else if (option == 3) { TEST(msg.which_values == AnonymousOneOfMessage_third_tag); TEST(msg.third.array[0] == 1); TEST(msg.third.array[1] == 2); TEST(msg.third.array[2] == 3); TEST(msg.third.array[3] == 4); TEST(msg.third.array[4] == 5); } return status; } int main(int argc, char **argv) { uint8_t buffer[AnonymousOneOfMessage_size]; size_t count; int option; if (argc != 2) { fprintf(stderr, "Usage: decode_oneof [number]\n"); return 1; } option = atoi(argv[1]); SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); if (!feof(stdin)) { printf("Message does not fit in buffer\n"); return 1; } { int status = 0; pb_istream_t stream; stream = pb_istream_from_buffer(buffer, count); status = test_oneof_1(&stream, option); if (status != 0) return status; } return 0; } nanopb-0.4.1/tests/anonymous_oneof/oneof.proto000066400000000000000000000007021361552131000215400ustar00rootroot00000000000000syntax = "proto2"; import 'nanopb.proto'; message SubMessage { repeated int32 array = 1 [(nanopb).max_count = 8]; } /* Oneof in a message with other fields */ message AnonymousOneOfMessage { option (nanopb_msgopt).anonymous_oneof = true; required int32 prefix = 1; oneof values { int32 first = 5; string second = 6 [(nanopb).max_size = 8]; SubMessage third = 7; } required int32 suffix = 99; } nanopb-0.4.1/tests/any_type/000077500000000000000000000000001361552131000157605ustar00rootroot00000000000000nanopb-0.4.1/tests/any_type/SConscript000066400000000000000000000014171361552131000177750ustar00rootroot00000000000000# Test usage of Any type Import("env") incpath = env.Clone() incpath.Append(PROTOCPATH = '#any_type') incpath.Append(CPPPATH = '$BUILD/any_type') incpath.NanopbProto("anytest") incpath.NanopbProto(["google/protobuf/any", "google/protobuf/any.options"]) incpath.NanopbProto("google/protobuf/duration") enc = incpath.Program(["encode_any.c", "anytest.pb.c", "google/protobuf/any.pb.c", "google/protobuf/duration.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) dec = incpath.Program(["decode_any.c", "anytest.pb.c", "google/protobuf/any.pb.c", "google/protobuf/duration.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(enc) env.RunTest([dec, "encode_any.output"]) nanopb-0.4.1/tests/any_type/anytest.proto000066400000000000000000000015361361552131000205410ustar00rootroot00000000000000// This file is an example and test case on handling the Any type in nanopb. // The Any type is defined in Google-provided any.proto file: // message Any { // string type_url = 1; // bytes value = 2; // } // // The type_url field identifies the type of message, and the message data // is inside the bytes field. // // The encoding follows the basic format of protobuf and doesn't require // special support to handle. In this example, we just set maximum size for // the type_url and value fields, and then call pb_decode() again on the value. // // This does result in unnecessarily copying the data around, so for larger // values it is preferrable to use callbacks on the fields instead. syntax = "proto3"; import "google/protobuf/any.proto"; message BaseMessage { int32 start = 1; google.protobuf.Any details = 2; int32 end = 3; } nanopb-0.4.1/tests/any_type/decode_any.c000066400000000000000000000025171361552131000202230ustar00rootroot00000000000000#include #include #include #include #include "test_helpers.h" #include "anytest.pb.h" #include "google/protobuf/duration.pb.h" int main() { BaseMessage msg = BaseMessage_init_zero; uint8_t buffer[256]; pb_istream_t stream; size_t count; bool status; /* Read the data into buffer */ SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); stream = pb_istream_from_buffer(buffer, count); /* Decode the base message */ if (!pb_decode(&stream, BaseMessage_fields, &msg)) { printf("Parsing failed: %s\n", PB_GET_ERROR(&stream)); return 1; } assert(msg.start == 1234); assert(msg.end == 5678); /* Decode the Any message if we know the type */ if (strcmp(msg.details.type_url, "type.googleapis.com/google.protobuf.Duration") == 0) { google_protobuf_Duration duration = google_protobuf_Duration_init_zero; stream = pb_istream_from_buffer(msg.details.value.bytes, msg.details.value.size); status = pb_decode(&stream, google_protobuf_Duration_fields, &duration); assert(status); assert(duration.seconds == 99999); assert(duration.nanos = 100); return 0; } else { fprintf(stderr, "Unknown Any type\n"); return 2; } } nanopb-0.4.1/tests/any_type/encode_any.c000066400000000000000000000026051361552131000202330ustar00rootroot00000000000000#include #include #include #include #include "test_helpers.h" #include "anytest.pb.h" #include "google/protobuf/duration.pb.h" int main() { BaseMessage msg = BaseMessage_init_zero; google_protobuf_Duration duration = google_protobuf_Duration_init_zero; uint8_t buffer[256]; pb_ostream_t stream; bool status; msg.start = 1234; msg.end = 5678; /* Fill in the Any message header */ msg.has_details = true; strncpy(msg.details.type_url, "type.googleapis.com/google.protobuf.Duration", sizeof(msg.details.type_url)); /* Encode a Duration message inside the Any message. */ duration.seconds = 99999; duration.nanos = 100; stream = pb_ostream_from_buffer(msg.details.value.bytes, sizeof(msg.details.value.bytes)); status = pb_encode(&stream, google_protobuf_Duration_fields, &duration); assert(status); msg.details.value.size = stream.bytes_written; /* Then encode the outer message */ stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); if (pb_encode(&stream, BaseMessage_fields, &msg)) { /* Write the result data to stdout */ SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; } } nanopb-0.4.1/tests/any_type/google/000077500000000000000000000000001361552131000172345ustar00rootroot00000000000000nanopb-0.4.1/tests/any_type/google/protobuf/000077500000000000000000000000001361552131000210745ustar00rootroot00000000000000nanopb-0.4.1/tests/any_type/google/protobuf/any.options000066400000000000000000000001171361552131000232770ustar00rootroot00000000000000google.protobuf.Any.type_url max_size:64 google.protobuf.Any.value max_size:64 nanopb-0.4.1/tests/any_type/google/protobuf/any.proto000066400000000000000000000132741361552131000227570ustar00rootroot00000000000000// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. syntax = "proto3"; package google.protobuf; option csharp_namespace = "Google.Protobuf.WellKnownTypes"; option go_package = "github.com/golang/protobuf/ptypes/any"; option java_package = "com.google.protobuf"; option java_outer_classname = "AnyProto"; option java_multiple_files = true; option objc_class_prefix = "GPB"; // `Any` contains an arbitrary serialized protocol buffer message along with a // URL that describes the type of the serialized message. // // Protobuf library provides support to pack/unpack Any values in the form // of utility functions or additional generated methods of the Any type. // // Example 1: Pack and unpack a message in C++. // // Foo foo = ...; // Any any; // any.PackFrom(foo); // ... // if (any.UnpackTo(&foo)) { // ... // } // // Example 2: Pack and unpack a message in Java. // // Foo foo = ...; // Any any = Any.pack(foo); // ... // if (any.is(Foo.class)) { // foo = any.unpack(Foo.class); // } // // Example 3: Pack and unpack a message in Python. // // foo = Foo(...) // any = Any() // any.Pack(foo) // ... // if any.Is(Foo.DESCRIPTOR): // any.Unpack(foo) // ... // // Example 4: Pack and unpack a message in Go // // foo := &pb.Foo{...} // any, err := ptypes.MarshalAny(foo) // ... // foo := &pb.Foo{} // if err := ptypes.UnmarshalAny(any, foo); err != nil { // ... // } // // The pack methods provided by protobuf library will by default use // 'type.googleapis.com/full.type.name' as the type URL and the unpack // methods only use the fully qualified type name after the last '/' // in the type URL, for example "foo.bar.com/x/y.z" will yield type // name "y.z". // // // JSON // ==== // The JSON representation of an `Any` value uses the regular // representation of the deserialized, embedded message, with an // additional field `@type` which contains the type URL. Example: // // package google.profile; // message Person { // string first_name = 1; // string last_name = 2; // } // // { // "@type": "type.googleapis.com/google.profile.Person", // "firstName": , // "lastName": // } // // If the embedded message type is well-known and has a custom JSON // representation, that representation will be embedded adding a field // `value` which holds the custom JSON in addition to the `@type` // field. Example (for message [google.protobuf.Duration][]): // // { // "@type": "type.googleapis.com/google.protobuf.Duration", // "value": "1.212s" // } // message Any { // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. The last segment of the URL's path must represent // the fully qualified name of the type (as in // `path/google.protobuf.Duration`). The name should be in a canonical form // (e.g., leading "." is not accepted). // // In practice, teams usually precompile into the binary all types that they // expect it to use in the context of Any. However, for URLs which use the // scheme `http`, `https`, or no scheme, one can optionally set up a type // server that maps type URLs to message definitions as follows: // // * If no scheme is provided, `https` is assumed. // * An HTTP GET on the URL must yield a [google.protobuf.Type][] // value in binary format, or produce an error. // * Applications are allowed to cache lookup results based on the // URL, or have them precompiled into a binary to avoid any // lookup. Therefore, binary compatibility needs to be preserved // on changes to types. (Use versioned type names to manage // breaking changes.) // // Note: this functionality is not currently available in the official // protobuf release, and it is not used for type URLs beginning with // type.googleapis.com. // // Schemes other than `http`, `https` (or the empty scheme) might be // used with implementation specific semantics. // string type_url = 1; // Must be a valid serialized protocol buffer of the above specified type. bytes value = 2; } nanopb-0.4.1/tests/any_type/google/protobuf/duration.proto000066400000000000000000000114321361552131000240070ustar00rootroot00000000000000// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. syntax = "proto3"; package google.protobuf; option csharp_namespace = "Google.Protobuf.WellKnownTypes"; option cc_enable_arenas = true; option go_package = "github.com/golang/protobuf/ptypes/duration"; option java_package = "com.google.protobuf"; option java_outer_classname = "DurationProto"; option java_multiple_files = true; option objc_class_prefix = "GPB"; // A Duration represents a signed, fixed-length span of time represented // as a count of seconds and fractions of seconds at nanosecond // resolution. It is independent of any calendar and concepts like "day" // or "month". It is related to Timestamp in that the difference between // two Timestamp values is a Duration and it can be added or subtracted // from a Timestamp. Range is approximately +-10,000 years. // // # Examples // // Example 1: Compute Duration from two Timestamps in pseudo code. // // Timestamp start = ...; // Timestamp end = ...; // Duration duration = ...; // // duration.seconds = end.seconds - start.seconds; // duration.nanos = end.nanos - start.nanos; // // if (duration.seconds < 0 && duration.nanos > 0) { // duration.seconds += 1; // duration.nanos -= 1000000000; // } else if (durations.seconds > 0 && duration.nanos < 0) { // duration.seconds -= 1; // duration.nanos += 1000000000; // } // // Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. // // Timestamp start = ...; // Duration duration = ...; // Timestamp end = ...; // // end.seconds = start.seconds + duration.seconds; // end.nanos = start.nanos + duration.nanos; // // if (end.nanos < 0) { // end.seconds -= 1; // end.nanos += 1000000000; // } else if (end.nanos >= 1000000000) { // end.seconds += 1; // end.nanos -= 1000000000; // } // // Example 3: Compute Duration from datetime.timedelta in Python. // // td = datetime.timedelta(days=3, minutes=10) // duration = Duration() // duration.FromTimedelta(td) // // # JSON Mapping // // In JSON format, the Duration type is encoded as a string rather than an // object, where the string ends in the suffix "s" (indicating seconds) and // is preceded by the number of seconds, with nanoseconds expressed as // fractional seconds. For example, 3 seconds with 0 nanoseconds should be // encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should // be expressed in JSON format as "3.000000001s", and 3 seconds and 1 // microsecond should be expressed in JSON format as "3.000001s". // // message Duration { // Signed seconds of the span of time. Must be from -315,576,000,000 // to +315,576,000,000 inclusive. Note: these bounds are computed from: // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years int64 seconds = 1; // Signed fractions of a second at nanosecond resolution of the span // of time. Durations less than one second are represented with a 0 // `seconds` field and a positive or negative `nanos` field. For durations // of one second or more, a non-zero value for the `nanos` field must be // of the same sign as the `seconds` field. Must be from -999,999,999 // to +999,999,999 inclusive. int32 nanos = 2; } nanopb-0.4.1/tests/backwards_compatibility/000077500000000000000000000000001361552131000210225ustar00rootroot00000000000000nanopb-0.4.1/tests/backwards_compatibility/SConscript000066400000000000000000000006161361552131000230370ustar00rootroot00000000000000# Check that the old generated .pb.c/.pb.h files are still compatible with the # current version of nanopb. Import("env") enc = env.Program(["encode_legacy.c", "alltypes_legacy.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) dec = env.Program(["decode_legacy.c", "alltypes_legacy.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(enc) env.RunTest([dec, "encode_legacy.output"]) nanopb-0.4.1/tests/backwards_compatibility/alltypes_legacy.c000066400000000000000000000037701361552131000243560ustar00rootroot00000000000000/* Automatically generated nanopb constant definitions */ /* Generated by nanopb-0.4.0-dev */ #include "alltypes_legacy.h" /* @@protoc_insertion_point(includes) */ #if PB_PROTO_HEADER_VERSION != 40 #error Regenerate this file with the current version of nanopb generator. #endif pb_byte_t SubMessage_DEFAULT[] = {0x0a, 0x01, 0x31, 0x10, 0x02, 0x1d, 0x03, 0x00, 0x00, 0x00, 0x00}; pb_byte_t EmptyMessage_DEFAULT[] = {0x00}; pb_byte_t Limits_DEFAULT[] = {0x08, 0xff, 0xff, 0xff, 0xff, 0x07, 0x10, 0x81, 0x80, 0x80, 0x80, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x18, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x20, 0x00, 0x28, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x30, 0x81, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01, 0x38, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x40, 0x00, 0x48, 0xff, 0xff, 0xff, 0xff, 0x07, 0x50, 0x81, 0x80, 0x80, 0x80, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00}; pb_byte_t AllTypes_DEFAULT[] = {0xc8, 0x02, 0xc9, 0x1f, 0xd0, 0x02, 0xca, 0x1f, 0xd8, 0x02, 0xcb, 0x1f, 0xe0, 0x02, 0xcc, 0x1f, 0xe8, 0x02, 0x9a, 0x3f, 0xf0, 0x02, 0x9c, 0x3f, 0xf8, 0x02, 0x00, 0x85, 0x03, 0xd0, 0x0f, 0x00, 0x00, 0x8d, 0x03, 0xd1, 0x0f, 0x00, 0x00, 0x95, 0x03, 0x00, 0x20, 0x7d, 0x45, 0x99, 0x03, 0xd3, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x03, 0xd4, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaf, 0x40, 0xb2, 0x03, 0x04, 0x34, 0x30, 0x35, 0x34, 0xba, 0x03, 0x04, 0x34, 0x30, 0x35, 0x35, 0xc8, 0x03, 0x02, 0x00}; PB_BIND(SubMessage, SubMessage, AUTO) PB_BIND(EmptyMessage, EmptyMessage, AUTO) PB_BIND(Limits, Limits, AUTO) PB_BIND(AllTypes, AllTypes, 2) #ifndef PB_CONVERT_DOUBLE_FLOAT /* On some platforms (such as AVR), double is really float. * Using double on these platforms is not directly supported * by nanopb, but see example_avr_double. * To get rid of this error, remove any double fields from your .proto. */ PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES) #endif /* @@protoc_insertion_point(eof) */ nanopb-0.4.1/tests/backwards_compatibility/alltypes_legacy.h000066400000000000000000000343451361552131000243650ustar00rootroot00000000000000/* Automatically generated nanopb header */ /* Generated by nanopb-0.4.0-dev */ #ifndef PB_ALLTYPES_LEGACY_H_INCLUDED #define PB_ALLTYPES_LEGACY_H_INCLUDED #include /* @@protoc_insertion_point(includes) */ #if PB_PROTO_HEADER_VERSION != 40 #error Regenerate this file with the current version of nanopb generator. #endif #ifdef __cplusplus extern "C" { #endif /* Enum definitions */ typedef enum _HugeEnum { HugeEnum_Negative = -2147483647, HugeEnum_Positive = 2147483647 } HugeEnum; #define _HugeEnum_MIN HugeEnum_Negative #define _HugeEnum_MAX HugeEnum_Positive #define _HugeEnum_ARRAYSIZE ((HugeEnum)(HugeEnum_Positive+1)) typedef enum _MyEnum { MyEnum_Zero = 0, MyEnum_First = 1, MyEnum_Second = 2, MyEnum_Truth = 42 } MyEnum; #define _MyEnum_MIN MyEnum_Zero #define _MyEnum_MAX MyEnum_Truth #define _MyEnum_ARRAYSIZE ((MyEnum)(MyEnum_Truth+1)) /* Struct definitions */ typedef struct _EmptyMessage { char dummy_field; /* @@protoc_insertion_point(struct:EmptyMessage) */ } EmptyMessage; typedef struct _Limits { int32_t int32_min; int32_t int32_max; uint32_t uint32_min; uint32_t uint32_max; int64_t int64_min; int64_t int64_max; uint64_t uint64_min; uint64_t uint64_max; HugeEnum enum_min; HugeEnum enum_max; /* @@protoc_insertion_point(struct:Limits) */ } Limits; typedef struct _SubMessage { char substuff1[16]; int32_t substuff2; bool has_substuff3; uint32_t substuff3; /* @@protoc_insertion_point(struct:SubMessage) */ } SubMessage; typedef PB_BYTES_ARRAY_T(16) AllTypes_req_bytes_t; typedef PB_BYTES_ARRAY_T(16) AllTypes_rep_bytes_t; typedef PB_BYTES_ARRAY_T(16) AllTypes_opt_bytes_t; typedef struct _AllTypes { int32_t req_int32; int64_t req_int64; uint32_t req_uint32; uint64_t req_uint64; int32_t req_sint32; int64_t req_sint64; bool req_bool; uint32_t req_fixed32; int32_t req_sfixed32; float req_float; uint64_t req_fixed64; int64_t req_sfixed64; double req_double; char req_string[16]; AllTypes_req_bytes_t req_bytes; SubMessage req_submsg; MyEnum req_enum; pb_size_t rep_int32_count; int32_t rep_int32[5]; pb_size_t rep_int64_count; int64_t rep_int64[5]; pb_size_t rep_uint32_count; uint32_t rep_uint32[5]; pb_size_t rep_uint64_count; uint64_t rep_uint64[5]; pb_size_t rep_sint32_count; int32_t rep_sint32[5]; pb_size_t rep_sint64_count; int64_t rep_sint64[5]; pb_size_t rep_bool_count; bool rep_bool[5]; pb_size_t rep_fixed32_count; uint32_t rep_fixed32[5]; pb_size_t rep_sfixed32_count; int32_t rep_sfixed32[5]; pb_size_t rep_float_count; float rep_float[5]; pb_size_t rep_fixed64_count; uint64_t rep_fixed64[5]; pb_size_t rep_sfixed64_count; int64_t rep_sfixed64[5]; pb_size_t rep_double_count; double rep_double[5]; pb_size_t rep_string_count; char rep_string[5][16]; pb_size_t rep_bytes_count; AllTypes_rep_bytes_t rep_bytes[5]; pb_size_t rep_submsg_count; SubMessage rep_submsg[5]; pb_size_t rep_enum_count; MyEnum rep_enum[5]; bool has_opt_int32; int32_t opt_int32; bool has_opt_int64; int64_t opt_int64; bool has_opt_uint32; uint32_t opt_uint32; bool has_opt_uint64; uint64_t opt_uint64; bool has_opt_sint32; int32_t opt_sint32; bool has_opt_sint64; int64_t opt_sint64; bool has_opt_bool; bool opt_bool; bool has_opt_fixed32; uint32_t opt_fixed32; bool has_opt_sfixed32; int32_t opt_sfixed32; bool has_opt_float; float opt_float; bool has_opt_fixed64; uint64_t opt_fixed64; bool has_opt_sfixed64; int64_t opt_sfixed64; bool has_opt_double; double opt_double; bool has_opt_string; char opt_string[16]; bool has_opt_bytes; AllTypes_opt_bytes_t opt_bytes; bool has_opt_submsg; SubMessage opt_submsg; bool has_opt_enum; MyEnum opt_enum; int32_t end; pb_extension_t *extensions; /* @@protoc_insertion_point(struct:AllTypes) */ } AllTypes; /* Initializer values for message structs */ #define SubMessage_init_default {"1", 2, false, 3u} #define EmptyMessage_init_default {0} #define Limits_init_default {2147483647, -2147483647, 4294967295u, 0u, 9223372036854775807ll, -9223372036854775807ll, 18446744073709551615ull, 0ull, HugeEnum_Positive, HugeEnum_Negative} #define AllTypes_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", {0, {0}}, SubMessage_init_default, _MyEnum_MIN, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {"", "", "", "", ""}, 0, {{0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}}, 0, {SubMessage_init_default, SubMessage_init_default, SubMessage_init_default, SubMessage_init_default, SubMessage_init_default}, 0, {_MyEnum_MIN, _MyEnum_MIN, _MyEnum_MIN, _MyEnum_MIN, _MyEnum_MIN}, false, 4041, false, 4042ll, false, 4043u, false, 4044ull, false, 4045, false, 4046, false, false, false, 4048u, false, 4049, false, 4050, false, 4051ull, false, 4052ll, false, 4053, false, "4054", false, {4, {0x34,0x30,0x35,0x35}}, false, SubMessage_init_default, false, MyEnum_Second, 0, NULL} #define SubMessage_init_zero {"", 0, false, 0} #define EmptyMessage_init_zero {0} #define Limits_init_zero {0, 0, 0, 0, 0, 0, 0, 0, _HugeEnum_MIN, _HugeEnum_MIN} #define AllTypes_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", {0, {0}}, SubMessage_init_zero, _MyEnum_MIN, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {0, 0, 0, 0, 0}, 0, {"", "", "", "", ""}, 0, {{0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}}, 0, {SubMessage_init_zero, SubMessage_init_zero, SubMessage_init_zero, SubMessage_init_zero, SubMessage_init_zero}, 0, {_MyEnum_MIN, _MyEnum_MIN, _MyEnum_MIN, _MyEnum_MIN, _MyEnum_MIN}, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, 0, false, "", false, {0, {0}}, false, SubMessage_init_zero, false, _MyEnum_MIN, 0, NULL} /* Field tags (for use in manual encoding/decoding) */ #define Limits_int32_min_tag 1 #define Limits_int32_max_tag 2 #define Limits_uint32_min_tag 3 #define Limits_uint32_max_tag 4 #define Limits_int64_min_tag 5 #define Limits_int64_max_tag 6 #define Limits_uint64_min_tag 7 #define Limits_uint64_max_tag 8 #define Limits_enum_min_tag 9 #define Limits_enum_max_tag 10 #define SubMessage_substuff1_tag 1 #define SubMessage_substuff2_tag 2 #define SubMessage_substuff3_tag 3 #define AllTypes_req_int32_tag 1 #define AllTypes_req_int64_tag 2 #define AllTypes_req_uint32_tag 3 #define AllTypes_req_uint64_tag 4 #define AllTypes_req_sint32_tag 5 #define AllTypes_req_sint64_tag 6 #define AllTypes_req_bool_tag 7 #define AllTypes_req_fixed32_tag 8 #define AllTypes_req_sfixed32_tag 9 #define AllTypes_req_float_tag 10 #define AllTypes_req_fixed64_tag 11 #define AllTypes_req_sfixed64_tag 12 #define AllTypes_req_double_tag 13 #define AllTypes_req_string_tag 14 #define AllTypes_req_bytes_tag 15 #define AllTypes_req_submsg_tag 16 #define AllTypes_req_enum_tag 17 #define AllTypes_rep_int32_tag 21 #define AllTypes_rep_int64_tag 22 #define AllTypes_rep_uint32_tag 23 #define AllTypes_rep_uint64_tag 24 #define AllTypes_rep_sint32_tag 25 #define AllTypes_rep_sint64_tag 26 #define AllTypes_rep_bool_tag 27 #define AllTypes_rep_fixed32_tag 28 #define AllTypes_rep_sfixed32_tag 29 #define AllTypes_rep_float_tag 30 #define AllTypes_rep_fixed64_tag 31 #define AllTypes_rep_sfixed64_tag 32 #define AllTypes_rep_double_tag 33 #define AllTypes_rep_string_tag 34 #define AllTypes_rep_bytes_tag 35 #define AllTypes_rep_submsg_tag 36 #define AllTypes_rep_enum_tag 37 #define AllTypes_opt_int32_tag 41 #define AllTypes_opt_int64_tag 42 #define AllTypes_opt_uint32_tag 43 #define AllTypes_opt_uint64_tag 44 #define AllTypes_opt_sint32_tag 45 #define AllTypes_opt_sint64_tag 46 #define AllTypes_opt_bool_tag 47 #define AllTypes_opt_fixed32_tag 48 #define AllTypes_opt_sfixed32_tag 49 #define AllTypes_opt_float_tag 50 #define AllTypes_opt_fixed64_tag 51 #define AllTypes_opt_sfixed64_tag 52 #define AllTypes_opt_double_tag 53 #define AllTypes_opt_string_tag 54 #define AllTypes_opt_bytes_tag 55 #define AllTypes_opt_submsg_tag 56 #define AllTypes_opt_enum_tag 57 #define AllTypes_end_tag 99 /* Struct field encoding specification for nanopb */ #define SubMessage_FIELDLIST(X, a) \ X(a, STATIC, REQUIRED, STRING, substuff1, 1) \ X(a, STATIC, REQUIRED, INT32, substuff2, 2) \ X(a, STATIC, OPTIONAL, FIXED32, substuff3, 3) #define SubMessage_CALLBACK NULL #define EmptyMessage_FIELDLIST(X, a) \ #define EmptyMessage_CALLBACK NULL #define Limits_FIELDLIST(X, a) \ X(a, STATIC, REQUIRED, INT32, int32_min, 1) \ X(a, STATIC, REQUIRED, INT32, int32_max, 2) \ X(a, STATIC, REQUIRED, UINT32, uint32_min, 3) \ X(a, STATIC, REQUIRED, UINT32, uint32_max, 4) \ X(a, STATIC, REQUIRED, INT64, int64_min, 5) \ X(a, STATIC, REQUIRED, INT64, int64_max, 6) \ X(a, STATIC, REQUIRED, UINT64, uint64_min, 7) \ X(a, STATIC, REQUIRED, UINT64, uint64_max, 8) \ X(a, STATIC, REQUIRED, ENUM, enum_min, 9) \ X(a, STATIC, REQUIRED, ENUM, enum_max, 10) #define Limits_CALLBACK NULL #define AllTypes_FIELDLIST(X, a) \ X(a, STATIC, REQUIRED, INT32, req_int32, 1) \ X(a, STATIC, REQUIRED, INT64, req_int64, 2) \ X(a, STATIC, REQUIRED, UINT32, req_uint32, 3) \ X(a, STATIC, REQUIRED, UINT64, req_uint64, 4) \ X(a, STATIC, REQUIRED, SINT32, req_sint32, 5) \ X(a, STATIC, REQUIRED, SINT64, req_sint64, 6) \ X(a, STATIC, REQUIRED, BOOL, req_bool, 7) \ X(a, STATIC, REQUIRED, FIXED32, req_fixed32, 8) \ X(a, STATIC, REQUIRED, SFIXED32, req_sfixed32, 9) \ X(a, STATIC, REQUIRED, FLOAT, req_float, 10) \ X(a, STATIC, REQUIRED, FIXED64, req_fixed64, 11) \ X(a, STATIC, REQUIRED, SFIXED64, req_sfixed64, 12) \ X(a, STATIC, REQUIRED, DOUBLE, req_double, 13) \ X(a, STATIC, REQUIRED, STRING, req_string, 14) \ X(a, STATIC, REQUIRED, BYTES, req_bytes, 15) \ X(a, STATIC, REQUIRED, MESSAGE, req_submsg, 16) \ X(a, STATIC, REQUIRED, UENUM, req_enum, 17) \ X(a, STATIC, REPEATED, INT32, rep_int32, 21) \ X(a, STATIC, REPEATED, INT64, rep_int64, 22) \ X(a, STATIC, REPEATED, UINT32, rep_uint32, 23) \ X(a, STATIC, REPEATED, UINT64, rep_uint64, 24) \ X(a, STATIC, REPEATED, SINT32, rep_sint32, 25) \ X(a, STATIC, REPEATED, SINT64, rep_sint64, 26) \ X(a, STATIC, REPEATED, BOOL, rep_bool, 27) \ X(a, STATIC, REPEATED, FIXED32, rep_fixed32, 28) \ X(a, STATIC, REPEATED, SFIXED32, rep_sfixed32, 29) \ X(a, STATIC, REPEATED, FLOAT, rep_float, 30) \ X(a, STATIC, REPEATED, FIXED64, rep_fixed64, 31) \ X(a, STATIC, REPEATED, SFIXED64, rep_sfixed64, 32) \ X(a, STATIC, REPEATED, DOUBLE, rep_double, 33) \ X(a, STATIC, REPEATED, STRING, rep_string, 34) \ X(a, STATIC, REPEATED, BYTES, rep_bytes, 35) \ X(a, STATIC, REPEATED, MESSAGE, rep_submsg, 36) \ X(a, STATIC, REPEATED, UENUM, rep_enum, 37) \ X(a, STATIC, OPTIONAL, INT32, opt_int32, 41) \ X(a, STATIC, OPTIONAL, INT64, opt_int64, 42) \ X(a, STATIC, OPTIONAL, UINT32, opt_uint32, 43) \ X(a, STATIC, OPTIONAL, UINT64, opt_uint64, 44) \ X(a, STATIC, OPTIONAL, SINT32, opt_sint32, 45) \ X(a, STATIC, OPTIONAL, SINT64, opt_sint64, 46) \ X(a, STATIC, OPTIONAL, BOOL, opt_bool, 47) \ X(a, STATIC, OPTIONAL, FIXED32, opt_fixed32, 48) \ X(a, STATIC, OPTIONAL, SFIXED32, opt_sfixed32, 49) \ X(a, STATIC, OPTIONAL, FLOAT, opt_float, 50) \ X(a, STATIC, OPTIONAL, FIXED64, opt_fixed64, 51) \ X(a, STATIC, OPTIONAL, SFIXED64, opt_sfixed64, 52) \ X(a, STATIC, OPTIONAL, DOUBLE, opt_double, 53) \ X(a, STATIC, OPTIONAL, STRING, opt_string, 54) \ X(a, STATIC, OPTIONAL, BYTES, opt_bytes, 55) \ X(a, STATIC, OPTIONAL, MESSAGE, opt_submsg, 56) \ X(a, STATIC, OPTIONAL, UENUM, opt_enum, 57) \ X(a, STATIC, REQUIRED, INT32, end, 99) \ X(a, CALLBACK, OPTIONAL, EXTENSION, extensions, 200) #define AllTypes_CALLBACK pb_default_field_callback #define AllTypes_req_submsg_MSGTYPE SubMessage #define AllTypes_rep_submsg_MSGTYPE SubMessage #define AllTypes_opt_submsg_MSGTYPE SubMessage extern const pb_msgdesc_t SubMessage_msg; extern pb_byte_t SubMessage_default[]; extern const pb_msgdesc_t EmptyMessage_msg; extern pb_byte_t EmptyMessage_default[]; extern const pb_msgdesc_t Limits_msg; extern pb_byte_t Limits_default[]; extern const pb_msgdesc_t AllTypes_msg; extern pb_byte_t AllTypes_default[]; /* Defines for backwards compatibility with code written before nanopb-0.4.0 */ #define SubMessage_fields &SubMessage_msg #define EmptyMessage_fields &EmptyMessage_msg #define Limits_fields &Limits_msg #define AllTypes_fields &AllTypes_msg /* Maximum encoded size of messages (where known) */ #define SubMessage_size 33 #define EmptyMessage_size 0 #define Limits_size 100 #define AllTypes_size 1320 #ifdef __cplusplus } /* extern "C" */ #endif /* @@protoc_insertion_point(eof) */ #endif nanopb-0.4.1/tests/backwards_compatibility/alltypes_legacy.options000066400000000000000000000000351361552131000256160ustar00rootroot00000000000000* max_size:16 * max_count:5 nanopb-0.4.1/tests/backwards_compatibility/alltypes_legacy.proto000066400000000000000000000076601361552131000253010ustar00rootroot00000000000000syntax = "proto2"; message SubMessage { required string substuff1 = 1 [default = "1"]; required int32 substuff2 = 2 [default = 2]; optional fixed32 substuff3 = 3 [default = 3]; } message EmptyMessage { } enum HugeEnum { Negative = -2147483647; /* protoc doesn't accept -2147483648 here */ Positive = 2147483647; } message Limits { required int32 int32_min = 1 [default = 2147483647]; required int32 int32_max = 2 [default = -2147483647]; required uint32 uint32_min = 3 [default = 4294967295]; required uint32 uint32_max = 4 [default = 0]; required int64 int64_min = 5 [default = 9223372036854775807]; required int64 int64_max = 6 [default = -9223372036854775807]; required uint64 uint64_min = 7 [default = 18446744073709551615]; required uint64 uint64_max = 8 [default = 0]; required HugeEnum enum_min = 9 [default = Positive]; required HugeEnum enum_max = 10 [default = Negative]; } enum MyEnum { Zero = 0; First = 1; Second = 2; Truth = 42; } message AllTypes { required int32 req_int32 = 1; required int64 req_int64 = 2; required uint32 req_uint32 = 3; required uint64 req_uint64 = 4; required sint32 req_sint32 = 5; required sint64 req_sint64 = 6; required bool req_bool = 7; required fixed32 req_fixed32 = 8; required sfixed32 req_sfixed32= 9; required float req_float = 10; required fixed64 req_fixed64 = 11; required sfixed64 req_sfixed64= 12; required double req_double = 13; required string req_string = 14; required bytes req_bytes = 15; required SubMessage req_submsg = 16; required MyEnum req_enum = 17; repeated int32 rep_int32 = 21 [packed = true]; repeated int64 rep_int64 = 22 [packed = true]; repeated uint32 rep_uint32 = 23 [packed = true]; repeated uint64 rep_uint64 = 24 [packed = true]; repeated sint32 rep_sint32 = 25 [packed = true]; repeated sint64 rep_sint64 = 26 [packed = true]; repeated bool rep_bool = 27 [packed = true]; repeated fixed32 rep_fixed32 = 28 [packed = true]; repeated sfixed32 rep_sfixed32= 29 [packed = true]; repeated float rep_float = 30 [packed = true]; repeated fixed64 rep_fixed64 = 31 [packed = true]; repeated sfixed64 rep_sfixed64= 32 [packed = true]; repeated double rep_double = 33 [packed = true]; repeated string rep_string = 34; repeated bytes rep_bytes = 35; repeated SubMessage rep_submsg = 36; repeated MyEnum rep_enum = 37 [packed = true]; optional int32 opt_int32 = 41 [default = 4041]; optional int64 opt_int64 = 42 [default = 4042]; optional uint32 opt_uint32 = 43 [default = 4043]; optional uint64 opt_uint64 = 44 [default = 4044]; optional sint32 opt_sint32 = 45 [default = 4045]; optional sint64 opt_sint64 = 46 [default = 4046]; optional bool opt_bool = 47 [default = false]; optional fixed32 opt_fixed32 = 48 [default = 4048]; optional sfixed32 opt_sfixed32= 49 [default = 4049]; optional float opt_float = 50 [default = 4050]; optional fixed64 opt_fixed64 = 51 [default = 4051]; optional sfixed64 opt_sfixed64= 52 [default = 4052]; optional double opt_double = 53 [default = 4053]; optional string opt_string = 54 [default = "4054"]; optional bytes opt_bytes = 55 [default = "4055"]; optional SubMessage opt_submsg = 56; optional MyEnum opt_enum = 57 [default = Second]; // Just to make sure that the size of the fields has been calculated // properly, i.e. otherwise a bug in last field might not be detected. required int32 end = 99; extensions 200 to 255; } nanopb-0.4.1/tests/backwards_compatibility/decode_legacy.c000066400000000000000000000206721361552131000237440ustar00rootroot00000000000000/* Tests the decoding of all types. * This is a backwards-compatibility test, using alltypes_legacy.h. * It is similar to decode_alltypes, but duplicated in order to allow * decode_alltypes to test any new features introduced later. * * Run e.g. ./encode_legacy | ./decode_legacy */ #include #include #include #include #include "alltypes_legacy.h" #include "test_helpers.h" #include "unittests.h" /* This function is called once from main(), it handles the decoding and checks the fields. */ bool check_alltypes(pb_istream_t *stream, int mode) { AllTypes alltypes = {0}; int status = 0; if (!pb_decode(stream, AllTypes_fields, &alltypes)) return false; TEST(alltypes.req_int32 == -1001); TEST(alltypes.req_int64 == -1002); TEST(alltypes.req_uint32 == 1003); TEST(alltypes.req_uint64 == 1004); TEST(alltypes.req_sint32 == -1005); TEST(alltypes.req_sint64 == -1006); TEST(alltypes.req_bool == true); TEST(alltypes.req_fixed32 == 1008); TEST(alltypes.req_sfixed32 == -1009); TEST(alltypes.req_float == 1010.0f); TEST(alltypes.req_fixed64 == 1011); TEST(alltypes.req_sfixed64 == -1012); TEST(alltypes.req_double == 1013.0f); TEST(strcmp(alltypes.req_string, "1014") == 0); TEST(alltypes.req_bytes.size == 4); TEST(memcmp(alltypes.req_bytes.bytes, "1015", 4) == 0); TEST(strcmp(alltypes.req_submsg.substuff1, "1016") == 0); TEST(alltypes.req_submsg.substuff2 == 1016); TEST(alltypes.req_submsg.substuff3 == 3); TEST(alltypes.req_enum == MyEnum_Truth); TEST(alltypes.rep_int32_count == 5 && alltypes.rep_int32[4] == -2001 && alltypes.rep_int32[0] == 0); TEST(alltypes.rep_int64_count == 5 && alltypes.rep_int64[4] == -2002 && alltypes.rep_int64[0] == 0); TEST(alltypes.rep_uint32_count == 5 && alltypes.rep_uint32[4] == 2003 && alltypes.rep_uint32[0] == 0); TEST(alltypes.rep_uint64_count == 5 && alltypes.rep_uint64[4] == 2004 && alltypes.rep_uint64[0] == 0); TEST(alltypes.rep_sint32_count == 5 && alltypes.rep_sint32[4] == -2005 && alltypes.rep_sint32[0] == 0); TEST(alltypes.rep_sint64_count == 5 && alltypes.rep_sint64[4] == -2006 && alltypes.rep_sint64[0] == 0); TEST(alltypes.rep_bool_count == 5 && alltypes.rep_bool[4] == true && alltypes.rep_bool[0] == false); TEST(alltypes.rep_fixed32_count == 5 && alltypes.rep_fixed32[4] == 2008 && alltypes.rep_fixed32[0] == 0); TEST(alltypes.rep_sfixed32_count == 5 && alltypes.rep_sfixed32[4] == -2009 && alltypes.rep_sfixed32[0] == 0); TEST(alltypes.rep_float_count == 5 && alltypes.rep_float[4] == 2010.0f && alltypes.rep_float[0] == 0.0f); TEST(alltypes.rep_fixed64_count == 5 && alltypes.rep_fixed64[4] == 2011 && alltypes.rep_fixed64[0] == 0); TEST(alltypes.rep_sfixed64_count == 5 && alltypes.rep_sfixed64[4] == -2012 && alltypes.rep_sfixed64[0] == 0); TEST(alltypes.rep_double_count == 5 && alltypes.rep_double[4] == 2013.0 && alltypes.rep_double[0] == 0.0); TEST(alltypes.rep_string_count == 5 && strcmp(alltypes.rep_string[4], "2014") == 0 && alltypes.rep_string[0][0] == '\0'); TEST(alltypes.rep_bytes_count == 5 && alltypes.rep_bytes[4].size == 4 && alltypes.rep_bytes[0].size == 0); TEST(memcmp(alltypes.rep_bytes[4].bytes, "2015", 4) == 0); TEST(alltypes.rep_submsg_count == 5); TEST(strcmp(alltypes.rep_submsg[4].substuff1, "2016") == 0 && alltypes.rep_submsg[0].substuff1[0] == '\0'); TEST(alltypes.rep_submsg[4].substuff2 == 2016 && alltypes.rep_submsg[0].substuff2 == 0); TEST(alltypes.rep_submsg[4].substuff3 == 2016 && alltypes.rep_submsg[0].substuff3 == 3); TEST(alltypes.rep_enum_count == 5 && alltypes.rep_enum[4] == MyEnum_Truth && alltypes.rep_enum[0] == MyEnum_Zero); if (mode == 0) { /* Expect default values */ TEST(alltypes.has_opt_int32 == false); TEST(alltypes.opt_int32 == 4041); TEST(alltypes.has_opt_int64 == false); TEST(alltypes.opt_int64 == 4042); TEST(alltypes.has_opt_uint32 == false); TEST(alltypes.opt_uint32 == 4043); TEST(alltypes.has_opt_uint64 == false); TEST(alltypes.opt_uint64 == 4044); TEST(alltypes.has_opt_sint32 == false); TEST(alltypes.opt_sint32 == 4045); TEST(alltypes.has_opt_sint64 == false); TEST(alltypes.opt_sint64 == 4046); TEST(alltypes.has_opt_bool == false); TEST(alltypes.opt_bool == false); TEST(alltypes.has_opt_fixed32 == false); TEST(alltypes.opt_fixed32 == 4048); TEST(alltypes.has_opt_sfixed32 == false); TEST(alltypes.opt_sfixed32 == 4049); TEST(alltypes.has_opt_float == false); TEST(alltypes.opt_float == 4050.0f); TEST(alltypes.has_opt_fixed64 == false); TEST(alltypes.opt_fixed64 == 4051); TEST(alltypes.has_opt_sfixed64 == false); TEST(alltypes.opt_sfixed64 == 4052); TEST(alltypes.has_opt_double == false); TEST(alltypes.opt_double == 4053.0); TEST(alltypes.has_opt_string == false); TEST(strcmp(alltypes.opt_string, "4054") == 0); TEST(alltypes.has_opt_bytes == false); TEST(alltypes.opt_bytes.size == 4); TEST(memcmp(alltypes.opt_bytes.bytes, "4055", 4) == 0); TEST(alltypes.has_opt_submsg == false); TEST(strcmp(alltypes.opt_submsg.substuff1, "1") == 0); TEST(alltypes.opt_submsg.substuff2 == 2); TEST(alltypes.opt_submsg.substuff3 == 3); TEST(alltypes.has_opt_enum == false); TEST(alltypes.opt_enum == MyEnum_Second); } else { /* Expect filled-in values */ TEST(alltypes.has_opt_int32 == true); TEST(alltypes.opt_int32 == 3041); TEST(alltypes.has_opt_int64 == true); TEST(alltypes.opt_int64 == 3042); TEST(alltypes.has_opt_uint32 == true); TEST(alltypes.opt_uint32 == 3043); TEST(alltypes.has_opt_uint64 == true); TEST(alltypes.opt_uint64 == 3044); TEST(alltypes.has_opt_sint32 == true); TEST(alltypes.opt_sint32 == 3045); TEST(alltypes.has_opt_sint64 == true); TEST(alltypes.opt_sint64 == 3046); TEST(alltypes.has_opt_bool == true); TEST(alltypes.opt_bool == true); TEST(alltypes.has_opt_fixed32 == true); TEST(alltypes.opt_fixed32 == 3048); TEST(alltypes.has_opt_sfixed32 == true); TEST(alltypes.opt_sfixed32 == 3049); TEST(alltypes.has_opt_float == true); TEST(alltypes.opt_float == 3050.0f); TEST(alltypes.has_opt_fixed64 == true); TEST(alltypes.opt_fixed64 == 3051); TEST(alltypes.has_opt_sfixed64 == true); TEST(alltypes.opt_sfixed64 == 3052); TEST(alltypes.has_opt_double == true); TEST(alltypes.opt_double == 3053.0); TEST(alltypes.has_opt_string == true); TEST(strcmp(alltypes.opt_string, "3054") == 0); TEST(alltypes.has_opt_bytes == true); TEST(alltypes.opt_bytes.size == 4); TEST(memcmp(alltypes.opt_bytes.bytes, "3055", 4) == 0); TEST(alltypes.has_opt_submsg == true); TEST(strcmp(alltypes.opt_submsg.substuff1, "3056") == 0); TEST(alltypes.opt_submsg.substuff2 == 3056); TEST(alltypes.opt_submsg.substuff3 == 3); TEST(alltypes.has_opt_enum == true); TEST(alltypes.opt_enum == MyEnum_Truth); } TEST(alltypes.end == 1099); return status == 0; } int main(int argc, char **argv) { uint8_t buffer[1024]; size_t count; pb_istream_t stream; /* Whether to expect the optional values or the default values. */ int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Read the data into buffer */ SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); /* Construct a pb_istream_t for reading from the buffer */ stream = pb_istream_from_buffer(buffer, count); /* Decode and print out the stuff */ if (!check_alltypes(&stream, mode)) { printf("Parsing failed: %s\n", PB_GET_ERROR(&stream)); return 1; } else { return 0; } } nanopb-0.4.1/tests/backwards_compatibility/encode_legacy.c000066400000000000000000000115101361552131000237450ustar00rootroot00000000000000/* Attempts to test all the datatypes supported by ProtoBuf. * This is a backwards-compatibility test, using alltypes_legacy.h. * It is similar to encode_alltypes, but duplicated in order to allow * encode_alltypes to test any new features introduced later. */ #include #include #include #include #include "alltypes_legacy.h" #include "test_helpers.h" int main(int argc, char **argv) { int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Initialize the structure with constants */ AllTypes alltypes = {0}; alltypes.req_int32 = -1001; alltypes.req_int64 = -1002; alltypes.req_uint32 = 1003; alltypes.req_uint64 = 1004; alltypes.req_sint32 = -1005; alltypes.req_sint64 = -1006; alltypes.req_bool = true; alltypes.req_fixed32 = 1008; alltypes.req_sfixed32 = -1009; alltypes.req_float = 1010.0f; alltypes.req_fixed64 = 1011; alltypes.req_sfixed64 = -1012; alltypes.req_double = 1013.0; strcpy(alltypes.req_string, "1014"); alltypes.req_bytes.size = 4; memcpy(alltypes.req_bytes.bytes, "1015", 4); strcpy(alltypes.req_submsg.substuff1, "1016"); alltypes.req_submsg.substuff2 = 1016; alltypes.req_enum = MyEnum_Truth; alltypes.rep_int32_count = 5; alltypes.rep_int32[4] = -2001; alltypes.rep_int64_count = 5; alltypes.rep_int64[4] = -2002; alltypes.rep_uint32_count = 5; alltypes.rep_uint32[4] = 2003; alltypes.rep_uint64_count = 5; alltypes.rep_uint64[4] = 2004; alltypes.rep_sint32_count = 5; alltypes.rep_sint32[4] = -2005; alltypes.rep_sint64_count = 5; alltypes.rep_sint64[4] = -2006; alltypes.rep_bool_count = 5; alltypes.rep_bool[4] = true; alltypes.rep_fixed32_count = 5; alltypes.rep_fixed32[4] = 2008; alltypes.rep_sfixed32_count = 5; alltypes.rep_sfixed32[4] = -2009; alltypes.rep_float_count = 5; alltypes.rep_float[4] = 2010.0f; alltypes.rep_fixed64_count = 5; alltypes.rep_fixed64[4] = 2011; alltypes.rep_sfixed64_count = 5; alltypes.rep_sfixed64[4] = -2012; alltypes.rep_double_count = 5; alltypes.rep_double[4] = 2013.0; alltypes.rep_string_count = 5; strcpy(alltypes.rep_string[4], "2014"); alltypes.rep_bytes_count = 5; alltypes.rep_bytes[4].size = 4; memcpy(alltypes.rep_bytes[4].bytes, "2015", 4); alltypes.rep_submsg_count = 5; strcpy(alltypes.rep_submsg[4].substuff1, "2016"); alltypes.rep_submsg[4].substuff2 = 2016; alltypes.rep_submsg[4].has_substuff3 = true; alltypes.rep_submsg[4].substuff3 = 2016; alltypes.rep_enum_count = 5; alltypes.rep_enum[4] = MyEnum_Truth; if (mode != 0) { /* Fill in values for optional fields */ alltypes.has_opt_int32 = true; alltypes.opt_int32 = 3041; alltypes.has_opt_int64 = true; alltypes.opt_int64 = 3042; alltypes.has_opt_uint32 = true; alltypes.opt_uint32 = 3043; alltypes.has_opt_uint64 = true; alltypes.opt_uint64 = 3044; alltypes.has_opt_sint32 = true; alltypes.opt_sint32 = 3045; alltypes.has_opt_sint64 = true; alltypes.opt_sint64 = 3046; alltypes.has_opt_bool = true; alltypes.opt_bool = true; alltypes.has_opt_fixed32 = true; alltypes.opt_fixed32 = 3048; alltypes.has_opt_sfixed32 = true; alltypes.opt_sfixed32 = 3049; alltypes.has_opt_float = true; alltypes.opt_float = 3050.0f; alltypes.has_opt_fixed64 = true; alltypes.opt_fixed64 = 3051; alltypes.has_opt_sfixed64 = true; alltypes.opt_sfixed64 = 3052; alltypes.has_opt_double = true; alltypes.opt_double = 3053.0; alltypes.has_opt_string = true; strcpy(alltypes.opt_string, "3054"); alltypes.has_opt_bytes = true; alltypes.opt_bytes.size = 4; memcpy(alltypes.opt_bytes.bytes, "3055", 4); alltypes.has_opt_submsg = true; strcpy(alltypes.opt_submsg.substuff1, "3056"); alltypes.opt_submsg.substuff2 = 3056; alltypes.has_opt_enum = true; alltypes.opt_enum = MyEnum_Truth; } alltypes.end = 1099; { uint8_t buffer[1024]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Now encode it and check if we succeeded. */ if (pb_encode(&stream, AllTypes_fields, &alltypes)) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; /* Success */ } else { fprintf(stderr, "Encoding failed!\n"); return 1; /* Failure */ } } } nanopb-0.4.1/tests/basic_buffer/000077500000000000000000000000001361552131000165425ustar00rootroot00000000000000nanopb-0.4.1/tests/basic_buffer/SConscript000066400000000000000000000007741361552131000205640ustar00rootroot00000000000000# Build and run a basic round-trip test using memory buffer encoding. Import("env") enc = env.Program(["encode_buffer.c", "$COMMON/person.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) dec = env.Program(["decode_buffer.c", "$COMMON/person.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(enc) env.RunTest([dec, "encode_buffer.output"]) env.Decode(["encode_buffer.output", "$COMMON/person.proto"], MESSAGE = "Person") env.Compare(["decode_buffer.output", "encode_buffer.decoded"]) nanopb-0.4.1/tests/basic_buffer/decode_buffer.c000066400000000000000000000042611361552131000214650ustar00rootroot00000000000000/* A very simple decoding test case, using person.proto. * Produces output compatible with protoc --decode. * Reads the encoded data from stdin and prints the values * to stdout as text. * * Run e.g. ./test_encode1 | ./test_decode1 */ #include #include #include "person.pb.h" #include "test_helpers.h" /* This function is called once from main(), it handles the decoding and printing. */ bool print_person(pb_istream_t *stream) { int i; Person person = Person_init_zero; if (!pb_decode(stream, Person_fields, &person)) return false; /* Now the decoding is done, rest is just to print stuff out. */ printf("name: \"%s\"\n", person.name); printf("id: %ld\n", (long)person.id); if (person.has_email) printf("email: \"%s\"\n", person.email); for (i = 0; i < person.phone_count; i++) { Person_PhoneNumber *phone = &person.phone[i]; printf("phone {\n"); printf(" number: \"%s\"\n", phone->number); if (phone->has_type) { switch (phone->type) { case Person_PhoneType_WORK: printf(" type: WORK\n"); break; case Person_PhoneType_HOME: printf(" type: HOME\n"); break; case Person_PhoneType_MOBILE: printf(" type: MOBILE\n"); break; } } printf("}\n"); } return true; } int main() { uint8_t buffer[Person_size]; pb_istream_t stream; size_t count; /* Read the data into buffer */ SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); if (!feof(stdin)) { printf("Message does not fit in buffer\n"); return 1; } /* Construct a pb_istream_t for reading from the buffer */ stream = pb_istream_from_buffer(buffer, count); /* Decode and print out the stuff */ if (!print_person(&stream)) { printf("Parsing failed: %s\n", PB_GET_ERROR(&stream)); return 1; } else { return 0; } } nanopb-0.4.1/tests/basic_buffer/encode_buffer.c000066400000000000000000000021071361552131000214740ustar00rootroot00000000000000/* A very simple encoding test case using person.proto. * Just puts constant data in the fields and encodes into * buffer, which is then written to stdout. */ #include #include #include "person.pb.h" #include "test_helpers.h" int main() { uint8_t buffer[Person_size]; pb_ostream_t stream; /* Initialize the structure with constants */ Person person = {"Test Person 99", 99, true, "test@person.com", 3, {{"555-12345678", true, Person_PhoneType_MOBILE}, {"99-2342", false, 0}, {"1234-5678", true, Person_PhoneType_WORK}, }}; stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Now encode it and check if we succeeded. */ if (pb_encode(&stream, Person_fields, &person)) { /* Write the result data to stdout */ SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; /* Success */ } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; /* Failure */ } } nanopb-0.4.1/tests/basic_stream/000077500000000000000000000000001361552131000165645ustar00rootroot00000000000000nanopb-0.4.1/tests/basic_stream/SConscript000066400000000000000000000007741361552131000206060ustar00rootroot00000000000000# Build and run a basic round-trip test using direct stream encoding. Import("env") enc = env.Program(["encode_stream.c", "$COMMON/person.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) dec = env.Program(["decode_stream.c", "$COMMON/person.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(enc) env.RunTest([dec, "encode_stream.output"]) env.Decode(["encode_stream.output", "$COMMON/person.proto"], MESSAGE = "Person") env.Compare(["decode_stream.output", "encode_stream.decoded"]) nanopb-0.4.1/tests/basic_stream/decode_stream.c000066400000000000000000000040111361552131000215220ustar00rootroot00000000000000/* Same as test_decode1 but reads from stdin directly. */ #include #include #include "person.pb.h" #include "test_helpers.h" /* This function is called once from main(), it handles the decoding and printing. Ugly copy-paste from test_decode1.c. */ bool print_person(pb_istream_t *stream) { int i; Person person = Person_init_zero; if (!pb_decode(stream, Person_fields, &person)) return false; /* Now the decoding is done, rest is just to print stuff out. */ printf("name: \"%s\"\n", person.name); printf("id: %ld\n", (long)person.id); if (person.has_email) printf("email: \"%s\"\n", person.email); for (i = 0; i < person.phone_count; i++) { Person_PhoneNumber *phone = &person.phone[i]; printf("phone {\n"); printf(" number: \"%s\"\n", phone->number); if (phone->has_type) { switch (phone->type) { case Person_PhoneType_WORK: printf(" type: WORK\n"); break; case Person_PhoneType_HOME: printf(" type: HOME\n"); break; case Person_PhoneType_MOBILE: printf(" type: MOBILE\n"); break; } } printf("}\n"); } return true; } /* This binds the pb_istream_t to stdin */ bool callback(pb_istream_t *stream, uint8_t *buf, size_t count) { FILE *file = (FILE*)stream->state; size_t len = fread(buf, 1, count, file); if (len == count) { return true; } else { stream->bytes_left = 0; return false; } } int main() { pb_istream_t stream = {&callback, NULL, SIZE_MAX}; stream.state = stdin; SET_BINARY_MODE(stdin); if (!print_person(&stream)) { printf("Parsing failed: %s\n", PB_GET_ERROR(&stream)); return 1; } else { return 0; } } nanopb-0.4.1/tests/basic_stream/encode_stream.c000066400000000000000000000021721361552131000215420ustar00rootroot00000000000000/* Same as test_encode1.c, except writes directly to stdout. */ #include #include #include "person.pb.h" #include "test_helpers.h" /* This binds the pb_ostream_t into the stdout stream */ bool streamcallback(pb_ostream_t *stream, const uint8_t *buf, size_t count) { FILE *file = (FILE*) stream->state; return fwrite(buf, 1, count, file) == count; } int main() { /* Initialize the structure with constants */ Person person = {"Test Person 99", 99, true, "test@person.com", 3, {{"555-12345678", true, Person_PhoneType_MOBILE}, {"99-2342", false, 0}, {"1234-5678", true, Person_PhoneType_WORK}, }}; /* Prepare the stream, output goes directly to stdout */ pb_ostream_t stream = {&streamcallback, NULL, SIZE_MAX, 0}; stream.state = stdout; SET_BINARY_MODE(stdout); /* Now encode it and check if we succeeded. */ if (pb_encode(&stream, Person_fields, &person)) { return 0; /* Success */ } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; /* Failure */ } } nanopb-0.4.1/tests/buffer_only/000077500000000000000000000000001361552131000164425ustar00rootroot00000000000000nanopb-0.4.1/tests/buffer_only/SConscript000066400000000000000000000021401361552131000204510ustar00rootroot00000000000000# Run the alltypes test case, but compile with PB_BUFFER_ONLY=1 Import("env") # Take copy of the files for custom build. c = Copy("$TARGET", "$SOURCE") env.Command("alltypes.pb.h", "$BUILD/alltypes/alltypes.pb.h", c) env.Command("alltypes.pb.c", "$BUILD/alltypes/alltypes.pb.c", c) env.Command("encode_alltypes.c", "$BUILD/alltypes/encode_alltypes.c", c) env.Command("decode_alltypes.c", "$BUILD/alltypes/decode_alltypes.c", c) # Define the compilation options opts = env.Clone() opts.Append(CPPDEFINES = {'PB_BUFFER_ONLY': 1}) # Build new version of core strict = opts.Clone() strict.Append(CFLAGS = strict['CORECFLAGS']) strict.Object("pb_decode_bufonly.o", "$NANOPB/pb_decode.c") strict.Object("pb_encode_bufonly.o", "$NANOPB/pb_encode.c") strict.Object("pb_common_bufonly.o", "$NANOPB/pb_common.c") # Now build and run the test normally. enc = opts.Program(["encode_alltypes.c", "alltypes.pb.c", "pb_encode_bufonly.o", "pb_common_bufonly.o"]) dec = opts.Program(["decode_alltypes.c", "alltypes.pb.c", "pb_decode_bufonly.o", "pb_common_bufonly.o"]) env.RunTest(enc) env.RunTest([dec, "encode_alltypes.output"]) nanopb-0.4.1/tests/callbacks/000077500000000000000000000000001361552131000160475ustar00rootroot00000000000000nanopb-0.4.1/tests/callbacks/SConscript000066400000000000000000000010151361552131000200560ustar00rootroot00000000000000# Test the functionality of the callback fields. Import("env") env.NanopbProto("callbacks") enc = env.Program(["encode_callbacks.c", "callbacks.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) dec = env.Program(["decode_callbacks.c", "callbacks.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(enc) env.RunTest([dec, "encode_callbacks.output"]) env.Decode(["encode_callbacks.output", "callbacks.proto"], MESSAGE = "TestMessage") env.Compare(["decode_callbacks.output", "encode_callbacks.decoded"]) nanopb-0.4.1/tests/callbacks/callbacks.proto000066400000000000000000000006751361552131000210630ustar00rootroot00000000000000syntax = "proto2"; message SubMessage { optional string stringvalue = 1; repeated int32 int32value = 2; repeated fixed32 fixed32value = 3; repeated fixed64 fixed64value = 4; } message TestMessage { optional string stringvalue = 1; repeated int32 int32value = 2; repeated fixed32 fixed32value = 3; repeated fixed64 fixed64value = 4; optional SubMessage submsg = 5; repeated string repeatedstring = 6; } nanopb-0.4.1/tests/callbacks/decode_callbacks.c000066400000000000000000000060351361552131000214410ustar00rootroot00000000000000/* Decoding testcase for callback fields. * Run e.g. ./test_encode_callbacks | ./test_decode_callbacks */ #include #include #include "callbacks.pb.h" #include "test_helpers.h" bool print_string(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint8_t buffer[1024] = {0}; /* We could read block-by-block to avoid the large buffer... */ if (stream->bytes_left > sizeof(buffer) - 1) return false; if (!pb_read(stream, buffer, stream->bytes_left)) return false; /* Print the string, in format comparable with protoc --decode. * Format comes from the arg defined in main(). */ printf((char*)*arg, buffer); return true; } bool print_int32(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint64_t value; if (!pb_decode_varint(stream, &value)) return false; printf((char*)*arg, (long)value); return true; } bool print_fixed32(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint32_t value; if (!pb_decode_fixed32(stream, &value)) return false; printf((char*)*arg, (long)value); return true; } bool print_fixed64(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint64_t value; if (!pb_decode_fixed64(stream, &value)) return false; printf((char*)*arg, (long)value); return true; } int main() { uint8_t buffer[1024]; size_t length; pb_istream_t stream; /* Note: empty initializer list initializes the struct with all-0. * This is recommended so that unused callbacks are set to NULL instead * of crashing at runtime. */ TestMessage testmessage = {{{NULL}}}; SET_BINARY_MODE(stdin); length = fread(buffer, 1, 1024, stdin); stream = pb_istream_from_buffer(buffer, length); testmessage.submsg.stringvalue.funcs.decode = &print_string; testmessage.submsg.stringvalue.arg = "submsg {\n stringvalue: \"%s\"\n"; testmessage.submsg.int32value.funcs.decode = &print_int32; testmessage.submsg.int32value.arg = " int32value: %ld\n"; testmessage.submsg.fixed32value.funcs.decode = &print_fixed32; testmessage.submsg.fixed32value.arg = " fixed32value: %ld\n"; testmessage.submsg.fixed64value.funcs.decode = &print_fixed64; testmessage.submsg.fixed64value.arg = " fixed64value: %ld\n}\n"; testmessage.stringvalue.funcs.decode = &print_string; testmessage.stringvalue.arg = "stringvalue: \"%s\"\n"; testmessage.int32value.funcs.decode = &print_int32; testmessage.int32value.arg = "int32value: %ld\n"; testmessage.fixed32value.funcs.decode = &print_fixed32; testmessage.fixed32value.arg = "fixed32value: %ld\n"; testmessage.fixed64value.funcs.decode = &print_fixed64; testmessage.fixed64value.arg = "fixed64value: %ld\n"; testmessage.repeatedstring.funcs.decode = &print_string; testmessage.repeatedstring.arg = "repeatedstring: \"%s\"\n"; if (!pb_decode(&stream, TestMessage_fields, &testmessage)) return 1; return 0; } nanopb-0.4.1/tests/callbacks/encode_callbacks.c000066400000000000000000000047431361552131000214570ustar00rootroot00000000000000/* Encoding testcase for callback fields */ #include #include #include #include "callbacks.pb.h" #include "test_helpers.h" bool encode_string(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { char *str = "Hello world!"; if (!pb_encode_tag_for_field(stream, field)) return false; return pb_encode_string(stream, (uint8_t*)str, strlen(str)); } bool encode_int32(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { if (!pb_encode_tag_for_field(stream, field)) return false; return pb_encode_varint(stream, 42); } bool encode_fixed32(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { uint32_t value = 42; if (!pb_encode_tag_for_field(stream, field)) return false; return pb_encode_fixed32(stream, &value); } bool encode_fixed64(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { uint64_t value = 42; if (!pb_encode_tag_for_field(stream, field)) return false; return pb_encode_fixed64(stream, &value); } bool encode_repeatedstring(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { char *str[4] = {"Hello world!", "", "Test", "Test2"}; int i; for (i = 0; i < 4; i++) { if (!pb_encode_tag_for_field(stream, field)) return false; if (!pb_encode_string(stream, (uint8_t*)str[i], strlen(str[i]))) return false; } return true; } int main() { uint8_t buffer[1024]; pb_ostream_t stream; TestMessage testmessage = {{{NULL}}}; stream = pb_ostream_from_buffer(buffer, 1024); testmessage.stringvalue.funcs.encode = &encode_string; testmessage.int32value.funcs.encode = &encode_int32; testmessage.fixed32value.funcs.encode = &encode_fixed32; testmessage.fixed64value.funcs.encode = &encode_fixed64; testmessage.has_submsg = true; testmessage.submsg.stringvalue.funcs.encode = &encode_string; testmessage.submsg.int32value.funcs.encode = &encode_int32; testmessage.submsg.fixed32value.funcs.encode = &encode_fixed32; testmessage.submsg.fixed64value.funcs.encode = &encode_fixed64; testmessage.repeatedstring.funcs.encode = &encode_repeatedstring; if (!pb_encode(&stream, TestMessage_fields, &testmessage)) return 1; SET_BINARY_MODE(stdout); if (fwrite(buffer, stream.bytes_written, 1, stdout) != 1) return 2; return 0; } nanopb-0.4.1/tests/common/000077500000000000000000000000001361552131000154205ustar00rootroot00000000000000nanopb-0.4.1/tests/common/SConscript000066400000000000000000000034171361552131000174370ustar00rootroot00000000000000# Build the common files needed by multiple test cases Import('env') # Protocol definitions for the encode/decode_unittests env.NanopbProto("unittestproto") # Protocol definitions for basic_buffer/stream tests env.NanopbProto("person") #-------------------------------------------- # Binaries of the pb_decode.c and pb_encode.c # These are built using more strict warning flags. strict = env.Clone() strict.Append(CFLAGS = strict['CORECFLAGS']) strict.Object("pb_decode.o", "$NANOPB/pb_decode.c") strict.Object("pb_encode.o", "$NANOPB/pb_encode.c") strict.Object("pb_common.o", "$NANOPB/pb_common.c") #----------------------------------------------- # Binaries of pb_decode etc. with malloc support # Uses malloc_wrappers.c to count allocations. malloc_env = env.Clone() malloc_env.Append(CPPDEFINES = {'PB_ENABLE_MALLOC': 1, 'PB_SYSTEM_HEADER': '\\"malloc_wrappers_syshdr.h\\"'}) malloc_env.Append(CPPPATH = ["$COMMON"]) if 'SYSHDR' in malloc_env: malloc_env.Append(CPPDEFINES = {'PB_OLD_SYSHDR': malloc_env['SYSHDR']}) # Disable libmudflap, because it will confuse valgrind # and other memory leak detection tools. if '-fmudflap' in env["CCFLAGS"]: malloc_env["CCFLAGS"].remove("-fmudflap") malloc_env["LINKFLAGS"].remove("-fmudflap") malloc_env["LIBS"].remove("mudflap") malloc_strict = malloc_env.Clone() malloc_strict.Append(CFLAGS = malloc_strict['CORECFLAGS']) malloc_strict.Object("pb_decode_with_malloc.o", "$NANOPB/pb_decode.c") malloc_strict.Object("pb_encode_with_malloc.o", "$NANOPB/pb_encode.c") malloc_strict.Object("pb_common_with_malloc.o", "$NANOPB/pb_common.c") malloc_env.Object("malloc_wrappers.o", "malloc_wrappers.c") malloc_env.Depends("$NANOPB/pb.h", ["malloc_wrappers_syshdr.h", "malloc_wrappers.h"]) Export("malloc_env") nanopb-0.4.1/tests/common/malloc_wrappers.c000066400000000000000000000100461361552131000207570ustar00rootroot00000000000000/* The wrapper functions in this file work like regular malloc() and free(), * but store check values before and after the allocation. This helps to catch * any buffer overrun errors in the test cases. */ #include "malloc_wrappers.h" #include #include #include #include #define GUARD_SIZE (sizeof(size_t)*3) #define PREFIX_SIZE (sizeof(size_t)*2) #define CHECK1 ((size_t)0xDEADBEEF) #define CHECK2 ((size_t)0x600DCAFE) #ifndef MAX_ALLOC_BYTES #define MAX_ALLOC_BYTES 16*1024*1024 #endif #ifndef DEBUG_MALLOC #define DEBUG_MALLOC 0 #endif static size_t g_alloc_count = 0; static size_t g_alloc_bytes = 0; static size_t g_max_alloc_bytes = MAX_ALLOC_BYTES; /* Allocate memory and place check values before and after. */ void* malloc_with_check(size_t size) { char *buf = NULL; if (size <= g_max_alloc_bytes - g_alloc_bytes) { buf = malloc(size + GUARD_SIZE); } if (buf) { ((size_t*)buf)[0] = size; ((size_t*)buf)[1] = CHECK1; ((size_t*)(buf + size))[2] = CHECK2; g_alloc_count++; g_alloc_bytes += size; if (DEBUG_MALLOC) fprintf(stderr, "Alloc 0x%04x/%u\n", (unsigned)(uintptr_t)(buf + PREFIX_SIZE), (unsigned)size); return buf + PREFIX_SIZE; } else { if (DEBUG_MALLOC) fprintf(stderr, "malloc(%u) failed\n", (unsigned)size); return NULL; } } /* Free memory allocated with malloc_with_check() and do the checks. */ void free_with_check(void *mem) { if (mem) { char *buf = (char*)mem - PREFIX_SIZE; size_t size = ((size_t*)buf)[0]; if (DEBUG_MALLOC) fprintf(stderr, "Release 0x%04x/%u\n", (unsigned)(uintptr_t)mem, (unsigned)size); assert(((size_t*)buf)[1] == CHECK1); assert(((size_t*)(buf + size))[2] == CHECK2); assert(g_alloc_count > 0); assert(g_alloc_bytes >= size); g_alloc_count--; g_alloc_bytes -= size; free(buf); } } /* Reallocate block and check / write guard values */ void* realloc_with_check(void *ptr, size_t size) { if (!ptr && size) { /* Allocate new block and write guard values */ return malloc_with_check(size); } else if (ptr && size) { /* Change block size */ char *buf = (char*)ptr - PREFIX_SIZE; size_t oldsize = ((size_t*)buf)[0]; assert(((size_t*)buf)[1] == CHECK1); assert(((size_t*)(buf + oldsize))[2] == CHECK2); assert(g_alloc_count > 0); assert(g_alloc_bytes >= oldsize); if (size <= g_max_alloc_bytes - (g_alloc_bytes - oldsize)) { buf = realloc(buf, size + GUARD_SIZE); } else { buf = NULL; } if (!buf) { if (DEBUG_MALLOC) fprintf(stderr, "Realloc 0x%04x/%u to %u failed\n", (unsigned)(uintptr_t)ptr, (unsigned)oldsize, (unsigned)size); return NULL; } ((size_t*)buf)[0] = size; ((size_t*)buf)[1] = CHECK1; ((size_t*)(buf + size))[2] = CHECK2; g_alloc_bytes -= oldsize; g_alloc_bytes += size; if (DEBUG_MALLOC) fprintf(stderr, "Realloc 0x%04x/%u to 0x%04x/%u\n", (unsigned)(uintptr_t)ptr, (unsigned)oldsize, (unsigned)(uintptr_t)(buf + PREFIX_SIZE), (unsigned)size); return buf + PREFIX_SIZE; } else if (ptr && !size) { /* Deallocate */ free_with_check(ptr); return NULL; } else { /* No action */ return NULL; } } /* Return total number of allocations not yet released */ size_t get_alloc_count() { return g_alloc_count; } /* Return allocated size for a pointer returned from malloc(). */ size_t get_allocation_size(const void *mem) { char *buf = (char*)mem - PREFIX_SIZE; return ((size_t*)buf)[0]; } /* Get total number of allocated bytes */ size_t get_alloc_bytes() { return g_alloc_bytes; } /* Set limit for allocation size */ void set_max_alloc_bytes(size_t max_bytes) { g_max_alloc_bytes = max_bytes; } size_t get_max_alloc_bytes() { return g_max_alloc_bytes; } nanopb-0.4.1/tests/common/malloc_wrappers.h000066400000000000000000000004711361552131000207650ustar00rootroot00000000000000#include void* malloc_with_check(size_t size); void free_with_check(void *mem); void* realloc_with_check(void *ptr, size_t size); size_t get_alloc_count(); size_t get_allocation_size(const void *mem); size_t get_alloc_bytes(); void set_max_alloc_bytes(size_t max_bytes); size_t get_max_alloc_bytes(); nanopb-0.4.1/tests/common/malloc_wrappers_syshdr.h000066400000000000000000000005451361552131000223630ustar00rootroot00000000000000/* This is just a wrapper in order to get our own malloc wrappers into nanopb core. */ #define pb_realloc(ptr,size) realloc_with_check(ptr,size) #define pb_free(ptr) free_with_check(ptr) #ifdef PB_OLD_SYSHDR #include PB_OLD_SYSHDR #else #include #include #include #include #endif #include nanopb-0.4.1/tests/common/person.proto000066400000000000000000000007151361552131000200160ustar00rootroot00000000000000syntax = "proto2"; import "nanopb.proto"; message Person { required string name = 1 [(nanopb).max_size = 40]; required int32 id = 2; optional string email = 3 [(nanopb).max_size = 40]; enum PhoneType { MOBILE = 0; HOME = 1; WORK = 2; } message PhoneNumber { required string number = 1 [(nanopb).max_size = 40]; optional PhoneType type = 2 [default = HOME]; } repeated PhoneNumber phone = 4 [(nanopb).max_count = 5]; } nanopb-0.4.1/tests/common/test_helpers.h000066400000000000000000000004141361552131000202710ustar00rootroot00000000000000/* Compatibility helpers for the test programs. */ #ifndef _TEST_HELPERS_H_ #define _TEST_HELPERS_H_ #ifdef _WIN32 #include #include #define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) #else #define SET_BINARY_MODE(file) #endif #endif nanopb-0.4.1/tests/common/unittestproto.proto000066400000000000000000000016131361552131000214510ustar00rootroot00000000000000syntax = "proto2"; import 'nanopb.proto'; message IntegerArray { repeated int32 data = 1 [(nanopb).max_count = 10]; } message FloatArray { repeated float data = 1 [(nanopb).max_count = 10]; } message StringMessage { required string data = 1 [(nanopb).max_length = 10]; } message BytesMessage { required bytes data = 1 [(nanopb).max_size = 16]; } message CallbackArray { // We cheat a bit and use this message for testing other types, too. // Nanopb does not care about the actual defined data type for callback // fields. repeated int32 data = 1; } message IntegerContainer { required IntegerArray submsg = 1; } message CallbackContainer { required CallbackArray submsg = 1; } message CallbackContainerContainer { required CallbackContainer submsg = 1; } message StringPointerContainer { repeated string rep_str = 1 [(nanopb).type = FT_POINTER]; } nanopb-0.4.1/tests/common/unittests.h000066400000000000000000000012531361552131000176340ustar00rootroot00000000000000#include #ifdef UNITTESTS_SHORT_MSGS /* Short debug messages for platforms with limited memory */ #define COMMENT(x) printf("\n----" x "----\n"); #define TEST(x) \ if (!(x)) { \ fprintf(stderr, "FAIL: Line %d\n", __LINE__); \ status = 1; \ } else { \ printf("OK: Line %d\n", __LINE__); \ } #else /* Elaborate debug messages for normal development */ #define COMMENT(x) printf("\n----" x "----\n"); #define TEST(x) \ if (!(x)) { \ fprintf(stderr, "\033[31;1mFAILED:\033[22;39m %s:%d %s\n", __FILE__, __LINE__, #x); \ status = 1; \ } else { \ printf("\033[32;1mOK:\033[22;39m %s\n", #x); \ } #endif nanopb-0.4.1/tests/common_unittests/000077500000000000000000000000001361552131000175425ustar00rootroot00000000000000nanopb-0.4.1/tests/common_unittests/SConscript000066400000000000000000000002071361552131000215530ustar00rootroot00000000000000# Test functions in pb_common.c Import('env') p = env.Program(["common_unittests.c", "$BUILD/alltypes/alltypes.pb.c"]) env.RunTest(p) nanopb-0.4.1/tests/common_unittests/common_unittests.c000066400000000000000000000237751361552131000233360ustar00rootroot00000000000000#define PB_VALIDATE_UTF8 #include "pb_common.c" #include #include #include "unittests.h" #include "../alltypes/alltypes.pb.h" int main() { int status = 0; { AllTypes msg; pb_field_iter_t iter; COMMENT("Test field iterator logic on AllTypes"); TEST(pb_field_iter_begin(&iter, AllTypes_fields, &msg)) TEST(iter.tag == 1 && iter.pData == &msg.req_int32 && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 2 && iter.pData == &msg.req_int64 && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 3 && iter.pData == &msg.req_uint32 && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 4 && iter.pData == &msg.req_uint64 && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 5 && iter.pData == &msg.req_sint32 && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 6 && iter.pData == &msg.req_sint64 && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 7 && iter.pData == &msg.req_bool && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 8 && iter.pData == &msg.req_fixed32 && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 9 && iter.pData == &msg.req_sfixed32 && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 10 && iter.pData == &msg.req_float && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 11 && iter.pData == &msg.req_fixed64 && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 12 && iter.pData == &msg.req_sfixed64 && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 13 && iter.pData == &msg.req_double && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 14 && iter.pData == &msg.req_string && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 15 && iter.pData == &msg.req_bytes && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 16 && iter.pData == &msg.req_submsg && !iter.pSize && iter.submsg_desc == SubMessage_fields) TEST(pb_field_iter_next(&iter) && iter.tag == 17 && iter.pData == &msg.req_enum && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 18 && iter.pData == &msg.req_emptymsg && !iter.pSize) TEST(pb_field_iter_next(&iter) && iter.tag == 19 && iter.pData == &msg.req_fbytes && !iter.pSize) TEST(iter.required_field_index == 18) TEST(iter.submessage_index == 2) TEST(pb_field_iter_next(&iter) && iter.tag == 21 && iter.pData == &msg.rep_int32 && iter.pSize == &msg.rep_int32_count) TEST(pb_field_iter_next(&iter) && iter.tag == 22 && iter.pData == &msg.rep_int64 && iter.pSize == &msg.rep_int64_count) TEST(pb_field_iter_next(&iter) && iter.tag == 23 && iter.pData == &msg.rep_uint32 && iter.pSize == &msg.rep_uint32_count) TEST(pb_field_iter_next(&iter) && iter.tag == 24 && iter.pData == &msg.rep_uint64 && iter.pSize == &msg.rep_uint64_count) TEST(pb_field_iter_next(&iter) && iter.tag == 25 && iter.pData == &msg.rep_sint32 && iter.pSize == &msg.rep_sint32_count) TEST(pb_field_iter_next(&iter) && iter.tag == 26 && iter.pData == &msg.rep_sint64 && iter.pSize == &msg.rep_sint64_count) TEST(pb_field_iter_next(&iter) && iter.tag == 27 && iter.pData == &msg.rep_bool && iter.pSize == &msg.rep_bool_count) TEST(pb_field_iter_next(&iter) && iter.tag == 28 && iter.pData == &msg.rep_fixed32 && iter.pSize == &msg.rep_fixed32_count) TEST(pb_field_iter_next(&iter) && iter.tag == 29 && iter.pData == &msg.rep_sfixed32 && iter.pSize == &msg.rep_sfixed32_count) TEST(pb_field_iter_next(&iter) && iter.tag == 30 && iter.pData == &msg.rep_float && iter.pSize == &msg.rep_float_count) TEST(pb_field_iter_next(&iter) && iter.tag == 31 && iter.pData == &msg.rep_fixed64 && iter.pSize == &msg.rep_fixed64_count) TEST(pb_field_iter_next(&iter) && iter.tag == 32 && iter.pData == &msg.rep_sfixed64 && iter.pSize == &msg.rep_sfixed64_count) TEST(pb_field_iter_next(&iter) && iter.tag == 33 && iter.pData == &msg.rep_double && iter.pSize == &msg.rep_double_count) TEST(pb_field_iter_next(&iter) && iter.tag == 34 && iter.pData == &msg.rep_string && iter.pSize == &msg.rep_string_count) TEST(pb_field_iter_next(&iter) && iter.tag == 35 && iter.pData == &msg.rep_bytes && iter.pSize == &msg.rep_bytes_count) TEST(pb_field_iter_next(&iter) && iter.tag == 36 && iter.pData == &msg.rep_submsg && iter.pSize == &msg.rep_submsg_count) TEST(pb_field_iter_next(&iter) && iter.tag == 37 && iter.pData == &msg.rep_enum && iter.pSize == &msg.rep_enum_count) TEST(pb_field_iter_next(&iter) && iter.tag == 38 && iter.pData == &msg.rep_emptymsg && iter.pSize == &msg.rep_emptymsg_count) TEST(pb_field_iter_next(&iter) && iter.tag == 39 && iter.pData == &msg.rep_fbytes && iter.pSize == &msg.rep_fbytes_count) TEST(pb_field_iter_next(&iter) && iter.tag == 40 && iter.pData == &msg.rep_farray && iter.pSize == &iter.array_size && iter.array_size == 5) TEST(iter.required_field_index == 19) TEST(iter.submessage_index == 4) TEST(pb_field_iter_next(&iter) && iter.tag == 41 && iter.pData == &msg.opt_int32 && iter.pSize == &msg.has_opt_int32 ) TEST(pb_field_iter_next(&iter) && iter.tag == 42 && iter.pData == &msg.opt_int64 && iter.pSize == &msg.has_opt_int64 ) TEST(pb_field_iter_next(&iter) && iter.tag == 43 && iter.pData == &msg.opt_uint32 && iter.pSize == &msg.has_opt_uint32 ) TEST(pb_field_iter_next(&iter) && iter.tag == 44 && iter.pData == &msg.opt_uint64 && iter.pSize == &msg.has_opt_uint64 ) TEST(pb_field_iter_next(&iter) && iter.tag == 45 && iter.pData == &msg.opt_sint32 && iter.pSize == &msg.has_opt_sint32 ) TEST(pb_field_iter_next(&iter) && iter.tag == 46 && iter.pData == &msg.opt_sint64 && iter.pSize == &msg.has_opt_sint64 ) TEST(pb_field_iter_next(&iter) && iter.tag == 47 && iter.pData == &msg.opt_bool && iter.pSize == &msg.has_opt_bool ) TEST(pb_field_iter_next(&iter) && iter.tag == 48 && iter.pData == &msg.opt_fixed32 && iter.pSize == &msg.has_opt_fixed32 ) TEST(pb_field_iter_next(&iter) && iter.tag == 49 && iter.pData == &msg.opt_sfixed32 && iter.pSize == &msg.has_opt_sfixed32) TEST(pb_field_iter_next(&iter) && iter.tag == 50 && iter.pData == &msg.opt_float && iter.pSize == &msg.has_opt_float ) TEST(pb_field_iter_next(&iter) && iter.tag == 51 && iter.pData == &msg.opt_fixed64 && iter.pSize == &msg.has_opt_fixed64 ) TEST(pb_field_iter_next(&iter) && iter.tag == 52 && iter.pData == &msg.opt_sfixed64 && iter.pSize == &msg.has_opt_sfixed64) TEST(pb_field_iter_next(&iter) && iter.tag == 53 && iter.pData == &msg.opt_double && iter.pSize == &msg.has_opt_double ) TEST(pb_field_iter_next(&iter) && iter.tag == 54 && iter.pData == &msg.opt_string && iter.pSize == &msg.has_opt_string ) TEST(pb_field_iter_next(&iter) && iter.tag == 55 && iter.pData == &msg.opt_bytes && iter.pSize == &msg.has_opt_bytes ) TEST(pb_field_iter_next(&iter) && iter.tag == 56 && iter.pData == &msg.opt_submsg && iter.pSize == &msg.has_opt_submsg ) TEST(pb_field_iter_next(&iter) && iter.tag == 57 && iter.pData == &msg.opt_enum && iter.pSize == &msg.has_opt_enum ) TEST(pb_field_iter_next(&iter) && iter.tag == 58 && iter.pData == &msg.opt_emptymsg && iter.pSize == &msg.has_opt_emptymsg) TEST(pb_field_iter_next(&iter) && iter.tag == 59 && iter.pData == &msg.opt_fbytes && iter.pSize == &msg.has_opt_fbytes) TEST(iter.required_field_index == 19) TEST(iter.submessage_index == 6) TEST(pb_field_iter_next(&iter) && iter.tag == 60 && iter.pData == &msg.oneof.oneof_msg1 && iter.pSize == &msg.which_oneof ) TEST(pb_field_iter_next(&iter) && iter.tag == 61 && iter.pData == &msg.oneof.oneof_msg2 && iter.pSize == &msg.which_oneof ) TEST(iter.required_field_index == 19) TEST(iter.submessage_index == 7) TEST(pb_field_iter_next(&iter) && iter.tag == 96 && iter.pData == &msg.req_intsizes && !iter.pSize) TEST(iter.required_field_index == 19) TEST(iter.submessage_index == 8) TEST(pb_field_iter_next(&iter) && iter.tag == 97 && iter.pData == &msg.req_ds8 && !iter.pSize) TEST(iter.required_field_index == 20) TEST(iter.submessage_index == 9) TEST(pb_field_iter_next(&iter) && iter.tag == 98 && iter.pData == &msg.req_limits && !iter.pSize) TEST(iter.required_field_index == 21) TEST(iter.submessage_index == 10) TEST(pb_field_iter_next(&iter) && iter.tag == 200 && iter.pData == &msg.extensions && !iter.pSize) TEST(iter.required_field_index == 22) TEST(iter.submessage_index == 11) TEST(pb_field_iter_next(&iter) && iter.tag == 999 && iter.pData == &msg.end && !iter.pSize) TEST(iter.required_field_index == 22) TEST(iter.submessage_index == 11) TEST(!pb_field_iter_next(&iter)) TEST(iter.tag == 1 && iter.pData == &msg.req_int32 && !iter.pSize) TEST(iter.required_field_index == 0) TEST(iter.submessage_index == 0) } { COMMENT("Test pb_validate_utf8()"); TEST(pb_validate_utf8("abcdefg")); TEST(pb_validate_utf8("\xc3\xa4\xc3\xa4\x6b\x6b\xc3\xb6\x6e\x65\x6e\x0a")); TEST(!pb_validate_utf8("\xc3\xa4\xc3\xa4\x6b\x6b\xb6\xc3\x6e\x65\x6e\x0a")); TEST(pb_validate_utf8("\xed\x9f\xbf")); TEST(pb_validate_utf8("\xee\x80\x80")); TEST(pb_validate_utf8("\xef\xbf\xbd")); TEST(pb_validate_utf8("\xf4\x8f\xbf\xbf")); TEST(!pb_validate_utf8("a\x80z")); TEST(!pb_validate_utf8("a\xbfz")); TEST(!pb_validate_utf8("a\xfez")); TEST(!pb_validate_utf8("a\xffz")); TEST(!pb_validate_utf8("a\xc0\xafz")); TEST(!pb_validate_utf8("a\xef\xbf\xbez")); } if (status != 0) fprintf(stdout, "\n\nSome tests FAILED!\n"); return status; } nanopb-0.4.1/tests/cxx_descriptor/000077500000000000000000000000001361552131000171705ustar00rootroot00000000000000nanopb-0.4.1/tests/cxx_descriptor/SConscript000066400000000000000000000014071361552131000212040ustar00rootroot00000000000000# Test cxx descriptor functionality Import('env') base_env = env.Clone() base_env.Replace(NANOPBFLAGS = '--cpp-descriptor') base_env.NanopbProto('message') for std in ["c++03", "c++11", "c++14", "c++17", "c++20"]: e = base_env.Clone() e.Append(CXXFLAGS = '-std={}'.format(std)) # Make sure compiler supports this version of C++ before we actually run the # test. conf = Configure(e) compiler_valid = conf.CheckCXX() e = conf.Finish() if not compiler_valid: print("Skipping {} test - compiler doesn't support it".format(std)) continue o1 = e.Object('message_descriptor_{}'.format(std), 'message_descriptor.cc') o2 = e.Object('message.pb_{}'.format(std), 'message.pb.c') p = e.Program([o1, o2]) e.RunTest(p) nanopb-0.4.1/tests/cxx_descriptor/message.proto000066400000000000000000000002531361552131000217010ustar00rootroot00000000000000/* Test CPP descriptor generation */ syntax = "proto2"; import "nanopb.proto"; message MyEmptyMessage { } message MyNonEmptyMessage { optional uint32 field = 1; } nanopb-0.4.1/tests/cxx_descriptor/message_descriptor.cc000066400000000000000000000016111361552131000233600ustar00rootroot00000000000000#include #include "message.pb.h" #include "unittests.h" extern "C" int main() { using namespace nanopb; #if __cplusplus >= 201103L static_assert(MessageDescriptor::fields_array_length == 0, "Unexpected field length"); static_assert(MessageDescriptor::fields_array_length == 1, "Unexpected field length"); #endif // C++11 & newer int status = 0; TEST(MessageDescriptor::fields_array_length == MyEmptyMessage_msg.field_count); TEST(MessageDescriptor::fields_array_length == MyNonEmptyMessage_msg.field_count); TEST(MessageDescriptor::fields() == MyEmptyMessage_fields); TEST(MessageDescriptor::fields() == MyNonEmptyMessage_fields); if (status != 0) fprintf(stdout, "\n\nSome tests FAILED!\n"); return status; } nanopb-0.4.1/tests/cxx_main_program/000077500000000000000000000000001361552131000174655ustar00rootroot00000000000000nanopb-0.4.1/tests/cxx_main_program/SConscript000066400000000000000000000020711361552131000214770ustar00rootroot00000000000000# Run the alltypes test case, but compile it as C++ instead. # In fact, compile the entire nanopb using C++ compiler. Import("env") # This is needed to get INT32_MIN etc. macros defined env = env.Clone() env.Append(CPPDEFINES = ['__STDC_LIMIT_MACROS']) # Copy the files to .cxx extension in order to force C++ build. c = Copy("$TARGET", "$SOURCE") env.Command("pb_encode.cxx", "#../pb_encode.c", c) env.Command("pb_decode.cxx", "#../pb_decode.c", c) env.Command("pb_common.cxx", "#../pb_common.c", c) env.Command("alltypes.pb.h", "$BUILD/alltypes/alltypes.pb.h", c) env.Command("alltypes.pb.cxx", "$BUILD/alltypes/alltypes.pb.c", c) env.Command("encode_alltypes.cxx", "$BUILD/alltypes/encode_alltypes.c", c) env.Command("decode_alltypes.cxx", "$BUILD/alltypes/decode_alltypes.c", c) # Now build and run the test normally. enc = env.Program(["encode_alltypes.cxx", "alltypes.pb.cxx", "pb_encode.cxx", "pb_common.cxx"]) dec = env.Program(["decode_alltypes.cxx", "alltypes.pb.cxx", "pb_decode.cxx", "pb_common.cxx"]) env.RunTest(enc) env.RunTest([dec, "encode_alltypes.output"]) nanopb-0.4.1/tests/cyclic_messages/000077500000000000000000000000001361552131000172655ustar00rootroot00000000000000nanopb-0.4.1/tests/cyclic_messages/SConscript000066400000000000000000000005271361552131000213030ustar00rootroot00000000000000Import("env") # Encode cyclic messages with callback fields c = Copy("$TARGET", "$SOURCE") env.Command("cyclic_callback.proto", "cyclic.proto", c) env.NanopbProto(["cyclic_callback", "cyclic_callback.options"]) enc_callback = env.Program(["encode_cyclic_callback.c", "cyclic_callback.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) nanopb-0.4.1/tests/cyclic_messages/cyclic.proto000066400000000000000000000010261361552131000216170ustar00rootroot00000000000000// Test structures with cyclic references. // These can only be handled in pointer/callback mode, // see associated .options files. syntax = "proto2"; message TreeNode { optional int32 leaf = 1; optional TreeNode left = 2; optional TreeNode right = 3; } message Dictionary { repeated KeyValuePair dictItem = 1; } message KeyValuePair { required string key = 1; optional string stringValue = 2; optional int32 intValue = 3; optional Dictionary dictValue = 4; optional TreeNode treeValue = 5; } nanopb-0.4.1/tests/cyclic_messages/cyclic_callback.options000066400000000000000000000003261361552131000237650ustar00rootroot00000000000000TreeNode.left type:FT_CALLBACK TreeNode.right type:FT_CALLBACK KeyValuePair.key max_size:8 KeyValuePair.stringValue max_size:8 KeyValuePair.treeValue type:FT_CALLBACK nanopb-0.4.1/tests/cyclic_messages/encode_cyclic_callback.c000066400000000000000000000075211361552131000240350ustar00rootroot00000000000000/* This program parses an input string in a format a bit like JSON: * {'foobar': 1234, 'xyz': 'abc', 'tree': [[[1, 2], 3], [4, 5]]} * and encodes it as protobuf * * Note: The string parsing here is not in any way intended to be robust * nor safe against buffer overflows. It is just for this test. */ #include #include #include #include #include "cyclic_callback.pb.h" static char *find_end_of_item(char *p) { int depth = 0; do { if (*p == '[' || *p == '{') depth++; if (*p == ']' || *p == '}') depth--; p++; } while (depth > 0 || (*p != ',' && *p != '}')); if (*p == '}') return p; /* End of parent dict */ p++; while (*p == ' ') p++; return p; } /* Parse a tree in format [[1 2] 3] and encode it directly to protobuf */ static bool encode_tree(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { TreeNode tree = TreeNode_init_zero; char *p = (char*)*arg; if (*p == '[') { /* This is a tree branch */ p++; tree.left.funcs.encode = encode_tree; tree.left.arg = p; p = find_end_of_item(p); tree.right.funcs.encode = encode_tree; tree.right.arg = p; } else { /* This is a leaf node */ tree.has_leaf = true; tree.leaf = atoi(p); } return pb_encode_tag_for_field(stream, field) && pb_encode_submessage(stream, TreeNode_fields, &tree); } /* Parse a dictionary in format {'name': value} and encode it directly to protobuf */ static bool encode_dictionary(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { int textlen; char *p = (char*)*arg; if (*p == '{') p++; while (*p != '}') { KeyValuePair pair = KeyValuePair_init_zero; if (*p != '\'') PB_RETURN_ERROR(stream, "invalid key, missing quote"); p++; /* Starting quote of key */ textlen = strchr(p, '\'') - p; strncpy(pair.key, p, textlen); pair.key[textlen] = 0; p += textlen + 2; while (*p == ' ') p++; if (*p == '[') { /* Value is a tree */ pair.treeValue.funcs.encode = encode_tree; pair.treeValue.arg = p; } else if (*p == '\'') { /* Value is a string */ pair.has_stringValue = true; p++; textlen = strchr(p, '\'') - p; strncpy(pair.stringValue, p, textlen); pair.stringValue[textlen] = 0; } else if (*p == '{') { /* Value is a dictionary */ pair.has_dictValue = true; pair.dictValue.dictItem.funcs.encode = encode_dictionary; pair.dictValue.dictItem.arg = p; } else { /* Value is integer */ pair.has_intValue = true; pair.intValue = atoi(p); } p = find_end_of_item(p); if (!pb_encode_tag_for_field(stream, field)) return false; if (!pb_encode_submessage(stream, KeyValuePair_fields, &pair)) return false; } return true; } int main(int argc, char *argv[]) { uint8_t buffer[256]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); Dictionary dict = Dictionary_init_zero; if (argc <= 1) { fprintf(stderr, "Usage: %s \"{'foobar': 1234, ...}\"\n", argv[0]); return 1; } dict.dictItem.funcs.encode = encode_dictionary; dict.dictItem.arg = argv[1]; if (!pb_encode(&stream, Dictionary_fields, &dict)) { fprintf(stderr, "Encoding error: %s\n", PB_GET_ERROR(&stream)); return 1; } fwrite(buffer, 1, stream.bytes_written, stdout); return 0; } nanopb-0.4.1/tests/decode_unittests/000077500000000000000000000000001361552131000174755ustar00rootroot00000000000000nanopb-0.4.1/tests/decode_unittests/SConscript000066400000000000000000000001441361552131000215060ustar00rootroot00000000000000Import('env') p = env.Program(["decode_unittests.c", "$COMMON/unittestproto.pb.c"]) env.RunTest(p) nanopb-0.4.1/tests/decode_unittests/decode_unittests.c000066400000000000000000000401651361552131000232140ustar00rootroot00000000000000/* This includes the whole .c file to get access to static functions. */ #define PB_ENABLE_MALLOC #include "pb_common.c" #include "pb_decode.c" #include #include #include "unittests.h" #include "unittestproto.pb.h" #define S(x) pb_istream_from_buffer((uint8_t*)x, sizeof(x) - 1) bool stream_callback(pb_istream_t *stream, uint8_t *buf, size_t count) { if (stream->state != NULL) return false; /* Simulate error */ if (buf != NULL) memset(buf, 'x', count); return true; } /* Verifies that the stream passed to callback matches the byte array pointed to by arg. */ bool callback_check(pb_istream_t *stream, const pb_field_t *field, void **arg) { int i; uint8_t byte; pb_bytes_array_t *ref = (pb_bytes_array_t*) *arg; for (i = 0; i < ref->size; i++) { if (!pb_read(stream, &byte, 1)) return false; if (byte != ref->bytes[i]) return false; } return true; } int main() { int status = 0; { uint8_t buffer1[] = "foobartest1234"; uint8_t buffer2[sizeof(buffer1)]; pb_istream_t stream = pb_istream_from_buffer(buffer1, sizeof(buffer1)); COMMENT("Test pb_read and pb_istream_t"); TEST(pb_read(&stream, buffer2, 6)) TEST(memcmp(buffer2, "foobar", 6) == 0) TEST(stream.bytes_left == sizeof(buffer1) - 6) TEST(pb_read(&stream, buffer2 + 6, stream.bytes_left)) TEST(memcmp(buffer1, buffer2, sizeof(buffer1)) == 0) TEST(stream.bytes_left == 0) TEST(!pb_read(&stream, buffer2, 1)) } { uint8_t buffer[20]; pb_istream_t stream = {&stream_callback, NULL, 20}; COMMENT("Test pb_read with custom callback"); TEST(pb_read(&stream, buffer, 5)) TEST(memcmp(buffer, "xxxxx", 5) == 0) TEST(!pb_read(&stream, buffer, 50)) stream.state = (void*)1; /* Simulated error return from callback */ TEST(!pb_read(&stream, buffer, 5)) stream.state = NULL; TEST(pb_read(&stream, buffer, 15)) } { pb_istream_t s; uint64_t u; int64_t i; COMMENT("Test pb_decode_varint"); TEST((s = S("\x00"), pb_decode_varint(&s, &u) && u == 0)); TEST((s = S("\x01"), pb_decode_varint(&s, &u) && u == 1)); TEST((s = S("\xAC\x02"), pb_decode_varint(&s, &u) && u == 300)); TEST((s = S("\xFF\xFF\xFF\xFF\x0F"), pb_decode_varint(&s, &u) && u == UINT32_MAX)); TEST((s = S("\xFF\xFF\xFF\xFF\x0F"), pb_decode_varint(&s, (uint64_t*)&i) && i == UINT32_MAX)); TEST((s = S("\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01"), pb_decode_varint(&s, (uint64_t*)&i) && i == -1)); TEST((s = S("\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01"), pb_decode_varint(&s, &u) && u == UINT64_MAX)); TEST((s = S("\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01"), !pb_decode_varint(&s, &u))); } { pb_istream_t s; uint32_t u; COMMENT("Test pb_decode_varint32"); TEST((s = S("\x00"), pb_decode_varint32(&s, &u) && u == 0)); TEST((s = S("\x01"), pb_decode_varint32(&s, &u) && u == 1)); TEST((s = S("\xAC\x02"), pb_decode_varint32(&s, &u) && u == 300)); TEST((s = S("\xFF\xFF\xFF\xFF\x0F"), pb_decode_varint32(&s, &u) && u == UINT32_MAX)); TEST((s = S("\xFF\xFF\xFF\xFF\x8F\x00"), pb_decode_varint32(&s, &u) && u == UINT32_MAX)); TEST((s = S("\xFF\xFF\xFF\xFF\x10"), !pb_decode_varint32(&s, &u))); TEST((s = S("\xFF\xFF\xFF\xFF\x40"), !pb_decode_varint32(&s, &u))); TEST((s = S("\xFF\xFF\xFF\xFF\xFF\x01"), !pb_decode_varint32(&s, &u))); } { pb_istream_t s; COMMENT("Test pb_skip_varint"); TEST((s = S("\x00""foobar"), pb_skip_varint(&s) && s.bytes_left == 6)) TEST((s = S("\xAC\x02""foobar"), pb_skip_varint(&s) && s.bytes_left == 6)) TEST((s = S("\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01""foobar"), pb_skip_varint(&s) && s.bytes_left == 6)) TEST((s = S("\xFF"), !pb_skip_varint(&s))) } { pb_istream_t s; COMMENT("Test pb_skip_string") TEST((s = S("\x00""foobar"), pb_skip_string(&s) && s.bytes_left == 6)) TEST((s = S("\x04""testfoobar"), pb_skip_string(&s) && s.bytes_left == 6)) TEST((s = S("\x04"), !pb_skip_string(&s))) TEST((s = S("\xFF"), !pb_skip_string(&s))) } { pb_istream_t s = S("\x01\x00"); pb_field_iter_t f; uint32_t d; f.type = PB_LTYPE_VARINT; f.data_size = sizeof(d); f.pData = &d; COMMENT("Test pb_dec_varint using uint32_t") TEST(pb_dec_varint(&s, &f) && d == 1) /* Verify that no more than data_size is written. */ d = 0xFFFFFFFF; f.data_size = 1; TEST(pb_dec_varint(&s, &f) && (d == 0xFFFFFF00 || d == 0x00FFFFFF)) } { pb_istream_t s; pb_field_iter_t f; int32_t d; f.type = PB_LTYPE_SVARINT; f.data_size = sizeof(d); f.pData = &d; COMMENT("Test pb_dec_varint using sint32_t") TEST((s = S("\x01"), pb_dec_varint(&s, &f) && d == -1)) TEST((s = S("\x02"), pb_dec_varint(&s, &f) && d == 1)) TEST((s = S("\xfe\xff\xff\xff\x0f"), pb_dec_varint(&s, &f) && d == INT32_MAX)) TEST((s = S("\xff\xff\xff\xff\x0f"), pb_dec_varint(&s, &f) && d == INT32_MIN)) } { pb_istream_t s; pb_field_iter_t f; int64_t d; f.type = PB_LTYPE_SVARINT; f.data_size = sizeof(d); f.pData = &d; COMMENT("Test pb_dec_varint using sint64_t") TEST((s = S("\x01"), pb_dec_varint(&s, &f) && d == -1)) TEST((s = S("\x02"), pb_dec_varint(&s, &f) && d == 1)) TEST((s = S("\xFE\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01"), pb_dec_varint(&s, &f) && d == INT64_MAX)) TEST((s = S("\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01"), pb_dec_varint(&s, &f) && d == INT64_MIN)) } { pb_istream_t s; pb_field_iter_t f; int32_t d; f.type = PB_LTYPE_SVARINT; f.data_size = sizeof(d); f.pData = &d; COMMENT("Test pb_dec_varint overflow detection using sint32_t"); TEST((s = S("\xfe\xff\xff\xff\x0f"), pb_dec_varint(&s, &f))); TEST((s = S("\xfe\xff\xff\xff\x10"), !pb_dec_varint(&s, &f))); TEST((s = S("\xff\xff\xff\xff\x0f"), pb_dec_varint(&s, &f))); TEST((s = S("\xff\xff\xff\xff\x10"), !pb_dec_varint(&s, &f))); } { pb_istream_t s; pb_field_iter_t f; uint32_t d; f.type = PB_LTYPE_UVARINT; f.data_size = sizeof(d); f.pData = &d; COMMENT("Test pb_dec_varint using uint32_t") TEST((s = S("\x01"), pb_dec_varint(&s, &f) && d == 1)) TEST((s = S("\x02"), pb_dec_varint(&s, &f) && d == 2)) TEST((s = S("\xff\xff\xff\xff\x0f"), pb_dec_varint(&s, &f) && d == UINT32_MAX)) } { pb_istream_t s; pb_field_iter_t f; uint64_t d; f.type = PB_LTYPE_UVARINT; f.data_size = sizeof(d); f.pData = &d; COMMENT("Test pb_dec_varint using uint64_t") TEST((s = S("\x01"), pb_dec_varint(&s, &f) && d == 1)) TEST((s = S("\x02"), pb_dec_varint(&s, &f) && d == 2)) TEST((s = S("\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01"), pb_dec_varint(&s, &f) && d == UINT64_MAX)) } { pb_istream_t s; pb_field_iter_t f; uint32_t d; f.type = PB_LTYPE_UVARINT; f.data_size = sizeof(d); f.pData = &d; COMMENT("Test pb_dec_varint overflow detection using uint32_t"); TEST((s = S("\xff\xff\xff\xff\x0f"), pb_dec_varint(&s, &f))); TEST((s = S("\xff\xff\xff\xff\x10"), !pb_dec_varint(&s, &f))); } { pb_istream_t s; pb_field_iter_t f; float d; f.type = PB_LTYPE_FIXED32; f.data_size = sizeof(d); f.pData = &d; COMMENT("Test pb_dec_fixed using float (failures here may be caused by imperfect rounding)") TEST((s = S("\x00\x00\x00\x00"), pb_dec_fixed(&s, &f) && d == 0.0f)) TEST((s = S("\x00\x00\xc6\x42"), pb_dec_fixed(&s, &f) && d == 99.0f)) TEST((s = S("\x4e\x61\x3c\xcb"), pb_dec_fixed(&s, &f) && d == -12345678.0f)) d = -12345678.0f; TEST((s = S("\x00"), !pb_dec_fixed(&s, &f) && d == -12345678.0f)) } { pb_istream_t s; pb_field_iter_t f; double d; f.type = PB_LTYPE_FIXED64; f.data_size = sizeof(d); f.pData = &d; COMMENT("Test pb_dec_fixed64 using double (failures here may be caused by imperfect rounding)") TEST((s = S("\x00\x00\x00\x00\x00\x00\x00\x00"), pb_dec_fixed(&s, &f) && d == 0.0)) TEST((s = S("\x00\x00\x00\x00\x00\xc0\x58\x40"), pb_dec_fixed(&s, &f) && d == 99.0)) TEST((s = S("\x00\x00\x00\xc0\x29\x8c\x67\xc1"), pb_dec_fixed(&s, &f) && d == -12345678.0f)) } { pb_istream_t s; struct { pb_size_t size; uint8_t bytes[5]; } d; pb_field_iter_t f; f.type = PB_LTYPE_BYTES; f.data_size = sizeof(d); f.pData = &d; COMMENT("Test pb_dec_bytes") TEST((s = S("\x00"), pb_dec_bytes(&s, &f) && d.size == 0)) TEST((s = S("\x01\xFF"), pb_dec_bytes(&s, &f) && d.size == 1 && d.bytes[0] == 0xFF)) TEST((s = S("\x05xxxxx"), pb_dec_bytes(&s, &f) && d.size == 5)) TEST((s = S("\x05xxxx"), !pb_dec_bytes(&s, &f))) /* Note: the size limit on bytes-fields is not strictly obeyed, as * the compiler may add some padding to the struct. Using this padding * is not a very good thing to do, but it is difficult to avoid when * we use only a single uint8_t to store the size of the field. * Therefore this tests against a 10-byte string, while otherwise even * 6 bytes should error out. */ TEST((s = S("\x10xxxxxxxxxx"), !pb_dec_bytes(&s, &f))) } { pb_istream_t s; pb_field_iter_t f; char d[5]; f.type = PB_LTYPE_STRING; f.data_size = sizeof(d); f.pData = &d; COMMENT("Test pb_dec_string") TEST((s = S("\x00"), pb_dec_string(&s, &f) && d[0] == '\0')) TEST((s = S("\x04xyzz"), pb_dec_string(&s, &f) && strcmp(d, "xyzz") == 0)) TEST((s = S("\x05xyzzy"), !pb_dec_string(&s, &f))) } { pb_istream_t s; IntegerArray dest; COMMENT("Testing pb_decode with repeated int32 field") TEST((s = S(""), pb_decode(&s, IntegerArray_fields, &dest) && dest.data_count == 0)) TEST((s = S("\x08\x01\x08\x02"), pb_decode(&s, IntegerArray_fields, &dest) && dest.data_count == 2 && dest.data[0] == 1 && dest.data[1] == 2)) s = S("\x08\x01\x08\x02\x08\x03\x08\x04\x08\x05\x08\x06\x08\x07\x08\x08\x08\x09\x08\x0A"); TEST(pb_decode(&s, IntegerArray_fields, &dest) && dest.data_count == 10 && dest.data[9] == 10) s = S("\x08\x01\x08\x02\x08\x03\x08\x04\x08\x05\x08\x06\x08\x07\x08\x08\x08\x09\x08\x0A\x08\x0B"); TEST(!pb_decode(&s, IntegerArray_fields, &dest)) } { pb_istream_t s; IntegerArray dest; COMMENT("Testing pb_decode with packed int32 field") TEST((s = S("\x0A\x00"), pb_decode(&s, IntegerArray_fields, &dest) && dest.data_count == 0)) TEST((s = S("\x0A\x01\x01"), pb_decode(&s, IntegerArray_fields, &dest) && dest.data_count == 1 && dest.data[0] == 1)) TEST((s = S("\x0A\x0A\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A"), pb_decode(&s, IntegerArray_fields, &dest) && dest.data_count == 10 && dest.data[0] == 1 && dest.data[9] == 10)) TEST((s = S("\x0A\x0B\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B"), !pb_decode(&s, IntegerArray_fields, &dest))) /* Test invalid wire data */ TEST((s = S("\x0A\xFF"), !pb_decode(&s, IntegerArray_fields, &dest))) TEST((s = S("\x0A\x01"), !pb_decode(&s, IntegerArray_fields, &dest))) } { pb_istream_t s; IntegerArray dest; COMMENT("Testing pb_decode with unknown fields") TEST((s = S("\x18\x0F\x08\x01"), pb_decode(&s, IntegerArray_fields, &dest) && dest.data_count == 1 && dest.data[0] == 1)) TEST((s = S("\x19\x00\x00\x00\x00\x00\x00\x00\x00\x08\x01"), pb_decode(&s, IntegerArray_fields, &dest) && dest.data_count == 1 && dest.data[0] == 1)) TEST((s = S("\x1A\x00\x08\x01"), pb_decode(&s, IntegerArray_fields, &dest) && dest.data_count == 1 && dest.data[0] == 1)) TEST((s = S("\x1B\x08\x01"), !pb_decode(&s, IntegerArray_fields, &dest))) TEST((s = S("\x1D\x00\x00\x00\x00\x08\x01"), pb_decode(&s, IntegerArray_fields, &dest) && dest.data_count == 1 && dest.data[0] == 1)) } { pb_istream_t s; CallbackArray dest; struct { pb_size_t size; uint8_t bytes[10]; } ref; dest.data.funcs.decode = &callback_check; dest.data.arg = &ref; COMMENT("Testing pb_decode with callbacks") /* Single varint */ ref.size = 1; ref.bytes[0] = 0x55; TEST((s = S("\x08\x55"), pb_decode(&s, CallbackArray_fields, &dest))) /* Packed varint */ ref.size = 3; ref.bytes[0] = ref.bytes[1] = ref.bytes[2] = 0x55; TEST((s = S("\x0A\x03\x55\x55\x55"), pb_decode(&s, CallbackArray_fields, &dest))) /* Packed varint with loop */ ref.size = 1; ref.bytes[0] = 0x55; TEST((s = S("\x0A\x03\x55\x55\x55"), pb_decode(&s, CallbackArray_fields, &dest))) /* Single fixed32 */ ref.size = 4; ref.bytes[0] = ref.bytes[1] = ref.bytes[2] = ref.bytes[3] = 0xAA; TEST((s = S("\x0D\xAA\xAA\xAA\xAA"), pb_decode(&s, CallbackArray_fields, &dest))) /* Single fixed64 */ ref.size = 8; memset(ref.bytes, 0xAA, 8); TEST((s = S("\x09\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA"), pb_decode(&s, CallbackArray_fields, &dest))) /* Unsupported field type */ TEST((s = S("\x0B\x00"), !pb_decode(&s, CallbackArray_fields, &dest))) /* Just make sure that our test function works */ ref.size = 1; ref.bytes[0] = 0x56; TEST((s = S("\x08\x55"), !pb_decode(&s, CallbackArray_fields, &dest))) } { pb_istream_t s; IntegerArray dest; COMMENT("Testing pb_decode message termination") TEST((s = S(""), pb_decode(&s, IntegerArray_fields, &dest))) TEST((s = S("\x08\x01"), pb_decode(&s, IntegerArray_fields, &dest))) TEST((s = S("\x08"), !pb_decode(&s, IntegerArray_fields, &dest))) } { pb_istream_t s; IntegerArray dest; COMMENT("Testing pb_decode_ex null termination") TEST((s = S("\x00"), pb_decode_ex(&s, IntegerArray_fields, &dest, PB_DECODE_NULLTERMINATED))) TEST((s = S("\x08\x01\x00"), pb_decode_ex(&s, IntegerArray_fields, &dest, PB_DECODE_NULLTERMINATED))) } { pb_istream_t s; IntegerArray dest; COMMENT("Testing pb_decode with invalid tag numbers") TEST((s = S("\x9f\xea"), !pb_decode(&s, IntegerArray_fields, &dest))); TEST((s = S("\x00"), !pb_decode(&s, IntegerArray_fields, &dest))); } { pb_istream_t s; IntegerContainer dest = {{0}}; COMMENT("Testing pb_decode_delimited") TEST((s = S("\x09\x0A\x07\x0A\x05\x01\x02\x03\x04\x05"), pb_decode_delimited(&s, IntegerContainer_fields, &dest)) && dest.submsg.data_count == 5) } { pb_istream_t s = {0}; void *data = NULL; COMMENT("Testing allocate_field") TEST(allocate_field(&s, &data, 10, 10) && data != NULL); TEST(allocate_field(&s, &data, 10, 20) && data != NULL); { void *oldvalue = data; size_t very_big = (size_t)-1; size_t somewhat_big = very_big / 2 + 1; size_t not_so_big = (size_t)1 << (4 * sizeof(size_t)); TEST(!allocate_field(&s, &data, very_big, 2) && data == oldvalue); TEST(!allocate_field(&s, &data, somewhat_big, 2) && data == oldvalue); TEST(!allocate_field(&s, &data, not_so_big, not_so_big) && data == oldvalue); } pb_free(data); } if (status != 0) fprintf(stdout, "\n\nSome tests FAILED!\n"); return status; } nanopb-0.4.1/tests/docker_images/000077500000000000000000000000001361552131000167245ustar00rootroot00000000000000nanopb-0.4.1/tests/docker_images/README.md000066400000000000000000000005211361552131000202010ustar00rootroot00000000000000Docker files ------------ This folder contains docker files that are used in testing nanopb automatically on various platforms. By default they take the newest master branch code from github. To build tests for a single target, use for example: docker build ubuntu1804 To build tests for all targets, use: ./build_all.sh nanopb-0.4.1/tests/docker_images/build_all.sh000077500000000000000000000003561361552131000212160ustar00rootroot00000000000000#!/bin/bash -e # Run all targets for file in `ls */Dockerfile` do echo -e "\n\n\n---------------------------------------- Building image for" $file " -------------------------------------------\n\n\n" docker build $(dirname $file) done nanopb-0.4.1/tests/docker_images/ubuntu1804/000077500000000000000000000000001361552131000205635ustar00rootroot00000000000000nanopb-0.4.1/tests/docker_images/ubuntu1804/Dockerfile000066400000000000000000000005451361552131000225610ustar00rootroot00000000000000FROM ubuntu:bionic RUN apt -y update RUN apt -y upgrade RUN apt -y dist-upgrade RUN apt -y autoremove RUN apt -y install --fix-missing RUN apt -y install apt-utils RUN apt -y install git scons build-essential g++ RUN apt -y install protobuf-compiler python python-protobuf RUN git clone https://github.com/nanopb/nanopb.git RUN cd nanopb/tests && scons nanopb-0.4.1/tests/docker_images/ubuntu2004/000077500000000000000000000000001361552131000205545ustar00rootroot00000000000000nanopb-0.4.1/tests/docker_images/ubuntu2004/Dockerfile000066400000000000000000000007551361552131000225550ustar00rootroot00000000000000FROM ubuntu:focal RUN apt -y update RUN apt -y upgrade RUN apt -y dist-upgrade RUN apt -y autoremove RUN apt -y install --fix-missing RUN apt -y install apt-utils RUN apt -y install git scons build-essential g++ RUN apt -y install protobuf-compiler python3.8 python3-protobuf RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 && update-alternatives --set python /usr/bin/python3.8 RUN git clone https://github.com/nanopb/nanopb.git RUN cd nanopb/tests && scons nanopb-0.4.1/tests/encode_arrays_unpacked/000077500000000000000000000000001361552131000206205ustar00rootroot00000000000000nanopb-0.4.1/tests/encode_arrays_unpacked/SConscript000066400000000000000000000021751361552131000226370ustar00rootroot00000000000000# Run the alltypes test case, but compile with PB_ENCODE_ARRAYS_UNPACKED=1 Import("env") # Take copy of the files for custom build. c = Copy("$TARGET", "$SOURCE") env.Command("alltypes.pb.h", "$BUILD/alltypes/alltypes.pb.h", c) env.Command("alltypes.pb.c", "$BUILD/alltypes/alltypes.pb.c", c) env.Command("encode_alltypes.c", "$BUILD/alltypes/encode_alltypes.c", c) env.Command("decode_alltypes.c", "$BUILD/alltypes/decode_alltypes.c", c) # Define the compilation options opts = env.Clone() opts.Append(CPPDEFINES = {'PB_ENCODE_ARRAYS_UNPACKED': 1}) # Build new version of core strict = opts.Clone() strict.Append(CFLAGS = strict['CORECFLAGS']) strict.Object("pb_decode_unpacked.o", "$NANOPB/pb_decode.c") strict.Object("pb_encode_unpacked.o", "$NANOPB/pb_encode.c") strict.Object("pb_common_unpacked.o", "$NANOPB/pb_common.c") # Now build and run the test normally. enc = opts.Program(["encode_alltypes.c", "alltypes.pb.c", "pb_encode_unpacked.o", "pb_common_unpacked.o"]) dec = opts.Program(["decode_alltypes.c", "alltypes.pb.c", "pb_decode_unpacked.o", "pb_common_unpacked.o"]) env.RunTest(enc) env.RunTest([dec, "encode_alltypes.output"]) nanopb-0.4.1/tests/encode_unittests/000077500000000000000000000000001361552131000175075ustar00rootroot00000000000000nanopb-0.4.1/tests/encode_unittests/SConscript000066400000000000000000000002541361552131000215220ustar00rootroot00000000000000# Build and run the stand-alone unit tests for the nanopb encoder part. Import('env') p = env.Program(["encode_unittests.c", "$COMMON/unittestproto.pb.c"]) env.RunTest(p) nanopb-0.4.1/tests/encode_unittests/encode_unittests.c000066400000000000000000000350621361552131000232400ustar00rootroot00000000000000/* This includes the whole .c file to get access to static functions. */ #include "pb_common.c" #include "pb_encode.c" #include #include #include "unittests.h" #include "unittestproto.pb.h" bool streamcallback(pb_ostream_t *stream, const uint8_t *buf, size_t count) { /* Allow only 'x' to be written */ while (count--) { if (*buf++ != 'x') return false; } return true; } bool fieldcallback(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { int value = 0x55; if (!pb_encode_tag_for_field(stream, field)) return false; return pb_encode_varint(stream, value); } bool crazyfieldcallback(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { /* This callback writes different amount of data the second time. */ uint32_t *state = (uint32_t*)arg; *state <<= 8; if (!pb_encode_tag_for_field(stream, field)) return false; return pb_encode_varint(stream, *state); } /* Check that expression x writes data y. * Y is a string, which may contain null bytes. Null terminator is ignored. */ #define WRITES(x, y) \ memset(buffer, 0xAA, sizeof(buffer)), \ s = pb_ostream_from_buffer(buffer, sizeof(buffer)), \ (x) && \ memcmp(buffer, y, sizeof(y) - 1) == 0 && \ buffer[sizeof(y) - 1] == 0xAA int main() { int status = 0; { uint8_t buffer1[] = "foobartest1234"; uint8_t buffer2[sizeof(buffer1)]; pb_ostream_t stream = pb_ostream_from_buffer(buffer2, sizeof(buffer1)); COMMENT("Test pb_write and pb_ostream_t"); TEST(pb_write(&stream, buffer1, sizeof(buffer1))); TEST(memcmp(buffer1, buffer2, sizeof(buffer1)) == 0); TEST(!pb_write(&stream, buffer1, 1)); TEST(stream.bytes_written == sizeof(buffer1)); } { uint8_t buffer1[] = "xxxxxxx"; pb_ostream_t stream = {&streamcallback, 0, SIZE_MAX, 0}; COMMENT("Test pb_write with custom callback"); TEST(pb_write(&stream, buffer1, 5)); buffer1[0] = 'a'; TEST(!pb_write(&stream, buffer1, 5)); } { uint8_t buffer[30]; pb_ostream_t s; COMMENT("Test pb_encode_varint") TEST(WRITES(pb_encode_varint(&s, 0), "\0")); TEST(WRITES(pb_encode_varint(&s, 1), "\1")); TEST(WRITES(pb_encode_varint(&s, 0x7F), "\x7F")); TEST(WRITES(pb_encode_varint(&s, 0x80), "\x80\x01")); TEST(WRITES(pb_encode_varint(&s, UINT32_MAX), "\xFF\xFF\xFF\xFF\x0F")); TEST(WRITES(pb_encode_varint(&s, UINT64_MAX), "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01")); } { uint8_t buffer[50]; pb_ostream_t s; COMMENT("Test pb_encode_varint 32-bit fast path") TEST(WRITES(pb_encode_varint(&s, 0x00000000), "\x00")); TEST(WRITES(pb_encode_varint(&s, 0x00000001), "\x01")); TEST(WRITES(pb_encode_varint(&s, 0x0000007F), "\x7F")); TEST(WRITES(pb_encode_varint(&s, 0x00000080), "\x80\x01")); TEST(WRITES(pb_encode_varint(&s, 0x00000191), "\x91\x03")); TEST(WRITES(pb_encode_varint(&s, 0x00003FFF), "\xFF\x7F")); TEST(WRITES(pb_encode_varint(&s, 0x00004000), "\x80\x80\x01")); TEST(WRITES(pb_encode_varint(&s, 0x0000D111), "\x91\xA2\x03")); TEST(WRITES(pb_encode_varint(&s, 0x001FFFFF), "\xFF\xFF\x7F")); TEST(WRITES(pb_encode_varint(&s, 0x00200000), "\x80\x80\x80\x01")); TEST(WRITES(pb_encode_varint(&s, 0x00711111), "\x91\xA2\xC4\x03")); TEST(WRITES(pb_encode_varint(&s, 0x0FFFFFFF), "\xFF\xFF\xFF\x7F")); TEST(WRITES(pb_encode_varint(&s, 0x10000000), "\x80\x80\x80\x80\x01")); TEST(WRITES(pb_encode_varint(&s, 0x31111111), "\x91\xA2\xC4\x88\x03")); TEST(WRITES(pb_encode_varint(&s, UINT32_MAX), "\xFF\xFF\xFF\xFF\x0F")); } { uint8_t buffer[50]; pb_ostream_t s; COMMENT("Test pb_encode_svarint 32-bit fast path") TEST(WRITES(pb_encode_svarint(&s, (int32_t)0x00000000), "\x00")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0xFFFFFFFF), "\x01")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0x0000003F), "\x7E")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0xFFFFFFC0), "\x7F")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0x00000040), "\x80\x01")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0x00001FFF), "\xFE\x7F")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0xFFFFE000), "\xFF\x7F")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0x00002000), "\x80\x80\x01")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0x000FFFFF), "\xFE\xFF\x7F")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0xFFF00000), "\xFF\xFF\x7F")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0x00100000), "\x80\x80\x80\x01")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0x07FFFFFF), "\xFE\xFF\xFF\x7F")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0xF8000000), "\xFF\xFF\xFF\x7F")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0x08000000), "\x80\x80\x80\x80\x01")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0x7FFFFFFF), "\xFE\xFF\xFF\xFF\x0F")); TEST(WRITES(pb_encode_svarint(&s, (int32_t)0x80000000), "\xFF\xFF\xFF\xFF\x0F")); } { uint8_t buffer[30]; pb_ostream_t s; COMMENT("Test pb_encode_tag") TEST(WRITES(pb_encode_tag(&s, PB_WT_STRING, 5), "\x2A")); TEST(WRITES(pb_encode_tag(&s, PB_WT_VARINT, 99), "\x98\x06")); } { uint8_t buffer[30]; pb_ostream_t s; pb_field_iter_t field; field.tag = 10; COMMENT("Test pb_encode_tag_for_field") field.type = PB_LTYPE_SVARINT; TEST(WRITES(pb_encode_tag_for_field(&s, &field), "\x50")); field.type = PB_LTYPE_FIXED64; TEST(WRITES(pb_encode_tag_for_field(&s, &field), "\x51")); field.type = PB_LTYPE_STRING; TEST(WRITES(pb_encode_tag_for_field(&s, &field), "\x52")); field.type = PB_LTYPE_FIXED32; TEST(WRITES(pb_encode_tag_for_field(&s, &field), "\x55")); } { uint8_t buffer[30]; pb_ostream_t s; COMMENT("Test pb_encode_string") TEST(WRITES(pb_encode_string(&s, (const uint8_t*)"abcd", 4), "\x04""abcd")); TEST(WRITES(pb_encode_string(&s, (const uint8_t*)"abcd\x00", 5), "\x05""abcd\x00")); TEST(WRITES(pb_encode_string(&s, (const uint8_t*)"", 0), "\x00")); } { uint8_t buffer[30]; pb_ostream_t s; uint8_t value = 1; int32_t max = INT32_MAX; int32_t min = INT32_MIN; int64_t lmax = INT64_MAX; int64_t lmin = INT64_MIN; pb_field_iter_t field; COMMENT("Test pb_enc_varint and pb_enc_svarint") field.type = PB_LTYPE_VARINT; field.data_size = sizeof(value); field.pData = &value; TEST(WRITES(pb_enc_varint(&s, &field), "\x01")); field.type = PB_LTYPE_SVARINT; field.data_size = sizeof(max); field.pData = &max; TEST(WRITES(pb_enc_varint(&s, &field), "\xfe\xff\xff\xff\x0f")); field.type = PB_LTYPE_SVARINT; field.data_size = sizeof(min); field.pData = &min; TEST(WRITES(pb_enc_varint(&s, &field), "\xff\xff\xff\xff\x0f")); field.type = PB_LTYPE_SVARINT; field.data_size = sizeof(lmax); field.pData = &lmax; TEST(WRITES(pb_enc_varint(&s, &field), "\xFE\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01")); field.type = PB_LTYPE_SVARINT; field.data_size = sizeof(lmin); field.pData = &lmin; TEST(WRITES(pb_enc_varint(&s, &field), "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x01")); } { uint8_t buffer[30]; pb_ostream_t s; float fvalue; double dvalue; pb_field_iter_t field; COMMENT("Test pb_enc_fixed using float") field.type = PB_LTYPE_FIXED32; field.data_size = sizeof(fvalue); field.pData = &fvalue; fvalue = 0.0f; TEST(WRITES(pb_enc_fixed(&s, &field), "\x00\x00\x00\x00")) fvalue = 99.0f; TEST(WRITES(pb_enc_fixed(&s, &field), "\x00\x00\xc6\x42")) fvalue = -12345678.0f; TEST(WRITES(pb_enc_fixed(&s, &field), "\x4e\x61\x3c\xcb")) COMMENT("Test pb_enc_fixed using double") field.type = PB_LTYPE_FIXED64; field.data_size = sizeof(dvalue); field.pData = &dvalue; dvalue = 0.0; TEST(WRITES(pb_enc_fixed(&s, &field), "\x00\x00\x00\x00\x00\x00\x00\x00")) dvalue = 99.0; TEST(WRITES(pb_enc_fixed(&s, &field), "\x00\x00\x00\x00\x00\xc0\x58\x40")) dvalue = -12345678.0; TEST(WRITES(pb_enc_fixed(&s, &field), "\x00\x00\x00\xc0\x29\x8c\x67\xc1")) } { uint8_t buffer[30]; pb_ostream_t s; struct { pb_size_t size; uint8_t bytes[5]; } value = {5, {'x', 'y', 'z', 'z', 'y'}}; pb_field_iter_t field; pb_field_iter_begin(&field, BytesMessage_fields, &value); COMMENT("Test pb_enc_bytes") TEST(WRITES(pb_enc_bytes(&s, &field), "\x05xyzzy")) value.size = 0; TEST(WRITES(pb_enc_bytes(&s, &field), "\x00")) } { uint8_t buffer[30]; pb_ostream_t s; char value[30] = "xyzzy"; pb_field_iter_t field; pb_field_iter_begin(&field, StringMessage_fields, &value); COMMENT("Test pb_enc_string") TEST(WRITES(pb_enc_string(&s, &field), "\x05xyzzy")) value[0] = '\0'; TEST(WRITES(pb_enc_string(&s, &field), "\x00")) memset(value, 'x', 10); value[10] = '\0'; TEST(WRITES(pb_enc_string(&s, &field), "\x0Axxxxxxxxxx")) } { uint8_t buffer[10]; pb_ostream_t s; IntegerArray msg = {5, {1, 2, 3, 4, 5}}; COMMENT("Test pb_encode with int32 array") TEST(WRITES(pb_encode(&s, IntegerArray_fields, &msg), "\x0A\x05\x01\x02\x03\x04\x05")) msg.data_count = 0; TEST(WRITES(pb_encode(&s, IntegerArray_fields, &msg), "")) msg.data_count = 10; TEST(!pb_encode(&s, IntegerArray_fields, &msg)) } { uint8_t buffer[10]; pb_ostream_t s; FloatArray msg = {1, {99.0f}}; COMMENT("Test pb_encode with float array") TEST(WRITES(pb_encode(&s, FloatArray_fields, &msg), "\x0A\x04\x00\x00\xc6\x42")) msg.data_count = 0; TEST(WRITES(pb_encode(&s, FloatArray_fields, &msg), "")) msg.data_count = 3; TEST(!pb_encode(&s, FloatArray_fields, &msg)) } { uint8_t buffer[50]; pb_ostream_t s; FloatArray msg = {1, {99.0f}}; COMMENT("Test array size limit in pb_encode") s = pb_ostream_from_buffer(buffer, sizeof(buffer)); TEST((msg.data_count = 10) && pb_encode(&s, FloatArray_fields, &msg)) s = pb_ostream_from_buffer(buffer, sizeof(buffer)); TEST((msg.data_count = 11) && !pb_encode(&s, FloatArray_fields, &msg)) } { uint8_t buffer[10]; pb_ostream_t s; CallbackArray msg; msg.data.funcs.encode = &fieldcallback; COMMENT("Test pb_encode with callback field.") TEST(WRITES(pb_encode(&s, CallbackArray_fields, &msg), "\x08\x55")) } { uint8_t buffer[10]; pb_ostream_t s; IntegerContainer msg = {{5, {1,2,3,4,5}}}; COMMENT("Test pb_encode with packed array in a submessage.") TEST(WRITES(pb_encode(&s, IntegerContainer_fields, &msg), "\x0A\x07\x0A\x05\x01\x02\x03\x04\x05")) } { uint8_t buffer[32]; pb_ostream_t s; BytesMessage msg = {{3, "xyz"}}; COMMENT("Test pb_encode with bytes message.") TEST(WRITES(pb_encode(&s, BytesMessage_fields, &msg), "\x0A\x03xyz")) msg.data.size = 17; /* More than maximum */ TEST(!pb_encode(&s, BytesMessage_fields, &msg)) } { uint8_t buffer[20]; pb_ostream_t s; IntegerContainer msg = {{5, {1,2,3,4,5}}}; COMMENT("Test pb_encode_delimited.") TEST(WRITES(pb_encode_delimited(&s, IntegerContainer_fields, &msg), "\x09\x0A\x07\x0A\x05\x01\x02\x03\x04\x05")) } { IntegerContainer msg = {{5, {1,2,3,4,5}}}; size_t size; COMMENT("Test pb_get_encoded_size.") TEST(pb_get_encoded_size(&size, IntegerContainer_fields, &msg) && size == 9); } { uint8_t buffer[10]; pb_ostream_t s; CallbackContainer msg; CallbackContainerContainer msg2; uint32_t state = 1; msg.submsg.data.funcs.encode = &fieldcallback; msg2.submsg.submsg.data.funcs.encode = &fieldcallback; COMMENT("Test pb_encode with callback field in a submessage.") TEST(WRITES(pb_encode(&s, CallbackContainer_fields, &msg), "\x0A\x02\x08\x55")) TEST(WRITES(pb_encode(&s, CallbackContainerContainer_fields, &msg2), "\x0A\x04\x0A\x02\x08\x55")) /* Misbehaving callback: varying output between calls */ msg.submsg.data.funcs.encode = &crazyfieldcallback; msg.submsg.data.arg = &state; msg2.submsg.submsg.data.funcs.encode = &crazyfieldcallback; msg2.submsg.submsg.data.arg = &state; TEST(!pb_encode(&s, CallbackContainer_fields, &msg)) state = 1; TEST(!pb_encode(&s, CallbackContainerContainer_fields, &msg2)) } { uint8_t buffer[StringMessage_size]; pb_ostream_t s; StringMessage msg = {"0123456789"}; s = pb_ostream_from_buffer(buffer, sizeof(buffer)); COMMENT("Test that StringMessage_size is correct") TEST(pb_encode(&s, StringMessage_fields, &msg)); TEST(s.bytes_written == StringMessage_size); } { uint8_t buffer[128]; pb_ostream_t s; StringPointerContainer msg = StringPointerContainer_init_zero; char *strs[1] = {NULL}; char zstr[] = "Z"; COMMENT("Test string pointer encoding."); msg.rep_str = strs; msg.rep_str_count = 1; TEST(WRITES(pb_encode(&s, StringPointerContainer_fields, &msg), "\x0a\x00")) strs[0] = zstr; TEST(WRITES(pb_encode(&s, StringPointerContainer_fields, &msg), "\x0a\x01Z")) } if (status != 0) fprintf(stdout, "\n\nSome tests FAILED!\n"); return status; } nanopb-0.4.1/tests/enum_minmax/000077500000000000000000000000001361552131000164455ustar00rootroot00000000000000nanopb-0.4.1/tests/enum_minmax/SConscript000066400000000000000000000002701361552131000204560ustar00rootroot00000000000000# Test that different sizes of enum fields are properly encoded and decoded. Import('env') env.NanopbProto('enumminmax') p = env.Program(["enumminmax_unittests.c",]) env.RunTest(p) nanopb-0.4.1/tests/enum_minmax/enumminmax.proto000066400000000000000000000006701361552131000217130ustar00rootroot00000000000000/* Test out-of-order enum values. */ syntax = "proto3"; enum Language { UNKNOWN = 0; ENGLISH_EN_GB = 12; ENGLISH_EN_US = 1; FRENCH_FR_FR = 2; ITALIAN_IT_IT = 3; GERMAN_DE_DE = 4; SPANISH_ES_AR = 13; SPANISH_ES_ES = 5; SPANISH_ES_MX = 14; SWEDISH_SV_SE = 6; DUTCH_NL_NL = 7; KOREAN_KO_KR = 8; JAPANESE_JA_JP = 9; CHINESE_SIMPLIFIED_ZH_CN = 10; CHINESE_TRADITIONAL_ZH_TW = 11; } nanopb-0.4.1/tests/enum_minmax/enumminmax_unittests.c000066400000000000000000000005201361552131000231060ustar00rootroot00000000000000#include "unittests.h" #include "enumminmax.pb.h" int main() { int status = 0; COMMENT("Verify min/max on unsorted enum"); { TEST(_Language_MIN == Language_UNKNOWN); TEST(_Language_MAX == Language_SPANISH_ES_MX); TEST(_Language_ARRAYSIZE == (Language_SPANISH_ES_MX+1)); } return status; } nanopb-0.4.1/tests/enum_sizes/000077500000000000000000000000001361552131000163115ustar00rootroot00000000000000nanopb-0.4.1/tests/enum_sizes/SConscript000066400000000000000000000005201361552131000203200ustar00rootroot00000000000000# Test that different sizes of enum fields are properly encoded and decoded. Import('env') env.NanopbProto('enumsizes') p = env.Program(["enumsizes_unittests.c", "enumsizes.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/enum_sizes/enumsizes.proto000066400000000000000000000037731361552131000214320ustar00rootroot00000000000000/* Test handling of enums with different value ranges. * Depending on compiler and the packed_enum setting, the datatypes * for enums can be either signed or unsigned. In past this has caused * a bit of a problem for the encoder/decoder (issue #164). */ syntax = "proto2"; import 'nanopb.proto'; option (nanopb_fileopt).long_names = false; enum UnpackedUint8 { option (nanopb_enumopt).packed_enum = false; UU8_MIN = 0; UU8_MAX = 255; } enum PackedUint8 { option (nanopb_enumopt).packed_enum = true; PU8_MIN = 0; PU8_MAX = 255; } enum UnpackedInt8 { option (nanopb_enumopt).packed_enum = false; UI8_MIN = -128; UI8_MAX = 127; } enum PackedInt8 { option (nanopb_enumopt).packed_enum = true; PI8_MIN = -128; PI8_MAX = 127; } enum UnpackedUint16 { option (nanopb_enumopt).packed_enum = false; UU16_MIN = 0; UU16_MAX = 65535; } enum PackedUint16 { option (nanopb_enumopt).packed_enum = true; PU16_MIN = 0; PU16_MAX = 65535; } enum UnpackedInt16 { option (nanopb_enumopt).packed_enum = false; UI16_MIN = -32768; UI16_MAX = 32767; } enum PackedInt16 { option (nanopb_enumopt).packed_enum = true; PI16_MIN = -32768; PI16_MAX = 32767; } /* Protobuf supports enums up to 32 bits. * The 32 bit case is covered by HugeEnum in the alltypes test. */ message PackedEnums { required PackedUint8 u8_min = 1; required PackedUint8 u8_max = 2; required PackedInt8 i8_min = 3; required PackedInt8 i8_max = 4; required PackedUint16 u16_min = 5; required PackedUint16 u16_max = 6; required PackedInt16 i16_min = 7; required PackedInt16 i16_max = 8; } message UnpackedEnums { required UnpackedUint8 u8_min = 1; required UnpackedUint8 u8_max = 2; required UnpackedInt8 i8_min = 3; required UnpackedInt8 i8_max = 4; required UnpackedUint16 u16_min = 5; required UnpackedUint16 u16_max = 6; required UnpackedInt16 i16_min = 7; required UnpackedInt16 i16_max = 8; } nanopb-0.4.1/tests/enum_sizes/enumsizes_unittests.c000066400000000000000000000041031361552131000226170ustar00rootroot00000000000000#include #include #include #include #include "unittests.h" #include "enumsizes.pb.h" int main() { int status = 0; UnpackedEnums msg1 = { UU8_MIN, UU8_MAX, UI8_MIN, UI8_MAX, UU16_MIN, UU16_MAX, UI16_MIN, UI16_MAX, }; PackedEnums msg2; UnpackedEnums msg3; uint8_t buf[256]; size_t msgsize; COMMENT("Step 1: unpacked enums -> protobuf"); { pb_ostream_t s = pb_ostream_from_buffer(buf, sizeof(buf)); TEST(pb_encode(&s, UnpackedEnums_fields, &msg1)); msgsize = s.bytes_written; } COMMENT("Step 2: protobuf -> packed enums"); { pb_istream_t s = pb_istream_from_buffer(buf, msgsize); TEST(pb_decode(&s, PackedEnums_fields, &msg2)); TEST(msg1.u8_min == (int)msg2.u8_min); TEST(msg1.u8_max == (int)msg2.u8_max); TEST(msg1.i8_min == (int)msg2.i8_min); TEST(msg1.i8_max == (int)msg2.i8_max); TEST(msg1.u16_min == (int)msg2.u16_min); TEST(msg1.u16_max == (int)msg2.u16_max); TEST(msg1.i16_min == (int)msg2.i16_min); TEST(msg1.i16_max == (int)msg2.i16_max); } COMMENT("Step 3: packed enums -> protobuf"); { pb_ostream_t s = pb_ostream_from_buffer(buf, sizeof(buf)); TEST(pb_encode(&s, PackedEnums_fields, &msg2)); msgsize = s.bytes_written; } COMMENT("Step 4: protobuf -> unpacked enums"); { pb_istream_t s = pb_istream_from_buffer(buf, msgsize); TEST(pb_decode(&s, UnpackedEnums_fields, &msg3)); TEST(msg1.u8_min == (int)msg3.u8_min); TEST(msg1.u8_max == (int)msg3.u8_max); TEST(msg1.i8_min == (int)msg3.i8_min); TEST(msg1.i8_max == (int)msg3.i8_max); TEST(msg1.u16_min == (int)msg2.u16_min); TEST(msg1.u16_max == (int)msg2.u16_max); TEST(msg1.i16_min == (int)msg2.i16_min); TEST(msg1.i16_max == (int)msg2.i16_max); } if (status != 0) fprintf(stdout, "\n\nSome tests FAILED!\n"); return status; } nanopb-0.4.1/tests/enum_to_string/000077500000000000000000000000001361552131000171645ustar00rootroot00000000000000nanopb-0.4.1/tests/enum_to_string/SConscript000066400000000000000000000002241361552131000211740ustar00rootroot00000000000000# Test enum to string functionality Import('env') env.NanopbProto("enum.proto") p = env.Program(["enum_to_string.c", "enum.pb.c"]) env.RunTest(p) nanopb-0.4.1/tests/enum_to_string/enum.proto000066400000000000000000000004611361552131000212160ustar00rootroot00000000000000/* Test enum to string function generation */ syntax = "proto2"; import "nanopb.proto"; option (nanopb_fileopt).enum_to_string = true; enum MyEnum { VALUE1 = 1; VALUE2 = 2; VALUE15 = 15; } enum MyShortNameEnum { option (nanopb_enumopt).long_names = false; MSNE_VALUE256 = 256; } nanopb-0.4.1/tests/enum_to_string/enum_to_string.c000066400000000000000000000010131361552131000223570ustar00rootroot00000000000000#include #include "unittests.h" #include "enum.pb.h" int main() { int status = 0; TEST(strcmp(MyEnum_name(MyEnum_VALUE1), "VALUE1") == 0); TEST(strcmp(MyEnum_name(MyEnum_VALUE2), "VALUE2") == 0); TEST(strcmp(MyEnum_name(MyEnum_VALUE15), "VALUE15") == 0); TEST(strcmp(MyShortNameEnum_name(MSNE_VALUE256), "MSNE_VALUE256") == 0); TEST(strcmp(MyShortNameEnum_name(9999), "unknown") == 0); if (status != 0) fprintf(stdout, "\n\nSome tests FAILED!\n"); return status; } nanopb-0.4.1/tests/extensions/000077500000000000000000000000001361552131000163275ustar00rootroot00000000000000nanopb-0.4.1/tests/extensions/SConscript000066400000000000000000000012101361552131000203330ustar00rootroot00000000000000# Test the support for extension fields. Import("env") # We use the files from the alltypes test case incpath = env.Clone() incpath.Append(PROTOCPATH = '$BUILD/alltypes') incpath.Append(CPPPATH = '$BUILD/alltypes') incpath.NanopbProto(["extensions", "extensions.options"]) enc = incpath.Program(["encode_extensions.c", "extensions.pb.c", "$BUILD/alltypes/alltypes.pb$OBJSUFFIX", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) dec = incpath.Program(["decode_extensions.c", "extensions.pb.c", "$BUILD/alltypes/alltypes.pb$OBJSUFFIX", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(enc) env.RunTest([dec, "encode_extensions.output"]) nanopb-0.4.1/tests/extensions/decode_extensions.c000066400000000000000000000027311361552131000222000ustar00rootroot00000000000000/* Test decoding of extension fields. */ #include #include #include #include #include "alltypes.pb.h" #include "extensions.pb.h" #include "test_helpers.h" #include "unittests.h" int main(int argc, char **argv) { uint8_t buffer[1024]; size_t count; pb_istream_t stream; int status = 0; AllTypes alltypes = AllTypes_init_zero; int32_t extensionfield1; pb_extension_t ext1 = pb_extension_init_zero; ExtensionMessage extensionfield2 = ExtensionMessage_init_zero; pb_extension_t ext2 = pb_extension_init_zero; /* Read the message data */ SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); stream = pb_istream_from_buffer(buffer, count); /* Add the extensions */ alltypes.extensions = &ext1; ext1.type = &AllTypes_extensionfield1; ext1.dest = &extensionfield1; ext1.next = &ext2; ext2.type = &ExtensionMessage_AllTypes_extensionfield2; ext2.dest = &extensionfield2; ext2.next = NULL; /* Decode the message */ if (!pb_decode(&stream, AllTypes_fields, &alltypes)) { printf("Parsing failed: %s\n", PB_GET_ERROR(&stream)); return 1; } /* Check that the extensions decoded properly */ TEST(ext1.found) TEST(extensionfield1 == 12345) TEST(ext2.found) TEST(strcmp(extensionfield2.test1, "test") == 0) TEST(extensionfield2.test2 == 54321) return status; } nanopb-0.4.1/tests/extensions/encode_extensions.c000066400000000000000000000026271361552131000222160ustar00rootroot00000000000000/* Tests extension fields. */ #include #include #include #include #include "alltypes.pb.h" #include "extensions.pb.h" #include "test_helpers.h" int main(int argc, char **argv) { uint8_t buffer[1024]; pb_ostream_t stream; AllTypes alltypes = {0}; int32_t extensionfield1 = 12345; pb_extension_t ext1 = pb_extension_init_zero; ExtensionMessage extensionfield2 = {"test", 54321}; pb_extension_t ext2 = pb_extension_init_zero; /* Set up the extensions */ alltypes.extensions = &ext1; ext1.type = &AllTypes_extensionfield1; ext1.dest = &extensionfield1; ext1.next = &ext2; ext2.type = &ExtensionMessage_AllTypes_extensionfield2; ext2.dest = &extensionfield2; ext2.next = NULL; /* Set up the output stream */ stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Now encode the message and check if we succeeded. */ if (pb_encode(&stream, AllTypes_fields, &alltypes)) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; /* Success */ } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; /* Failure */ } /* Check that the field tags are properly generated */ (void)AllTypes_extensionfield1_tag; (void)ExtensionMessage_AllTypes_extensionfield2_tag; } nanopb-0.4.1/tests/extensions/extensions.options000066400000000000000000000000161361552131000221400ustar00rootroot00000000000000* max_size:16 nanopb-0.4.1/tests/extensions/extensions.proto000066400000000000000000000007541361552131000216210ustar00rootroot00000000000000syntax = "proto2"; import 'alltypes.proto'; extend AllTypes { optional int32 AllTypes_extensionfield1 = 255 [default = 5]; } message ExtensionMessage { extend AllTypes { optional ExtensionMessage AllTypes_extensionfield2 = 254; // required ExtensionMessage AllTypes_extensionfield3 = 253; // No longer allowed by protobuf 3 repeated ExtensionMessage AllTypes_extensionfield4 = 252; } required string test1 = 1; required int32 test2 = 2; } nanopb-0.4.1/tests/extra_fields/000077500000000000000000000000001361552131000166015ustar00rootroot00000000000000nanopb-0.4.1/tests/extra_fields/SConscript000066400000000000000000000016371361552131000206220ustar00rootroot00000000000000# Test that the decoder properly handles unknown fields in the input. Import("env") dec = env.GetBuildPath('$BUILD/basic_buffer/${PROGPREFIX}decode_buffer${PROGSUFFIX}') env.RunTest('person_with_extra_field.output', [dec, "person_with_extra_field.pb"]) env.Compare(["person_with_extra_field.output", "person_with_extra_field.expected"]) dec = env.GetBuildPath('$BUILD/basic_stream/${PROGPREFIX}decode_stream${PROGSUFFIX}') env.RunTest('person_with_extra_field_stream.output', [dec, "person_with_extra_field.pb"]) env.Compare(["person_with_extra_field_stream.output", "person_with_extra_field.expected"]) # This uses the backwards compatibility alltypes test, so that # alltypes_with_extra_fields.pb doesn't have to be remade so often. dec2 = env.GetBuildPath('$BUILD/backwards_compatibility/${PROGPREFIX}decode_legacy${PROGSUFFIX}') env.RunTest('alltypes_with_extra_fields.output', [dec2, 'alltypes_with_extra_fields.pb']) nanopb-0.4.1/tests/extra_fields/alltypes_with_extra_fields.pb000066400000000000000000000010131361552131000245400ustar00rootroot00000000000000 (08EMU|DYa i@r1014z1015 1016* '@D(($(t@20142015     2016*nanopb-0.4.1/tests/extra_fields/person_with_extra_field.expected000066400000000000000000000002641361552131000252350ustar00rootroot00000000000000name: "Test Person 99" id: 99 email: "test@person.com" phone { number: "555-12345678" type: MOBILE } phone { number: "99-2342" } phone { number: "1234-5678" type: WORK } nanopb-0.4.1/tests/extra_fields/person_with_extra_field.pb000066400000000000000000000001741361552131000240350ustar00rootroot00000000000000 Test Person 99ctest@person.comEXTRA 555-12345678 99-2342 1234-5678r   nanopb-0.4.1/tests/field_size_16/000077500000000000000000000000001361552131000165535ustar00rootroot00000000000000nanopb-0.4.1/tests/field_size_16/SConscript000066400000000000000000000023251361552131000205670ustar00rootroot00000000000000# Run the alltypes test case, but compile with PB_FIELD_16BIT=1. # Also the .proto file has been modified to have high indexes. Import("env") # Take copy of the files for custom build. c = Copy("$TARGET", "$SOURCE") env.Command("encode_alltypes.c", "$BUILD/alltypes/encode_alltypes.c", c) env.Command("decode_alltypes.c", "$BUILD/alltypes/decode_alltypes.c", c) env.NanopbProto(["alltypes", "alltypes.options"]) # Define the compilation options opts = env.Clone() opts.Append(CPPDEFINES = {'PB_FIELD_16BIT': 1}) # Build new version of core strict = opts.Clone() strict.Append(CFLAGS = strict['CORECFLAGS']) strict.Object("pb_decode_fields16.o", "$NANOPB/pb_decode.c") strict.Object("pb_encode_fields16.o", "$NANOPB/pb_encode.c") strict.Object("pb_common_fields16.o", "$NANOPB/pb_common.c") # Now build and run the test normally. enc = opts.Program(["encode_alltypes.c", "alltypes.pb.c", "pb_encode_fields16.o", "pb_common_fields16.o"]) dec = opts.Program(["decode_alltypes.c", "alltypes.pb.c", "pb_decode_fields16.o", "pb_common_fields16.o"]) env.RunTest(enc) env.RunTest([dec, "encode_alltypes.output"]) env.RunTest("optionals.output", enc, ARGS = ['1']) env.RunTest("optionals.decout", [dec, "optionals.output"], ARGS = ['1']) nanopb-0.4.1/tests/field_size_16/alltypes.options000066400000000000000000000002171361552131000220250ustar00rootroot00000000000000* max_size:16 * max_count:5 *.*fbytes fixed_length:true max_size:4 *.*farray fixed_count:true max_count:5 DescriptorSize8 descriptorsize:DS_8 nanopb-0.4.1/tests/field_size_16/alltypes.proto000066400000000000000000000112321361552131000214740ustar00rootroot00000000000000syntax = "proto2"; message SubMessage { required string substuff1 = 1 [default = "1"]; required int32 substuff2 = 2 [default = 2]; optional fixed32 substuff3 = 65535 [default = 3]; } message EmptyMessage { } enum HugeEnum { Negative = -2147483647; /* protoc doesn't accept -2147483648 here */ Positive = 2147483647; } message Limits { required int32 int32_min = 1; required int32 int32_max = 2; required uint32 uint32_min = 3; required uint32 uint32_max = 4; required int64 int64_min = 5; required int64 int64_max = 6; required uint64 uint64_min = 7; required uint64 uint64_max = 8; required HugeEnum enum_min = 9; required HugeEnum enum_max = 10; required int32 largetag = 65535 [default = 0]; } message IntSizes { required int32 req_int8 = 1 ; required uint32 req_uint8 = 2 ; required sint32 req_sint8 = 3 ; required int32 req_int16 = 4 ; required uint32 req_uint16 = 5 ; required sint32 req_sint16 = 6 ; } message DescriptorSize8 { required int32 first = 1; required int32 second = 22222; } enum MyEnum { Zero = 0; First = 1; Second = 2; Truth = 42; } message AllTypes { required int32 req_int32 = 1; required int64 req_int64 = 2; required uint32 req_uint32 = 3; required uint64 req_uint64 = 4; required sint32 req_sint32 = 5; required sint64 req_sint64 = 6; required bool req_bool = 7; required fixed32 req_fixed32 = 8; required sfixed32 req_sfixed32= 9; required float req_float = 10; required fixed64 req_fixed64 = 11; required sfixed64 req_sfixed64= 12; required double req_double = 13; required string req_string = 14; required bytes req_bytes = 15; required SubMessage req_submsg = 16; required MyEnum req_enum = 17; required EmptyMessage req_emptymsg = 18; required bytes req_fbytes = 19; repeated int32 rep_int32 = 21; repeated int64 rep_int64 = 22; repeated uint32 rep_uint32 = 23; repeated uint64 rep_uint64 = 24; repeated sint32 rep_sint32 = 25; repeated sint64 rep_sint64 = 26; repeated bool rep_bool = 27; repeated fixed32 rep_fixed32 = 28; repeated sfixed32 rep_sfixed32= 29; repeated float rep_float = 30; repeated fixed64 rep_fixed64 = 10031; repeated sfixed64 rep_sfixed64= 10032; repeated double rep_double = 10033; repeated string rep_string = 10034; repeated bytes rep_bytes = 10035; repeated SubMessage rep_submsg = 10036; repeated MyEnum rep_enum = 10037; repeated EmptyMessage rep_emptymsg = 10038; repeated bytes rep_fbytes = 10039; repeated int32 rep_farray = 10040; optional int32 opt_int32 = 10041 [default = 4041]; optional int64 opt_int64 = 10042 [default = 4042]; optional uint32 opt_uint32 = 10043 [default = 4043]; optional uint64 opt_uint64 = 10044 [default = 4044]; optional sint32 opt_sint32 = 10045 [default = 4045]; optional sint64 opt_sint64 = 10046 [default = 4046]; optional bool opt_bool = 10047 [default = false]; optional fixed32 opt_fixed32 = 10048 [default = 4048]; optional sfixed32 opt_sfixed32= 10049 [default = 4049]; optional float opt_float = 10050 [default = 4050]; optional fixed64 opt_fixed64 = 10051 [default = 4051]; optional sfixed64 opt_sfixed64= 10052 [default = 4052]; optional double opt_double = 10053 [default = 4053]; optional string opt_string = 10054 [default = "4054"]; optional bytes opt_bytes = 10055 [default = "\x34\x5C\x00\xff"]; optional SubMessage opt_submsg = 10056; optional MyEnum opt_enum = 10057 [default = Second]; optional EmptyMessage opt_emptymsg = 10058; optional bytes opt_fbytes = 10059 [default = "4059"]; oneof oneof { SubMessage oneof_msg1 = 10060; EmptyMessage oneof_msg2 = 10061; } // Check support for custom integer sizes required IntSizes req_intsizes = 96; // Check support for 8-word descriptors required DescriptorSize8 req_ds8 = 97; // Check that extreme integer values are handled correctly required Limits req_limits = 98; // Just to make sure that the size of the fields has been calculated // properly, i.e. otherwise a bug in last field might not be detected. required int32 end = 10099; extensions 200 to 255; } nanopb-0.4.1/tests/field_size_16_proto3/000077500000000000000000000000001361552131000200615ustar00rootroot00000000000000nanopb-0.4.1/tests/field_size_16_proto3/SConscript000066400000000000000000000014671361552131000221030ustar00rootroot00000000000000# Version of AllTypes test case for protobuf 3 file format. Import("env") env.NanopbProto(["alltypes", "alltypes.options"]) # Define the compilation options opts = env.Clone() opts.Append(CPPDEFINES = {'PB_FIELD_16BIT': 1}) # Build new version of core strict = opts.Clone() strict.Append(CFLAGS = strict['CORECFLAGS']) strict.Object("pb_decode_fields16.o", "$NANOPB/pb_decode.c") strict.Object("pb_encode_fields16.o", "$NANOPB/pb_encode.c") strict.Object("pb_common_fields16.o", "$NANOPB/pb_common.c") # Now build and run the test normally. enc = opts.Program(["encode_alltypes.c", "alltypes.pb.c", "pb_encode_fields16.o", "pb_common_fields16.o"]) dec = opts.Program(["decode_alltypes.c", "alltypes.pb.c", "pb_decode_fields16.o", "pb_common_fields16.o"]) env.RunTest(enc) env.RunTest([dec, "encode_alltypes.output"]) nanopb-0.4.1/tests/field_size_16_proto3/alltypes.options000066400000000000000000000002141361552131000233300ustar00rootroot00000000000000* max_size:16 * max_count:5 *.*fbytes fixed_length:true max_size:4 SubMessage.substuff1 max_size:256 *.req_limits proto3_singular_msgs:true nanopb-0.4.1/tests/field_size_16_proto3/alltypes.proto000066400000000000000000000053741361552131000230140ustar00rootroot00000000000000syntax = "proto3"; // package name placeholder message SubMessage { string substuff1 = 1; int32 substuff2 = 2; fixed32 substuff3 = 3; } message EmptyMessage { } enum HugeEnum { HE_Zero = 0; Negative = -2147483647; /* protoc doesn't accept -2147483648 here */ Positive = 2147483647; } message Limits { int32 int32_min = 1; int32 int32_max = 2; uint32 uint32_min = 3; uint32 uint32_max = 4; int64 int64_min = 5; int64 int64_max = 6; uint64 uint64_min = 7; uint64 uint64_max = 8; HugeEnum enum_min = 9; HugeEnum enum_max = 10; } enum MyEnum { Zero = 0; First = 1; Second = 2; Truth = 42; } message AllTypes { int32 sng_int32 = 1; int64 sng_int64 = 2; uint32 sng_uint32 = 3; uint64 sng_uint64 = 4; sint32 sng_sint32 = 5; sint64 sng_sint64 = 6; bool sng_bool = 7; fixed32 sng_fixed32 = 8; sfixed32 sng_sfixed32= 9; float sng_float = 10; fixed64 sng_fixed64 = 11; sfixed64 sng_sfixed64= 12; double sng_double = 13; string sng_string = 14; bytes sng_bytes = 15; SubMessage sng_submsg = 16; MyEnum sng_enum = 17; EmptyMessage sng_emptymsg = 18; bytes sng_fbytes = 19; repeated int32 rep_int32 = 21 [packed = true]; repeated int64 rep_int64 = 22 [packed = true]; repeated uint32 rep_uint32 = 23 [packed = true]; repeated uint64 rep_uint64 = 24 [packed = true]; repeated sint32 rep_sint32 = 25 [packed = true]; repeated sint64 rep_sint64 = 26 [packed = true]; repeated bool rep_bool = 27 [packed = true]; repeated fixed32 rep_fixed32 = 28 [packed = true]; repeated sfixed32 rep_sfixed32= 29 [packed = true]; repeated float rep_float = 30 [packed = true]; repeated fixed64 rep_fixed64 = 31 [packed = true]; repeated sfixed64 rep_sfixed64= 32 [packed = true]; repeated double rep_double = 33 [packed = true]; repeated string rep_string = 34; repeated bytes rep_bytes = 35; repeated SubMessage rep_submsg = 36; repeated MyEnum rep_enum = 37 [packed = true]; repeated EmptyMessage rep_emptymsg = 38; repeated bytes rep_fbytes = 39; oneof oneof { SubMessage oneof_msg1 = 59; EmptyMessage oneof_msg2 = 60; } // Check that extreme integer values are handled correctly Limits req_limits = 98; // Just to make sure that the size of the fields has been calculated // properly, i.e. otherwise a bug in last field might not be detected. int32 end = 99; } nanopb-0.4.1/tests/field_size_16_proto3/decode_alltypes.c000066400000000000000000000155741361552131000234010ustar00rootroot00000000000000/* Tests the decoding of all types. * This is the counterpart of test_encode3. * Run e.g. ./test_encode3 | ./test_decode3 */ #include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" #include "unittests.h" /* This function is called once from main(), it handles the decoding and checks the fields. */ bool check_alltypes(pb_istream_t *stream, int mode) { AllTypes alltypes = AllTypes_init_zero; int status = 0; /* Fill with garbage to better detect initialization errors */ memset(&alltypes, 0xAA, sizeof(alltypes)); if (!pb_decode(stream, AllTypes_fields, &alltypes)) return false; TEST(alltypes.rep_int32_count == 5 && alltypes.rep_int32[4] == -2001 && alltypes.rep_int32[0] == 0); TEST(alltypes.rep_int64_count == 5 && alltypes.rep_int64[4] == -2002 && alltypes.rep_int64[0] == 0); TEST(alltypes.rep_uint32_count == 5 && alltypes.rep_uint32[4] == 2003 && alltypes.rep_uint32[0] == 0); TEST(alltypes.rep_uint64_count == 5 && alltypes.rep_uint64[4] == 2004 && alltypes.rep_uint64[0] == 0); TEST(alltypes.rep_sint32_count == 5 && alltypes.rep_sint32[4] == -2005 && alltypes.rep_sint32[0] == 0); TEST(alltypes.rep_sint64_count == 5 && alltypes.rep_sint64[4] == -2006 && alltypes.rep_sint64[0] == 0); TEST(alltypes.rep_bool_count == 5 && alltypes.rep_bool[4] == true && alltypes.rep_bool[0] == false); TEST(alltypes.rep_fixed32_count == 5 && alltypes.rep_fixed32[4] == 2008 && alltypes.rep_fixed32[0] == 0); TEST(alltypes.rep_sfixed32_count == 5 && alltypes.rep_sfixed32[4] == -2009 && alltypes.rep_sfixed32[0] == 0); TEST(alltypes.rep_float_count == 5 && alltypes.rep_float[4] == 2010.0f && alltypes.rep_float[0] == 0.0f); TEST(alltypes.rep_fixed64_count == 5 && alltypes.rep_fixed64[4] == 2011 && alltypes.rep_fixed64[0] == 0); TEST(alltypes.rep_sfixed64_count == 5 && alltypes.rep_sfixed64[4] == -2012 && alltypes.rep_sfixed64[0] == 0); TEST(alltypes.rep_double_count == 5 && alltypes.rep_double[4] == 2013.0 && alltypes.rep_double[0] == 0.0); TEST(alltypes.rep_string_count == 5 && strcmp(alltypes.rep_string[4], "2014") == 0 && alltypes.rep_string[0][0] == '\0'); TEST(alltypes.rep_bytes_count == 5 && alltypes.rep_bytes[4].size == 4 && alltypes.rep_bytes[0].size == 0); TEST(memcmp(alltypes.rep_bytes[4].bytes, "2015", 4) == 0); TEST(alltypes.rep_submsg_count == 5); TEST(strcmp(alltypes.rep_submsg[4].substuff1, "2016") == 0 && alltypes.rep_submsg[0].substuff1[0] == '\0'); TEST(alltypes.rep_submsg[4].substuff2 == 2016 && alltypes.rep_submsg[0].substuff2 == 0); TEST(alltypes.rep_submsg[4].substuff3 == 2016 && alltypes.rep_submsg[0].substuff3 == 0); TEST(alltypes.rep_enum_count == 5 && alltypes.rep_enum[4] == MyEnum_Truth && alltypes.rep_enum[0] == MyEnum_Zero); TEST(alltypes.rep_emptymsg_count == 5); TEST(alltypes.rep_fbytes_count == 5); TEST(alltypes.rep_fbytes[0][0] == 0 && alltypes.rep_fbytes[0][3] == 0); TEST(memcmp(alltypes.rep_fbytes[4], "2019", 4) == 0); if (mode == 0) { /* Expect default values */ TEST(alltypes.sng_int32 == 0); TEST(alltypes.sng_int64 == 0); TEST(alltypes.sng_uint32 == 0); TEST(alltypes.sng_uint64 == 0); TEST(alltypes.sng_sint32 == 0); TEST(alltypes.sng_sint64 == 0); TEST(alltypes.sng_bool == false); TEST(alltypes.sng_fixed32 == 0); TEST(alltypes.sng_sfixed32 == 0); TEST(alltypes.sng_float == 0.0f); TEST(alltypes.sng_fixed64 == 0); TEST(alltypes.sng_sfixed64 == 0); TEST(alltypes.sng_double == 0.0); TEST(strcmp(alltypes.sng_string, "") == 0); TEST(alltypes.sng_bytes.size == 0); TEST(alltypes.has_sng_submsg == false); TEST(strcmp(alltypes.sng_submsg.substuff1, "") == 0); TEST(alltypes.sng_submsg.substuff2 == 0); TEST(alltypes.sng_submsg.substuff3 == 0); TEST(alltypes.sng_enum == MyEnum_Zero); TEST(alltypes.sng_fbytes[0] == 0 && alltypes.sng_fbytes[1] == 0 && alltypes.sng_fbytes[2] == 0 && alltypes.sng_fbytes[3] == 0); TEST(alltypes.which_oneof == 0); } else { /* Expect filled-in values */ TEST(alltypes.sng_int32 == 3041); TEST(alltypes.sng_int64 == 3042); TEST(alltypes.sng_uint32 == 3043); TEST(alltypes.sng_uint64 == 3044); TEST(alltypes.sng_sint32 == 3045); TEST(alltypes.sng_sint64 == 3046); TEST(alltypes.sng_bool == true); TEST(alltypes.sng_fixed32 == 3048); TEST(alltypes.sng_sfixed32 == 3049); TEST(alltypes.sng_float == 3050.0f); TEST(alltypes.sng_fixed64 == 3051); TEST(alltypes.sng_sfixed64 == 3052); TEST(alltypes.sng_double == 3053.0); TEST(strcmp(alltypes.sng_string, "3054") == 0); TEST(alltypes.sng_bytes.size == 4); TEST(memcmp(alltypes.sng_bytes.bytes, "3055", 4) == 0); TEST(alltypes.has_sng_submsg == true); TEST(strcmp(alltypes.sng_submsg.substuff1, "3056") == 0); TEST(alltypes.sng_submsg.substuff2 == 3056); TEST(alltypes.sng_submsg.substuff3 == 0); TEST(alltypes.sng_enum == MyEnum_Truth); TEST(memcmp(alltypes.sng_fbytes, "3059", 4) == 0); TEST(alltypes.which_oneof == AllTypes_oneof_msg1_tag); TEST(strcmp(alltypes.oneof.oneof_msg1.substuff1, "4059") == 0); TEST(alltypes.oneof.oneof_msg1.substuff2 == 4059); } TEST(alltypes.req_limits.int32_min == INT32_MIN); TEST(alltypes.req_limits.int32_max == INT32_MAX); TEST(alltypes.req_limits.uint32_min == 0); TEST(alltypes.req_limits.uint32_max == UINT32_MAX); TEST(alltypes.req_limits.int64_min == INT64_MIN); TEST(alltypes.req_limits.int64_max == INT64_MAX); TEST(alltypes.req_limits.uint64_min == 0); TEST(alltypes.req_limits.uint64_max == UINT64_MAX); TEST(alltypes.req_limits.enum_min == HugeEnum_Negative); TEST(alltypes.req_limits.enum_max == HugeEnum_Positive); TEST(alltypes.end == 1099); return status == 0; } int main(int argc, char **argv) { uint8_t buffer[2048]; size_t count; pb_istream_t stream; /* Whether to expect the optional values or the default values. */ int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Read the data into buffer */ SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); /* Construct a pb_istream_t for reading from the buffer */ stream = pb_istream_from_buffer(buffer, count); /* Decode and print out the stuff */ if (!check_alltypes(&stream, mode)) { printf("Parsing failed: %s\n", PB_GET_ERROR(&stream)); return 1; } else { return 0; } } nanopb-0.4.1/tests/field_size_16_proto3/encode_alltypes.c000066400000000000000000000100451361552131000233770ustar00rootroot00000000000000/* Attempts to test all the datatypes supported by ProtoBuf3. */ #include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" int main(int argc, char **argv) { int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Initialize the structure with constants */ AllTypes alltypes = AllTypes_init_zero; alltypes.rep_int32_count = 5; alltypes.rep_int32[4] = -2001; alltypes.rep_int64_count = 5; alltypes.rep_int64[4] = -2002; alltypes.rep_uint32_count = 5; alltypes.rep_uint32[4] = 2003; alltypes.rep_uint64_count = 5; alltypes.rep_uint64[4] = 2004; alltypes.rep_sint32_count = 5; alltypes.rep_sint32[4] = -2005; alltypes.rep_sint64_count = 5; alltypes.rep_sint64[4] = -2006; alltypes.rep_bool_count = 5; alltypes.rep_bool[4] = true; alltypes.rep_fixed32_count = 5; alltypes.rep_fixed32[4] = 2008; alltypes.rep_sfixed32_count = 5; alltypes.rep_sfixed32[4] = -2009; alltypes.rep_float_count = 5; alltypes.rep_float[4] = 2010.0f; alltypes.rep_fixed64_count = 5; alltypes.rep_fixed64[4] = 2011; alltypes.rep_sfixed64_count = 5; alltypes.rep_sfixed64[4] = -2012; alltypes.rep_double_count = 5; alltypes.rep_double[4] = 2013.0; alltypes.rep_string_count = 5; strcpy(alltypes.rep_string[4], "2014"); alltypes.rep_bytes_count = 5; alltypes.rep_bytes[4].size = 4; memcpy(alltypes.rep_bytes[4].bytes, "2015", 4); alltypes.rep_submsg_count = 5; strcpy(alltypes.rep_submsg[4].substuff1, "2016"); alltypes.rep_submsg[4].substuff2 = 2016; alltypes.rep_submsg[4].substuff3 = 2016; alltypes.rep_enum_count = 5; alltypes.rep_enum[4] = MyEnum_Truth; alltypes.rep_emptymsg_count = 5; alltypes.rep_fbytes_count = 5; memcpy(alltypes.rep_fbytes[4], "2019", 4); alltypes.req_limits.int32_min = INT32_MIN; alltypes.req_limits.int32_max = INT32_MAX; alltypes.req_limits.uint32_min = 0; alltypes.req_limits.uint32_max = UINT32_MAX; alltypes.req_limits.int64_min = INT64_MIN; alltypes.req_limits.int64_max = INT64_MAX; alltypes.req_limits.uint64_min = 0; alltypes.req_limits.uint64_max = UINT64_MAX; alltypes.req_limits.enum_min = HugeEnum_Negative; alltypes.req_limits.enum_max = HugeEnum_Positive; if (mode != 0) { /* Fill in values for singular fields */ alltypes.sng_int32 = 3041; alltypes.sng_int64 = 3042; alltypes.sng_uint32 = 3043; alltypes.sng_uint64 = 3044; alltypes.sng_sint32 = 3045; alltypes.sng_sint64 = 3046; alltypes.sng_bool = true; alltypes.sng_fixed32 = 3048; alltypes.sng_sfixed32 = 3049; alltypes.sng_float = 3050.0f; alltypes.sng_fixed64 = 3051; alltypes.sng_sfixed64 = 3052; alltypes.sng_double = 3053.0; strcpy(alltypes.sng_string, "3054"); alltypes.sng_bytes.size = 4; memcpy(alltypes.sng_bytes.bytes, "3055", 4); alltypes.has_sng_submsg = true; strcpy(alltypes.sng_submsg.substuff1, "3056"); alltypes.sng_submsg.substuff2 = 3056; alltypes.sng_enum = MyEnum_Truth; memcpy(alltypes.sng_fbytes, "3059", 4); alltypes.which_oneof = AllTypes_oneof_msg1_tag; strcpy(alltypes.oneof.oneof_msg1.substuff1, "4059"); alltypes.oneof.oneof_msg1.substuff2 = 4059; } alltypes.end = 1099; { uint8_t buffer[AllTypes_size]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Now encode it and check if we succeeded. */ if (pb_encode(&stream, AllTypes_fields, &alltypes)) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; /* Success */ } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; /* Failure */ } } } nanopb-0.4.1/tests/field_size_32/000077500000000000000000000000001361552131000165515ustar00rootroot00000000000000nanopb-0.4.1/tests/field_size_32/SConscript000066400000000000000000000023251361552131000205650ustar00rootroot00000000000000# Run the alltypes test case, but compile with PB_FIELD_32BIT=1. # Also the .proto file has been modified to have high indexes. Import("env") # Take copy of the files for custom build. c = Copy("$TARGET", "$SOURCE") env.Command("encode_alltypes.c", "$BUILD/alltypes/encode_alltypes.c", c) env.Command("decode_alltypes.c", "$BUILD/alltypes/decode_alltypes.c", c) env.NanopbProto(["alltypes", "alltypes.options"]) # Define the compilation options opts = env.Clone() opts.Append(CPPDEFINES = {'PB_FIELD_32BIT': 1}) # Build new version of core strict = opts.Clone() strict.Append(CFLAGS = strict['CORECFLAGS']) strict.Object("pb_decode_fields32.o", "$NANOPB/pb_decode.c") strict.Object("pb_encode_fields32.o", "$NANOPB/pb_encode.c") strict.Object("pb_common_fields32.o", "$NANOPB/pb_common.c") # Now build and run the test normally. enc = opts.Program(["encode_alltypes.c", "alltypes.pb.c", "pb_encode_fields32.o", "pb_common_fields32.o"]) dec = opts.Program(["decode_alltypes.c", "alltypes.pb.c", "pb_decode_fields32.o", "pb_common_fields32.o"]) env.RunTest(enc) env.RunTest([dec, "encode_alltypes.output"]) env.RunTest("optionals.output", enc, ARGS = ['1']) env.RunTest("optionals.decout", [dec, "optionals.output"], ARGS = ['1']) nanopb-0.4.1/tests/field_size_32/alltypes.options000066400000000000000000000002161361552131000220220ustar00rootroot00000000000000* max_size:16 * max_count:5 *.*fbytes fixed_length:true max_size:4 *.*farray fixed_count:true max_count:5 DescriptorSize8 descriptorsize:DS_8 nanopb-0.4.1/tests/field_size_32/alltypes.proto000066400000000000000000000112401361552131000214710ustar00rootroot00000000000000syntax = "proto2"; message SubMessage { required string substuff1 = 1 [default = "1"]; required int32 substuff2 = 2 [default = 2]; optional fixed32 substuff3 = 12365535 [default = 3]; } message EmptyMessage { } enum HugeEnum { Negative = -2147483647; /* protoc doesn't accept -2147483648 here */ Positive = 2147483647; } message Limits { required int32 int32_min = 1; required int32 int32_max = 2; required uint32 uint32_min = 3; required uint32 uint32_max = 4; required int64 int64_min = 5; required int64 int64_max = 6; required uint64 uint64_min = 7; required uint64 uint64_max = 8; required HugeEnum enum_min = 9; required HugeEnum enum_max = 10; required int32 largetag = 65535 [default = 0]; } message IntSizes { required int32 req_int8 = 1 ; required uint32 req_uint8 = 2 ; required sint32 req_sint8 = 3 ; required int32 req_int16 = 4 ; required uint32 req_uint16 = 5 ; required sint32 req_sint16 = 6 ; } message DescriptorSize8 { required int32 first = 1; required int32 second = 22222; } enum MyEnum { Zero = 0; First = 1; Second = 2; Truth = 42; } message AllTypes { required int32 req_int32 = 1; required int64 req_int64 = 2; required uint32 req_uint32 = 3; required uint64 req_uint64 = 4; required sint32 req_sint32 = 5; required sint64 req_sint64 = 6; required bool req_bool = 7; required fixed32 req_fixed32 = 8; required sfixed32 req_sfixed32= 9; required float req_float = 10; required fixed64 req_fixed64 = 11; required sfixed64 req_sfixed64= 12; required double req_double = 13; required string req_string = 14; required bytes req_bytes = 15; required SubMessage req_submsg = 16; required MyEnum req_enum = 17; required EmptyMessage req_emptymsg = 18; required bytes req_fbytes = 19; repeated int32 rep_int32 = 21; repeated int64 rep_int64 = 22; repeated uint32 rep_uint32 = 23; repeated uint64 rep_uint64 = 24; repeated sint32 rep_sint32 = 25; repeated sint64 rep_sint64 = 26; repeated bool rep_bool = 27; repeated fixed32 rep_fixed32 = 28; repeated sfixed32 rep_sfixed32= 29; repeated float rep_float = 30; repeated fixed64 rep_fixed64 = 10031; repeated sfixed64 rep_sfixed64= 10032; repeated double rep_double = 10033; repeated string rep_string = 10034; repeated bytes rep_bytes = 10035; repeated SubMessage rep_submsg = 10036; repeated MyEnum rep_enum = 10037; repeated EmptyMessage rep_emptymsg = 10038; repeated bytes rep_fbytes = 10039; repeated int32 rep_farray = 10040; optional int32 opt_int32 = 10041 [default = 4041]; optional int64 opt_int64 = 10042 [default = 4042]; optional uint32 opt_uint32 = 10043 [default = 4043]; optional uint64 opt_uint64 = 10044 [default = 4044]; optional sint32 opt_sint32 = 10045 [default = 4045]; optional sint64 opt_sint64 = 10046 [default = 4046]; optional bool opt_bool = 10047 [default = false]; optional fixed32 opt_fixed32 = 10048 [default = 4048]; optional sfixed32 opt_sfixed32= 10049 [default = 4049]; optional float opt_float = 10050 [default = 4050]; optional fixed64 opt_fixed64 = 10051 [default = 4051]; optional sfixed64 opt_sfixed64= 10052 [default = 4052]; optional double opt_double = 10053 [default = 4053]; optional string opt_string = 10054 [default = "4054"]; optional bytes opt_bytes = 10055 [default = "\x34\x5C\x00\xff"]; optional SubMessage opt_submsg = 10056; optional MyEnum opt_enum = 10057 [default = Second]; optional EmptyMessage opt_emptymsg = 10058; optional bytes opt_fbytes = 10059 [default = "4059"]; oneof oneof { SubMessage oneof_msg1 = 10060; EmptyMessage oneof_msg2 = 10061; } // Check support for custom integer sizes required IntSizes req_intsizes = 96; // Check support for 8-word descriptors required DescriptorSize8 req_ds8 = 97; // Check that extreme integer values are handled correctly required Limits req_limits = 98; // Just to make sure that the size of the fields has been calculated // properly, i.e. otherwise a bug in last field might not be detected. required int32 end = 13432099; extensions 200 to 255; } nanopb-0.4.1/tests/fixed_count/000077500000000000000000000000001361552131000164375ustar00rootroot00000000000000nanopb-0.4.1/tests/fixed_count/SConscript000066400000000000000000000005171361552131000204540ustar00rootroot00000000000000# Test that fixed count option works. Import("env") env.NanopbProto("fixed_count") env.Object("fixed_count.pb.c") p = env.Program(["fixed_count_unittests.c", "fixed_count.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/fixed_count/fixed_count.proto000066400000000000000000000007531361552131000220400ustar00rootroot00000000000000/* Test nanopb fixed count option. */ syntax = "proto2"; import "nanopb.proto"; message Message1 { repeated int32 data = 1 [(nanopb).max_count = 3, (nanopb).fixed_count = true]; } message Message2 { repeated Message1 data = 1 [(nanopb).max_count = 2, (nanopb).fixed_count = true]; } message Message3 { repeated Message2 data1 = 1 [(nanopb).max_count = 2, (nanopb).fixed_count = true]; repeated Message2 data2 = 2 [(nanopb).max_count = 2, (nanopb).fixed_count = true]; } nanopb-0.4.1/tests/fixed_count/fixed_count_unittests.c000066400000000000000000000103341361552131000232350ustar00rootroot00000000000000#include #include #include #include #include "unittests.h" #include "fixed_count.pb.h" int main() { int status = 0; { pb_byte_t buffer[Message1_size]; Message1 msg_a = Message1_init_zero; Message1 msg_b = Message1_init_zero; pb_ostream_t ostream; pb_istream_t istream; size_t message_length; msg_a.data[0] = 1; msg_a.data[0] = 2; msg_a.data[0] = 3; COMMENT("Test encode and decode with three entries"); ostream = pb_ostream_from_buffer(buffer, Message1_size); TEST(pb_encode(&ostream, Message1_fields, &msg_a)); message_length = ostream.bytes_written; istream = pb_istream_from_buffer(buffer, message_length); TEST(pb_decode(&istream, Message1_fields, &msg_b)); TEST(istream.bytes_left == 0); TEST(memcmp(&msg_b, &msg_a, sizeof(msg_a)) == 0); } { pb_byte_t input[] = {0x08, 0x00, 0x08, 0x01, 0x08, 0x02, 0x08, 0x03}; pb_istream_t stream; Message1 msg = Message1_init_zero; COMMENT("Test wrong number of entries"); stream = pb_istream_from_buffer(input, 6); TEST(pb_decode(&stream, Message1_fields, &msg)); TEST(msg.data[0] == 0 && msg.data[1] == 1 && msg.data[2] == 2); stream = pb_istream_from_buffer(input, 8); TEST(!pb_decode(&stream, Message1_fields, &msg)); TEST(strcmp(stream.errmsg, "array overflow") == 0); stream = pb_istream_from_buffer(input, 4); TEST(!pb_decode(&stream, Message1_fields, &msg)); TEST(strcmp(stream.errmsg, "wrong size for fixed count field") == 0); } { pb_byte_t buffer[Message2_size]; Message2 msg_a = Message2_init_zero; Message2 msg_b = Message2_init_zero; pb_ostream_t ostream; pb_istream_t istream; size_t message_length; COMMENT("Test encode and decode with nested messages"); msg_a.data[0].data[0] = 1; msg_a.data[0].data[1] = 2; msg_a.data[0].data[2] = 3; msg_a.data[1].data[0] = 4; msg_a.data[1].data[1] = 5; msg_a.data[1].data[2] = 6; ostream = pb_ostream_from_buffer(buffer, Message2_size); TEST(pb_encode(&ostream, Message2_fields, &msg_a)); message_length = ostream.bytes_written; istream = pb_istream_from_buffer(buffer, message_length); TEST(pb_decode(&istream, Message2_fields, &msg_b)); TEST(istream.bytes_left == 0); TEST(memcmp(&msg_b, &msg_a, sizeof(msg_a)) == 0); } { pb_byte_t buffer[Message3_size]; Message3 msg_a = Message3_init_zero; Message3 msg_b = Message3_init_zero; pb_ostream_t ostream; pb_istream_t istream; size_t message_length; COMMENT("Test encode and decode with two nested messages"); msg_a.data1[0].data[0].data[0] = 1; msg_a.data1[0].data[0].data[1] = 2; msg_a.data1[0].data[0].data[2] = 3; msg_a.data1[0].data[1].data[0] = 4; msg_a.data1[0].data[1].data[1] = 5; msg_a.data1[0].data[1].data[2] = 6; msg_a.data1[1].data[0].data[0] = 7; msg_a.data1[1].data[0].data[1] = 8; msg_a.data1[1].data[0].data[2] = 9; msg_a.data1[1].data[1].data[0] = 10; msg_a.data1[1].data[1].data[1] = 11; msg_a.data1[1].data[1].data[2] = 12; msg_a.data2[0].data[0].data[0] = 11; msg_a.data2[0].data[0].data[1] = 12; msg_a.data2[0].data[0].data[2] = 13; msg_a.data2[0].data[1].data[0] = 14; msg_a.data2[0].data[1].data[1] = 15; msg_a.data2[0].data[1].data[2] = 16; msg_a.data2[1].data[0].data[0] = 17; msg_a.data2[1].data[0].data[1] = 18; msg_a.data2[1].data[0].data[2] = 19; msg_a.data2[1].data[1].data[0] = 110; msg_a.data2[1].data[1].data[1] = 111; msg_a.data2[1].data[1].data[2] = 112; ostream = pb_ostream_from_buffer(buffer, Message3_size); TEST(pb_encode(&ostream, Message3_fields, &msg_a)); message_length = ostream.bytes_written; istream = pb_istream_from_buffer(buffer, message_length); TEST(pb_decode(&istream, Message3_fields, &msg_b)); TEST(istream.bytes_left == 0); TEST(memcmp(&msg_b, &msg_a, sizeof(msg_a)) == 0); } if (status != 0) fprintf(stdout, "\n\nSome tests FAILED!\n"); return status; } nanopb-0.4.1/tests/float_double_conversion/000077500000000000000000000000001361552131000210345ustar00rootroot00000000000000nanopb-0.4.1/tests/float_double_conversion/SConscript000066400000000000000000000012411361552131000230440ustar00rootroot00000000000000Import("env") env.NanopbProto("doublemsg") # Define the compilation options opts = env.Clone() opts.Append(CPPDEFINES = {'PB_CONVERT_DOUBLE_FLOAT': 1}) if opts.get('EMBEDDED') == 'AVR': opts.Append(CFLAGS = "-Wno-overflow") # Build new version of core strict = opts.Clone() strict.Append(CFLAGS = strict['CORECFLAGS']) strict.Object("pb_decode_fldbl.o", "$NANOPB/pb_decode.c") strict.Object("pb_encode_fldbl.o", "$NANOPB/pb_encode.c") strict.Object("pb_common_fldbl.o", "$NANOPB/pb_common.c") # Build and run test test = opts.Program(["float_double_conversion.c", "doublemsg.pb.c", "pb_encode_fldbl.o", "pb_decode_fldbl.o", "pb_common_fldbl.o"]) env.RunTest(test) nanopb-0.4.1/tests/float_double_conversion/doublemsg.proto000066400000000000000000000001111361552131000240730ustar00rootroot00000000000000syntax = "proto2"; message DoubleMsg { required double value = 1; } nanopb-0.4.1/tests/float_double_conversion/float_double_conversion.c000066400000000000000000000050111361552131000261010ustar00rootroot00000000000000#define _USE_MATH_DEFINES 1 #undef __STRICT_ANSI__ #include #include #include #include #include #include "doublemsg.pb.h" #include "unittests.h" /* This message mimics how DoubleMsg would appear on e.g. AVR. */ typedef struct { float value; } FloatMsg; PB_BIND(DoubleMsg, FloatMsg, AUTO) static const double testvalues[] = { 0.0, -0.0, 0.1, -0.1, M_PI, -M_PI, 123456.789, -123456.789, #if defined(NAN) && defined(INFINITY) INFINITY, -INFINITY, NAN, INFINITY - INFINITY, #endif 1e38, -1e38, 1e39, -1e39, 1e-38, -1e-38, 1e-39, -1e-39, 3.14159e-37,-3.14159e-37, 3.14159e-43, -3.14159e-43, 1e-60, -1e-60, 1e-45, -1e-45, 0.99999999999999, -0.99999999999999, 127.999999999999, -127.999999999999 }; #define TESTVALUES_COUNT (sizeof(testvalues)/sizeof(testvalues[0])) int main() { uint8_t buf[16]; size_t msglen; int status = 0; int i; for (i = 0; i < TESTVALUES_COUNT; i++) { double orig_double = testvalues[i]; float expected_float = (float)orig_double; double expected_double = (double)expected_float; printf("\n---- Testcase: %f ----\n", expected_float); { /* Encode the original double */ pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); DoubleMsg msg = { 0.0 }; msg.value = orig_double; TEST(pb_encode(&stream, &DoubleMsg_msg, &msg)); msglen = stream.bytes_written; TEST(msglen == 9); } { /* Decode as float */ pb_ostream_t ostream; pb_istream_t stream = pb_istream_from_buffer(buf, msglen); FloatMsg msg = { 0.0f }; TEST(pb_decode(&stream, &FloatMsg_msg, &msg)); TEST(memcmp(&msg.value, &expected_float, sizeof(float)) == 0); /* Re-encode */ ostream = pb_ostream_from_buffer(buf, sizeof(buf)); TEST(pb_encode(&ostream, &FloatMsg_msg, &msg)); msglen = ostream.bytes_written; TEST(msglen == 9); } { /* Decode as double */ pb_istream_t stream = pb_istream_from_buffer(buf, msglen); DoubleMsg msg = { 0.0 }; TEST(pb_decode(&stream, &DoubleMsg_msg, &msg)); TEST(memcmp(&msg.value, &expected_double, sizeof(double)) == 0); } } return status; } nanopb-0.4.1/tests/fuzztest/000077500000000000000000000000001361552131000160265ustar00rootroot00000000000000nanopb-0.4.1/tests/fuzztest/SConscript000066400000000000000000000111751361552131000200450ustar00rootroot00000000000000# Run a fuzz test to verify robustness against corrupted/malicious data. import sys import time import zipfile import subprocess Import("env", "malloc_env") def set_pkgname(src, dst, pkgname): data = open(str(src)).read() placeholder = '// package name placeholder' assert placeholder in data data = data.replace(placeholder, 'package %s;' % pkgname) open(str(dst), 'w').write(data) # We want both pointer and static versions of the AllTypes message # Prefix them with package name. env.Command("alltypes_static.proto", "#alltypes/alltypes.proto", lambda target, source, env: set_pkgname(source[0], target[0], 'alltypes_static')) env.Command("alltypes_pointer.proto", "#alltypes/alltypes.proto", lambda target, source, env: set_pkgname(source[0], target[0], 'alltypes_pointer')) env.NanopbProto(["alltypes_pointer", "alltypes_pointer.options"]) env.NanopbProto(["alltypes_static", "alltypes_static.options"]) # Do the same for proto3 versions env.Command("alltypes_proto3_static.proto", "#alltypes_proto3/alltypes.proto", lambda target, source, env: set_pkgname(source[0], target[0], 'alltypes_proto3_static')) env.Command("alltypes_proto3_pointer.proto", "#alltypes_proto3/alltypes.proto", lambda target, source, env: set_pkgname(source[0], target[0], 'alltypes_proto3_pointer')) env.NanopbProto(["alltypes_proto3_pointer", "alltypes_proto3_pointer.options"]) env.NanopbProto(["alltypes_proto3_static", "alltypes_proto3_static.options"]) # And also a callback version env.Command("alltypes_callback.proto", "#alltypes/alltypes.proto", lambda target, source, env: set_pkgname(source[0], target[0], 'alltypes_callback')) env.NanopbProto(["alltypes_callback", "alltypes_callback.options"]) fuzz = malloc_env.Program(["fuzztest.c", "random_data.c", "validation.c", "flakystream.c", "alltypes_pointer.pb.c", "alltypes_static.pb.c", "alltypes_callback.pb.c", "alltypes_proto3_pointer.pb.c", "alltypes_proto3_static.pb.c", "$COMMON/pb_encode_with_malloc.o", "$COMMON/pb_decode_with_malloc.o", "$COMMON/pb_common_with_malloc.o", "$COMMON/malloc_wrappers.o"]) # Run the stand-alone fuzz tester seed = int(time.time()) if env.get('EMBEDDED'): iterations = 100 else: iterations = 10000 env.RunTest(fuzz, ARGS = [str(seed), str(iterations)]) generate_message = malloc_env.Program(["generate_message.c", "random_data.c", "alltypes_static.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o", "$COMMON/malloc_wrappers.o"]) # Test the message generator env.RunTest(generate_message, ARGS = [str(seed)]) env.RunTest("generate_message.output.fuzzed", [fuzz, "generate_message.output"]) # Run against the latest corpus from ossfuzz # This allows quick testing against regressions and also lets us more # completely test slow embedded targets. def run_against_corpus(target, source, env): corpus = zipfile.ZipFile(str(source[1]), 'r') count = 0 args = [str(source[0])] if env.has_key("TEST_RUNNER"): args = [env["TEST_RUNNER"]] + args files = [n for n in corpus.namelist() if not n.endswith('/')] for filename in files: sys.stdout.write("Fuzzing: %5d/%5d: %-40.40s\r" % (count, len(files), filename)) sys.stdout.flush() count += 1 maxsize = env.get('CPPDEFINES', {}).get('FUZZTEST_BUFSIZE', 256*1024) data_in = corpus.read(filename)[:maxsize] try: process = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = process.communicate(input = data_in) result = process.wait() except OSError as e: if e.errno == 22: print("Warning: OSError 22 when running with input " + filename) result = process.wait() else: raise if result != 0: stdout += stderr print(stdout) print('\033[31m[FAIL]\033[0m Program ' + str(args) + ' returned ' + str(result) + ' with input ' + filename + ' from ' + str(source[1])) return result open(str(target[0]), 'w').write(str(count)) print('\033[32m[ OK ]\033[0m Ran ' + str(args) + " against " + str(source[1]) + " (" + str(count) + " entries)") env.Command("corpus.zip.fuzzed", [fuzz, "corpus.zip"], run_against_corpus) nanopb-0.4.1/tests/fuzztest/alltypes_callback.options000066400000000000000000000002021361552131000231060ustar00rootroot00000000000000*.rep_* type:FT_CALLBACK *.oneof_* submsg_callback:true *.Limits.int64_min type:FT_CALLBACK *.DescriptorSize8 descriptorsize:DS_8 nanopb-0.4.1/tests/fuzztest/alltypes_pointer.options000066400000000000000000000003511361552131000230370ustar00rootroot00000000000000# Generate all fields as pointers. * type:FT_POINTER *.*fbytes fixed_length:true max_size:4 *.*farray fixed_count:true max_count:5 *.DescriptorSize8 descriptorsize:DS_8 *.IntSizes.*int8 int_size:IS_8 *.IntSizes.*int16 int_size:IS_16 nanopb-0.4.1/tests/fuzztest/alltypes_proto3_pointer.options000066400000000000000000000001401361552131000243410ustar00rootroot00000000000000* type:FT_POINTER *.*fbytes fixed_length:true max_size:4 *.req_limits proto3_singular_msgs:true nanopb-0.4.1/tests/fuzztest/alltypes_proto3_static.options000066400000000000000000000001521361552131000241530ustar00rootroot00000000000000* max_size:32 * max_count:8 *.*fbytes fixed_length:true max_size:4 *.req_limits proto3_singular_msgs:true nanopb-0.4.1/tests/fuzztest/alltypes_static.options000066400000000000000000000003201361552131000226420ustar00rootroot00000000000000* max_size:32 * max_count:8 *.*fbytes fixed_length:true max_size:4 *.*farray fixed_count:true max_count:5 *.DescriptorSize8 descriptorsize:DS_8 *.IntSizes.*int8 int_size:IS_8 *.IntSizes.*int16 int_size:IS_16 nanopb-0.4.1/tests/fuzztest/corpus.zip000066400000000000000000031076611361552131000201030ustar00rootroot00000000000000PKS=P./PKS=P f$y(1383d3d096cff711a7c60c978ef1fb5d59d763b10 &`B ]D(BPKS=PH (c38c131b07325af5920ea10cf0390d52e25826edkbK8PKS=PН (0c4738209c79b4aa23948dfa86253420d056146b{PKS=P/(bbf4c6a3f944c86dfa35a005418143800b3967b0dZ H3 u)IPKS=P,(c1a46896a5f4209ccddd451ffef42426ad3b93dcPKS=P^9g (a02e7ed030df131c3f9abf08a6712f8a594bf79fİ -bbPKS=P,(83f9cf59bbefb18ca64a27df65a5209d5c8d2f70+b(PKS=P (f0ecd1104e3f541c380398a81479bca6152b1ca90a&&PKS=P0*"(45cb228dfefc104cd9cad3c225635e27076eba95a PKS=Pq(ad72ea307dc764c47260d2bb8992c16333d67551c:PKS=P]a<(53e30bc34cc3e8443140e7817b0a19b18ef0fdf5[PKS=P5Z/'.(b005ec06577015bce33b6771ea1cf3c8dcb84a3a;.9v1000@L&UL,XPKS=P^ (7d3fca43b5d3787d22ee3e0fbb2b8c55382f9eff[wPKS=P#Z(1d115976f2e573c04caef396ef257a9f44352a66ϴ PKS=P39(6b8f89a3e205180653d1c5d42c5540e7cf3756a0=n$E{BV$ $Vd8' {1#8 Eh{Ab=zwL˻Sݽ=uu=>8q:}:éhGg3[j?sTQz= )pY_~#G0r33 ށJx>nbHm[qk &f 5I0x*!o)ǵ)I wR[ڻ`bj_Q1Tp$yށJx>nb=ǫ'Ƴ~+ֵށ^[>|r=kpk &WNyޱ `f40x*!}Wk]S0,\(bh q]o˕7nMTq;he R1Ty+WLboBFyUWW>TVțTq)r* n#o;h xFnw`;P M =˾xX53Aj+Z\kAjDi9C7L7&wЊoR5(|8a|+!l^ax1+f_ 0x*!o)ǵ)I wR[Z˺{"L> 0x*!o)ǵ)n)x*!ijqk &O0S1t j &fP4h&V>ŵ)O S1Tp$yށJx>nbxfS;p]ӷgN:zww5|P`Mx[sK䂑aTqCj{rǣCmѭNڞ5{ƨ ^ț}?.}"y#7;0&:>fv/ǵ)6q/ꫨJo~/JGށJx>nbx>S;pڞ5S5~zWF] u8>|0*{eCx,CjO3w gݿؑ; RۈrFZ'7y&fcd$oq|ށJx>nbbSwʎם~ŧ Bj8ڻ  U$9Yk]S01l%JSwʎq{/SFwȾDZI}?.߾ 3. x;Sfg: Ju=,ᔎ4'O 1v$ES;p>*ǵi;HIyNZ{L<[k) 3@jOEE3n7^E1?,|!@8_dh8yBHmOx!=qk &RwH(xiCY@`KG+k!Р"N%0lqGk\bgCPKS=PFV(b16cf3324ca15ff0851b0f99dd86ac638c3e0cae`PKS=P)U(0f74cca881cb241661eba1ee634a91621623b880=PKS=P p(d1c98c8a072167f7470a710446cf31245b0f5e62```P1p0re X1)fO@H$(F@v&H E U M` ش82h0Z080x46o|d/ϰÎa.I 8>bh¢ `4b X?qV]l @%YPKS=P?p(d053f8d2dd0d1906aca2a864d387371aacd04c08{?^7F.x$ PKS=Pw4P(32b76afa91cbd43b327a65e651ea8083f72ba925=n$E{Z ڄg H8G BdLaH6vTVSgF\NU|ܬoz\q8GYtl}Qj(.o>wyE?#ށ@%<71-53pӚ$rxf|Đ޷Z{L̤w`;P M |@Sk]S015Ho*0 Fބw.ʯmܫk9|zZ{LL R[yZcDB|QNp q]?+oݚ&wʎ/$ JPU<cT]]PZ#o;P `ԧLʩ* Fބw6'D0r33 ށJx>nbHY-{DZ'iJ_ lŵ)OS1Tpa @%<71V!US;HF^15H>Kk1 5&yLbE wRr\k40x*!hj'¤+WS1td5aW c}t{5USS9C7fn$/L`fxf|Đ޷Z{LG|Đʇ45ST uas:YMLp|8|Đ45Sir* .L7&wЊ!` xNRӿ + >V#o;hp6?`fxf|Đ޷\(dP[t+9wM W)|W_EPzac(yx*W)LBj{Z{LL R; 񲯌l@pxs>@%<7Qٷ. w굞ղ\.CjO3w g߸]aTqCj[.|e+C;ݙ;53AjȽ^{_4W7LL R[i* "#o;P Mduo'ށ'/ǵ) ŵ @%<7Q-bxYX8 Yfr=YkTMTr\#_wQӅw !}\k]mcҋN"m<'kqk &fVbjZt;noeq]Hx"KN}?ܾ]|fg3EnvVoW(c20406a78f4076b26f5d2019ef41d73dafa38699S4yLaECye_ *Q(@) Ĥ 0A]JPUA( aX   Ɔ 3@̟_?3c`0 C }`48P .6 ؕG -@@KCtPKS=P|(300f8a6291cbe1a51fb0e71fb8c5db1d63e46f60t?PKS=P $(56050057610fda8c3600564ddff97c11db47824a;Ũ Į4  WPKS=P9(5ca53964a1fefd6167b35ca73a0640256d8223f7P PKS=P~(86d6b48a42c75ef26b9ea26bae4bf182e79c2b98[PKS=P뀰(4c51e17e94596fd0d9107d10bf33af5d3d7df2abxs=PKS=PH w(1de103f31f12636be2dd4b0409bf83c6df44b1f9.PKS=P(3fdbedd3e720fdfc073662771f93cdae06030bb0kbbhBBPKS=P(b7f373cdf8e904496db9ff6aa9be9a49c8209551`ưLPKS=Pᬍݟ(1a7f17b3b6f7881c3813f0a64c5e7bb479083539``P``0``pe`p`a`X L~b`xL!w0ց?c@cCCg_T0bRf12tq0|xNC_@l]Nq֗;8PKS=P.(95ca7814f53f55b7b94e48d735e9db8b83920bedkh@<PKS=P(70e96894fea424509c0dedb36a7c53e390b52948c5PKS=P DH (62ed6d7e5a0b22320eaa21b6c66d171f425a763fpPKS=PP(bfd2c55d3af368e3bd54f2dc571ce692d024d3cdcPKS=Pe(2c665a38015d33ca52ccc269ad765412d4894beb+M<PKS=P!sP<(82e2dfa3f3e2a4d9d8d2e657695a1c4bc76592fe{\PKS=P }(60db1520df8fdd6bfc0c33cfab39085e4ebaaba9|HAa#f.PKS=PZEr(8d4812a6374759a0084ffdee277b610ceffea017kbcPKS=P`s(44f70f7ac927feb9680a8f32715d1510539cb42cjhPKS=Pa4(08a914cde05039694ef0194d9ee79ff9a79dde33PKS=P (3d2da68fd36987c1b89cd202185c57bd7d01d5b4?#PKS=P ip(8151fc9592b354828f7cbb2459d86fdd72b79cd70;.&2`B$;\Oa*iI  fՊvv&"UT]]߀ߗ 5.XyBd`p\Pb`jnTb``hbh`xSPgUF-MI jf_`b`X$!ta CJPKS=PF(b06b3383f095edddee224f3e1f9984d654927b43``P``0``pe A3 I2g`Hf32"&FFIlZ@6X~  ~? 6RU ؄&12bdbc` f؂l,.6=/wqPKS=PǕ`(0155512511c3b57377d93c39942c2587edea74f9pPKS=Pv%(34b0e43d9788f0f42b28ffafffe94a6807aeec1e+PKS=Psi(4444fdcdd6c5c875c58b8e5f097a286f301862d3cpPKS=P1 &(2556d2c5f5b0b652df4792e1faf19ed4d259c3bdSP@*@ ȂPKS=P8 (2394c1e6397db0852021f0286d32b73ebd859542|PKS=P0R(3c9575bf704f2c0d9a085a4c4654398680d769a5+5PKS=PzP% (214f5bb9bf93e362a03074eefd77c0e1efc99a543PKS=P((5d973e725e34155e0b42a5541822e1a442c8dfa0+~PKS=Pjf+(4d5df3ea7d7f17d321d4befe77ab05e3c0f2bb30S`xA7 BPKS=P”~(a40b3f8cc2f6d1144471aab0202c9d8ec2149d0c{MPKS=Pj(9ede96daeb2cbb136c8b2fc83fb862b631703b09+~PKS=P(' (6834c5e48089a513634057edc2681c04318e36c9SPKS=P+ (6fcda3187dc567ada60afaee7a492f96139b1662{ PKS=PYJ(ad7a259ffb1147ea7a5bb8da5f5ad788ca561b6d+?PKS=P-(5f48ba99f4b9d791bf64cb24d16d86edec1e92bb:ѰGPKS=P%-P(94d554d115a2b4302978310e1be16e001cb8308a`xPKS=P˘&(35ce189b203c6c1ce8975c30223d78fffa2a5c27bc` `1"" #I R3vU|PKS=P (3999543c7cf4b48eecdfe5414e02b02b845dc2058sDPKS=PβC-(82cf93860d317e9973bf3bd98c21bc39bf2440b7[ bDdPKS=P;(4345cb1fa27885a8fbfe7c0c830a592cc76a552bSPKS=P (4e2777efc3132a5a6dce07fe486cee395d21aed6kbXs?HPKS=P̔ (ad377fc9f008b2ca5fcd60ba95700b8764a13b97;*m~ PKS=Pn(d854df4605155b0ef08c849f9f75300b584cb4a4c!PKS=PA(b644d7c9b27562a79f2e0e79bea3ee2ff9a85dd9{ PKS=Pq (54dd3746e510a8e78c759e468fd6376ae46222e4APKS=Pcis (c9bfc009792e3cd8beff052387df128160bbffcfkbcPKS=Pr$A(ee8d05e52edfbb4be6178a224955f064d7d1d145+? 4 (7b~σ>>> PKS=P![ @(c1611d1e250bf6dc5ac278aacfb764576bc95ff7횿NPo[L588bԍ?¢qm|wиवնSGeĨER-){-ǽ܏oX' wp ٲڮe=w ɹ=ỂWBup&{b璁@+VQ/" P&ITAV]tAjOf~VtԎh!PR3W!B~(LM2u.0`։HPC\A30z}`~Dft@H,?"bsp=h@S>?P5 ~_[-0dlO]2bLޔzm[q,$}60AsM]_1]-{1JXK#giXI:mGn -Gti8ä hku(~h3`~@x"oL>]PN3y9&\m cN3vjk :M6IYD3ܔ[_,gm2"p!&c7jtm؜ w,\@6 pm,O%a.9 pC^)KkjYUF,Ñ ./]qXp߉I4ǤVm+3ot/gϲqq k*GdwX01+ #OǺ.|̈́ѹѺ|[?bR~ƙJOo95IR[؟:ڣâ2SQ^)k^d1XT7*CoG0 X"#& :?[my#P;VЌZgk߼sפΛ~ YŐyؤݓ!ߙ`Đ!9ׯen%JvԽ" 6!B W|ɵZ._D9]R.p֖C 6qһ._lh2W76K?PuhLYvqGv9w훯KUwO(ajz1uCTsO:7ͯweEuu:벬NNl=t~ْK]3/h#VRHg'=ۅ9#{w 'bwm+(2ޑS9bϧtSL~mtحL}2Ēe2˻x͐-9{zKhɽ+J&Y8Y}tw">|%[=fiM?;^sg巆E?z`W2/)zQ W-KbIz~kbCf_jf3#?گufZ^y&[ҺO :罿 gn >X{Ag2都0/gOkؽ|tDq3&lpJnȰ)XFNoG丳ݟ/H:8 ch={@Oz["MTxh";_z Mo],1\`(C]0gPa!{_, ՛EyLA>IYfNyVE?wwwC[KLE<ǿgB2i(2W%cqרּbeOvZGApɒv鈽 o]O' $ \W늍ue{1+Uu}ڞMc&=h7Wf oS'›ꡣ ܦmվqf"ȵb׻عF,+3 8*3Ǵv8oKJ3L  G8:UۣYl8jSkVm2C}Q)rY?PY-h;-Ḧ}Z6ܬߵafy`{͚m1f ƛ-;xVЏf z5gceU.hQ8 ˡp=l#p>xs-`XFi]ĥ G¿pE*^ܩBs6YKSvkfb^أ uP98Gwbw l`1$C9"Nk"8oSA] ו9%^r?4Ȧb7jp/Hb+A]2Sp C,Bb%:UۣY0<S/qgyg3;\kpZ9ZV-hkyXFG{A@΅RJ9km=5|eOiK#;P uV=q㲬WY'7c wDP]\б`c_ ݛw 7[ p0jiZMf8.lE8:Uۣmspιc8t,vŖb4D{W$9S +*%a::Ϣ%)/>Ȯ=Ihz|JtSQgg0m#˛)nQLD1{Tn2H؃|f"|Ǝm\ `岶ek7Xz~N .5R'*[TmX/rssk4YY~:܄|`홏0ΦSkʹPY,<@pIUݪWHifI$Oj,)zs RR5TÿGfqwJUUQ4J](ͺ"TS=ԊV)EQ$0D)7~씸DDU;o z 0뇘P#f bU*5xf`wUt+P[[ibmmNR7&bAx#"eޖ (b0699f5ed08264a6c9055284321fefa14e3e1b78kb9PKS=Pzi(31137901247e61afd988a38798650f0a8cc0882d+bPKS=P? (65c3f48ee3f9aac0da7c14d8b769266d60b2451a_uPKS=P#_(d33cbddf149c1c7031335037e1cb6f7dddefdba7PKS=Px_(93d3a5610626e75cc4eee9e9fa696fa5fa5d5e1c_PKS=Pm* "(3e916879fa294106d14e2dda653a444ae1348a0f߀0PKS=PS(eca544137e2ea77785bd33e3b8087d09b52ddaac+=PKS=P[% (ffbc5bc8f856114ad70fdd4e0af7b317aba045b1` "PKS=P+o(a42c6cf1de3abfdea9b95f34687cbbe92b9a7383cPKS=P (8771358485bad97c1414d5e326b6a3e309b19ee1oX PKS=P(f121f40bf0d3915ca263e0968b2a8e2e6080124b PKS=P=C?b(a87b842d1699db3fcde9f77aeb299e76ae7f1aadA0<,g0#4 {q5aq?32m< o`ߖ8uLLx @<_0d M/uL tDt<*x1 Vn7_;.o!}x3% SV>AxVW~7J//it<*x VnLݰ |hse*!dzΞ)Yd݈$X oR[` n^2?g=S0(~ BfgJ|z oR[`C| 6N9Lƣ2PKS=P*j(d8db6b5f548dc10593656c3d74409f8702cffa1f{$3  @43j)S Xָe9ÐPKS=PV' (52b6c2fb2a6af41a5d52ffd422760745ef52d35f+bX$PKS=Prh(f721dab18b917d2eae52ddaf264ab9e4e30dff72;PKS=PS&F(0e3808238b738aafc13a2a62f36d2a49dec4e1910PKS=P?i?(501d2c805e1d1c23c4e6ac3e683d697dad26d59fMlEҍ B7Am&V"AыSŁ[e!ʼnq U@Qe"Ҟ8$7"{XNU!*UH m#[fٝiTəy'3oPԲ`ـEٷ+c\.W8Kgˎk ;Ldvi,E! T*#lvs+ecYT̟ s` E˧?:'W8nW.2yQs1vE]ۗnp">s;Dch0J'- ̵kx cG &H? ''& jR4Ma2Z='LJ7.;TґL/d5+ڬArYlU_u!9 S?Y"8銝5>AQMyp`ҪXz` g T*4Y,q^"ߓ4MK?HD`x28l 7tDC yKK5J5#?} xr7/Iv2e90*9Vi$lt u?#V;U6"~go@éfFVI @ns#_{0a-ofR> G-q$0E p nnV bb|p5NPI=yw2*q O"df]GuhNK Y1.UkV+HPFvF|.Gu2D1N`~e[:0AlC$Ok #>x:c4Uh_@._>ݎ 'ϰ$}Dg f/3zgDwvQHo5ar͎r) @qI33&3齘?:?d&H W+]ďi^7-msT msQ` 9+6ΉjtRWxn1=cQ?|`' U"r\s5DxձN̷k6T( Fi 9`⯎cP,EH#n}:.ΣHw߂wC Ů@( bV B*j^ts/ >r}!{xA>Ii0o."n/d{Л3eî `no͟oP}&$ Yld8G(]+(b&;kBJZ袿Hu$ޡ0gV.G8OD9+`: p >v>="],jTYndr%*/pEjD,2:W|4rB:eƓ4Ju>ꫵL5Y\ha͹y6EP;PKS=PL(c89a60ecb806f720351bfe2e59f213fea1ccc102PKS=P/*(dc1b3394608bc2582526cfa1e84f0cb04d38d1813PKS=P0(11f4de6b8b45cf8051b1d17fa4cde9ad935cea41PKS=P[o(af08ab08ffab78b3afbea799831dc5f66679507cPKS=PwN (fba251485e28587b017e870ed5210aff8ad1ad200!PKS=P7? (fcb9f04e2b223ce23218f4b82e5a7fe2da1334ddkbzPKS=P[s (c26187999cb81ad31beae311c9666080e9bcc0ec􈙉KPKS=P{N B(85f13d84160cd63ed2ddb6f532b818bc12cf3f07{̰ 'zWPKS=P4I(40ae08910846e2b9d5dee5cc65955e222d49805b9PKS=P(2a278cb59633c52fa61e68afbfad982b073f2bc7kbcPKS=Pjʋ(987cd5659f245dead25f0009777abe72b3abf3b7{[PKS=P;hu (9e138d3f3adb88895dddaa05ed49563ce9af7126o}QPKS=P (ab5640852d9f5a6064f4c07bdd42ba523484349a[<PKS=PF$(4b0075ef7389905ae2b0542f944a4204b4ad0381PKS=P.S(986a3e729d66c0edb156ae23eff018bb69e114fdPKS=P(9a91701f8a1ad3ca2a48c828ca372ffe6e5cbab5?H|=%~PKS=P)(3c50ce0f607d2942855c9f76ed524fa21034d630["+1 ~PKS=P(0fc3c3e4c2ff2ea8b0b2fe9e04795eda729b8b38YPKS=P"]H (3b39f23148603beaf1e0a41071bbe89ddeb8950dPKS=PU{ (88c71644801bdf41aa105748e681da79e29fb840QPKS=PE O(225fdfe027ceb2c9a7e334173f5637907723a55c{PKS=P7y(f91077a44623d7a37bbf65684734b6723bf6aab2kh@ PKS=Pq:Zf(771c129766b7942ea9c88a45e424aabe5ac431b7pPKS=P * (639fcd1ff1e7626594313dd0468781c5e55c972bboPKS=Paʑ(50b4c4efb5e5a3b28ce2c439ba87890d4b1220773PKS=P]w(c778d27d6a4d53e87438b470bc6c902adb669502+z~PKS=P$O *(8f7eaf9769661453a5808e0167f6faf95590b234{ PKS=Pf%KN(b87544bd23b4b2aee1f4b0ab560de5aa1bff00beS`xArPKS=PC(a117c08441dd98ea8dea0f66c64b27b82208dbe9?PKS=PN$!(6b46e4ab25667638b32d4a7f8bd503a60ea1fd34gJ3+fGXYtPKS=Pk (e5baeece42b964f47f080944f247ba68f67773b3PPKS=P/(97077a5709a188abe28a060453948bc1fbc738e8`{ de0`PKS=P;(32c556e20f04e23fb2d7361a6243f4180d9ec198{ m fzě* o>9añYZ-a!4a#CÇ7\  9X%4 ,<(85c0bbc8c5cd361fbcfaa2fcc333ca10279e5612İ PKS=P"j(5caad5997907bf4c3d13538e7f66e35528af8465hφ nPKS=Pw-(243266cfe17b1f9875ddd754e59f41af40913933d``; F0LEKPKS=P_ (cd2e753e66cca8cebac4db3b2169253f2dc3cdb1x PKS=Pހ-(6463e769706b6b8762bd1b40376301975b8eeb3ebc` '#`PKS=Pn~)/(afb594ea3e415628aa85763bedf4b5b12caa117dkbdb]&12tq0|x0aY'FPKS=P7(8d4fb6f5e1dbf809875e42c8ecd297138ba0b992PKS=Pi(bf448f1de55058bc353eb8539a828d617c2e0594[jWWA)PKS=Pt(58e84df86c3dd60f5424b1fa50b7dae554e702b3;v-PKS=P%q(e905eeab931c5233a0c682ef7b44ef9bafb42a62{PKS=PS(480277bb62cd9428294a21e505e02d6e9a283482_u}{NK?!Ew &)s˥(PQ"P"BQ,Q"U$K}66]:+TRj W(.RiuEir\3k{w]ڙ~732~z滃V!^PN2`ҐqFǞ# OM8v!)CP? s_;#1Ў|.[U⽌W )KSaENCKPHzJ45x~}G_'P!)Pl!(w:?E¸茟Z.)&@BxUP(Xge,CU/0z nRp2iX8iy R faEA]<۶=p H䯢1ה L{<vrbҖƺGl*}J]h{ZkYDTX9 ~X}0O,~3|dxݸ$2sr@MQWQje7z({u&۔mRtKFf.29264>EN"Kڀ-kC$OkӶ 6vsntGy ܔ.P~F%\pf4Ƣ۠*^eK6+x[ 7$֋50\]lUDŽ fP8_B '^RCY'khE?<:!IQ3K_y*@{k~#qM^s!h7+`(}"گ3Cj7Yֈ1a+pt HbCZez3Fn!&(3Ш?fuo⍚yGjޜ7Z40^;mn)'&|Ŵ=4ȹ}1?6mPЬ):MT>{~=s(c}NkPU&7̷mC1OU ~줾ۜklTDNetXg1l>LW Gs AHdӻQK{=B>g3 ӃgnHٝɬ&-47]jzi26/fl-`NE^M+O:"G|x~2ii(*fb#[ϰ\`_cBQKK+ָ,.i[_ÍK[~DI'cVXR||||sJiz ~@:Y#ǰ:!`YzQlCTfu:Rh'3@ !PD dbtu41ć=T%sUE|GۢfKTexjyMarX[4$ RϠ[ۈ"f27 a+vЫ1-aW_b@q+奰m`tt7IFH8y~B{Hwn-)qPD lf( :խڸE.ذ 3RjSq%ơeTl'C{ Mאv(m\W0&4O AqF{f5}xQlA0-){)^ay6+et/7)VG&sD#;=(==Xαɻt ;iU`SW=e Qg}S`GХ{m[S^1C(!V8te5f͖"cG4*&'kĪydpu^Yd77{G3*j"&+;֌q͆6T3G 9WNXCvlVZ̐ET@+b;b Gp8LO}KҾŧb86OHAK'Ԝy2l8eeZ5Xؾ_jc~N)6^FWNebZsbjOŒ@2 ZVi`dW_.=i F9LE@=H'SKXrmiQn'P᜹LjV_>ɋ@JmVSpR{ 4]z;hyiZ"A#_F]N9.y|%ǘY5pWRf ~V~@.66P6VW E_Rï+ Y沇|,N+R; gF' O?p8(0 _Is9n [NG[Vp8#faTދ(|9 h5av jnl"B(z"sI=NDSVo$`}D>O'P-ȍUټ3$*Ү+q\];dw o]b$K'}8|q|$a> .T,N}ڟ G 1_f&plQ~6Fn[''<ݐ zv^[.rAig=ZHC M~Fb!42f,Gp{I _p/1ԅDEQ+,Z?o@\ea; A48Псw.ՓLqԷ+F7lM6ddIx8;[rE\%x%l߁@SQ^?DȊ *"E:K|L3O~2UJB!H mưw |YxQ>9NTXRJVds=Iu'BN83?&&dڼ6vsL'_/ [J v9?}$ʅ10`$Lm^Gg@u]s%D_+)5Av3!.狵D1Q I}^m+=YXY4QlZ֒]"f{6m숵|HPKS=PR(772fe75d27d9802d1ccd9b5cef04302f9317b7bc|A`PKS=PxUi(68eb0cd079edaade79fc0bd35aba7305f107435d+bPKS=P~)0&(6b2da3037416d6294592d9761b2f8628fe3d6ddf{3  @u sPKS=P.o?(1496bbba6302c8ce4cb3fd88d5da9d88de871ff3;ã`pHȀ< yh *Q0Ѐ貀k@)UU0n 6c'>bfb tP-;xaPKS=Pe l(28047781b861b82390acab4acea59e5ee9c35a35İPKS=P (b62f98976c11d79674b019ea78a7ce4d6d78b479`PKS=P>u(558d63baf07f3eccb060f1736a3b8869fc3e70e3+g~PKS=P>(f8b6bb181d2d65425995c1d45d5c9419a0160381(ٲ ˖-[ܼ2+PKS=P8^Z (5b88bc2cf8c28ba82e7844b6ed36056d65d30fba``P``0`PKS=P< ,(3ffbf1c2621efa474de06a9293bdc66999f03525dZ R3 Su(PKS=P }:(e0482604e816aabc6e26bcdc222aade89669a8a8PKS=PVYV(7f1997a6256ecea8b28549652a4a5deb0fc9ff5d3Ѐ $ɡp)K 14PKS=P(32ef566e0c35abb261773cd2964f3c0e680871ff3PKS=P J (5750e2bccd5c5a207fc6e8969d1c89cf8e8cfc25kW PKS=PO@7E(2e13b2d804596233a3a2616b53e79c9dae434f240bPKS=PAy(5ca34c97cfcd36defcf0955f5b1036bffc689a31[ D9-bbPKS=Pl](e710ef5a2f1341123f89a7616a49a91eba690c04bBPKS=P^ (da043c78e20c62d8ca3246b5311bc7c2bab9b88b```W`5~(PKS=PyX̖(1f40939354c50fec108e56882e7012b90e34ab36ۤ) Hh/PKS=P5Ho (4e821429f6b24c8e840d4b5feab6f7c14c324a6ap PKS=P (f14d7db4d193e88f5d99a7571c4fcbfae0aeb9d63PKS=PZ&(b56428e3e97537d9d1316ab0267296fea9926742Ũ 32U PKS=P"(442262c857ef10ace40e944952f9cc73838c9307PKS=P' (64f8e019009f6854a588fc041ed981af7692a400SPKS=PK (89a0805ca3b45779d23b1ca081ae555ef9141ef7t*PKS=P. (ad6fd0bf6663bdf130969561cde821f13904f82f[ PKS=P,a(261ccf8e28a5c0bdd49c6c3ccb64eb9f1f334bb8{PKS=PE*(f9b72441578cc0ca268aeacd699c2be47e52fdacXp`&PKS=PJ* (c80b9b1c8ba4824b4ebf6a28567ead47797a31f3~?PKS=Pw (c16b22910be813448117526a6e9f72545f3fadeakbPKS=PlUT(f8461bcda9e1be1b86c57984c088a045ce2c2e74{PKS=PB(dff216aa6740da40055a0b116c09f06a6b25124fc~PKS=Py (525765915184a68fa1fb77ea59f065620aba793ePKS=P0EI(8c6b2173808a2a7482a42904c4021a08a57c2b24PKS=P$C (c2e5e0bac13e2b48434a1aa436aa9d08327447f5PKS=Pp(c7adf6198da153dda5640676da69825b52045630=nG+p"0$H#M3>BN&GR)Y"} 褰fF/p!X}YCv]\O??߮uyT4H3˙N-j(nÞO.kC^/Fnw`;P M r*k}=8@SL 7ô&ށ@%<71[qk &f;0&V>EV\@%<71Vo>ƕ;p]yI\O.*Z ebݵ>傑GGP 8O8;-'@T ; țf&I wRۧ~5¯Սr*;0^ y&i* T U>Sc bgPuuCk @%<7Q_2)bN0&Fߗmo`IL^1ށ@%<71O6qk &Ep&$@%<71V!Cy+uVՕU0&|F}ɤG;ț}_^gȝaBKP#b^1ށ@%<71 M-ϧ6=uMgގeE#G wR-53}p-#@%<71)M-wM hNVS01A3\0χwR[ڻ`bjھ,PNP`Mx*㗹Wwӛ3'r=;bkU0&Fߗ]{S.ށ@%<71[rR2r- Rӿڻ`b_`+yAG0r33 ށJx>nbHmm_/>TqaC}x,/h5$Ԟf@κbG 2~lHm#YkTu |`*ǵ:TqsװVv\w#. 'Or\k+Td-wM~ʳ8;BL A+;^N{MþL6r\kduDe2\|f%L(u9㊇S:w~)8yBHmOx! 'l?Ë w !}Uk]}w*ŵ)R[ygS;hŋ 3@jO6E"j7p/ygxa/2(Efށ'ׁwRۓڻ`bj3OSn{@z7-zV;h%ePKS=PZ(496e820420afbf20ccbaac05445941777c965641 @J#5)PKS=P=(89562722b2f244c15057796ce40b251d988403410 PKS=P{a(a70b0275eaf9b6860b1c94827487896a800a6ed33!C u  PKS=PqG(dfea3862135368d1afd1a5c2fa863c51ddcc8d0eh@ ։ SPKS=PVl(2d74fe988aab4478fd5e16de9bcda759e91735ce3PKS=Pf8R(dd594ae9fedde940145ab5931fc94e39b80d6d0f3tPKS=PV (3638fd6581509123a3ee8e22d693f6f3c2dba6aekbxrPKS=P(\ (01b263fc40cb3e5ddbf888e8ffe8fceb5d1bb9d30 L8PKS=P!(6c71b8013a652657fac29bf64f2068f01f97588aX(w PKS=PGê r(2e16477fa7fc6d7c3575069fd71e3e49e0c8f7b3İaPKS=P ]Um(01075b057417758376a3c180f409beef3aa181e6[?g`x#?&W?i#G P#-!He|(CH7 }PJK:0PKS=P&ި (e5343905eb7e0c858e4155e4ccd5974c81f66fc4; Y!PKS=P˵~(aa09bfe13ef8cf73b3ad813de9c9e48be9c231dc;JQF$"`6j Gp)݅Fp LL|<&s I~CȽ$rZutܔtơ򜾢sglÖֽ%UwoIkdyb5Ljݗtf_SY7CGdēLWQV[B-%;FeFP*BQkLzsq%KRY%j-hDc;G]:%*Z" -vIN b $WD]=ȋq%#ckWV;~Ys.@̜6pi.mE1$ǥB>6P4jeZ=[4>*s^Κ6-J6 8(pÇPZ"Ӯ\3@ɸ ^5 5iWM߈CgQMz%;k*; )uJ9u*Ȩ H|8|O6MiQt\ffp$>ZVz3 [epLjHh;L3$^.;%T1c6GFx[o1G&+YSh/XGvPZKdc(YR.^UVgp("Kz@CzHA J+fؙ6`\rDef6Gm@QZVf27WZdZ`\=KJycB( )覠!,S`2FG(]Fiph)8w-%qTƶ+BQkLfS害஦ᡚ3sԥ,3/Qƃcgk%y=$[!&GRz<΍BrjԟI$d>_gv:%FZ 5*oHT KzȢ7^UNQlڀG}`>x<³ĉ-QJ[pL2;#Q5f3Shg(팔Ƀv`|;;iZw.U+A(oUzGߴZsaoP$mKImz$2jc*O_2Ӯ(pPkD]=9!+k(&d7^>u/tm>6~_m}M4jm}M|̚5/}v콟=G?M޽rNMSgL$.G:<ӳg>g_noSI~{ZYp@kI׸cP/r΋7}q?-=afcE'N޵LկIxL;aRJ # s_}v._i}=t%;KJ-0)5NJ 'c#wNA]:#ǹOGԾ} ҝFI>d5LZ.P1:OcH2>Cqhv K7euh<"#%Qgq2{G&kKe%1b"품ډڀć_ʈ¢;#XvqD\YS`\H #nX*G7*Dȅڭ4EzE'/F0ʓ31OE%2`" 54z@3.-Atu66}V;G]:% Q ULE(Z"Ӡ]ɟrAl`tI@>d7@mH@ Y*R)v"6 )0`+#Ot'*FQF+ nq7`^spYkKټ<]'ڔ9=`6 9G["kIЈU!Fܝb!u ,$Ӆ5 Ϯ\ NIiw=j6ܽ C"~[]W $͑pb,l dF U:H̥֋'Rg>3*++bFk.>i> 3;*O^Xo ?…rO>"6B)5V-nU~Ւ9UmuMή-[sS7揊U=gQG?9ysP6#I簈W~M[KEז.NKdqDWk/rg`GuEijgC #=ŭ#ɩvtl=ڼsP[2'CU>b#ch V&7窳UzZSPKS=P=U (ea3106b843af663d4be171bee0477e4bc336dff9PKS=Po(17468132873a990c24287397fc70f3342c2e9bf2`P`0x 10prPKS=P(8d186533bccfd129fe17ec5c0f0261c3f453c71bPKS=PKA (f57e42d367ec7e78403f151de2c6fe0d8e53c348`0PKS=P $^ (b1b1181972c519e961502e5e19e4bf2c767ebba5;pPKS=P]6](2386e77cf610f786b06a91af2c1b3fd2282d2745S`PKS=P#~H>% ]5Ի)͊-!~}R(V8)!6ĕސ#< ȧ}wQ_z $wꝫthw#2@Ae$o$SaKN@ C+DUBת}]dfQͪ T0N}C%ʟ2чKH]N{F.(bmuKfώHoݠ~3l , Ҽ 24c~%SIssawGmOʼn^gX~kf%t돲_H{}M^6>~goN}v͂^9Ñ7߿Q+\2:g Lv dOH25,A'zt >\xacT.i=}=Gʸ=!@OnM}oEO~\PZISCs['D0RB.Ӈc= UGp[^j .Os!ؐX419\u64PU-jUQʀտfk3]U?7p%0-#mQ,cVs.6VW++_)83>u4ރH@"W͢t {֠Ӥ1ݠU9KSx':bOD*ރ(1'O\80^eڍA:v_cҠ e2^u4m=j0E9dL]URrb6u Q4;˝_^ 11>&0?&  ҭO!}g3MkLUGpxaÉτ?0?Bz4=%xpc m{ f5ƒҶWW֠Ӥ1ݠMQy=ᡪ S!C'ȫAoL CcP4(FCU<h( (a[@+<}16bG|𠴭54)fL7(mc{NBAGmq㡪m!w]7{LT 9ny16pyt}py E#Isyɵ?_'zlCUuNk|RV XmaQ6ce[sc op_ c2bZ1f5bocaub_?PKS=PD(61f508d69eef2464b07f215d3e6c3089053b0f32;PKS=P(de6af4959e7cf1e4807497dcb6c183d249deace1kbd|PKS=Ph (6a5770960811714fe18d1d46fc1a33ec6c90ac0d `T_҅1X@]+1!C) (8!E<'P?D c܈ L c{_ziv__s$%///Ȫ"Qmlv\ c30{1buImO'H#?[Q֔&u[Ɗ'xr0Pp$]2/3jS9Prs! G4O =2Iv|h b= EjR4Q,Qz׺wD 416G1VI@h/JdLסuXן0c{y$=09{O3'nm# e` jZWk+]ցv|;L̓_QCje{C˽ׂ'g:( AҋBe$4 qn.v޶e3ŽIfxqϟQ<4\.6,|q-L^Hp[uy03-F: :-i:,m0IoD+R@,>Et[m67|cs?\A/⣫f\u^m/NyߴcA]'~ίZqqsFfȲr֝9uZ6}[7Q=w)9m}.b&tz&>nMG:}6�on+_ȴ_Z ^h[~đ=^cjo5/+'~T^oZܾ͙ug,s}?}f ?{/6⬟{t_V2;`L cf>@=;,zIݑ?T<6Ɯ<Գ!~dF+Z{OU]M𱢴玶;Ա?ܷkkOՇ/^-|\N<~/Z>Eິ?nwYnjO]x|ͯ7cm89?my5ԩW<7m%fyݚ>x}n+ɗP=ov놩S6կ^p|&vH6JşurOXOjދG {ϩ[3]>}7@O^JI\p䡌1|>?o^#?M=C7YqѱZ^lθVxdZe& hZO}RSe_vj/<0][?f K~jYܹ壬f˞_{}W/~wot?a`ޒH.߄7Uc?c:|G͛WOy~rZ=MQ w7xGcЍ?Lyw~uΘ=».k_m:'cO,2+oͽ3ުq"u*=Wl}ۯW\msOV7Kzx3{Ov;;?[+:'f|gZ0l)m?uRtԑ},Iv|jHi{n|Nn7dӶmP{w]cqRIvmZ?fQwy"cF㔌I-nÿZ'#<{={']yf̆~5r'M:29룗G[/v>j߾}/u'&2Y'pcϿ9uJ?=Z,Blr>غlתW{PaSGDHi—ոsW oʷv x枾ͦ5P?t kυЩOk7.s7D^K>`Qxֶ'7nҿSJʯ pwgƤOYu|UNa =пo19_OZO g#h=ZD;*ABC W/\8(zb3G/\0 O״NZ'n/ziC %Z3o :e;۷sD&n`oݘ|nHl CX$^Џo\\kj|fi7' FIŏ6}^t>eaI6QNC"egZNWH[<ȡ3U>1ǽϷ;g,[vY{Od™//DBubäo=feܚ?d}wP._["7[杗~LQ]fN{cnxgċv>%_rWivS'lg/ov7g"$8rȬzQo=x8-?'Ψ^93gOh[Q{.V2bݯ-jO\y[:wŪ.Zdɭ.qMfZӦޓvzʈ/^W}#SE_}֟#^hO6wu{M+]5؟sg^^/\NxoCOoZ:? =\?n?ΘypzNJl[IӲov{83ieφ-n^Oiv5h[5PdVء݆V5mo{z~58gnsדܫn?7nZwlۦȨm?My|Io\ǷG;Ӷ]19=K.^6ˏvzZ7N;'?7+ߟf95k9d ͙װgk<޹Wqqޔ.M?2gw=wKyu?LON_5|ޟ5@{FR j^|pÙ_$gވkL}ܐC3/{V[©GpÙ{7ox1kj#N6c*~rk^6{~ˆgO]F7WN}i3iNMFts}қԓ/]kR=}4ok䶙eU{nyY7jOUVn}㨃_ G2ӟe4ڰft{ۧS6N|2Q{5dhDc,g=6ͪup{.L~sXc{Np+Ì =zbk{GSw<3UoC~٫qOAgqirFpa|?C޾rۚkw79v୹o4|$NiG\ݐ{~A?\Ϊe,4|L:em+s3hZ;)OӴן,?ݱdžu"K!o/~ej6'Wz>wݿ`?ʼ%hE5u=c;7f*ZO%oݣ;/wx\{̽[ӿxjg鵲߮Օ^{G]ݞ< _{i 䔶 oܵ=ϚjYpk?^1__ZG燎oܱGOy"9#>ۡV+fGv/ͧ=IMg<)Y/nW}vYQs}[/vA=mi>i2&Vݒ7hgዓk>~y%MܴmJw.o[:)y3=޲+g<3ͤ?{xSE'Yڮ NǮ+jK+t:Ǿ!JƊ[,S~aC"Co?L]MߓqhȃM& ^TW=^yEoN @UA*#R"w ErA%^gևqmvaIJsW*=keC2Zm\,(^4(D=@ e2 "e: +F4+TETA(+ s0Nm<?RK00II![ËG(<[U 9b [dii.V`V`rE ! z&[tJ=g,r+g\kL׮Unb wb+_lB2ց?Y~O}Lң_ZlWVJ#L,O6:n*7_qpHMl\J˗$e?eiN֊Ҳ͠#k_iYh_ƘYliδw8 T8xn~\7 J1RL&CvMЄ1n1=Gw骊U>S}}tJG};FnpLw)oz 80;3YojUJ(HӇ[+MH f-v-V[uB3Vbb+v;/sy%ea^(|wm^15&VZ|ݖbp-ToC\JBBm juv;ٟɆ/`!JF*UСZTSAؔR״؆ ^`kMl ' РH9R TyN%I!9WJ!SJURu8 b8ƚHBrl'abx[U2+L!Zqd D5%@0jJ@x~YEc}*U F*f&'Eq>9+JPe xzxupTs.:7eD(mi7pV(++y6JZ':Y̅ Ѡ R~gV[jWWA|{nm%}(m AL~O["՘vg@4* 0_l]Ā#@d.VN4L3/Wlgus$ZtkYP~%Q0Kp~ 3m|GX|"3[|_݂*-# yYIt5l֝8@H;\0x_;(nZhU qu:h9>f" Oo/m&Pɥ. U10iREPmEЄ|s˩/sEȿ*4+c|BL+@nޓ mlz(Z[2ÊbPY,FuFEAW (Q6[q;UЊx*Å|i뇰Mc'TOM9\ '͆֓iB`&  btmsaU!X8 B|vyǣb+5E?ǯ(^5 vØ%;Tj*9jg5ܝ(2eQ%l~@AAC3tD@DhD`q H2a0L5 ~b+"d1<+`Dt*R9nʖ%z-V'Sx!2DDҁK Bfd)Nآ=3 -| w` D k΢ý(8>HLzG@ph\^VRL(*fR%+`Ds J.7^S$QA4'uP`A[o>n[?M@ El b$hҺyqZJw`+)j%ݬ!E |ٍ]KEJB Z|"JrT.4(hPr*̸6_żϲ/j6@Ҹܶ Ok wZs~1lG#]&.*Ÿ㋟3kAqs&j[un ŋ'2+0تkH&_$WTCZ@^[U/Kȷrvc|Դ7B M{aʮPb!uA"PJ9|GemqͦC`uYӴ2BԈ&||RS wt:m*.Y(1( ){JV?-}k۸}gC9}{L"QdZo/or/4}:oj1e'Hb( bCIܼWU$Ofq*"">Fc԰hMJ]+Y9l{6)Mɔ+ wvY$\9 ɦйGۼ쿩8Zߴ~iii3"qERW}KDbEShWϙ'e;rF-C]ʭkV[obdZS߁J޽=Դeo&g1x7+3T LnK( M f_˒OS-/ .s_Y}fcօl#6;7u22ipꞩva檗Wj=4r+D|ƯwY33?^Aн=9oם**oDJ8J0̞ndCC+8JDFz'\;y.>enj @!@$KO,p#:' gDb=D2n|¸O2 ,ІD!Qp3'0*2z3sIR渲wCya@, 4tPh*gFçd ֫}6k>73遑P lool{G-ZyI@ z:_;K|P0ᇇQtcqm/|KloigR|vk}3^WB#P\U WLbY..jWss9zgѠ{2v&yqƠ) UaQm1F[_z|Z]0ɓ̿O6̎U;Y\+lmrK0|/̟`4"D|%DD=` r-]idQn%o4v3x X 2rxpiC0.HnQ>(WDn:ϋD1_ngwS"`8ARQI):ŌIJ4rEal3g]բJ̼Q],/cBY,z7 -` kYzA)dMO5цQ]^&IxCxw0t#^\

6d"|u  6۟Tt;1ϸ%GZٽjfU3@WTšNfb+B "EP@j[z[r5Bj}kGX[Rl#.;N:1{*yp"pªJ^Dtˋ0FETI^ JJl7lrKn |}0_qHX'C]seUjA,F'"93=N| rɁx-N| y薩 55r!ɒDOF5Y$~k{14w{p2:ڑA7hXAh0oEZ-3!Rmwmd$6{8QPZ[a![sSQlG[ xjd2#i@plm/9_It~Oq g&bxn!7*fK/Xm\@Cl- 6 k * e%))S,RRV?"B`=bܚQHGKhkޚq)8:]@8W{P\Ґ B(^h>T@6fA\=y؊(,LԤE"vr*u%\s2B|שx4U0EEqSBH`R_ RvmT TB(\Kk}cn-Dƚ[FfhLF+H'kO!ɥ. ( (ŦrF8ȕ!f 3 HԈn#Gꦌ  >?(d?"CNirk|aU8"%MÕR+U+_2Nba٧]rfaF5# 3 zlc[OÆ}R3Ka7]Z,2ޔ=&݌87TQVO[225ӹsou0lx5%)f<25i`6ٜgv nјtl: #0H\F rhC cC l|훆'4Bd0㗛_Pw~?tjn>?w6hQk<+qltjÖ׷)[^gց;kMOMN>Ywÿ&gҦ+״qӉizEu˰5Gzh RN~9oM{E|ʇImjc2WMߺ>{RobZo% Ov-s/13(骓TTu1Z.@|VS` `8XSP+`\a]R.튫}Vޯ ;f~Jyޯo%j̟=TbA: xVXI";Xv %$Ms]c 5 SwH:=OQ|8\.![q>D/};-擈ҒopL >eEgNTXEw S()c_?Οl`|e(i\sg/NgfCٵ,RJpY +D*{;HFL:[LϦZ/3ǝ * G s$G~aJ~1. 'VfGʰԕL2D+>.56-59R5(0zc'b:Юj^]rqI10As~<T;.{, ͉Au pw圷Ķ\9v d|Oa9ir[@n\TH(aB|LOa\ye{oܩ|Ph>(& m b#l3Bjm\wTȟz^ d"ioHnʷRӇJY,\*km":d5&_N.[ *nV5.?!89otɭ?,? ^:5CdɾG#(VI?3QUzG I|~͗-gڻ\uW{'Q[7D4a|*ҍ! Nl;5t2n:W-V2gn qpM50ˆ>vjخAܢ [$.Ua:f8p. O>ڦWm^VSu =6*-"r¨zi)yRkPa3f#ԁ 1(xbw,[kCr wIhJ؋w )t2JJLd:Fy&H4!^&UR؝f.a)~FyPSt؊r"ڻ=%?'{^3iS:My>uz;{~䔩*b{Yj-\10d CKQӄ'y@l%xsQP(^K*UыX-877pZlDGW9nU^}8r&;}UK=4HRR5S TyN%nu2q9,%~UEMPf_2k8UݙRׄ{f |Eub@UJW8iߟߟ{}\h1Rl'Q6Q57Ǥ&tdƒ ["Jd:7e|k'b>2sq$fFUfK ZMܖ!|Vz_ϗIګmK!lBHB\{m^jֳX1fs[MaHU/pC!a͢M\ޢ[rGrvS("WJoG]fĪxw1NDݐ:H褈Q81*&6Z#UYwrҨ%NG/`0a7ab3EpBsP|;( sϪ P3&0IcUI8,83K s9J?:`܌xS-O6Q,tVG,Rm"eנ wk 3ʓa&*\K2#)((ׅb?DKTLi/!J(f (Z I-Il%,"hYLZkr}z{.UӍOl1h]!di ]aA:i蹇m^~VUC?";8i(zx`%pV$̫`X+(Թ40(ZDH [a>q"?}0pI>d!WuZ+Tp=̿i6xP ء1: yDG4T@r ,B^MVǗ S+j%ُU4[Hlu`PG~֐_臄0b\CюE0CG*)Yar͉Rfqf .rnqb>Ydκ%'>)doմiCq}3JKNִףJ|XVФ@Z:`q6LJQTho97[D]Cփa/ 7&gi]o~9wGCNG@b6si.j[Xecb;azeK,"$2Qes%/fV @H~-Q8čpɴRB+K PDG'K戭/\8<@p;=@lCr9A+()~ n-9h5-^&ڽGnؘ]c[=6v `,>1`XG dV=>bk,SZ" 2}iB!@P[ N&P]1EЋ?b+ڏ+~\@ R0g z}ItnD e))A)*Sb1DݍˉR*QrsE"iJYKL1PMU,;Fd"P؁B =ɻlغ< pmwEr4g$⻍" .W<+n%&!~h%b48qnKjw+uvZ?M+L0R:2ThLF+H/c;VC?";8ZMC++\DH е0 !PM'7L=P&La ^-|>Q8M H@uX. ")׀[1u[#=bݽ)1R!Nte ГQ[z6Wӆ, ÂMZm\Ĥ?Lzf2~ft2>^xM=9]S%yb;|P@o\yl5>a )(]ȸ˷.\i qK募vT{ZS: ^ZדOXxpNſBPחv΅ZΦ;>P([:Y.I)E-w 6K}+c]7Q*^l]va7$"q='#4*$yoAvX>SUAU wI 6:9.vat9$SO}>>\fpW" oxcN~~ ~1Pa&`sE+s%+>x_1+;l,l|8Ua}=Zyr_qዠuWrjʹn*n7A_ It0<1Dp cwj&<}) GgD2ED" PIFp`&>Szr9Cuت͵Rwa#Fp& Z tCˎ T,p<v;ǯ_#80oP r@%}_#80ox>z$<yD *i>q! Onڽ:g?=WZȬ$UHBB֧ JEtjjYqIϠ~PKpeXSfq;}&\7@plfr:%ҿg3FP "ΐ) [[A }l= z ̏*D@D Å 0eěp&b+_Z!uBV>24ZB.8ȖK& xq8qX㌰\"4 ٌp)gnZ*r{ձl^!YRrB NLVAWkت8:d(,|1 gH>Li՗ULT  H[,DhC |7u`/ &|ܐۃ:|(<6a`Sm :w^'LKWN#*.`Fn8 a0 K&JY4gͬ/ Z]+;_N;e aض +P1u+lƾE 4&Zcn QNr:9d 2/"4X֡|Tƛ>1n1=Gw骊U>>F"+:%MY$2y;*>We%K[T~%=k-o ;v 2+<5\62 ҉D͘s梖{A2Vt|Q(t_'jzbiNɹ9eꓞHz"s@_0>;, 7#힪Z\;U2:hձˣr_wq-+(QbjTUXrͽY4u!=֕7/PFejU;(_OS$ƼUD*KxP.jW:dOBXA ~4*TyM1nM| ;L,W;pRΌa[Z҅C HӇ[+MH f-v-V[uB3Vbb+v;/sy%ea8r#rW{vScB/KjEm. %t@bKb_ d\LUq4 5h:rCi\a{NΚlv.TGvV@P(]jYM)EyMm }p0<~&ı.BVD 4Hsm-{ֈH~ YM[Gٕc&-2nU[Є'd.">2Քb+ !DTvTHT*FH5_, G w1NDL$":).+'#x[3ꈚѧR9kB{ Ul(ؚ᳟X#T_b+%ޱ+~j"i1`&Llߜh5h?(Ko",2TRip mî?Ng> 2yOn~,u 롼a7S&=Ӆ)oNIhL)UI՝!Zn\N27;?EҔb sU,;Fd"A#hhV h@eٵ>36 /Њx* ą|q뇰Mc'TOM9\ '͆֓!iBh&  bumsaU!X8 B|vyǣNd,va~SC4~ T_Qy@5xXwT"}e:^Nj:Xr#Ss)/9ܗ"î|^lKprE~oX4a᳨CD!QVaUn[uo^l"TQ4&Phc/Q=AiM=r1Kv!TFs(\k3Q.e\vb+bU P ]>MNG~6.xVxAzG_;!6/νZh3̏y n}xyQ¼bG&`vcR8*4Ҡ>\4(gd0(݆SQ*nЙ 48->͙j-EOZ飯QUs|s&}#H~ [~r9{kna:ŋ'2+0تdv'JW>JxQR~4}5d-idT, |$o@]+!zyU/-A۪%[vvGee x1>jڛz!ဦU0teW(u|f} {~<چؚTdG$9byq˝žC{v#,wH@&w^tF/xj^,̆yw #DӳVKniGGmkV;[0]KU;Rg[RQzxXetVb+lv'8J]B'( ZtleOGw̹b}lKP<[AE:t>JBX|X;lk\]o{"nx߉fp$uDw[nmk | ey3S8)raBNK6c|ɫ9فTb=Oy||_uTr=^<섴5P9Kllm gMkg`4o_V{l˒u*# ljBcPpyVQ:B|6i^Re,  B=%kZ6.j߾=.#PN^l+$hTs/i *u2\.i9M%rrtN %ět)rI" P7Dlg3ɓYʺHfQk5,bRbJV}N$[@iͪuɔ+ V7ݖ:"1i:h޵'^L#sc+jKKKD+>%"QȨE5b`TLs&IklO=H{;L+Vݱ&K:q?mr9' =N y>qiJ$:z!YВ,P@&y6it(Y8P1$(mI%.ݝٝٝٙ;鯝{ܹs~l?lx7GQ…[j@4;&I2]Imq&5AS(uJ Jwtf-x_\ BPD)ԈqDuu1PXY<>LTnMʣx sEK%LwT{[ۏ~ O)ߦ-龥6Fl{*-@(L**ta:(7rvZY?XGda-- O+yZ6\;aӑؓz۔/lWGI)Ѵj}MHzfɋG{j'\( ǣ( Wj1h} yBn6g=k;辰w7uTĄB|RF=5yP0nt+b+% `kM 8&q2UC_~;FD'B7BWƮK˻KL;d٭ԙ/bЈp,5/QtYYs!"a&L)i4*vX޻Hl$bypZ/ hGVhPlkiK뱎\l>HGz$~,YCB'Pvg9u%=uݫ :}g^ـ20#>䱓6| |@o_LU\eB"C`|0Q.G1< إPU#Cmhe\F*a eFp0oxF (pḱa!/+8C,, c\A[(B!T!M\tEIe 4 *|t T`&Fny;Z{=F?Jo, MwpNQO:`~'OOpđT G_ o bBVx] PAZm11lItQ+5x s ju 􌰏bPwIj̡P*59ޚq$;6 o-xW~1!DJ0y+TC`$^Q8,g h8ZϹF-Rǜc _\vDΓ*~d~ȜK<29 `:/"*c{bNe^v_wxU G)H iz^BHvɍΜQV{J m4#s[oGjs*9!t;K{#0HBc]Qm>[)j{ViJ$)1.wS6!;Q~ZHڝ\Hz3anۢelkGhw`4r!erv]9@4t |1F^@よ8p5Zq R?Ֆs[':2)y|>5»ЌNRJwݤ,7+=Š*Ǡ lw/ɤbZӝR!li$QI2zsZQ)b;D6j F4$ dy+4)ə$m.mU^Z~KT~%'7W)cWG6 VF9>vu+jfi'p+߲zө_Zwש,!g;|w[;.S /G~uw i9SdvyWiϩr;`UhQ|M$fYX2(Wv,11kˋ 65Y4\fWrP3*.ÒvQ$a'4x -XZN+Xvvv(&PhV/Xo >Gf\_&Y`~26?r%pG~]H.D s''>틯@3!'ɡ.ᭇc+3ie{QVIuڏ' Zř`V&6*|1:hS/rԼt*r-ߒݴk !iVi%$&w~~a;'Vܹsl\S_;x uJK "?BHiz ޚG-zw͓mabDyݶq ^.(v ҏ2]!p#S6-mLb|%ټU0}p~Lt,H_8i8xe`ƒj9ce~40BL`ŝ´t @mBy@+S~e=2eCfMtTtZkYn=lLƾ"%Ƅ[ŨԮTuDzƺZ%'Xnt"M"䡙t_"mg |`ƾX/w{_-}ʮK3lJ0!giY "48ҌP<.` y~\'X%Dž5(;}?pz5>~Jۺxb zPĪ%ì{ɲ% x:PkNiGF(2BߏJBWmT"V+ 4b^2${Jfϒ+W*noF:a,_+Kǧ Kbd2I$%%i')1!sM35tg1rNQ+(h\EB3Dj|=UD1-F9[QuUM|NL}IVAh|3t6LHJFM{X0"(ci:OHF?q\KS+\g۞={۳'A[,9$PA1QDvBUܓSLX)B,n;XݍK߷gVς m=0([P{CMf=I+iv1-Τ~^ h~ SVItaZiѰ.Xެ%CZ/듋!AJ(ZB1. Q+6ׇڸ)Ty/AyNյoɵ nso^}kя h|?8Hipt[JLGbOmoSF]&TKDX"П%x"-МT[ޏmbTх:Wš|- B^8h]% 1lJ+KcmŅLbGE㬱 ]B=y䢜rI5/.B*]>Zt]U ?`QOG|y(hCtݱgr{_p`6}"%/Sr}jh24}w)oԃYXF"ֹRohc'Sn =wѽ#oD~2?/t*t%hJ+hڻĴ3AJ)Q"!6 ( rZs u}~LI5g/b!flʔrnI0F{j7lpKVH"F/7uAҀV@ NW{n& uȦ)ņ;^1tD[gMȒ%K>T,/aQome~[qS_RSwؽ gz (3^N;i@cjes wޞux. odmk{xm)΃r#>sv$˗`Ju¯٬>VnE.9`jACP45ozZzB9CsuA"jjC$Xt>`.KZ'rQOdI=, czvO+L㮕…pk8T&AeR Nr[{K' VKKwkϾϤF3WH[+sBه k Lh\Xd`HF (GqC#84*`dMSXq H^; m`=_B.<1mPtڇکYhSƸVPOvos,J*IV{k251rM7Psܱ䐌~{47TBx+`Ym[m~[vZ||?{И֐և>yb†#9dG5gt=Ekp*=VʧjaK(!ѓf?'Y[3X4+rPo e*.+L2TX4ťt [><841ygIy\(=Ft@VwQ:jqn|iuRL/n=csh;Ugvzѿw][D21*JJ#unt3ޑ" пO }bgz MM!YR\%c.| ūq2PBh=#T@ss:JMbq&6f:m~6  ۢF%/ѭlGɨcJ9Cݑ.咜P8Z[ IRwtɫG|A%ɟR.y鵓TpHOSq Eݗ3d2AL.٬1ڵkj1fϏM-/kS  V5_n1h{a/Aby䔇^dž3f,v0ܸ@NS; ~WƐքcǤ 6TSB}{GވL-vk]D꥽ YZ1fVkfϒi6˲ƊDe ࡂvT vTvT%ЎI"Zztu^PXx*nۻX9T oPx&l{Vɹ$Q$N\`g\$.Zʝr-f6 9!޸E^Ƙ ,˪7eZ4.9l,sPX6%FR5uKC= .#si|>ݶ己ѹ\k䥼3,(M;u.ZY4[n$!%ύ0QƉo:θeع;'Ϗ A; LE6#:)kXvȖy~}!v}޶ε u Y/g(N.M-2Go>:j6/ a )}w߽w|5wqoeM*)jvwʰm\f0!oF w}+g@ > 4;MW2S9M8Q㭉 _0?h/P~keL=JfY֬ERi+U~{_ZoI6;aSfƌs \2ٝu㑿^A^׵nƍɛwmظM6ʛ6lص.й'Cϕ36=b§,6|n (E*J4wI1C##C}x.^pv+}YjFjRMc9J$`U8ʚlRY]g"h!"dLyGU1>[ieYzp=fyMNWh9FrQFj^\~AP>dIV*K#h'[soci*+նRܻ:ׯ(?ݰk6pm`bS>FgEgw!:}ˉ>%ׇЦ!C3B] ,BbPNUʩS)9өYw4˦Uj _"=%d?yeBF^_-ՇovF y8|tHdDMF:b,)%9mGLD[rYʬv%TPmOg `]}yxB c' (61Waצ@.MZ'rQOdI=, cz$RdW ^]+|0+֊*W@!ʤ V&y Nr[{K' OKGK׭.m̯֚L_x'.ad8/[@nSs߫0@ÂxbA8aomJK#Q6O>)mQz[B_kufU'][x xyx¡eU߂9»Fw.]0[ aJM`ׅ:@ȃuüpQ~K"I*@%B&d\[eg~+YOާeB@5PL<B*C8;4¨W] ԏ*k1bj0{/ek;KͦnElb'HbkRw1([ ^ #g[ `wW7P x(^>U [xy%zPvΠ`Fme9Y=;Ԓ! 82S/=d~k\y&e3,! <4#!:^|D~wz7f4>8걊0T c /=DtoV#rȈT "e_,ח컽u1L%ׇE<1 mv3CJ^i9K82we[~`SUz0&3*0g7V}n60M}-S~i= Fn&[:ctFYtvS?CxGcrOa8i; y@.spG;F;+csNMdS_K!W,ȹ}pWdn/`ZoM+74iy8P oТ҉c|\i`%`n CnМvs# H3sc+lo7;kZ7c^͘F%Ww,Pf;j.S]Bv7:A QIUEܹ)3̦!<-3'Yz(+8RZ*L}2P;MApy7q "W:boc;/\6܋5fh#{؎aK^5Ătoe"ZZGﴗbouqM\Q4A\YDjiƻxzX<:I2Ub ]HMӸU{Fz +)5R;{Fcy f= F=uWv3 U:޼^4-pW0 JҲ/3O4=}-i'myB+#[s5 iT1T]8HEs \!wܳLu]e}ls4[jtr[4_/ whҽ %E$&By_`F<Dž'f>,,Dt}w32ѯAw_Pڬj6ai1ve8cT'[YPU>TW 3ԘąSNyO \\,5WK7=3Iy5tL#\`2z½t5kqYF&<5Py\kP)pio+m?f{Uj֝ zc`+YJ)rj492K7zc&.@څuhQ^XB! 2]Z4_iEѪQ~CdTYZkny*2"hߩ?TZʏoӀ4Pk*&~`zmy4_  Z%." %Q \.oiNzEqJKիxgdvV$BM_[[C11S8aM';V:eA3)yR:J=PJO`  zK*q_]ϒx*nm(c|# x+vaZExqA4vlv va[Kh=:lDY/z+9NuZXBʓ#oL={ƅXJٰhm.0И;7ۓ xE ֮%W}3~Nxhz%g/c>jk?po߽OXDw2Vxi pX d"\ _4wV%L>c3юnCuDŽn Tt0h; _IUϐBHs3RDAZ 䥩p܏Nl4XI~QU[|jnCujhP|IdN} ޵3ya+NYx ca <\c;3>83ԙ /5rsoџjcé||Sm:.#7:A3(v7]$ݯXPk+"ʲ4uA;аyhQ(xF6+E^$(gpoz,`#۶GrP]Xk-m3.8P7S'x}ȟ~Oǹxf̅eeQUHA#\rD\T^Xd02c0fC1uE,br츺.#l7k{K5H#Ie{=RxNQ pyiM2qSNNfb൑ Pޭ:W|vfߌJMWcZC܄#S K%=ri)w9AnuZk:]rm/L_>QB\] 鲨`+;u,͉,Ϗe npLwKJ0.wS孓0"EDI8#s]G&\׋gI2َWuӻcgBE#ȍ ș wͬ|BQߋW4E<eL&ަOURgx^(Htͺ؞.酎!M>=u% f_'3]0? ),Yhr|e.T~P,!4!@ܨfhDK2V:]w2*[KnuԺNWw"fNŖ6 &چrYIH)>,//3)MY-،KVR$bTZE4u>х f7)Ov0Gh D[zř2sqZOQ@'_hv!_%^+?hBkk7](Wb#^3BKR^2ܽVzXw&/FӡٻLŻM VJ~TEksx3Xl=܎=-SY./`X`au[0o@!0U9>I#?Ñ= OɢwwY\Ļ;T]|`\xb"KDg܇ЙqJ \ 0P=ӿa磼%J]tnV}`פ|L_sb]ky*uGf*I,Sfm[6S} Qꇰv&6jch(oeMn:nfD:Kl`jbjIN~zϱug79KuDžlQ<-[X_y(꤯L-_tzƭШ+Uw\F[/jrV$}})*]4}sYح$ŵj'PhXϾS +;vrf45f9yV ְW#c+LFm\*`$lV _L?{˩ޒGRf+($Rʶ\p.]l o,^C@٤@HqX&EԿmS޹m#T9:/1gqh@E`%XNȗw5'-<:76ߥVFoh+賺^j5C7~1=T:KFcJֱAQG]m [m#.ehΫa]?,8Ŷ#,Pr)e B~A<*I<#Ok?կҩ޾uO~OМ+Iz'Ocb#DŽ\,F^FնΓ=OST>KL*TAВSZyԥ3a]9˲yRǥt2PKS=Pԋ(4bb022befa5384b12f3c61f9cedfc9975e2a7c323PKS=Pt7U(a200d4824384bf17043a38f0e79f06416ab8746dPKS=P7(d0da7b99c1f25a9a8b2e2f4382651122165b7a37{ ,b(/UJ PKS=Pza(04693ba61cc6c881268134fdc51af170cc8bf8f7PKS=PҽM (790aef27e5951f1bbea91a298f8b721aa7221399PKS=P8$(ff810dc4c1fcd3add54c8eb59e84fa6c58bd6f34~d`%eB(PKS=PH(e8086762c30b583b0ee6af8a5585987469fb9e98 PKS=Pm(a5eff3a704e243e86047c869a99683c3bd975f7bPKS=Prt(e7adfb7c6fd08f7368227da4749821fc94cbb274;<=PKS=Pe(ef007f5f9e4f60febf30e5c961b2bcdfde5a659fkb1@PKS=P r(202807204560aae553ebd4d24726e19d5027a156{PKS=P'6>(520d4aebcb8987f83b971ac978fe3f683d6e1dbc3PKS=PI(8b5452da8351e8989b4cfb3974d0339abf22dfcdkb PKS=PP (95b471229a173fa02e6a5a99437dd458f4b98bd80aEva >j7. =nGv@v4."0\q@KBhbd aPKS=Pm(c481bc8ebd4819a372c495d57ccbe784d93d6302PKS=PDJn (2331225fafa98a6ae7b94ec1b93a814b6dbcfadf{% J"FPKS=Po(f5bb57c90a56ae6c356045c1c0506b89da408848+b PKS=P~(68e61346cce8064b08220385833d475dd6dd1254Ÿ7PKS=P%'\N(8f44fb8ddbb6c245b190abd17dd3fffe69ca972a^EO 3 KvP Ӌ J!լ(ۆmI%o'\PKS=POv?(c4201a2a098f0d743b6aae480f9a80f8f51dd45dİaDC !PKS=Pe(55f96787b549eb321f17d77c4b96e1c30599c549;PKS=PL(461098709ba28af43ef49f68af86ff501f31372cPKS=P%(af86dccd1a4047b8f7850d55a7bcb1f18267a797a#,&_`6: PKS=PA*(3aeae8107a84285cd2b0199222a03e273ec0a23cPKS=P[/H6(65b6f0c27a11e26cdd50fffa8b047128017ed24d[İtPKS=PY(505a9ba8b67336f5fdabe70220b55cd3a0e8b704{ PKS=P6N;(f55817e350ecc327d828099bae3215832d97d4ab{l PKS=PmO(72311b2016f7d39d14e17f0a1954ef3af1cd12caqPKS=PL(3dd89efabc1dcfed2614bdecde19c19e751b4b74kh@PKS=P99(b914301f110f8619eab1bffc9f3bbac82043b456PKS=P:(8a24e7ef2f9722208dc3931a20ba3eb709d4c5ca+PKS=P(584ee6bb639042492beea008e16d776ef8cf5524```W`7`tP@.$@ ]Pbh`h\"M9@ 3Zf1?w1b2>`f̢kdl$jahh!p[M?0 gϨ*?wqp}x7-~@uhF.! 6x4µ/}PKS=P(b369637e961c44ca383f5fd3f1fd9f0cc69e936d+NPKS=P(P(e8f16f8bbb0b5a0d7d1e5602375bdb37422a2587+PKS=Pn(16f7f20108e653219fa2f13fcf0dee2ee4fd2cf9ŧPKS=P (f69d79271c41f1b373a89eb303ecf886c95dbba6Ÿv,PKS=P (f7548b2a2b543e90e5b6a01aa64dec7386e888df;caPKS=P` (362625a968613d3c33c6f2a3f69b07b8ffbf50caİPKS=P)6(53ec7bb42d532fed3722811ec96ef10af7257f7cUPKS=P(0559984a6c9ae37aa2c47f00024ba6d52d3d8b96{PKS=PFAJS(275980357c08b60afe382b1b6e1115d2ec5b345djhPKS=P] (f72de887121b719c5ab21dfa7a848fa3b8fa52bc+b_ElH)I谢M 5Nbej*HGn!@A!`JPKS=P;[~ (454f20467d6060b367e11bcb5b4b3f4bc4ba1e81lbcPKS=P@, (42e97083e8416b16fc5208645e25de9501efc37cyPKS=PbS+(efe80431ceae7f3ab1398ddc4f09fbf71e4adbaf-PKS=P]?(568eb41f99524fc95c56c7250bdb020d34efb5afQ;HA}s9o ^ tIH b2\1R$BLg &8fIcgc.k3E-\k9YD-Ǽ YrG3|<.rfKg*/4Ud%2-V 5RjfµLMjirx*BS+a#<3$qYc!`;!A-j( * 9֌23KQpn4 4 Jْ ?))@p#^˶OvZ;  !DIUWA^,r<:aDvpMܬPKS=P<9$(f93a482ab6734cbcd5e16b844c451dcbef3be24akh PKS=Pe*3(7682fa7d63ea99d3d046856a81a65a48c34a8139[аPKS=P7O(ee74569d484ed2033165a0d3ab0a420311a5925aZPKS=P(68b52048ae28de97d51894d462a72f76b7462b400 PKS=P>k(e109843e7f1536476a10882be16d645e9f15f30a!PKS=P#(bdef9e054f41ffaacf656766e4e3cb7100d3da16``PKS=P)(53a0acfad59379b3e050338bf9f23cfc172ee787PKS=PUC(4074fb78a839773a7423b07cd7ab075574ee652b3WPKS=PMVg(3c8ee227a37690ba47998c78ef28c8030a1839bd3aePKS=PN (0ea1a146c2ab37213236ca91fea052be926449a1aȠPKS=P :RfSj4@ڄ4s++#)jT ddY m Z gg0gfP_u'͝-1fOVGn yߨ'\>l[އcIz_ ULk;Q8;q;0/yp=ͦb]ϰoŧ/ڎkgȾIxazH/ Z'gRO7ý9 -> 's&N19 GV C&N!tQxۇQYǩoy!*Q Lh}a;㌝@\floфޓH8o YO4ᥲcZqs|NOFt'EAo]8K0y)H#P6ȳr¡ _v H!HȸkuW%&k6SDbTAJc*b靨(VkgmuL:fdXaw53(BǭE݃mg78+~ioj$,Jo|.6|VqC_ 7> z(4u' Y6|V{ja{Poy- uhjj >uģD@' mgKyR8%@ Zmf5" }4|xPKS=PG|(1276a991a923f3d546edfedddecff55d9ba4551c3PKS=PVp`(1d2b1c72d892892495c619d5048cc5262571dad2coPKS=Pj (7ec3aa5e54d5d33d362587b8566e8827e659e9f8[Ű QPKS=P(7a30d1153090c064240ac8a5beb92f0525041be8PKS=Pr.8(a3b0be7ca0187ab741d54a39dfd500d13f2f544cİ ;PKS=P\ (b3bb7ce05d079b5ef4fad65a0a2086732fef632e@ PKS=P^P (e8cf33715f9d8317d66bf6e933c776603fb21e4akb8PKS=P (138fec5644ec6dd2a008eba7316192d34d4cba50pS PKS=P ٨ (f5d3a9869f1486b30fa859d24af44f1ae956260a}<PKS=PHJq (9873dec283b4f1ff98c49502834d30ca381418b6`PKS=P3e  (4163e68f0bffe5ebe3591b7dd3db360c8fc02a85{0 PKS=P(d6810f8a0ff818cbbcb61a8b04adb4f8fbb2938abPKS=Pu (19083cf1250a625c4b4111d501d04e3b50656e20& `PKS=Pq (c581615bed94ff1a27f055b5898afa8b589bf392??PKS=PԕȖ (46ac4c71731022371c1357595f4e086c10d1f38a3PKS=PH9(a579dd124b9e6915e375988fcf3f24d0f0376a007PKS=P9/(791b83841add0de75ce0a46e6a73b359a4855df7G31PKS=P6(bbd7da84209d118d2ff851a4df9992729dec3571PKS=P-(03c67f754ef5add2b949b82763c4b6c3ac83d009[*$ifX>PKS=PjJ (a8464f00db1492ca2f05d00ab919dd6abbc57469İ  PKS=PU>T /(aaf4256c68565fb3a859fe19da68dcb3d14909f6+b("2PKS=PQ (772a768649814b2dc433a24cf508c7a355b4559fkb8?PKS=PD (2f541c7412ed000d27a0619233d5c806dbc9f94f[PKS=PEx(ab09c7537960b8c839879de6a1d8606cfaae1f3e0i!vPKS=P0b(e6424bafb9e83741d1b927c2c892d97c11b84ac1Q1APKS=P͑e (0ccb809665732cb7f8f189a15c327946a6d6e807PKS=P(d5d558480d8432fc68f35d3c32580222f1680104;KPKS=Pc(3b81fea796a887ebe22661748a25792d85bba075IPKS=P7 p9(752811a58539b7e3cb2fe3a98ac8cdc1c20f406a{PKS=P)g(20a727d3c9cd6119b0452234bc5d08b76c645c54+_PKS=P8 (ca32f6de22a3a82978df33fdb12ec24836f5f8a2;Ħ" !!1MPKS=P(f0c35c1862cd51df3afb3f5937ffa7fccdfcc0f9+b(PKS=P!؊V(6905a2b7944316b3587475793dd4927628ccd059(``Q3qD~"@`_lF0!ra-3ց?c@cCCg_"&C @ U 2@>$FY ]ll p14LW`0 Me%;PKS=P_sF(9e72f7272c05c6ac591a65bc630f4ce476d83c50t!$5 - CLaPH7؀Vѻ F#\] :"g~ff`n" 0I 1S)V`u&0 JPKS=P|(52bea59fb685044d4fb72897ca452617a64ee70b[w=PKS=PTG (de7ed762e264bbf9f2fd80e9635af343282498fe+b_CPKS=PDIM(252b3790d0ac7e78f2525e0a55043f34fe2f0d5f`X LAyRQPKS=P{Q(1ce28125828c1b82f6d925d8c5a95e856a5764ee(z +2uPKS=Pġ(68dd67dca45358182623e449e83e524cef3f661c+b(PKS=P{Z(107fc08bc47806738446a3bfea1cd9fb79321461`sAA#G< (PKS=PR(a322ab585faed605db125bcd5e0ea18b25bc09c5PKS=Pd:(4a2054eb5442462df555f13c1b19b527228e0bf5+zt??PKS=P#'`(1252bf97696b4fbdf0e84b964faad9ae50433ed7zPKS=Pm(bb1615a6fe04aa04eae16a1676443cb3ee5f374fTPKS=P]'a(6d71cd24a76987760377aeafcbb52988d9f7185f+?{gБd+n p[l(6Ҹ?PM`ELz`㶛' `(k0ɅTΠ PKS=PJK&(a0d8902468090a6810d73a9ee5612d23d06e224c1 @E IXjo66\K!*-!ZT.)cs'"":̢tGеa* <:@~x2mtb|5fW@Frb|ZY_+X]й]tν @bD/X{PKS=P' (2eeabee58c84c81efc01084423f8a318e8146068kbc17PPKS=P9$'(b7babfe9143ef38b19ba2925af2d7feb857cb308̗8 ^PKS=Pݯ (265cd92135dd1db888ab98383e0e379c9dd70e23;8/PKS=P8 (a7bb21d724fe3beaa7ee7097a0589e85c9047e9d;$ʀ 8PKS=PA= C(0c8d66dfc81d3d0a4033481a93d98c5e60d0a276 r11PKS=P oZ (d3a9a50a24e08fe0717d9233d57b977663eb5e062aPKS=PJ5 (2b7568c7328692e486959d5576e3bda528375bec3{OPKS=Py&@(83170bb66295ec0311a34de776c33aa0b7d682c2| ~PKS=PЖSY o(6a58a85fe6f41bdf45a8ce5cf650a4ef296078e7İPKS=P$)~e(1a623597bd0f1a82b65916796404dac5f1e9ff2f{A@$+:( PKS=PA.(18b7ea8c40ae401e3c523dbb4b7ad6cd845786a50 ?PKS=P (23833462f55515a900e016db2eb943fb474c19f6PKS=Pz(db0f7cdccffb409b5f859182ec1b931863bb3e52;pANRTPKS=P#(4610a9399a7456340fe83b232cb16f69c489e8f0(gL ~ .PKS=P(a78eb4597ea17b230e9838a71746dd15aa47c58d{,@20 PKS=P!(2fd31906f216f6ec544766a69b89482681c783e8~PKS=PIz(73dc347fc9dfdcef0be8d3dd056a4bbbbf9e742ekbPKS=PPc (6bd353596c5607f49909d67e1f1df726d45734aaİi 5PKS=P0(78a78fb4791905d448b1e0bd64bd7b5ebeb15835PKS=P(af9d915754e96c107d964dea909b7783b52bfa1a;PKS=P! (f050f6c8723075e3db46079b26e1d9341eab1791PKS=P e(5fbf2bac30b9a6c86876e69019117a735577761dm0C v me:@A(@ X('x:҉~}{`lɟ B͜>1 Ҿ;p&Ԉ4߈K-4FxiTL 28:GIsm,5ܟl%Ƈ &/׌H^t1 >͸@ݿk &h0 >f3vS39rjLL/9LS'9Ԉ|#.jƗ0k/U7_3n  NxiMh(H6Ǘ/!&h0 >f3vS39rjLL/9CfS~R8gp|XVyFCA#0k[(ZfBB70ebrlQ Xڈ>GxWP#rr<ٽPKS=PŞ%*(69f3694e7e1b7804863c387e6f0d50c44a1cdeff[İ7z EPKS=P? (8590ec70f74d9dcc807a743cacce67f4e4277c997PKS=P d(fe8530058e4c0413eb09218bda8b7e1a458f8339{ hHQ (<*A PKS=P09*H(fd5689fc4f6dec970a0c4413cf7fe8c48b0af206$(4H`?!h 0jdEh1PKS=Pl"K(25a6d8a9b37feb82e02c219fe82109e313357640{ hR (<PKS=P?mD' u(2d0b7cb1bcfff85626023724ece41a8576b4a283; uYPKS=P%] (b5c465b7fe4309a95b7160c568f874578c6fce60bcpA3 bPKS=P}( (6240c9580ee71de59dfaf49096d47e3d67521f8f;.PKS=P|(c0bd23eec44ac1fc583570163d1b6dfd267dbb300 PKS=P%uOt(35190e25ff039fe1200f42def804d311398e7568I'Mbd#PKS=P#4"(6e8883cb50878ae07659769649b17552d9e04905b/((()((Yu`ʫB@PKS=P)(d49abf61487b462a29f8ffb3bebf4fb8cf820255>~PKS=PќU4\`X F;,x8`wRئ3_cMY9dלԡ*xFGe7!x[oK|rUXQ4zq.x=eð/ "Hv3˂+Y#8%427)atvNHQOfF' v <6c: 7-1&M4@jJ/ +|i( 96gEC~GCsMFAsx>K}i*{cQE@ɥ"Hv3䒃 yBMKsidnPz;;BbE.}ԁK<BכC-N)l^t\ Z29yMgM^2TI_-ܿ/+Oit<=Y|ss:$/  ,h&P*Nn0B50gq#=@E6!xݔoʁm4ꫀ2؛%>*,W\?@s.@y_/R݌jGgwti19/mΣu*8]oZbLH 3i`A3*ՔT_1,AVTa7Pspa1mϊ~2&A7t1y잔ӭcNo<]&P9 [P:W|@g{x1+!<| erFps<9_Pásqƹֺjޛ?k x ?mΣu*8]oZbLH sS T _"aQ2Χ =,u{pn=\Ƽq#=@E6!x7C|SVoMЯUafDY9ΞP~ۀz!dQnFxYpB5c;޴Ęrˬ;0QUvcz-Dћ6gHSv7!xau>|b}ּ4^|uy~ct?|\m_ϛ'̻'nc?W{cW/PKS=Pٷ6?(a2091ab60711cd083b2f74531884912c73a084a9{1A8PKS=PP(5cf214b7fc5e303cb41e0f5f82795ef0db9ed815PPKS=PN(2609647dfbd6fb5c374fa20f75ce8e407acd67ef;pAN"bm<"PKS=Pu(b7dd9c065a71de5b00ca1fedcec578148cc6c3e1+PKS=P5(dc39bfa3c2c87e121519bd373211df48ec114096b``%t: PKS=P< (3a218a9fbe278e187421fdf7a30fac0104f3b161?~PKS=P{i (33c44c17e7ec0856414a2ba4c8e77e103a2ed622kbPKS=P( (88bb2f984e61daf084768ec24703bd99891a52bdİ fPKS=P`(96bcad1e6642ff2e39b7dc193b1ad235ff9dab45$PKS=PC)g(21597c92c3d062726ed640296c043afc8d53eb29+RPKS=P(094129936dcf4fd88bb14ee936bd9905e290d2e3[~PKS=PՈ( (e8877cad6eb7ea8b25add023b0f1993da5d5b1e983EPKS=Pz (d7e0f444256edb58bae2092e60a67a70ce094f88aPKS=P\_(3c4bb120ccc22abce3335d3ad27ec9c2a66e0961;PKS=P ~(80943cfe3b32417815f493fe8df0d65d1c125757{PKS=PF(e8c91416e6be8d310a6eb9220f518e5ef6eb3cbdcpPKS=PDLA (c36080fd5e1d42481753a39dd403a1bfd22e625eta.nPKS=PpnEu((d0cac332dab7a61b2810358ceb2dfc02d8dc66d7K fPKS=P٘(8e31cadcc84d3c8fd7eb4e281ad09637b23aebb8[PKS=Pew (aa1fba92174bfc92bd5f0046172fbc7af1f79bd7;?XPKS=P݂ (76780f070ee9e1abfb5e47b030cd1cab72af797akbcCPKS=P (73d738dae571bef44fc98dff17baa645ca426ca53PKS=P (edfc07a2c34057fe246ea503cceb0359ba4b4c62|PKS=PpCy(497397d04fcfc491dd82e61d34ac687a7b39d3acPKS=P:}s0(d51244471861f8dc6d53584bf35c024126ac7669PdցvDv'PKS=P,(d5036c9abf8c939eecb00f2ca81bda049e6dda1b$APKS=P\(A (15181eed3ff7fa92acf420fe6be30f8bfd22a246{PKS=P(8b4a7d3c508bbc394470c02698f9045562ea68efPKS=PKg(ab3e6b8f7beab7c9167974966598f96b634c7ea6RPKS=Pf(a20592505937165c2092e0309f591f895b60e7bef<PKS=P>(ddffcd8409657f42e20cf0bed9ab32195ca72681PKS=PtS (0afa259a79b66260fe12f4d92ce50b3715817ed6{IBLPKS=P(7a58f48925665b3574295cf643d74b514f2b37f9PKS=P) *(7111ab99aa70e9dc04a606e13565bce14be0e3b5[Ű0QPKS=PλG(6a9fc4ed6c424a05ddf452deece4f7b4dd95d619bSPKS=PqKV (dc8e4ecc56611f846f41e19ed53b3e2ccb809f71+bPKS=PXG(8ba51cefcc06b96df4a87eb7cfd28bea3dd4e8d1PKS=PJ (be65fea7690513269adaf26442bb4422127ca5ad7PKS=P4<.(f4eb33092623394baf487cdec784103d388756f9+b("PKS=PK W(13c34666b620addf9908f2e64456b5d64982d4050PKS=Pd/(2e8579da949a4078a672a064ee545eff68e59eb4DP 3Q]P`l.t Q S0ȲPKS=PX (ea84d1dc9e866e9da72282e903afed21daa4e243o}PKS=PQ 8(b6f69fae94c1cb3dd08e572a38150006a8c20c1f[ T PKS=Pz(f596065831f9deae3d5fd836d3effcd86c296385[ PKS=P(59985e186d2d1e586891feeab481475a501e067b8 PKS=Pu$P (5234bd8f68dd1ac89e14db55366d62847211217a.PKS=Py(b400731a21a534ec9916d4e9237c4d4f9b26e95ePKS=P (8a0be514daa3466c6491c6942cce16bc68c4eb1c+~PKS=Pk (5d001e90bb5659f513f48969f4a33c7644cec92b/PKS=P (5a7a6003e96d1f8e807af78f909ea3a6d61fdb3d0 &1PKS=P#;(f8b6c2497e125e39e9a9ea848dfe350fd34b9d237 PKS=PmmF'(5be8ffb8bbeca40ce84a320f19dff96472046f64?PKS=P!((2fde648f80b47839187924b83af5f1199bbe80eb[?g`x#?&?.F6! 3RV_2Vbde`XcQ44 H J;vŨf0`@,&IL V1Zv1PKS=P (8f4b81462e4e23a8fba9a826d5d007f36a6d53983{/PKS=Prt (cbc7a2ddd270c82b20bcf1c831c4965da6fd3a3b;Ħ MlBPKS=P (700c4fbb7c96dc66b7ec5c921842efe8fb5d0c06OPKS=P}n;(f570792d80afbceee4187f825b7d83492a81b100;Ĵa0b6d $&. ` %N ,~ ] @? 0UԾ Bf&&8:=>!PKS=P3#f(c992eba86f2d2f1d6653339472d9ac5a1c29a526j@|PKS=P$S /(afe52a169fb702c67a16682c16eda35c6637588bŨ@<PKS=P*p(082e058829a94f8dfec396ad8e9d33b760ca67f0U=hAfyεĜa-"#$"\&j!vn*LgkclAN${fs<ͼf7yWgh`K0i39$́r| x)C0KMhÇЏtY[EWa`a%'&&ցb>S7(j4"c<cJM})!e/pp!B Z?j\f?Iyr1^BXPPVs]P#mVJ-H81Gzo6ljvҞ?tyn%W *S(zSbhAftFÇ$JT4ݽ c/]8BFc#]HywA`y9!28X 1eګ)|ߟ?IlRIJ3M4'MNo,C JGd7 #ks| H_~7%qDzZ3}[2Ygi>u[ i)|sׁͺ`yoETԖu˥ YIՅP4J[clS0u< /H$iH睫?c'X]Uoo~?QDw1c?JFխn|jիPKS=Pׅ (59b5074914d539ca831bd89d9c74bc7942c7ef39kbxPKS=P5Y(89966604ca6ac212faeaa1f58f6b6a1998ebaef1bhb4PKS=PiP((c43d5e8f032c0aecafbef6f58550c32e1d684482+bhPKS=PZbr(0b6e190704e869ec30c3b0a3b02a7da1171af296`P0x @2E P^PKS=Px| (42db7944583412c62fc29447bd1f2d26295ab655PKS=PUc(4321e5765e1a8b1c94edb64053149fba62196ff6PKS=Po(dbfed0e64cfd73a64f0cdf2f373b97728ded043a;lPKS=Pf(9e2843adf7756e0bd14be6b2292799efb9dd0d8fh`PKS=Pm<(f584251d532851c11d949dc554b2298174d47cfb=PKS=PK (c7a192ffae6f6d0e95ecf24ee4e90f85a5bf545e3PKS=P~(46fa214b2ffe9e4d065b39abd98a434e585aea19kb`PKS=PhI(8a60eb532bed1159d35b64798f46d002bde1c5db0 F2`k7 PKS=P<(30fca38074cee460195e2159762ce8f6f7bf4619{ PKS=PK(61dfd04637921b08ed3995e69e1289d6a4d46bea+m PKS=P8.(0b3b201edafd46ac6047f4d3ed4acd5678620f4adZ H3 (PKS=PY(47caa692295bbda638edc19a04ef20cc61d9f140+bPKS=PL (8946db0cc72ed2af15593517776316d467e64d16Q"PKS=P (a03e66066cdd2c56ef71845d2b5132f892c7407axkPKS=PY' (be8186bfe2c70a9a5b3c7d77ba1f6a7bb8dbe768x3PKS=Pg(16a693a543d78160a4c3ea63568c0af1e3bc6867cZPKS=Po (d615559bec899b88724bd2a7ac0607db0f46a958`x PKS=P0J(7b42522358b21906618f78eb60739327bf829931+4PKS=PA\(bb012dc4c6e8e900508630afdd4ef43e00969435xPKS=P b(e0bbf8463d22f5aef3a9bba693d3c8dc98bdf0ac;pPKS=PD (c29c81d6cec6069ac8eb97010ae37ae43b594baa0 PKS=Pwr(6ddbd8db9a29733ff4445add2cd48f860e41d617kzPKS=P.(3b4e441a3c72800fe3c1626fa1bc94b737508dcc[UPKS=P(26e58ef71ed4b0ecd156424b356650b160fbadfbdbFE II PKS=P# (4daf9c32e15774f352a0fb6be65baac610a81cdbkb?PKS=P.8(a6b00f94f8fd68b8e883589eaa7cea0cd24a4f16{ PKS=P[ (dad90d26355eaadfc87c348898b5f55c36e4c82f3Uc PKS=Pm(cdce31e1d25d7417389052561a73068ee439de3a3%3PKS=Pf(3e21280095ccc0da0ea0aace536bf36562e7b23fl PKS=P&c(091385be99b45f459a231582d583ec9f3fa3d194PKS=PWev(7a1ccdde94c9307413b51baa8dfb6e0bd91fa1911kA $qrEIxvZX`iii rڄM~] A6i)<)4<ϰS;2G\QxZO G\?MDmzbpl(ϥ>$k󅘻]^ӽ3Ӊ0btݰ~?*i]pvO)$|WJL0]vPdG1x)GA:MkLS '[[]zĹllY|܌';i/vJ&kipI2p<3H|)۟PKS=PM (f9f4a31b22c3d5565f0b863a02f9a7913e1b5731kPKS=Pl(0cb3663ad56386d1ebd34e8f6996581c850596e13i#PKS=P(f48c1982cb83b358e9b546bf25bb89240f66acbf+PKS=P}+%(e7faf11e19ca57e6135e0ac0c0c241682cebbecePKS=P}^\(8777442367d4e268abb9de233d764774e3353f4f3xPKS=PuԦ2(91fe13be9edd3ede8c90b71f49eb2f5382148915+PKS=P.(f392534dfff298af05944aaecc8a7d55c336f519``P`0`(bbhbdb`PKS=Prć(e451aae8c38aaa14bd2e3682b1b4e6d39cee3c62>PKS=P:> (ec974b55905de3adf76a656fcb79320555376df3`4`PKS=PVDځ(699a3e5d171055d51e818de4676332165cbeaf4b+b[PKS=P / (4c34a6150a4577e6e34d32cec107ac9fef9704c8{ ` PKS=P M (51229080967e170b3d4bc33a188769c268f38f5d?TPKS=P7](cc1ca87153373c1388040a03f8972aa11997e4ed3 PKS=P:OѺ (ee64eb3b889c61f52f8e8cbff86a7c39b9fb5a91kbPKS=P>ʝ (780f051ce70f2324d7e4f73b576d324442c48751pQ# FPKS=P (aa9bbd4ff594b81da2c26534e69c9c17cf5d60aex PKS=Ph (50f1cad19b46e357d6dfa47cd25a4dff5f735951GPKS=Ppԍ (7500e8a780e64aa2e1a44efdb91883b9a4a9162dLPKS=PU; (99312e891c639697024690e6108d608d2bfb293fKLPKS=Pe(202f5d09ce6deccfac7169e9fb2d3f4338091435PKS=P"X,(63c36068525a25e3b8e4969f5e052e10688a47c4[İi  1PKS=P"r (437fd7166977f7107e8e9995155fe387d8c60e51kbPKS=P8Q(96790a0f236b7c30090fee64fc7fb99431f5f549PKS=P~>((f86c9d0fb0689252ccbd855f34d47fa6a7ebefdfb" PKS=PzZ (900d31917cd3b616a365008b81d513f26026fdae3@_PKS=P5R (23434aae194869667205809278a1098135a158beSȏoPKS=P#9(e5e3d3d122d7fcea55d7c2449550e9bc46385ef6bPKS=Pt4(b03219272bc5cb9e8ed2c4591d194784a4dd0285PKS=Pc5(01382f8f0fae7a319a31d747898f1a4d8bd02284{Ȫx[A!APKS=P4 (f67d2e609404fd211f603a0a9a6c6f87cf3b7272S߿@6PKS=P7z(e2310df29db3ab57b854e1729ba0111ef5913efb\ PKS=Pn(9e279af08fbb5f0c22249ca9f2003e95e33e81bd;PG A+8(PKS=P%#(9e25d4ade7400fcf50172f6ac34ba46d692ea950|?3PKS=Pr(2f3135939b1e06710a382c1339e3ed2020f8ec64{vPKS=P-%޲ (b25b40cdd18ef05733d8ebc5490f22c3691cb21dkb0pPKS=P" (25f8ab5793f8f634bb4b58dd0f62c57ea3eefc633 7PKS=P߱z (55f8aa501a3902b9d1ec473a1aa1511dd9fe8426d$PKS=PRY E(5096774a2380ad65357916687b69221758e22099{̰,`PKS=P…n(5121017f19e588cf9733691ec795276427b9556c[bd`h&_;C")H!"`h``2 Bh,D@l( - P-B`-^gt C\, qj1[ehh*`]E%;k01 $8IJP[P\ʰߡL~ae` 7h@sIhf?eݘ1PKS=P[(bbffaadd467e4332ac2c62fd9e81e16902079a08;NPKS=P (b875bca4d75bb6f7cd0e225452641d279614feb0{ʰPKS=P %x (af9c4ca4b2231726dce755982dd5e6e8c4c02b81Ũ#PKS=P ;6(693f2375f2ec4808315a91ddd841edf53f948a36;ĴvX2Dd#9VUqvl$ucfPKS=PWI (aca79c189f92f81e3558fac7ee6757785752759f;pPKS=Pb (94ae7e36fca3797a1e05afe47a24b0a83ad8f54fPKS=PZ&(b8b2d71fec7511673d4fad07859b18069d2683d2PKS=P{& (d72a3bf74488dd8a9e2795a650d426cf5b3a1d41,PKS=PN"H"(67fa22d2c993e4553cfc9331a669c989069f7075$PKS=PRz (31539a16c787dfb3cbaf71760d53176b2dc8f0b4PKS=Pdw(00a947fc0b5d87427e7c80e65ea68d89f51ac141cZPKS=PZϱ (dff795af02e3818a5ec1d5fabd102dafbec60c3e! PKS=P`(6114c4f9304830b99e638ff74bf5310a5789f5d2PKS=P S  (f6808993978ca355dfd0ea4e9e1de8059b5bd1a5+PKS=P8V(733f3b8be3b03bf58cde773e01e0b0fa811db5a6$ +c h9@b #fb|HF0d"*&FF/8>bĦ A ` hlhh<;W fA4IKZC S0 & , `{'Z $Á1bcR \'PKS=P2(8ed68a2060cd3458daabb4bdb84ab5069bf7f0f2Mn0TH=@AbGŮgGB,g!8G=TZfbANBHnv<].ӷe{s/2wI;p &?әw!Qk2& R /H,Ӓ"o|sQ Jx>clN EwPJótf(CHmZku.sn5潈E.ێN_|,[d m߻]qQ&cb`GWcTu/Ycb ? 1t]DGs%]b,%UZT @BjWZ!JįX4H+(/S Jx>:͛NPmòP2hk|y| .ysy938(=ZmShk-2`.k̆D u }Rӟ9adW[t+:vMĢAjg>g10}׏tQD u 93%w城j]1hzG/$VE^w%<16Ţ;(EOށ;6t;w%<159ϔ]mѭJZ5 Jota6 Jx>cx!(CHm-tTk회EօٽЅفQ Jx>clN EwP.ށ;qp:vM]2o^cދX4HtDzEv7|j2&&AjvzE8FZ>+5& R; :.#9._1Xփ*|z~ t?!v⯴O_IEԎrQ"o80Ӽd >, %ӊFھ͗W[7?<;khe.sM)b 10k|,x?G9W0r1 A|\ǐں}w2]bө^}׼X4HT@ЀǑun*~XtVw!un+6_hڑWP._ A|\Fu7eĴِM.F*W; _#ZyA|\؜=zxJR[5uW"\Tk회wR;V&/S Jx>81e.N#NZ¯VE^w%<16Ţ;(E'@Bj88Zsw*R5j]11R;jΤCEwPJIx︽AzhЗni=CEï>jE\̿UqwRǝN_C @BjkǁwR[8Z&cb #\T"3:7# `;ӯ1A)NPKS=PaTz(3f8ada085f3286739820ea40d2f2870980e169c2{ g1 &`p(,PKS=PEZ (c2d835c3332ca946970fc17df4bbaad1b996634fkbSPKS=Ph(47d60a79fc88c86f5b5ee5b51029302392e444f13_PKS=P.T (ce9f28b951d08546068baaec400cec455e2a4232. PKS=PoJ(be4959425c25801beab9f1b2389139994ddb15c5ĖPPKS=P]8(97c93b14cafa3bcba23ac920899eef08384484d6@oA(qі0p4M +jXİ[KxIػBep >2Ckh.}L1w(!bSB_~8UCQAPbsw| P^ꣃkPKS=P=(facfdddcf31ace8a809602c2dba2ccbeb38b4ed4 PKS=P֛t(b53029a90b9e00c92f8dccf297d7bb25ad93c58dӸ&PKS=P\ (8e72f7dcfcf5afcc7be1f5413c42cfa9f345410e PKS=P'_W(e55903fcc159da30327a87e2865b7bb31bead998İk(#PKS=P(ql(36b176006454157fd4df463b146be25037e29a2d{۴ PKS=PO8<Q(bf62c6614f131de27048f804795feb9c80227f36p 6nxti#bpꁳ `~~P1PKS=Pc (7eb61cc91cf6a4b65c31babaf94c2f3e3bc61714q$PKS=P' (e7f927acdc582003626e26b7167a657b14f200f9 PKS=Pͥm(9908feff544d23b4a695ed0f6468a3738dba8e40PKS=P+Qm (048bb1427912ca948a1da19a60ec18bfdf9c66a203PKS=P.[ (3b36185800a61406c7e36c8e020f6a90c63b5abb3} PKS=Pq(b1100ad6285f0e38c52c5abb234da2407280ad05PKS=P_[(b7a493641e649782c0517f0590e66b32ecfd002dIQzPKS=P (37eb8a04027d5190d1571acbe095d16c4afef737PKS=P6(32b2f8fbcf53aeb32fb2c27dbaa6363912ba2336kPKS=P: (23ff80f9f7307960f434b395c47e5fa75dd1bdb2?PKS=PA7c(500e8a1c6900c2cf6f950ebe49423e8e419581e4[İPKS=P_ (ea41f25595e214a8cef74c8416c184d2b78d9cecvAPKS=P:Y] (7f0b1e4e7b397dbfa10ef3101050469fac65fb23İ L$PKS=P/ζ(2376af5ea4f9eddb757e84cd99ecda7a5c0e06d8;PKS=P|p (c5b1eaab1e4c382008684e8c536ba40e1b401b69aPKS=P?(0995d10e920f6720744b7722a5540406385c32e8+PKS=P.T(e2f656589f6c122e85d4869aaa28ece16bfebf24PKS=P` (a4713dd9349e3227282f3b2cc6b1a3c1f4316a80\PKS=P27[(fb7ba0591e6aed35ff2c0503d01d623f46a3a4bd+PKS=P+(5aaf9e9dabbf4c8d616d3bfbe2a95756e6a58614;fPPKS=P(1bc1474d1de74b7970eda43afb21a91bcc0c2c22{ PKS=PY(8b36ccf0bd00858aecaee0b1fd0e775d04664e65PKS=P~|q$(a810516aa0f54cdb2f6b5d056bf3d1c47c9be74dPKS=PA,(e460812f5f55bea787582204380fb92036cdfa13[İq0-"PKS=P,(9728bc87cf2a7bbea59a0818bb33291477e7a8b844PKS=P (568819aea7347effb31dbf4cb66cf3e96a45bcfe;xSPKS=PV(1f5cd3f0e5115c39742c03939157aa502d8878e3=sg``PaPKS=P.a(7b5dd688e1c35aa686e3d50f82dad629b196cd1akb@PKS=P~ #(2bfef89f2375030cb37f4b1bb8834565c6969fbbxPKS=PW.(2bc9f8ce6e4d8b930e97390293265788de67f045PKS=P(7e89460907b115e28e969435361e6126e586dbc5ưPKS=P$^_(4b5c325022a674ff187152b6ddbea6d6c9a633bd``W`7`tP@.$@ ]Pbh`h\"M9@ sZf12d~ ѼY3-f&6P(Q?BC?@ W$@  _$h3ނ?F_PKS=P$\w(585752f9160435444df4eee9a04d4a9f0fdad434{pPKS=P.'P(f3869006048d4200e9de32df4ed7a814e6dee9de$aN`pĐ#5G"GPKS=P'9 z(23f83465a763f97902316d1dfe8fe79bc5536aea+2PKS=Pd(dedad7f547e97d5edfce2da4939f795293dc2511=PKS=PeH<(8a761296eac0e5d6b65a22a0307d20ad3f8f4206{Df-GPKS=P?R(bf03d877768b04a5336d97bc881b7369ac7b3856PKS=PEML(91e159c622c03b8ef82c8e16c0b55e4b8909b221PKS=P(0ff677dc3065f39c5cdc30150ac5af6421d95903ME=B% V"6 $D 8!|V`.#̂}x!=ꩮ}g$Sg\N쿘?Oys>?;x~>mc8ϟ"=}O'ݖԾײv~(p~"G0jx|Đ~m)ևq@oB8}u$rx|Đ~m)ǵ)ItwR[ں`bjo*0 F^w×u*kc{u-w\O\k뚂Aj+ϠZ\kqZ/S1tgl7#/;b&  ށJx>nbHmZ[L, (W7ʩna:'s卼Y|ֲFT U^W㏐QAՕU0"|F}ɤ`Ex+}~`O#`d4L7x*!}Ykm]S0,xU.*[Ϫ]|}VT U^WVWW>TVȋTq%r* v}>+GntwZ[**yLx|Đ'4Tz865^z;) ށJx>nbHmZ[L̼w;܂3RTqCj+Z[LL Rۛ˩:Dlu4 y9|Đ'45Ser* .L&w ?k\9'ߔ9pSxQW | F^w~ n?]{\0jx|Đ~m,ddW[t+9uM>%wW0"WQ1^/JGށJx>nbxk}w !=qk &kᶭl@䯮~k{;P `T3~굞4.҄wR{9>9O)!Fӳ:+60o&#ya*ǵ:mx*yhXL Z6w=. 'Or\k뚺+Td-uMvʳ8BL Z6me0 R6\Dnm_vȫW3E6V;+N;'󕆀w !=u$.IJ o2ށ'W9uM]AHsں`bf;HmZK!`-dR{o2 7Py+x;Sě c&Cqdh8yBHmOx!=qk &0 (347096c6b77cd7ae1a1323102333aac3c0264ff2bX"PKS=P.(84aa5b1d5855d2dc100d9eef742d757be012245f;PKS=PS(637647c82eb5ef5daa19629bf701fb476b4ad29fk`PKS=PF (5921ba8c81c0ff1b23921448f71bdeb86b242f683 PKS=PJLX2(885b91ee769c95134711d583c69728e5d1773371; ྋ y^ 0 0a^.@M$D'vD+Z1""&I2 bPKS=Pu(e2b1086e9b690dbc3ba7ce7b923924b384108f50[ PKS=PcTNS(4956b7fb85e4c220d06f9ac61b48ed05e00f1219(nG^124C(Ǘ (QA3 <<@BL0G3PKS=PZ (5669b1517ccb242ca9bb38cd66a6b26f9155ef2cȢ PKS=P ps (d33a567c0bb30aa3fd24fa20c201f52c96cf1a58İ -#PKS=PX.(13f140f1bdf7cd7e302aa4a01499cb6b0c3dfb20``Wxîoo E.T ( E,&U ҴPL{$FY@ #U| ?@4gX`d bd \?a\?aa b0>ba@7^a 0o_ ,(6;0Aa~@UL`imbbbdM?̗%3*44 hl]l~puMb hP@.5fh p 2;N30PKS=P8o(e29cf760eade6c0842b717451423c7d0d061c101_PKS=PIf(a56a7d50e372e71b887c577de8912d42af72898d;lĥ PKS=PP (287c2842b353299e518b10c2c14de8c1872e4b41kb>PKS=Pc:(6dbb0f268430207fca6ed3ddedfc71ade04c9d6cư PKS=PA>{ (67eda9821179d14d7fb94d8d035d96d8256ab3ffp n!p PKS=Py (68534e500e3e17249457ff3a485d035d9f6f8c39?PKS=P{^(00554dfdfe019a407b7a9575f7ebd5f482724687kb_PKS=PUI(4ca3088b3b723effdabd46865f1afe47d7213e4f[n|5Mb,HtSj!hbJ6J]j0PKS=PI,(284b4a41e957560a9f01124bc1abb6f435e11491ba]L b``@g bȢjũEa#lNX=: c`1gwPKS=PbW](40b3af0fee78a8532bc8b94d08775ecc49235089$ +c h9@b #F3X P2G O#L((bbhkb`d.IlZ R@4 ,<>ƀƆ_?3cxͰHl9LY`dz.77FM}b=IO6M{lV0& y? (BB$eg-pNX='m܍! ^yyz*w9QKDKP0h2,& mq)K@yc+qkE6bA('|2jńja.^ʫ"}!ZS#Ooi^{c =za+ {a\K S5X"ѝPVAd/hpkE0%w]zϑuG9e@x7Fxae; ^yVVdr'#P yθ+`l9ǖs blQ=pE!LIxbF4v[zVO' D?Ta1PuS?Er1{^>f>*&]N“hf9hƋ?!܉ӓsw31UR{U΂m(sJ9[-]2Dli^ՋNd$lƭa4L^o mFV1K3ZU JdӦB*?^ɸ.lR(PKS=PxN (8ddee3352c09a9aae110f739a545f34ab0f6a9ee31PKS=P( (878fdf6e891038fa3f542a79a3f6b3629ac12ddb?PKS=Pn(9cae6cde2971f9f2965250e0a9752f4d67716894PKS=P ` (1abd34b7b083eeb3a49164d0e0b54e550de427bd3GPKS=PtGN (5cccca30b7a62182b6144c1c4d81f69f2f8b6ca2jPKS=P~~ (f21458c7b02ba1ca36e2ab8c61e22727682ba28e3?qPKS=Pw2(da185278bb43ee4e37fb6a6877fafbc470aef3bb;PKS=P s(d6ee466d9dee44140633690ca936b44cec0a2396+b([PKS=P}"*(12217fe7064fd8571c91cc5b32b5564b467784080) PKS=P3uE(c9e07715cb3a622a0d46896efd6fd6abc4d37a95cPKS=PJ#(9ae2a7b0f71637a08e8ecb84b127a307df14350c[ʁ$W088PKS=Pz *(f68c1b716b6a83f42c8cd1ae6ae56c67a35c36ed[Tϡ$8\KPKS=PyK(dba7f37418d34b166c7474c522f867ce40b14989PKS=P`>?(15f1e13af10403b873748ddf4d3367b419e15582İ'.F6 a%_a-F&YL V113Lj`b8*ϰcPKS=P.&(9a8412b22e3e0403f976e53acd6bf3731b51f269+b("PKS=P 1*(aaca52ea33bb471e9df54119e58dd42f75b694ab;pxhPKS=P4%(7142fe3f48c3d3bc0944ae4bc3f596c7af884d3ePKS=PǛ9Q(286dcd2d494267057ab78cd13230289ae7ba3edapL7nxx#&gZb`8x` 42PKS=P$(311afff7e6e1dfab0cd0ff206ab8819643bea71f0PKS=P~s(e55a602bd5ab013046d05fb2865448499a32eecfJ1D=7.~4ODk`l^hkIv z>sߗn |Y@Em ז81 3ml]`"|y^1dMuAfH,< Tyr|~ϸ8|7S05lc5|y^@Q_I,< voi,o"6_uAfv#Nb$xVo"(k8A 2*ncl˷,/}T$ C*Ro` ,u=C*nc3.`Ej΢Y PKS=P((a0b740b2bca0809afa8e5e62a0a0ba68cd1919dd;Ĥ +k'0PKS=P+f (14a87dd23985ae8180bcb85cac5483773d90a77e;pPKS=P-(4ab159d84a1664036277aacf65459576a2f9b179X$2.0PKS=Pfh(7f5a6bebcb0cd4b450e0805d625563481ce256ef+?~PKS=P} (94c62cce64284df818fc33a0d5159cd64fe97974+PKS=Pc(d88b652bdae92abeb69f4bf4f4e9a9cc105d8b45;pNsh|PKS=Pp#(e705359083e42210bd66e9abc82107c0d2e6c44c ^PKS=P{2(458d0147e0036630a8872f00c9aa04d537f6f03b;ĩȸBQ`ӣPKS=P W(3cb352f38876b17ecd42e95dc061edf9bd49a948PKS=PQL (e72aab5865dde9e80e1585f24ec26c84c2a096ddcobcpKPKS=P}F @(90d7814e1a51bdd5fae14d6636c5bc555fdbdbcd+(PKS=P[(f7b0f2b04258c061fab90e83e05d8a00f22ec9c9ctPKS=Pi8(75a48badcd1c9496db5bb2b664988e6108874555`P@ a a@@PKS=P=7. (5dc9e28eecf7dd605a5000bc7629151e8c0e5d19~APKS=PoU(a26a84b67b4108b5d61bf1d17034d4cb072f9cf2X!`2PKS=P`i8(c6bef0e2a1471d0534db5d25482ac1a12f2a7be9~PKS=PD`(150d88840b8f9d62c59ef182eee3177897927f84[İPKS=P)z(ab6cd194053d6defaf131c9647b6bc7ee35fd0b4&"-h`apÃPKS=P%eK?g(6e17d156c032db89f4061096e9551f675104340bhbdb`_!6Ħ P ` ƀ yvPKS=PfU(bcc3ba0c7e4516a9340e0b0d63dd4be48f0f1266;ssPKS=PwQ[ (c13ea1a5ec2c5d79355ad624c1fdfd42c31c050d; !:PKS=P_$(1a248a027c058d143c5ae1d614f49a74df540b52d0PKS=P!h%(d826844b5dce7ab8f1a6523e55bb430612ddf0d7Ȯfoa./ 5.v!!(-!: U@14t# C#$FYx] L\vQ4@ Wg 0#y2p]9BNP_bh #\( 1Et `e`8 bQDDg耐hR #=xl#H 3,-ժb-5ږ#FRDx0Z ѼH  $5NT([G$PGP /UV8F[uhC8t@ j4)Bb b*c¦VN#DPKS=Pn^l2(745d9c57e5d8fd800f5855d610ddca2d19f7b081+b(PKS=P*-(70fd1766cf5c2379a084728c33735402331e4f9f=PKS=PV(124e518514a1942acea825e189ab9b1ce568e15f8|PKS=Pr (988fe0fd3720c5be784206573878d2f28d7f96ec/PKS=Pj(328586f399b2fc2b1d4fd25a3fb31c232e1dd845[PKS=P֢ (6ec9df963124306ee438ede22ed32929e11ebc2e DPKS=PL]!P7n'(a6d0574fe82a51ad410137a2770c2fd87c808784헿0Əbqr!qt4qa| ߃əёGpLjQ?A(-_r)J+so?7X7d.tΟwΏF|F5–/Y9-doљ#ʭ^:vr flisCRQ2MAmVvDz8F%9zkZ32Icjn W?@lvDhj WTe0Vao۰ y 9DqIcr`=BLG^PKS=PjEw (5ab2ee8d114a184cb84c717cf01643f7e6a7a1bd(tQPKS=Px(1e9c68dd459423c0d47466a669b02a9503637689{PKS=P5{(a1dfe7cd9fa6a6186b474ef85edc8aaf949ff991zPKS=P'L(f5954773a08867f35c8bc9112c9ae6ba9514e87a[İ PKS=PB(408dec80433821591341275eb7d881e197fa1eb9۴&&FVf&fPKS=P{T+(2e71ef03db2467431257a6ba6cc1bdca1c51dd74{ļ3çf PKS=Pﯵ(267da631324da35e4af18cedb1895db2c18d5fcckb@??PKS=P)Wa (4d55e0912f0f88a8ad5e7c79c54208b6fdaf27f33PKS=PIC(fb39ceb0284637928c2567d8d4b1b3d09f94fd98+PKS=PQ(f8fe66f7aff0db7902ee016e69087d9e6e341f4d`hbl`Y]vPKS=Pŝ( (65d95941ae737a17f07796cbc9d7a61c3994734d_~PKS=Py (cca95cf3f7e5e727f8bc6c02303b77bc9731d03fİ~HBBai3~?"&0b``PKS=PJ.(beacedbcddff5a8b3ebe369b8d7ca68cc7f12f7bcmbc25PKS=P8(631e5f2fe53e0979061bf72638cf4f3702ccc5c03_fPKS=P]˿D(545bbd1135f1c5dd7cc86d7f6b51568178016e4d;ã`pH< (a  KG e" AR:E `H;..f0~;v}bCxIIcl4 + bfپ]UDž37UE&U\oe|+u_As H6=fSkTBj$u_"2E0WW_{i}bW![/D%&~8Ꚅxu挹~US,_?>el|6dȎ˭3١๰萲[ sl ͑`;NDlv-ii'%RceMy'u$0csl%s,2*hZy>8ƛIKK7"LjDI7c'ou߼ U5&t%6E: rkqh=d x|_oI7Q733kv(V7,K4m,ìNB*>M6r\{!1걚(?LN]&ƞOXX5[ķt,j@~B^'!g4}@&uDS+ `H1(Qa[6{i"^gL>Ʊ18?ax˖T7R^&zOGIze`n8(|l>ж>+Z8g3Coթn.u!wFo:uL+6(f;ch|uB~o\7j_1&W'\83J9p(33ËE`W(_ggFـoIyK ;+M`Y| D[IlS_ }d2G4OaӇ#ٳ eHr83=2s_^~6 I'Z&Y$\E Ox=j4?Fΰ5p\ç&b"mϯ^ILdΦR&=>o>@?'WRۈf{iߐa -uf0au|!FKkh(L!gai: KuNZ_*bUB"vQ З8ǞIo)vB7wd qI>q xBiVp8N\Ru\%i) {v8 nㅮhtfZ6-e;'J kNT* p$:Pm!NX+[6{WV>nyFm-o4k!} xSMo2[emo-iM+ua7w\ތߖۮ{zF(阶S%P>1vA˽p5Ee}7@U/#mBcq*e Lƞ~%)񭦴 \]h(wr53iZNڽ햖)l$H}p8'rkce[SB}ۃ8ȹ<~N}>97=,|)ncW/鑅-~#쳺xixr N3É(^1>Q+utq4l81~jpzK+Y@iPX$Ь3Ρ{=Es=U-GGOo[.a8_ p8fװUJYz dQAx8CC&fs$p8}̾lLZ?5iIp8C-#~Fإ~# cH"20?0Y;GXr=q! {:ZɰY鳨7aiJZ#ŭ㧻Y|֝(BŅ'=5QDz>=F^K&}ژNXV k235fHTI]VY=;dgwMoCbHd>U tN_a>8Q0cr} f*to'>i/71_f&plQ~6Fn [''<ݐ zv^.z>iw=ZHiզ0a#1wɁ[w 3-O#3$[ϹZBe-:7] r*"+*IO68Псw.L14+F7rlM5edIx?ʱ<[(a25df4e1879b07f5afee4f69cabe94e872c7b0fe`x0aGFGn0e = (> .&6-:  } 1HMbKv|PA H @E,&U Ҽ 0PKS=P: (8a12213c835752857ffa3a6d42084ff66fdb178c8a{PKS=PBR (51a96a5cc856e3d6528f91ab429abf887d7175dbŸo~PKS=P^P(100b5088946445f495d74dfb28d5cdafa6597c39c>PKS=Pt(cad5d5f6a033d87adfa249b3634407cb0956941bcPKS=P^W(a700b9df6265e0e1a44fef607bf7319f702ed7e9 PKS=P> >(5ee6749f43cb2a3f6565f65111a32bcf00f2b80a{Dd`PKS=P2v(916ebf0ef7fa3ce1290b1c3f4090368a2fd53e34_PKS=P\M(7d56d98d18c842082ef82dbce3794fce06d84d59PKS=P?j$!(0a7d616c0781d07f8d36cad3486f729ac285064d( +1Vc3i97F&]k PKS=P8^(3f3fdbc1cea5dd0d4bd27a05acf293ee272e6d64`bhbdb`d0AaHBi`iH0@1LbSppP`p0Pshl^?04&h0($2LpvqPKS=P'( (b3b7e2534a65a1c0605c7d2cf1139056a15cc098LPKS=P{e[ (bc27f653c38e445facba501d4557d2cde086b0e3+bxPKS=PHC (cdae126973381e08434810ffeb0671acf459a38eɴHŊAa@#f.F9c$y\v@! w p SDπDfPKS=P> (5a57ed0c4594d3b524c644a65d8de606a204bff8+bt_TPKS=P׋S (97719ca6c917cc3b6ccc1901142d6b13f28d344c{\PKS=PPV (21a31af7a0ecc6a6d83af645f9a2607fc076db0c{aPKS=Ph)F(49a60f2d72aa9f16bf9b93d6214d7d46b9b75009w޽PKS=P;*(15dbf73071c836b8c628c6b9679a7cb6904662083PKS=P(49a2c8ed4b17b73cec70bbf083ed69d0775ffe11;qPKS=PR_(5191c0beeb666b7fe2032a4aa997d340b73983d5PKS=Pw (a622dcff130190e6430eac4c8fc7579f765422c2[? PKS=P<(37e2b0c260280da0c0523f2233271b6953f790bc[ z<~ PKS=P{N(25c5b20c32f65c4a2fb052ed719e19d4d8edd6c6+:#fPKS=P|mw(c059132b46482e00b5ce6e47e9a7343241636f6bX` PKS=P>$9 (670a0ce96c16152df46ed1d1837cf646d7682d2f1;PKS=PnR(c1fede7060c0a57203035b8dafc402bcdebf4e4f+o~PKS=P j~8(1a2fa5e697ecf2ec169285c78b7928bbb37c2ea7vz1PKS=P ( (acbdfbb9c9e00102a5e611c23896941ee8dc9608kb㑀 &PKS=PH (761f3462b5858e94f3efeeb03ff43382e1041352DPKS=P (bd8f8a20fddde8c33cce34ab4a7b1ad6e7ba3e55a! !! PKS=Py(1f6fd5c4559d1df2bfc9189770955636395438180PKS=P1(a4b32d2afc56ebdc984e5db6ca7a00859a368b47?PKS=P%8(fd3496023e5cc11d3849e3af3319948fc98bde47+~PKS=PJg(b44f37f06091a62eacf08b295273d8083d0d18a2|?<PKS=P39 (a3105f2fb80d65d7b8b295db9ff9af9019c8589d0aPKS=P(fe8e9f22fbda04b412dda2663a8510a22f17d365+OFPKS=P@/Z(7ee1ab30ec590a466ff4a35525ee26caebaf92dd{ f Og@MWPKS=P˂%Y(502ac56a26c6237ca926e1be4be11c7ae34c7b9b3e}PKS=P.(0cc793a2df07e64f43068c8f161562deee533e11;PKS=P&(fe1a71b98f5166ae9ff46b59601ffb08abc270e3+PKS=PYY(cee19cc9643ece4c9246375c33d1f26bee460d03;PKS=Pu (707fc70dccda44869f6f5a6ac553b90eb96e38ca0FLPKS=P2">(97e3fc6d9090d888879ff5a3bd12c41e817eee27ӨֈԈPKS=P7(fa3cf028780022b2713a93e9367b084b05b48e8a\ PKS=Pn](4b61c0da7c601050da1234224073aa59c7d41defkm] PKS=P'{`(e144e6b3b859f03aba68096b1f7136b6af74f167khPKS=P,#(de4e747caf934c4b9f1fae3304e1081e4d9c2fefXȁ"8!,PKS=PpHOa(c6e758f0241ca694a183b7a8be6c70549e3f763c{t?uPKS=P@S `(fa4eed0b4157c4bdef3d4cc883b34fdb0dc8c492+b(~PKS=Pp rN(8cf7919f54b14334e3a89a785a424615c17f2a17PKS=PE (a300b7a0dbb3142c587adf01fc7f25174fa0870fPKS=P'(e3e6da6c35febcc35c55c17d010dd274b6d6cc29ii e PKS=PF !(6950a81a80ac9090553060cc34a91eb1e6f67b2bkbӑ_PKS=P52(99c54cbcb3d435abbd9f785e967f7a7e02c88b49&PKS=Pm[(bcbd3c4735be9c28a25ba72e101473a24c7e82ce0nnPKS=Pks(ebee397c0a3d75b1ba52be3afe825f5d9ee20ab2;!&PKS=PDN(c45f1f8cf72cc1af5fea7283845b27faf2850410F}PKS=P>m(64e5b5b68262d6f2dd8af884b9104e6ae0577780kbcdPKS=P\ (1a40667bcfc598819af0445eb49e838e8a24632aPKS=P,(6ba5f385d23f5f45aea8d45fc06bad804cf7022dӸPKS=P{(8097f41c2cc850073a8fd585dadebe65e1fc8aa1jhPKS=PR (9b54d3d07790aaa63f23ddb925ddef249b56fb5aj?PKS=Phi (94360605eb4640443a539982936d82f35906b8ff`Ą@lPKS=P>[}(baa1ba334c560c778ad296ba23bb58470067d4e1;T@7 PKS=PP(7fc3604b6a7ff9fa57abbf3587a893e1bbd26dbaPKS=PJ?pI(7f4bf0c4134589a653082e81996a5a2386ad91ba+_PKS=P3\(47d5cc2f3aeda2894dd8328f47935124de7189b6+}PKS=P3{_(dbacb8441d184f6e47d23ab243f254ec4f8f947eӸbPKS=P;4(0d0774d4bb0dca0244806d61491e9e7750c63050ĬĒ5f`x&?Mb$X4 ,<ƀF )<.6?_```W`7`pPD? g20ԸDw(b1404M\ M.?3200w0jMbd C\rPKS=PS(256fdb7cec772dfbd27495f7289046b318565a1dPKS=P3TJ (d3c7f9d6d565865415562e29f5cd2d2bc000299e{ BPKS=PX(c66748182b3357e9903645bb2d07e7ae7484e3d4`SPKS=P@ (fe3b6b21adec8ba4ad06272b82fdf46e0212876c0 PKS=P,d (321c7db2ba08ec7eb835eaba05de83468691a4e2kbcSPP0PPPKS=P"(2a9ecc5a91b35593ee5ee40f2667472629c6f2e5+:PKS=Pv (4da232d6a02c608f65b18b2d211b44dc819ed70bxPKS=P#&(30996cf2f4e4efc229695fc5bcbfb60142c16ff8+~PKS=Pl1M(9cb4249e8a055eb22a6e0cc6daddc7c1d688e73b E,1ob z?y?E=Ĥʠ_PPSU!!A~ cf&1&PKS=PO>(31e9d693ca168f2dd87dffc1711f50516fa7cbbcŸ=PKS=P!(14df66be3b08880f367ef4f021409f2a03827a22PKS=P@M<M(8dc31dc38406ce144262661511b74ea9c6e845fcPD5PKS=PL?E(af9dacab05e917e28f72598f5db56189789e7783Xu!3!7SDDȄU 0  zN4e¤"w!F 5 #PKS=P3`(9cd52ac50e2244f85a0914f7af26530d69123bda3PKS=PE(253a8b572ca3ac039916c3a322cb9e29997e4000+_PKS=P(784c6c9c8ca0c8c364b8c7ed6aaea28f1f6e9426&PKS=P rCR(b072327083da5a84d8abbb4f595fcf1ed54cb62e~lPKS=Py(c1da783d44a324c81308a4e095c1605e15cde26d[VPKS=P89l(d0cb04df98377227f9898413e95cc5b68bc34178kR?PKS=P (40ca4c9080d3c6688cc9ffed807336e9e599f4b40 DPKS=P}s@(027db3b5cece8a4146eb13c08cf18615354375d5PKS=PB2(62528975b0380d9440b0d40941a9c56106eda5cfkbXPKS=P=(cca4c4ace3fdd66d12d54757865170bef3598cd2kb?\g```PKS=P(c40c1a09102890f27ab23756b512fc02dfe4e180PKS=P(0bb33372e25ebbee3063d44c41a3e54ed931de5f+_PKS=P_(85877a364af6f00d2633990503a4bbf64ad93414+:PKS=P`m(929cb8dcea9459b7ae2be58f5f4c328d9ed89e77kbd0`PKS=P}N' (80ddc73eb23d8308898b84c546fc569ed108dc86aa PKS=P3|)/(3e5dd3b3048893307d79a7593c5f86454103b939ŨC`PKS=P] (c285e69951de0422359bca5e8988e556a26175f1kbSlPKS=P(2a602e1a96408e285b0bedd4172e0b5fa5936816PKS=P;jS -(ca37e506115755b1b7cd61c4b2dc9759e39a7eca[İzČPKS=P siZ(2da89713048a56ed6fd764dd8557e1467cb02c9c{Ĩ uB sPKS=Pi] (9241ee52fc17cc19f6fc017587b3f030b9eba1064iҧPKS=P.(752443b0149e60e8522b0a605dc5ed820979af4fkbPKS=Pz(e45cfc876def69cd94c8853d623b98a8018094c9{PKS=Pwʠ (5ce42937f44fe2e0e576f7d45217a70aa503299boӦMPKS=P()(3a89c6086ad2277b1a37c8eb7e62708f63fa7e90Ѐ  HJjhPKS=P%$V(74a36b51e772b40dc955bb4e1e785531f3046ea2+b( ؟$PKS=P(1a59ca93d5859f8dcb770a15a66610480a45b088+0| PKS=P+f (cc38a08f856458bc06009185084415b216f3a859{j PKS=P\(b46ddacd2d510819e12e70a190810f1ef0a930ed{lPKS=P{(c1095f49091a920c984bdde117f1ac43fa1f6dc7cmyYPKS=Pᣤ(cfbe7d5e13e6448533e73f61427e8bf2b661bac0;s603PKS=P(T(d4ab3ca5f38db4c6785873f9527ffc8fe2707ffc{^ PKS=P@(65da194c9d89e4bfce13613d74b4e00c2266a3f7bPKS=P߱ (9ec7aec7b9128186c113e24533d8ad2eda0d8604kb3PKS=P B(8fdf86870cc1695bebbcedf024b4489459a9c3c2{ZĄaPKS=Pv(f2a75bf0ece016db64330493c459ce8e0120ac6c`PKS=PoU3I (9893647e1e69fc08eca523d46746b1487e73cd5c;$PKS=P~0 (e5ac152b3355cf32ce449ae2cb06ebbfc0063ab8`xaama`vPKS=P\^^(f96dacd27ff19b32b2c283076be7be7ced1f8f72;Ĥ+Ӯ]LPKS=P (31c4419c498adfd6449d332302b46b5174529379[İ7WvĢ4\PKS=PV(d03e1fab935ceca199e7c454e139ad10eda603f2+bb(bPKS=P.(9e5884182a60d6c8159178e9e766b8150e81f0f6+ZPKS=P$W>(55d1ded3edadcec09d20c2685111c2c6436ae641[ '<PKS=P>%(7f520e6cd016a1b0bd25c35f2f61318393083369[lPKS=P].8(36f0765772d324ec1ac62bd3c73c90496ae64e22{(gcgPKS=P"(119fcf93ff17ad7b601afd01e4cdca422bf181da3-PKS=PvMБ7PKS=P~;(45b647bcc9c81f53cb3de54d6ac66ea861298486c^PKS=P+!(7128173ac2b3ed1389d2012b4a52861062ab3266X `"PKS=P B (3e5c834bbea49db81a84b877bd0c3032bb1a8c78=M 0PKS=PN0(82b57b0f8d71413a0134742cae893c1787179412{Aa3PKS=PrY(e12ada142bb543e143f24e12f3a2cfe84410cda6[PKS=P#{ 3(8c0927ec3453132ecbac1331b6a52d814c2e605dkb3 PKS=Pc6(1357b2660de4d887b34b87b09d175be09c494aac{pPKS=P{ (36bad9d18f826d81bec867a7da14907349b5c419ab PKS=PĮ>(bca7260e90c1bd4bce8f4640302cc8ec60901f05߿5PKS=PH y0(180104e90a170a2807dd4dac216c6eebfcb98836+b_ElLaPKS=P!& (56a306d124ac49b63a3a65fe96f5abc2ff2672fakbSPKS=PvD,|s(e55d2b5ac48214576f8085584bb31a874e3c21a61o@+ "Z5[2F]pPdQK%1O RƌL_ "JP*;1}_.~֩k{{;fNW﷜:Sn6ڕo`jZWM#8ϗ<拮5{uB޿{ ˇ{8zc;Gǃ =A8?: Ă=,9X)ⴇ06(^ֿI|^ Dtj~HQ -=őd6U3(nJXSנXip#x /?dsxrr"hEl}EO \#"T`贋UZp6$ײ62^~D@p!nvi'2NCg.zbxVi-c rq!n6$($kvm+C'S0?G8PAl=DO(dAR-` Ү%0u&Z WQ0?G86uԩ| m"(*璝ClaN@v$2@/QI"0D &3&uWDf3G("N}S ECɈ9PKS=PQ* (c795e9761c378d25dc6b6e836cdb037ad02853f2b PKS=PC9 (eb3b28b76924a6946eb3593de4906feed9b54c89kbcPKS=P%Ŵ{ (4d0da381a04428c39c2f6e0a4561c49648887f17kb;+PKS=PF'(8afed39264a9aad49843005bf7237bf3a293ddc0 n1r0sqPKS=PtlJ (47602918e1a3444546394c6773490b23b40cf055]}l{ܭφ\bEV,N(glJ$"P%+RT%iDUJQ6m)ERJGqTE{i RUMIHQ X(~ݳcowgy{0"#VĻ;$)E dOY]@호X ؃}Q?|59$X$;{AC2 U&)Y2æ;\$7ioO+̩O4gbOP11+af ˚/QDD$,R֜Vْe) q={_<:+(V⨔ǁA90ڦ‰g^ݗu &o݈FIFXsq:_/ko Z :iZwf0~& [`c: HDIFD5ZN2uq o%{4dj#vY[i,L%+YТ?h1D {8k.2Xeڸ h *@^} 2|.Z YfC";>a X K=-;c:ߩNcF<`  @ lFWm4^)M N ϺHsxm<%tL!kkB2p1,Qc'\+U^l8!EP2)M RfOf2CTLFn߾W)q(_Q sbZNMTa@eb 1bXpiϸU{|T\kx%[3@sCT};BZ@suHtIra(`hcd'$ieDZuN$)?Z 9]9qq10ʻ2YN`]yMj?|+ԤJ1K0X*ͼ86FPTwd-ҘavLk$%PGf! #)q3LA^>I{Jqr,Z q@lJR+D}V34ʪ&q{߉iIn#Qӯc:?H'b}wשwυ.qpk ?8XA>=KC}x9dK<<_{/[ɶ 9~'O˽>aND&~N5FqiCt<$'hgDk @ '/Ć\ :#7ׄ3 JD#e#i>K\.aJ_x컜LHүߚ|;;~`zP;z/V$%)N7@F2ECT_uc\-ޯ[҉+xu8j喒zʗvjRT{+i *]CU|TmlS1mWսi\$3juۋi%;3X.-NN3x&3pMɧ\$Ljyg|*Cq lJz@WjJOުTl[.3XYnIlsi8veثY9uaHXaW_ dN͜XZw;K5KР0ouF @rEvuQ!ɻM@qTјHMډgS+?)j0 ¬] _20ܞJ¢rֆ.{7?lQ7+ TUzs-L]9Hѣy3* #1Oc@iؐ}SE52]7,Ei4  @aqǣh{'[/ $1c^~[s2 nfΦr[ w/&iuGSC!+qNhun.S)s0SR,蟃!!%A3bd``` )F6 %FY`XewPKS=PF/(ee2538736a5d38193b223b1db9263b2953fd5481{PKS=P 4?(cc4c16c635ab8abda0f721b6a70d2d7043e903d3mPKS=P4d?L (c5e537433e8d1ad945849addf06986a49ad1f42a0APKS=PG.(e8de29ffafaa7aa374fd0e02fa3a43766171c404Z;N@,A&P $DA$$ҀDI ;LERE)HT!w ؖc;gi~;3M?ாd;1ހ-΀>(>nzfQ9_& {V}AA~ĸ1G۩}sC݈TDSL倄)ÑUPKw r ڟȇ8?PJdhT4FnrEl_'ոڀ%^S.B""nr"4\zve,xnm1y5Z-|s$"U"o#X7R~Fm B;j~Tml -.+*[f (mlxn&a()C (df30b5ff148e4006e80259561bfe74f20bddc0a2kbS_PKS=P15 K(5d97622d4fd0d905006090e9ad75828ec412f32asbXCPKS=P0(5fedc8cf312027cda2d7ab5fd060079e793345a9;rPKS=PCד (4236777d781ab88f6f5e3decb9b5b8f2ec0a63d6kbPKS=Px! (af3ef28ae5e3f68bf11aba9e3d09197d45460315`\ PKS=PBZ`I5(029b35daf47220649c478e475df79385c557d9b2/.&]M,\   f |rL IDBtApE (`hF@H&!lٲ9wi0(9scsni$;I D3jBM5TM5ʤH 0e_܀ӅFl#;$D.9A  BtJ4өPz51VR%`; \Ltl20`QOqai``wT^T*Ss "24qPKS=PO (630d3fc17825b54203c7ea4350e3fd4f54797bd1?0PKS=Pk (34bb493b23c34630aa061ef22283dabe2fa4def7{PKS=P0(9180727f701abd7515d0d32bc2d27e842ca1560c+SPKS=P6h(d160e0986aca4714714a16f29ec605af90be704dPKS=P4(8efc2f1e8e538f2d56d9e3e95a857da19df0a721$ +c+EL,\  A+f(!P2#' Q `E U M` _032tq0|x0MA@ hGcCÇ@+ yv  ͂8i2 ǵ& C ddduj  }?IqT;D+-;-$$;  PKS=Pc(&(dec681ce21114918129f387a59caba6177d034490a**PKS=P {(c2857ff836462607bc8b501f0bfb41dddf362886{t?PKS=PJ (6e67bf382cc306ece62436604e6b4964d34c189fģ PKS=P-Uڤ(701ccb98ad7b79f622cea97406e16f5ddc52215avPKS=Pw? (c258e40a2f878ee4d27a7e41afd19aef345e8344PKS=P>j |)(5921064e696f7084b4bbf1996deb881fb2d2f679`xA&PKS=P51(4bee9504bd82eff0a903aeddf5f85313c43eaff1 0CC>L(]uҏ&|:+NGr뼽%4<A+KD p%k]b'|qrhu+p1] ZF$G|OB-N%+h:"a)- j6Yc}e&c)LBУAR ZƞY fDrf+h%:GY;DE̎x#0bFJ&5 ^AYPKS=P}r(9fe117fbc3bc879c8f294561d0f8e409919fe0c8mPKS=PO](229ca0175d05d5d188256982f7eafbb0744e8eb9OhW7l !+ R4K!`[,(E&-Gk/U(Zk0ElV DL?gOܘݝ̛ٙo&άoLv/kKճ3NQ*lbN)c\j\ܔ~nT/Z8Cŝ2mk:,N%UDEՐzN5 ]_*TXtό4tInxWG 棆 b/|a_X1KWɴ1'}*E_$TlӚ01C%M3ԭ=^#m5d9ω\[k\4n;K[2EwFX%E↡g=- XnDd|OƽmMa2~XS\_I(/R~Ygտv"I'i3m^JQߒ-&x9W?_yW_=t'G o_l95[{}>B!+5Wn.]n8sd8deWM|;|iJo7XiSӢEsbUs^OH9iwmV dGIyI8}_;}}-."ZGYF0=Wd|1"=y,Q_RDEQT+[ĉJ3yIV Ǎ=k{cN,1g7lԍocpUY }#t8ݕ~7Oc炎Կ?PpS ؖ}K xK@tJ37Ǎ3qC-/ğJčjc M2T<'v_j:#ӥ͉N3{fܰ;#),KAɇmnDaШK{DWd|1=u|}gT@+mۺCټ)tO'?v CtMuf[Pb@cm : /ilp.d8iFÆ}M7Pq[[X#%(b w*5fj/ZB*,5ݦ2j Q,HrNS5UuDuaאHv$B~L ŃԖ =i cANsҳHG F=d-t(;95PC E%GW,Q'ߵ}{m7_S~5Ϻ>^l[ (1U :uxe3|6Շ-[=J=nw: ?~[%ѠhqT_Ø(}`zОxTQ(h|ժbNTp :NU8`L2PKS=P !(e21296519edd2d456ff5bf99bb7e1cd4cbfafb36{nPKS=P;ʀ(d6cea37ff64bd59bbd331594d1e8429aee3715f7?nGWK0ƵK71H'\<.,|'P6H0%!ʾ7o>'Bgv"ʹ0m˼pbz;i4˛H7ӁJKjo̮Rckml[?;;` -vTk횂@ϠdF.@t%<>nbڷQk &&Ҁw w71Hm/vM@jP…0"x,qs٭W>>=^r)m\/A֮)HmEƈgFtώc8nF^`d4nM R>GyŲ1@:a14´rܬI;(ʼcK0 wuF^%<>IF/."T[L8v;(}xx,qexku𚂉v gZ`bl uԎc(Dy;(EsA2򊱁Ԯs ]ab"1z'dF.@t%<>nbڷQk &&Ҁw@Hs+Rpŋ4Osod򊱁8ޣs:XMhhyǫ͈˩Uc#';xȋܮH nM R[;vMD-CKx| i5c8] mێc Z?gLL4htX&|@E֮)HmJ0F^%<>nbJb %OR[ӿ xQ;>V #/wPx2݅WN Ajk߲(2-t+HmM;vM@jC3zkQtQ;` R,!;P"+R[KZ`bY\Ďchi7i[Yh,qwPJ38Aq e^W3g:PZ #/w$woT[L8RvKNoi-bnV5 5@jS+Qֵ?yQxf֟IvC w;` w{;?^N0xJZ`bl g/ktbX03vCrYiM.F*WNZ}rCWl`n\-LvT"w7117 cF ށ'`;vM]TZ`bHm%FcW C[ލ^n,Q}o'NW PmoU tՅ!;P 5y;H R[؎j]S016FPyyQՀ3:#zӟ1RPKS=PI}L8(7212d59d8f1682f2e6a5f83451134743dbc0da83;ã`pHIhX .1WD``7L//yei"iCbզH"ӡPKS=Ps (041690a5d8f757b3da7add99e2be011db9bc5d9dƢmPKS=P](77a4ae930c56a8d1c7d039f398b13d055a4e9c149PKS=PN(c50e8f00facbba54bc137f9e69949976fa5f6dd0c`r@PKS=P͢(f7ce2cd06c4c42074f8ec5c1b216fb3e1ab1498ecPKS=P[I&'(f33b28d38d35607f9041f7680887b61e770bf667X (y-PKS=Pν (16c6c3288613fdf2e36bde9fe92ad56e8f21e14aϰ&PKS=POg"(cc4bda89fc8e0335181f5ce578b4744b501c23db{PKS=P I&Q(aba24fc69b9a369aa6aa1c8937a861a1d16313ac{(y(G +Ck(*8PKS=PY#(b8cf6c76cf4f18dc13d722f9b84806010ef55b52bCPKS=PQ(452f3699e986700876e0b0978b7a8d6b6e534b27[?98vsHppPKS=P71 E(d5684bcc2eb4c0c95304027d5686d46a32f348e5{ZĄaPKS=PxqƝ(2fef86a071b2d4e94d3e36664fb3f7a12cf23842PKS=P'| (dc417675b82aaedc821a6d8dd2ac5cd58d908ba9[k@~hh;9C !TJB`LYY2d̘Mqѣ.]:TABv,]BK d iUɖIIwҝ}?{  V ꧎=*p^.psNsXU[{ i쵝}Xe].}U]}8y@#7ǚtLqYfw\UΔ_<446i0Ʈ]V.toKhXY wvo6a.u&F 9!w0mmz =S!]$$[ⶦ jI;~Ĝ1/y=P/7|}]v(%㶦Ndq0SAK^Eqor?j,i:k[@ ,ܢwA8JVfe%xoInvF1G%Gÿ7TKwR!y㛁i y4t ӈ9"R̷0Z⯅5D䙙h㓬:(s{%Mtq[Ӄfc''q3ʼHD\B' 4bb$yZN" WB89~ yՅjj j;D/s0`-bE)f=(cR,$[ⶦ jI;~Ĝ1/yɿNdٱTXQ q?V^\cyz:{?`oxX~Y%|X#>ȕm,Okk0qӼHaQ+I_x!t,O å T8NθCta&,wr׹KdXNcduLgwQ*9oWMF-,O:t1Y 3W˿+CHgŀ3;';`7c7w\goٓeMSQfckƣ*8Qm:=m Z58:V 68 ة̀-?PKS=P˰ (decacbeee6ae7ed3699f23e758f2b8ad442b2d3ec;pGPKS=PCi(3b37e34fa7a5cd577ca1fee8b67e45e0626b49210MPKS=P4 (04544614a5f1b31fa15c83303e93804012250298PKS=P\ (2fe8bad6a101e8de9a9732a93aee7399e81bb864kbPKS=P[Y(385bf8718ae5023e79011d5835f41550fafbddf3kbX PKS=P`A(7685bcd4100c3ac81097322d7d507af9784760b1PKS=PX:/J(8b75432087036bd98f8fc7137a2e39ae418b80f7$/ je %Q! Rac@cCCT$ GUPaYTKPKS=Pعd(a79fbb10ebf45b04bbbe3b6e4b47f57f2e8a1971XPKS=P!b(728e5c68005986552afdb7146211380353fa5a85Ĭ$0,&fG,\  Yش8,  } /<.6?_```W`7`tPD 3j\"W;TH&FN.ϟX;1]&1 Cv}!/>PKS=P|vv(b5d9354bf1fc5b62bea50b1bbcf8f135de4b8c26kbbhPKS=P (b351c4e2934d988c0283e9459889eeaa7c6607ackbc8uPKS=P}(4974ad2795797a643114789c2b22b10db395e247{,m k0=PKS=P-mt(b9d513e41cfb008bc0f613135b4301aad075cf6e;{9PKS=P?Q(46089f197f5fa14f380276bcba49f81dfcefec64[ <+m>PKS=PT(6914ac42b57a1c15c843efcea5590ae6df8f98ae;yJA FPKS=PY(cb1b26e4bab5d3ad651bd9ac4f7398c9794638013UPKS=P " (3b98de204c93ac21ec58a03b9d6d1173b166dfa4KƘPKS=P%(95fa6b1b021075780699de91cd385ee404ee2a5d34PKS=P_(d91b93b7c98fe2a89ee57bb79ef433a3e1267f23+bPKS=PI(15dd95d03e77b2d54fd3648ba640fc29c7a258263 PKS=Pn(a17203be23e92ad7b336009ce4ae1650e7341e8b PKS=P -|(29e5dff6f73d5dde8261b4275965ad15d484399c+z_IӢ.I TGY@4#PI07 FEL a*3;י\Bb1204x/a!&6R@MȚ -0@H3۴"661r Y *F>&P]l @+LaTy6 `:_TcJz_X-|@ 4+y@ߡpIz$!~&bQpNz3<1Y&Nӣ"= ͌0Of8`z(~8f J1Q3}p&g~XXǿ;RDE`^j,D #Dk@0AC`G -0Vҥ 8{PKS=Pi(5812bdc1d0dbfa37d261121fa1b204f365dcfd77(lٲ0bPKS=P[< (180e3b6003fd95197e2641659cbec4c9ca1cbc8b[ ` PKS=P0(056dbb82bf07b580d9c7b04978c94aaaec02ea7c=PKS=PyE(42d6d4de1474fea015d1def200fc04f23d493c59+ZPKS=PDJ(863fd2e560f64a74be0b6a5b5009314f41656871+b(PKS=P՘cl(efdb672669888e2322fe6e14fafd02dc6de2752ap'PKS=Pb(fc551182a97d025c218fe3d16335c5451c05dbde+~PKS=P I(1e6d64350e188b9af7e8605cbe089253e026ea7c,PKS=Ph(3d12f7a3d9c6a06d1cb322e718b0d54d2437f4f7PKS=PWu#(a59cbb0c3ce11ce4f1cab6462409763f6f2437ffS`PKS=Po(f3124e256e19c0e6f4542c9613465eb049082800QPKS=P^K36(ce0731447f58e671f045810ae4903f4235a8ab91kbPKS=P](33dbc474cf44533b5c3a2e1e15f8907babc3a8693`ePKS=P(r(fd2da519f091cb880f12382128ea904364291b8a```P``0`we``feP* !&"PP0a#!FVc]ll p1LbB`p`hlhh21l0gaPKS=P^](4a6a0a0d53ad4fc275954db36ea75d030003faca$bfvAwٵm,)F~Awa H)(F<q[de,2?Dlj%PFϒ⡂ 0f;0@#8A-2"kR z)]68D8E]}ŗL/꼪4 &~ϡvЂwvPRP߯4uePR]'Fϒ=9A VRPxOC1d;0tR)(aSe졚eJf?6=akA;pBuR)(S%x/^yUi"-LC7M & n-& `@yW#({%=.A& tnn33g(s3 BCiCiM@JA 4=af3s -JmNUjR z)a>)M -JN+dzVU\0v|} 4-+;?i%p/ѳxWpe;0@#8A-2"kR z)]ɳ)Q=tFʪÆw2XRPx:4,~Xd~ H)X FPB>O_??~Ț'q4oPKS=P ` (2bae94ea6aa67cf3dfae2114d13ce7385712bb3fc? ~ PKS=P4(fddad668e229ccc1f4adc2a1800fb205ac51cc68+b(PKS=Pm )(fa455ca2dcba8ccf9d73d9c8fd51a13bc0f5d393Ĩ*@d2002(0P$mPKS=P[_ (50c778b6f8eb815af12b84a19959fff3b2f8ed87kbc`PKS=P=(32096c2e0eff33d844ee6d675407ace18289357dsPKS=PC1(99d118a4178efdb463ad4fe9cf091ab845c8ff13PKS=PS (504be743a430f69b65733ee1de64c4087805ca78? PKS=Pl (16a106574cd33275ab7c41f13521070348daa2f1oPKS=Pe(ae40b988b867a5ae233474953fdb580691ca1583AJ1Gܸ4IčCBW#\ʲ+ZR%k)M/_)i6)NF?D7м<>,u=:+0*Rޢ3.1EiЭSt}PKS=PyP (224b10837f8a124b0a83cd2ad4e4952ccd7670caơPKS=P 'y(3fdcd90845c79c956d987b4a45e5ef35fd1c02313PKS=P?_ (a3718b75cf7bd3580da095a924d5cb63b0c8c9a6ŰPKS=P%6$((5d135c57c75c6bcac55ac2dbd495429c45f0ab6bSP PKS=P-O (91053e05c35591e677d79fabce4b0353026b7994kb?_PKS=P]1Fg (aa967eedf3201ca70e7475fdaa385186cc692160FPKS=P4(282e58168707136993e6a9e129bf3ae15820b5a2{=PKS=P r(e9bfa339648524c06469609031c0624885ebed6f\=lE~Ýc"Dv 8' qDr&BJ@"u("$d*LQ֢HP$R:%,>ݽݙٙfX,߳Ы һЂ&?@ _ޜ=gk sG]/>؀ks6׭i/4m7WzډYi7%)- ~fm [CA]AlZk ^Q>A}?xj©A1<\Z~!74 o^.{(}|98b,b uq 8G$lun~4T,w>C"9UdL04,MQ`9T m@w3y8 p\1HMqKuy ܒSJl"j& ܺX jU ?bAUxZ^7fLXMXqhy6`5)K pN)>4?yrNRE(<3kj,~[LJ I=B=s5 3Vy,O M$4Ku/|A#dIxIIfj2!'+o X- ȷWZx[.&o㸈z3**fW|b&_WH @W^58nȋ йܫ>^u=7{m:D97kdd6٤ nQ7`CZu+>DbeYiAÌ?ed#1My*NgOO }>SDϿ=Pe20ԸDw(b1050b144lbb140)~I 8>bhz=?uD]g4b0NPKS=Pb(8e932f8d52fc04da61d69f46d4c8432c88ba79baӰ0PKS=PWB(a6c279a8f15a0e91229d320447785f2326a7e7db PKS=P$n(301d38e2f11ab0c4ddf87a0b554351942e127076p PKS=Pv(cbba797dc7e2a7b392195dfb7bee0188bea5a5c3_~PKS=P,qu(e335e47164b8ec51c5b96b454691f95485b4a8243PKS=Pv](d0290f8c328b4a1134ce40f6d10b46383ba0f987ZPKS=P~w$(0668c9ecd9b5e7ef634ee06be56d5d3aeaa403f9p+yD᫂PKS=Pe(40935496b8d5df512307b4d5fa8452bea14fd1b2?3PKS=PK/$(bd3abb32f0458b37e238b116ee2d4a4982d1c0c7kePKS=PG(a7800978ad282d18e99e81a58300423aeba908ddPKS=PsK (e83a06e7720ab10dae84512ee7c02c315bc337c0kbxNPKS=P?VV(94c9a2feb33f419df2ad268e74bd1449c48d4627;pc=@!zLCJ`h A&]L  vYptBH>]ht<PKS=PG(0f330ece9ed25de93f1991a6e9a5c19f99390691jmmPKS=P[f(33cac09486c10024f1abf269a5863fe0984339b2Ĩb*}qb67B;KL0#߆2b 6`R g] 2PE$xIlMmį,?!e&G(~`t&i,*GQ;ZO1200;LsN޿PKS=PRRy (e0c52baaf6503fc1a23fa8cf6647e075c6e818760aEva >j7. =nGv@v4."0\q@K!Zh 0pMe@PKS=P:r (8f78d470aa0e5dd824aa3cfe937c5f5abd39015e0FLPKS=P$ 0(675190fdcf772f12a3348421bba3024f148b87f0+b("VIPKS=P,f-(29795fc9df905cfd9bbc8e70f6f5246d4a687fb3S`xA0 PKS=P]|0(56756eb9e91ea5c88118c3c6c21ca5d00c0970f40PKS=PtxF'(af48e7613c99069c01856878ab6e1925ddd10e940 a $+f;8PKS=P%+(9a35f6c7a41a66a00085de58be80304564136abah PKS=PIS!-(9e75c2d53ab0da79d448163d17168c7e78657b5a;ã`pO@ Iqbxt b@XCPKS=P+}O $(f8578a70cde4ee0f468e71c0225563f6d64b7ca8İ -BEPKS=PM(9259ce914ac0728c9e82076cf7eeb55ffc7a51ea;PPKS=Pnx(ee465feee3880166b117fe431ad5ec9cf1484791+z~PKS=PX (035ba76c96b24e8b8a4af08c7a04b45ec995b45a0 %PKS=PU) (a336b8e2ceed5d2c47a09ff5ace75562b2ed85b8p?PKS=Pn (539db30c9d13077e4b4cc520627301817d7d1da1+8 PKS=P'F:(349a5827584e66fa6d18605121ecf7065af9ee3eS`xA4PKS=PK V (7bf801c083613a14eb8eb9822b289ae3deea74d7`Ą-PKS=Pq](dc4dfe0f81489b5ed47d3aa07fa13a2784b6d23f8Z8V?ȺPKS=POY(fc10aea6b8a1c0b40028e58198bc68d324d15aa9+?'PKS=PU"((178315abb9cbaf27f269672bac6f42121cf55bb9PKS=P?ಽ(6a3b738e2ead5f895f1fa0a38b125c2caf18e38frPKS=PQ$(913c016601c37294c2dbd494c416d4bd0a399264PKS=P+"ؚ(2dcfa86179898664d07b1b7c72d27970921227a6{A3cfPKS=PhY"(fa4188ef1976bea46f728551ada07f57ddaa57bf;(o$ 888`4PKS=P .a(c9cf9c9d77f3c834fbb2b0414afc7ddce4f9b639;ã`pHI QhFxX4@, :444`$PKS=Pڹ~A(edbfa975cbae437163050cd898affaf988ea89beXPKS=P ̮ (14f6ed6e30e2efb8c397bb89a50b8861c0a50979PKS=PH%^(631efa3896d21dc7016d0d096add0ecf2461ccf33PKS=PN(562938a58a6052ca01e65441ef21a144e522e020 PKS=P(a795fce4bc21e85cb3de1f26e199b81e05e46cb8w&PKS=P%%%(82403e9a3c1fb74ef66da182a5fffe46731aa7a7SP PKS=P%#(12b8ed383aa884c83d805ab130bdabeaa2bcacf7;edhbildald>scsKSSC3CKS KK{PKS=P$A(31d2fac9c97a8a22332745d93e80d41fd0cafb96PKS=PBQP(c0c0184000f19289535ef6864fa87c770deedad5PKS=P(558dd27c27ee764045c8e532c3e748acb3a08c11;!PKS=Pew0o(15395c33aa627c384a1c6084618824eed773a4e4UPKS=Pgtk(9a9e56fcead341c3dbb0333764364aac66489571pNPKS=PE% (097402897a2632a089d665433236b8b7d4f89b9c;LPKS=PF (ee4c0c63ed7ec56a51ba3d73c5f1037db878aa02xi#f_PKS=P]0(8dd9115e2ef57b46306581f92b4c2af4d982100b{~PKS=PQ# (293a5ba1d38141f38dfcaac6026ac27f0ecd43ecdPKS=P|E (188ba818f2ac56c72744f50e315525299d1ccbaaٽN0ೝ!Bb d萁7`DCt*}(sGXC%^"Ku"$jqmٗ,zyaUq P{ZHx{:V^*<9ޱ3ҍ7~{1 EU VaX 0U9I|hlj`o5gK!uu]'@vN:B|E}:=5vۍfJ^!d\'PuBvD.e̊DIUks8h/h2ԃ}pbp<봼5tvgD_PKS=P9(4d2216bc6c8db363c99457bec0bae83bd8bec2ca3PKS=Pq (54b36b28ac7d6b9fd1e5a6898517fc4c2f241539VKA~oVM^E(J*QOIGBDe Ju!H@BuuwմOqޯ}}1lǾ.6Ưkk'Y<]_PKS=P (476c42c128f80001f582b6168889e6f54e7ab4e0;﹋,PKS=PcW˃(49734afb15cbdb2cacb46ef7f78f00c86c75de79PKS=P# (9ce7d6b9647519d91879e96827759640efdd9edfkb_PKS=Pi(68ab9ed9e314673e87372c72215bcc525ae2da82[PKS=PQ (221cd760fd63b6efe2d40e58d986c43bd522bf10{0 PKS=P}S?(5a4ac9e47414be4087af37d673d1c79a900683d3+:wnPKS=PH#(1f32ce95d1e142f80bdb905b1ca4cb3ce46c887e[́PKS=P (52a3eea77193ecd0a2fcfa73dedeb84a2fcfb68apa8?PKS=PQN (20243ceca6bd3ff9530973c97f44f2daeabacabfkb?PKS=PTӐ(a2edb3a1db57309b4a522d03fd7a841f1df11f873 PKS=P+] (7504f0d4383d7137c147e45f1bfaca18ac97f4aap??PKS=Pt](0d0abf89c9aba41f77e9a030c1822ee418727d98+Z#PKS=P7(75ff96b1f08d948ea78b8d0823866917c24d87fcİIiTKvPKS=PB5(227e50c6f954f14d4fa116803a0a21035a343b60;sPKS=Pw`(aa6af75e3cc6557a533e8bc2e746633398a443ce[PKS=Pe(4cbaec006fc759132464952c76fbe2067951d9a2`hbPKS=PX)z(3f8a15fa7e0716523af6eec8ad15bb9c831f6d55kbPKS=P8 (22f4f30e2fb931b7f00403fd3c20a1e77d759948oPKS=Pn@o(52955966986131bc4078d975430ae54c25862112~PKS=Pu՚(cd74f9513c624b9a588a7d064e49b43e38493808{ĬΥPKS=POQ (dd3a69810f76a52ae2f57ab7e6bf7e6170a56c9f3PKS=P\ u(a39b50255769815fe1b5dce60dff1722ab3f9bcc.PKS=P(e5324b16ef7238d8f07b86eac81271c7875ef2fecҰPKS=P%g(f0626df2075623681d032d0d9d6fcb5d6656af8ak1#PKS=P<S(acc475db3a642dc0f8f30f25c61e1b8b4cfaa0c5PKS=P,a(b54664965911c6fe91e18cd01b68a75c8183b530 PKS=PG-(9b38f5fd06561162cc2f0421ae4c7aca24334a6cPKS=P\y4@(d15392cf6589465d124c7ee5c9f16a70320226cbQ@ $D=)u1wޕPKS=P9(8c2631887ae7b39a35b219bb8e00508e58f339ab[İPKS=P/(2dba114a12f766569dfcc933913c4735ce4e9ae3_t PKS=P*~(861a62fdca0cca2ce052edff862baa4edc588490[İhPKS=P~.[76(f91f55eb7339a186f9870840af19d37bffbe14d6[hh`}׿3}g?3000?$` נ}  bfPKS=Pw (32d3cfc032c5a08232c366af5205f306daea98833PKS=Pa (f823444b5803645ea2794c21a417354cf4f2cce8f_PKS=P'(7ec180d6760ebb1ef7f1dbcc55390deb587d77a7c{PKS=P(36deef8699fdad1be9216e91438419d1d3679eeb;PKS=P<܂(c4c2c5c82122e60a7824f07a6fba16b15a1c8144bUPKS=PDD (9857d517af09990488e27e87bc5ed7d86f491355[PKS=PJ`(91b57f79449c3a9944f00606aa6a82b50bad5f61{,PKS=P| (96067476cf1b4632a3699b2758d3e38a602f6d6f+b=PKS=PQL(47d61fd9512b417a64b07b8d7c2f76784ec5e2ecXPKS=Phi(0c0b1b04a5c0ac357059c9bacd49249d49dbf3e1T PKS=P#; (9f3eb7b5ffb21bac65848f9a67f9c90dd061c033yA PKS=P(B (e8c2303f67fa03d3e9f736c007d958764d22aa8f0a"&PKS=Psz(becf42740ac3cfb3c5856fe16286c339e53a801d+?+PKS=P(e672526282c3421c793a84b4145c917e3c169c33@  PKS=PE(1e6b7286e92a0c8d7174a60709d300a4aa546d70+?7PKS=Phn (a19bb061dcb60a7727490dd383fa512d4a7f4070[İPKS=P.(a8a4f107c78217a38eab950a64e32e4acc367b2aPKS=P- 9 (af3f788f3fc4b8c5b1a756a5687b0815b92f5ca9{aPKS=PZ(91861108166c6de3fa1da1541224fa79a13247f50 PKS=Pc (03237b4df49331fd9aece72ddd80810c5d25e124kbS2PKS=P (16cdbc76ef49b7f31e4da42c4a796a0702f94e09] PKS=Px (e89298025bbff35f725d45b14bd76c35eb85b1900 PKS=P4(5226033afdd9c14555a197323f7e367b12a1a6cf[PKS=PDU&m(320709bc8aef45bc35cd08b281d670a4f716eb493PKS=P[f(338fb8d054ff64272056d16254ac789dc67c54b1PKS=P(Y(7bf8f7e1de11f80a409d92be132465bd6028d709{=PKS=POD(0f1ded751f4e94a3422b0dc8c426ad238bc1f81f[ L1/B@"&0[ $PKS=P( ;6(9b928a49b01646259e5b66e9b7215d61297904a60a&$,0&0 PKS=P:J (6af96fe46aa0c6c8785ae979d1ce3b54e3c0f353{tzⁿPKS=P&(b3879a06cc60fac28050a5ffa811acde50ff90b0 PKS=Pn(12a108258a021985464cd52b6e660940173d083bWPKS=P(307afda8dca699ed0fd78cdd3df76b0cdb078ea9ɠǨ`yAE\PKS=P[l(7684d37999f7b84632468a9ad6995b0f80695d6f PKS=P@x(fad2cf426af5eb79869c9a8ccf222f32896008ac<(PKS=P (0446d2ec76059a54773d81d3f80aefdb467b5f7e[ L1PKS=PȾB(a29d4a0c29efba3d5aea283bb4ecd59a200b4320;iqPKS=P3(5074d179d9371d9bc92179716e5dc06a549d6b1bd0 PKS=P雦S(5b9072ff57aadc30b6e9e7fed8ecd032f3621b3a{ hC)k`PKS=P# j(c4fcd66f49b9db8025844068ba8a13900c803b56{. PKS=Pf (c6a61c58b4253ea222389cfd96bb7e0519a8b762e KPKS=P!J(01d82aedfe6172e330ec86b6404d3751ad238548PKS=Pρ(ac99133e64b0534d51021cfb0c5c1234827381f0IAPKS=Py}(f046b188b7158256c378a33fd551e2ea3fb9f7f1Ÿ^PKS=P 5(46a82c3b5d30e2b62de044507d21d254e04c8132АPKS=P}G (0619c305f95778890f7c53d1aeedd0f1fdef9de8lbc```PKS=Ps(68e3e99836365417cca18461b4c28460c1687dbaPKS=P%(5ae5229d1bf3b93a86e3550629f4355b0ee388cc;t_PKS=P(6e2e40f41013907d7a57d27414234d8ced6087b2+b|PKS=PQ@(86bdd1abbeee1ca694cadbade2badd0d7f82d175[NPKS=Pn w(6cc66e23b0fb9514d3c1918d4af77e1458491c32+:!PKS=P:L(d9b9c6cde078eb45fcb76cc209c82c91c0791ab6;£|ǀGGaxGـPKS=P|.c(b7fbc6ce0e87fdfa59539b79df0155dd8a5ebf8934PKS=P\ F(48681c49433102a0259e5e3f9089276b1a2c7aafc}PKS=Pp_A (0ddb2e793e5a72cf7cd15e9e029f77bbfd2f23a0??PKS=P (047976b96f6cc3157f997ae03d03e5316c251501kbPKS=P)# (5bffa09664dfbbd57dae386400059824b362b60akbX PKS=P]fN(134c48c1b8d45508cdd2cfe21450505b717fbfe10 Mb```W`0`p`h~ɾÎQQ]]߀߂3/Cj\"?3310$&PxECI4ob1n ``Ԛ0.&6%l.9<vPKS=P ~+(49f517c255905230bd9c0a9973239ebe95107b6c+b(BPKS=Pm(0f355af41f394cb95d92bd08834cad80ec670e52>PKS=P]{(c96e6b322d3e11b7dcb6510d5bcbe0ec4f81e4cdb*(((H(@[0(PKS=P͗%(d3b6de2f7beb0069d99b071f7127021ea89fcbab;{G<cԟQD` x$C'.zPKS=P[l(cfb4191e476f0e9d48898353195eaa29f7abd3e5+PKS=PM&p(9cc604b85b147abf2678e9a33784a690aab0e817; PKS=P(bff9cd3d2942e27ef1abaf545d8b0e0b86603731`PKS=P P #(3ff59598186707992ed95087f41a70a2ee57a6a6{ PKS=PW(fe5dbbcea5ce7e2988b8c69bcfdfde8904aabc1fPKS=PDQ(9f9a9c742ecd2c870957870d66f4e393990a8140]PKS=Pc(a0b10d94a662ec5c1b3fa7864ea6ae74a10f9e630 F(0v\ٗUPKS=P(a333bcf42f963d51f4fb7ca3ed5f4e75ab7e51c0bPKS=Pӹ?(c9d74347026eca85d45b1bf009e9aea7325025d4OlUovݮM+4VC A&zxC7 <4&ʟhB,G!M83ߝ|yvl(IstS(e,[OsYemׯ*;>ΊP)H)o/(ei[_@~GQ6qV|46-Yq%JG-̸ҫEj@gTa(/|){#4CSWL#BKU9FʡyFeF,ݹs@ &5Q Y05 Homdvݞ@4QYRf}3 l ЈrD(a+41HPC}46#DnڬV6yF𴤾 IGR+Ol %c4&i~5O(]}OڵƅòȎ/)I95-Тz )dQM+ƍ!7%^Ofjb8d[=g\ޜY s%\)k\O &\z5%K9b(cծn nwRjVՓТ@9*"sq ty$v^R@L'?S{?!]7KKq3f  q8¯B0Q2XҦ SWjHY]ڔ]}(ͧŝi:wl*-E!mS9g-k/^'{"lEㇶ%^#Oɉ>xsv3ze8Nl8M:v;W[mv (SiǍ-֮ rX}Ѓf2KK,ᐕy5~B;11S=ቛZ3.nGe2\z"/~7_'il[0VL]9J`suq AP*PZz[&{'>\W6{`0*o@sq @@L+!/  S@~66AAIV@N"/.Ho-e+b˿:AT}+"D0(CK+@?NQ@~ ;OS _ 8̀64ffy=􈬪;Oz0}= ۷c$7x דI<Z#iÓtPޯL[H%H\vNH$aOuۛźwn ^?PKS=P)6T(ec52756d7d08e8f5ed0042885497e311298e57be{ ~!1E~BCPKS=P s(7335be088fe0f937e7740d1e7a4c73e378ccb718{̰ PKS=PˡL(332343c9f201925ecdb9117e0b308d42c1d611493PKS=PF (d5daf079c0020941d21bfc9b8d71768474d9ead40PPKS=P ~ (ad044971431ffaecafafe341cc92fd73ad0d20ef[ȦPKS=P/6(b854e7e974980afc2c0e3fcb9a17cd57e24a96a2x4j>PKS=PX(c0980a443e30c663b4d5f63db366ff22a3f189f5PKS=Pwb(395df8f7c51f007019cb30201c49e884b46b92faPKS=PPH(c9f56fbc20b229567690cd1b9e905f2f2c5dec22;ã`xOLPKS=P G,c(bef77460c9b25ee35d3013c8d626d4f4f662144d;,+ PKS=P ;(99c09b2a2aac86f201568292deafd140275e1014+PKS=P+oG(be81dfbf5a5a164cac6c51faf12dae1404ab2ef7PKS=P8A(c4a03739c3eb2980213c29f780fb8d5dab5efff9+PKS=P4H(71c30805f622d14d03cf9bb946172a3279f2e116_)PKS=P(dbaf209eb755ffc000c85f61981e4c374f65af61k2'PKS=P(54d0a8e1474dd8c05782cf93865b2f446700c8f7PKS=Ps&(44af6d9e1845ad4be3a1378c104f4f14168496deSP PPKS=Po(6c47346137697fcad3527247df5f05f915ce8d31paG=  PKS=PIa Y%XCwX:Ǽqk3jU5">IXE~9!1.S+xY͊k3 [!h/:W-qŇg~Cܐj9؇OiQW]6ʲ`} POy]X:}BL}1^S7Y6ff$׷Y C>芇#rriT^>T<װs>HtwӰFW$[Um`)nWl왒&#a%Qb[0JSo"/g~+;GQM=K,+)O q|L}4E(Lddf\o^ǼD;퍊Л8îJMIU:/(k%e>e*Bx1Љ>T^fbl<_%Gx6L& vɏ@6#"Wnu/ ͣS0yX>[+Σq\(-yry*(iˠ~US_JL e)\ D?PKS=PjT(33cdd7708386c22e4465d6cd96be3011d1e40a2cV=hA~3{pq O "I*1i, 2őkO#,$`c[q{5 ^b^Hэ?īN>=2]4JX@[oe3}/PVbl1K+~' ըy?=犴jl~Kg[[*#26?[T'Cy5 sj Z7,1g1~6FfAȂ0~ rjOѺ7pNVf߯Z}4ǐ/^MhUKL&h #1mH^g5|7J?7J߸fMne2X?WJol 6f=zDO~Yím·0HYة( 25[-B]ѫOYk{N"K pͧ+x!OUz)~=Ohd:2cѶc v v,nO=Dpq ,GU,2wAb,FPKS=P?6\(6ebac5cf4a05e25e25b240cb434f78a15866186fXN0>K%&TP1!:2»cc&ga v7u&}$MY?9 qӹz_ ;5,MVz ͥY2{N$kILAD/J&59-,2rORH1Q 2s2q< ?dw5x ~ف ]k3<27¨qzr• XvHÞFEϺPOV=)(oo=#EmoG@]m0L -1KKdŸq`SzV xL%[kFMj3u]Ե@!D `h#^XNLBB.b4,vM9BIX O(pl99!}B-N= rL"ycPKS=P T (01132278f2e36815327289d3ee62127c0a47b0f9{̰ PKS=PTb3(bcde2531168d922da0d24ece5fb8ad577ab9ac0ekb3 PKS=PDfL(1fca8895aaca5f7716135a2e90fdbc065fa2f9ecbc PKS=P; V (33360edd54f1f83a7fd91b8291eaa397d723b418;P$*PKS=P(ce5ebb745e8bd240a2ad318d9ee99c4d8ebaf043+=PKS=PeV)(b292c33eb80f4c0c3228377caba3ef486ec577fc39@A y}AkaaPKS=PD)((66a8257d7b906484b38a29e359375c3762e2fd6e[p;E7>/`P ;;ElM] PKS=Pȇ (d7a1cd2e04b410375494817a8bfa29af67aad8f7[İHKJmME#Q[`q(EA@ PKS=PҼ+(af3c67c154360e47a5dd121029c5367e2a7d03c6{h"PKS=Po(d48f36c8855850ddd4a20a42540e48b1c540e85ba'CPKS=PL1(92d0f5eb7275356bc1537518dbc115c5d45efa9f8ʵzPKS=Pm (39cb5e58a4057d7fc98ac6ad7bbbddfcd27ac14f3PKS=P x((5f4063cea1ef2b6c03d77fac302cea3cf495dd8d1aDb jFIٸ9\IE$kUhT}d|תm7YDDġ*n<`h_gv.oH :;$; 2;`̶P:#13 bV#0~ #L kzW I>=PKS=PgPhn (2963668026eeee4aa393afa1e54cb65f9a2e466aSxPKS=P2N(0868f50177ebc41b59140ca711ed03d1508dee023xPKS=PRf-(394fddc0ef5b8a5430c55273452b1f420058ddc20hPKS=PT(5983ad8f6bfea1deda79409c844f51379c52be2dPKS=P (08997d35d618ed5e6f75289b4ee0da2dd3b1ecb6;p9PKS=PQ_%(abaf39e6fd1bde4451762788bf271649910bcc1f;4}W&&FvhPKS=P (b4b1fd002c9c951e6a374e36aa4dbd23cadbe6cd|PKS=P (7f804b275902988f5fe886469f64cdf9bd71ba22 T̠R6S-;-RzJmJV5MVEJjՎj6!*=K/RH0o3f9νsw;=u *H (p8 %MW0'2ZP'ZnDJxO&\I$+M5iD糮 Z=aaߟC&i@i1 LVGbҒ()I+yjm?-L3jY3Bdvk1UAL\JC5}ۂC8OBїwEKb= +^{ۊ@4吊CUdX[C5qUiE`p.`6vgԾbxE<,XԦ (!L (SĭaEAPAӡMɑk6K(iӜS͞"\"rNb"f QSpq+s[GNᒅPpI(w7tt<^&p>.[X_ х1Rh/j䯑CP-G"D8}iz> $7.Y4/Yu+BjHE1?~Bz\`b\x^!hvfm~!/FhQ7}W N^ܡl^UcQ_6メQI*;UjE;.ZQZgu}qo ҍ TdҾ齢z;mNL|mClbX~_nۦIsMx@pNB^ЩaGo(I(3R7|oӤ}S9mE=dIo>i<f"l{?9ؗf !u?n-|iu_[_-*9MyAi|%RFAG7m\&T)o0ߵI?i3M3*V"Wd8<&xBU8:{͑_&6wk]ՃDEx鲬Pbkz&V!FMuK6y'>[l\yx}w/ 0~Đ.*^. Z_l gntV'sq'֟fG|c?p .?7|yZls*6ʫX|IEѵT+40QԨ_x_hS%{'N]Gܮ 6QC]aC}̼?o欉Z1Ey[ןO.BSE #ޛqze=m<;/|:뻃V0\.a_* }H;7NJUX0X#IK$E\8d$5=S/DhS V DNA[p("^$>Jl%$UW܊4-\a 7H+&.4~렯6. EԣBUvK*(DrhI_']kU(A+Dr"GX$5H+OGB;T`4nxzshiK%j/LDv0}.!Za"p3zY_77.uxIAWv$B/|)d}tcSrd"=f`eQPXLBK,[us]$50QE|^kvdr~Y8 "yOPOC$ 8BDÙ5/QR}]_ ǟY0yAsin4Q]$<.Z$L/%u枃9xzs()z?fw`-[TDVv~Y5 JŽn_kRNɺWS&n[ϟ lRo+׌/958ϱzJ؋;ͫ|#1*f|04 >IeG~JhE^+3Jw~`#A1^!֗ lR7WT7^Oc͉͝p蔟MK>kMvT=q O~IH :5L% }F_Jxmo3,9iB56Ԁr'- kŴT7)/(͠o_((pf˄*"E6~y G5mF@þ {6 Q}!\'h)7=rr;Aꙻ`<ڊ'YHH$FjȚ4DWbeT'c:1&Y7Q>sMa9ΖWT',bVAaO=\NnϪZ4;(CCg3AwW@# ,~->3I^Hc>uq)p!WN4-KYF瞞u͞ab`n- vJi1_9;Z& F4/P@` Qc'?]}h_\ϿMP/oOJDMc"30tO0:mhͪWQsJVa1X Ú*]g{]9uε\쾣};zY=f PF: OD aXR.}Mavђ4 r` cl+{I(xtpےhpX3oIJ\/>.ߩ\ ] Ώ9R&+.DmX~hm[(aX5A0Y_?і9v =i"t99GTu:E]NrP1xr>_7l+] q]/{K}hICE =gG={( z&y4})=Xy8}`(<E/Oﰋr~Inڑޛzˉ%Ǟ^ِ}W2?ߞ2*?~{A[銑.sɚ݊^^Ni 2'}2ǒ5z7`Dz鍨a1bU , ^9v*~ʓ≮>k¡]+=?4ս.>pءE&;[-[65L?{↓퓈Q1GT _4K~;kpX7zG' 頗Ըxm|Ҏ LaK-w׈}?ݺ9fe.OV͉_PnIHaߤw&#?ZvgZSۃIhG7T>66+C/>5hnBC^]W3~4}cBd^ro?4 7_92١Y:S/$/6Eoj'Zw昿}{̾gvQOnՒJƹ޿M}_^_?!w+>G/bΝ|zOk}MAenHjT>nBwkǶ?ӪYdh$zKO0lM*.y;TGAjm?tٮ.7FU3 m8f/pf=}CKѹلƈ^ =0R#o_6jT1C?Z`9-tfx kEeZe]9&b }3Q6K Qz'+rw0>nI l)л?9lcN'[ uNX_['~#]LXq*0}`1Ã;m`]MmҤZWegpSS-eoѬAOivu'(+>4[K/$Ux"Uk_r>Sj&ͤ]n::á~na6uӢ^8:k}(_7`uMq~[TD51_1pHzYxQc1LCN]AhgT"=YE&{${ZY[ZS̬(6)PNOrkg>vXK"W1B DwUlKIVR* 303vf5`g~TL*xtŽlj8b+P"^k-J">Q: Anq ߛvvq*QHc4#\2CHI2_YhX}|R߄8 S&"*,z+imGG60e&t#Y)ⵂ!cqr |6B.= y8[E _zGB=te |HiR>-5s+O39"VPKS=PQF!(3166599ad394235bcc88d00aa99fcc5ba8c3c497((oo pq0]a#CÇ7\ MlZ@i  } 1H/ϸOH?%33 @"3+X M@y#'M@-Anb``ԚpIc˿da a׸ɸYX3&cS3[,F&@"8PKS=P8/(2af9745eca7cc496aeef3fc03e2f938de331ff14?( PKS=P:X(24454a7635a2f264cb2b562cecce643d389ae0cc{ PKS=P&(d637d4a73b8298d4e02c392e393af510a65722afk PKS=P-(42cba3dccbff66296feec8bc4dc40d742bd119553XQ PKS=P#co(0a912c5bb736592d0f65d87b257ae5770309fe4c+_PKS=PmZ(63b078a8f350f4530f0d31c3a7ed5fbf8a6d6f81dZ􈙅Aa PKS=PW!)(c26264fece169e5453fc9007b1bc9d437e11e90f[P(}? PKS=Pb(7f8cd09d91491d64845f3bb62d9de2ec8cf5c785 PKS=PxB(9addbf544119efa4a64223b649750a510f0d463fPKS=P\*(ae318217dff4b1c7584b1dbd03ed1296b916c441İ8PKS=PxS (96dec6300366fb868421bc4b532eb39516f4bb43a! PPKS=P`(185111d498e530a8235cad89089f030b1e9f16be{yPKS=PN(5ab75da7c306bb8b47343ceb66f5a250385a249dZ!PKS=Pba (ad34df7d9d1c39c80c7961ba101bd1f90d7f1aadİ PKS=P̙(4740a8d9147830cd5a32f1ba1fef8642193038990PKS=PCi(6e208164d50eabf1a9d3b622907e0481b2e39f09 { de`PKS=P&|U(dd6795b52f6a11223f9a7f1fb138eddc1ba338eaPKS=Pj{vG(9cb07242860aa9eab4b8d94505030b2171a257cd[İ1CCPKS=PLJ (90a9af4a262a18b2dfa7caf5867f62132e5c51d2{3PKS=Pƽ(fba555d065a98ae45a0406642cf84cb1629464f01 1YLllmlCZz Oe+Z܇q/WUmw4Cic̲Hlb@!y'=1ʧaʅ!5]st@:lwyPKS=PxB (7f86ddf4db764846167cd7b85302a89838344186kbӖXsPKS=PW(e2b2e139aac60c6504cd3ad8d4166b07f9101679{lPKS=P0(08a038dfeefb1c218d15fbd5cb5996c319cf2bd1[PKS=Pیe(09acf66cf63cf821362d6ba09c18e2ff3d3c1a02PKS=Pfs(20fc709eef8540d17dcc41d3ab51ecbe0c9f7d91PKS=PNu(a4cc0406b021967935b67a8f0e0caf742526af90|^PKS=PV{(92301b5e84896d0dffcca8938f6a00fc8fab56ddWk@] 1Ro^t(A*]]:IBFLJ]۱ApI6D?]޽w޽ Fk@ abۃA&$ݷRJbb, 垹noԲbJޕNu@!ܷ"7W^GAˇ}GwZUdZS3MrU>S`t"CCtאFϡi cl|0E&m89r(#ѧ}8PxR`6y2t (MElߦ,C١(]6lZ韰ؓw'0MzBZWS#W%_9lzC8^E6}վɺ"acyQ)2OEzCljq M۶;݋z=6E >sPKS=Px (07fe0f7b961be73842843ceaa735c792aa9040d03GPKS=P)t(c2bc200c0d312639167b76c72cf640c662deb580PKS=P0T^ (b6d332d7c30802b44c29cf0a84c7123deeb1dd35;PKS=P@_f(b677d1b38329687dbbbc2d6347a4e1b13cc1faa736PKS=PbZ(61d1bd6a459bf0b2d7ad647efa1cc718c1540248+z~PKS=PZ( (418a779fdad3932b56e465a2f6766634f8f5c4a1;p#FPKS=P (a0f1490a20d0211c997b44bc357e1972deab8ae3+PKS=PBt/A(94f74d9cf37368aeee00c517f1bcc10127fdd7f2g8?g@PKS=P$ (72dbc3ed541e34e610e1b6d23960dea2934b5ce8fvJPKS=PR (2d7aed54132585cb733491c0b7db7537c8083591;ddPKS=PL{ (c1e7e3977eec23414dc18ef8482c4fbfa991e9b4PKS=Po9* (6afa784262684471254fbc57b00fda8913cab475 PKS=PM(98b0aa590f080137af3b879a9b79ac8f601302ca; `*YB}0 PKS=PSlBr(1dfd235e6867f3755f0ef81d00b5d9bb299b2744 `VPKS=P$(5c838e4a5eeecca2ef01e493db503b43db91673fy]tƨ?d q 'U=PKS=Pjm(56826106dda30a783761ae77e00177b986b90da6c*PKS=Pi݃ (ac0e72ddffad0e1fbb06c46f9b83b144eeb775a3kbXu0HPKS=PQ(af9633081d349ef37c61b014f7e3f59e0a47429b{(PKS=P,(2b7d8b3757151f646b1d50ea54602ec7874d1e23a PKS=POa (e1c1e88138f1023f3dc1a8f35a4c62744ba098b2b~6PKS=P& (1c670111feb07f949387b1e6be27d1b17cfe4f0ckb<PKS=P}a (a95a284c5196fd752daee840e87e0729d24b1e30{ g1YPKS=Pm_(79189d022b4cb6ca17f1c7bc177ce46d0eb6b10c;PKS=PEP -(8398a6793bc1e1199571d8c3bf5495296d109794{LPKS=PĢN0 (a48ea14f0d11dd9e52c3ee6399ef0fa6ef76e77b+b16;PKS=Po?(a4039243ffb02d1a80e0caaf2af8fbbc777a137e_HA;I R: ꠢ*Ѓ/=!bvTԂ!!O"=&Q~ͷ3;+ "| pjрCev!)6G#ZHd 0}m 0T]Ia7%b  +0k:i;IϠ$ xaF%*lx\o83O} wL8ޠʣW1.L[/Kҹ$>?tXl* Rkk R}@ ^Ӫ#IGw{6pr!B6mvxn[pr0~C!qKKB'dK/*l%JHeF[wtftneLy[&A p897 X`Xwؒ!E%&hlX3kҔs8=hF,IG(tҵĠZL-L*SWJ=.Hn_RpR4ѩ2=\n监?>zv HQ9q/0V3-= ]2dQn>m`esFXa2n?lx S0eS%&p8E!jj ϐYAGKzQ1}.6tR0GS51/G ͦ4%콠W,A[,0,}Sa?Lt_K윃sv7/:y(sPJ7!e8"L~:{ wQ[< r|pUuMԏBѷ7cz;IJH83)!~W%[ʏXPKS=P(4478f17899abf6489c2a0f00769d34eb4fac7f433v# jXw PKS=P@@i (effff0de1d8476f76190a15fe64054ef39671e8dPKS=Pm (bb4e35bdaa70a1038025f66672ce4bb17960f715`x PKS=P(1be19aa8d4732624aaf3fa7b5b39471146b5765e[İPKS=P}=q-%(daf1680e61f04c580f0def4b54e86a5b074f84ed`xA%PKS=P<6ڞ(e9e11b1c17c646dffb1288d646fbe5ef25b2c73a- P@|-aX\\"X Fh2M b\\+Q 4mxsG@؎:1S|z[cß=Nsa pUJSdjݮyNDL,=SZ,Rc׾Vv@1!8PK}"?%qm.~vPKS=POJf(3d4bfc87700eef4c4c54a7a9fc9512d338fcb461+bd{~APKS=Pi(506b50e84427539fb09ed00a2b25bbe49c0900b0?nGŇ+D&T" !@R"jA[i 2MRR!i g}a}]/嫴=-qZcrZM0:k?iCۜlW\_!\ ށKx| mGəp40-#]w w70Hmm[Qkr&&€wcͼPjm]316oQ0pDyYn%59c"Yh&:ȗOP;aF2qD0X]|Tk뚜EOF>CݭVӱܭI;DN)ʼ+X_<JX+aYX:0C& %\F0r5xbx,qԶm k5^316l-EəHm(ͧ`(኉0,x,qwPx+R*1 'qD`t`F@ %<>n`ڶZ[LL@ %<>n`;4ֺJSz8FE\16:/Vhə ]_04ت֞S>C g;` ] a R[ۖ|Tk뚜6,ʡ%<>n`ڣviNS-W Χ`+ /qDY8nj.6[㖏%Hm=RTk뚜ց| #ςw70x&;P 5w5|P*aY*}> ~S䄑;;` -j ݊hR[?ں&gbl g) ӿEёw70x,(y@ښ5ͳcЏ u#lku+C. އbu`gOiCq'xAj;(rS0X]m9p58|,_ /mn59@jk=z5Lu&Rm n"#ςw70ƄW@GəHmTjn>Ci"k\X*:Mק&029S37*W;VE> Kx|\4X Z:>< HmZ[4tY;yNZ[LL<[KPblpw=#=fd5MOm<><ܢ^vyv|;: v-rUl;(y@ښ<Ijm]316g¿Ӂr.' aYn  ߍ3l{5 }"'6Nݽ= aeo07=;PKS=PX(813b6e789db60c10e01dd339af6a6724c38da84aZ=oA3crAtBJ"@$$$ ʔt2t.Nww;wx$vdn{]N6v^OOV-g棰dzL *u{ohRT= *g<ɆLxT*=j_,)'E7tEYb'ϞVݑ=芌Ԗ iK3oE;+S_,AB?'[ڝ1i@wvMm5dYIZ 6hVS>P տ=(Z\0Tr"1FCa-!OwL+酡O7 }P3V{gz@r haD ~e5k1:&nm&h&04Q&c!0=y)4QSʀ]kR,-a y Lӎ5GbwuQR8=Qqvw-ٜ60G@+Q $pQ5b:Z<#ٳ $1k֞*M7JƧ*4gw\p J "x*g|z]80#7T)h&ܻv bͳ*nRB;tͼ)2WNnrqƧѵniuqל<;G`7WGnip`׹|ZuKiɫ%^>\ViI!FYKƉmZ pO-U(8,;v8nmMaZvrKk3>=E:M1.NֻU?ܾ;W[ 8s@+93q!gŃ3a${Rqցhm>h4 Ybu=&SQ$loS\s 9ee'z\\l6i5{<.f2zAo&ۛW/Wo{F~-PKS=P~Ԥ (36ffe835e00447fc5c0176b3f0e5458a6347ccd2?PKS=P0(dd1a699dc4b09a8d679ded42f8c6024b98badc380PKS=P6z&5(2505b1b8f7bf5547ae931821b41401787185a8f1S`xAPKS=P4#N(d39710d365bdcdc19895281b78322bb208c6af2c&!!aaPKS=P (3b36c664139608eb2461f31774c8022519e48fecb6PKS=P Q/:(4e7a2f00a11e67c8734a4ae859aa876894d00fd0{E WǠ PKS=P(d16fc973611c0400f28081b51f4712bdbc03e8d3+z~PKS=P6*(f3b5cac51095edf22421557b8550504d9630a9b6PKS=P (9309e4687dcf1b9236deddcf0b511e5240ad09d3[f.PKS=P1(3f1420cd52ae3d7fae233acb21c0947bad9c50ddc:PKS=PVȔ(b6cfa89578c88f338ec75e59fdd67eaba2ef8d5a\PKS=PL(93b413f372ecc84437999bdcadb84885a90f204a{ hF)k`PKS=P񀒔 (758ead29a8c628ae9d597f86a9f0fe1651be3674[PKS=P{ (a822c8081b2708e059f86e03651f4f266e4b5055[p*PKS=Pj~z] 1(2dfe1a0f83a369afd1b0cc6c8fa91b6cd8b53ba1b"%pPKS=P3(aa487b78c3debe4473c3fc6e0f0218340df2ee7bbPKS=PTd(32bf8d6aad9d587d7f8423ae85c42e8b6ac2d225c}PKS=P˖Z!(aadfe4d7fb5a35f6ba5f45111b8407a4d4c87f0c+g(-5(eg4(-(e.8"PKS=P'(22ea1c649c82946aa6e479e1ffd321e4a318b1b0+PKS=P >(14399288503ed6d704025f80c6bb5e0b6afa0e92;d`,&8S,l-PKS=PsH(a159f0f856e7ecbeae1cfb4370887044da0e30e0p ;PKS=PJ (ed4f5872e74144a7ce1da16eaca52ac08bea210fkb1PKS=Pc6K(a1a158de9bf005c68fd03f437f22e7fb004aa82c{Ũ,b6!# n?kPKS=PҁT(d39b286562eff3203a691808fe30010233d6c90a`X&TXPKS=P(afe88da005dc8f6f51de7b37bddd16088357e36cJ1/E ]t(u S8i:CAny!v2 :nwͯ~ #"b;MY}݈pMPl]`QR$mɯ/'bv)@!.҂ #nhRWe`zt5:9|` c !&"5 ,p |%餛됯\5L&EM8ܠǔ]Z6{_{.\uU}\t,Ϣda-A4KYU6FQPKS=P(003655eaac2f8db736c5ce411646d6980914b009+( P"8C @]PKS=PFH](c75b2602bd360a460dc6923af91760273e61b6f3{PKS=P<(ec5c91d3848d2adc41548a19b5179c37138ee6cc_PKS=P3d (c9b583f5e85de9dd35d27544d1aa3d5a61b8eadcY=k@~>$ՔZCӸLic!ЀB =fh:؞BFR]! lZ$Kɉk%}ZUkeVnë"괤酯6EpNZ{]V9]Q[Ώ}予Go=ߏOe١>yP&30XA='{6wBM=";&&,Bž80lMtCeǞT6iAxl`kmtZ;'bͳD"Gz4>y|V<^lBe?M}JP}wH7Rih0>P@FV"i@uB>I4%倘1)F$& PKS=P(fecdee61b6bee995f234e802fec0d8536b529500```5`W`PKS=P^/xݞ(d970cabc832b32550245839970286a8e0458e419cY@ IW 0@#te #+"(aa87e4a99c9e7d14f61391edb6ee0c35dc40ebd3[ 7ń.@GPKS=P#(e84c936ce61a692fcc5a402b3b9b733592ba0b67 PKS=P)h)(6517d17ab35755a44d2185fbb89ff8033e19bce3OhULVL贡f6vL^*顇=D-H\M@)-R]/69yS`h - Bc|3MRMf'o7vͰ3{ K֩׾d*}?%JOBimyQ$o]r5mInMX7Ne'-͹ 7n=f=?OݟΗJ,XRʚ ,(o\u3sǞ"#$7AR:Ը <>UJ $*Om66_$ eE4Sfmn\Tu}&]ɸ=W'(3Lg{Tvr\5֮}|;1=-| apsұ_5̟w,th^u(6i+`/\x/ut,wLsDȭ{R+u٪:RUgLu/ 6+ڼ?xVK$ezzKLXXf2T>dhO##$OBu}+x&pcԝWp4Cv4(jْݎٔQ Vk+k|{P2YY9k65YE "uܫGEF[MyS_*ttQJMr\4PBe+qU#~^fcձWLbFlomժgX"~r^@?|͜ *dz30i!S ×jBu:_ꫮoqZ>ZYyt֏}4QRUFVAӻ&J{ c-n0rOM>z<`N]ilऋ.HNRVUJQ%ӏT>]e'ʰIۣ;W/8VOާ`}V7Q,[4G3R{dq3?wY zn%,O>AѰCAZlT*alhNoھJzIXZ=v `vk`@Ǹ}jNpXV'~'MwRo2)6r"%[Хm]U[MeM}aTT-*S;c*J՘RQT!;jmVD55PU\%ҝǙd?x|]Woxy~ A et|]K];#d4R繲1Ј\݈@Uw_:.n'b i 暪#.X @7Pzs?rPN t+. P+!*]Јwo@ ˊzW6̤1Ďx c Psԑ˪wS&p8삕t0/N+(UVj~.1T$c1DŞ<>]#fBiht+.fseL܌./hF *pu-.xkQ+('}HvA#d7b eU1ZB<51Y#`%v4@Ez*XW7F@#1ȲQ-& ];n4"<_!B9֢+Ѝ.`CĎxbHvA#y,+*^u3ư;"yH ЀeUOkq)\Z8AvJhtcUK"*߈~&& ,|-)ưU(]]ntgx3r\Σ+ ]^Ј~Yq$1T$lBc >uǺ@օ.X LLDA<1}tPKS=P]՘d(6354febcefda9de468327cfb981d5a345df6bb79kbPKS=Pf(2f49fc2719fa4749deea24a84a10a919b7df7d97+b(_ PKS=P= (999c60bf5271d015008c1c48b845719a6cb48559 PKS=P^f (b8e250b68ce6a749edb980b383b86fcd7aa26de6[İVPKS=P|(62258d6694e3c1297d9c60dc219db36475773ca6;$PKS=P*((bbe91f6eac4f52a9e97a227e29380db6586fb968kbc8QPKS=P\ <(937fd04f7ca8126fca38265690e33f9573014d05[İ&A#PKS=P2% (3df2062023a6e78cf5c62c39d6ae3e5a957eeed6DLPKS=PW (61e1d004735c5fc18c9a24710570bc6143ee26273PKS=Px*(320e70db43d8201a84e7cb07d6b2aa5d8d32a388 PKS=P&(10868f9ba360e007657fb0dfc83c67b83c904fe7bPKS=P_Fc[(4aa82d7984ea147d31a8d032ca6b68c50e3bda82[y`PKS=P|"(ac87e016f608fd6289ff3f9333bb7c95aa722403RIPKS=Pכ,0(b57988486cb47ec1182165506dbde6b2db6f8cf8bPKS=PO (5a20f6b453c7a4b7a00d87a35effb69d3ec80d4b0PKS=P .LT(a22497b03f957a63e57caf07c4a98c04add84bf6;p#.0@(l6 PKS=Pca (d6177c3f5a09ba2f574f7b3a9a188da7e2f634b6PKS=P4(f16824075c42f07011e6d35ac78e6dee6866bae7+b(gPKS=Pp(68430f2296b868bdcb589794f29d8a2a0608b9f5j PKS=P.(d72b0d43bb8ee1d7e40ee2312ce11e73d2315c42;y瀘 PKS=PL *j(d9b7abaf52bc8a875e1ff078aceddce9d1548555kb/PKS=P(3644b8861a130ea479acbdbcf07f77dcb11056485PKS=P~(e5dc0d414ce7dc334d19fc3ca66d8e4d4272b8cdc4PKS=PQ (1c99f9535da804e43c04a5ff0e1482496e5a9b33[İh ;PKS=PMj (497dfc9651e081a82a90b73f47c4a1dd3f9d8fe0_?PKS=P9(623c8751ef4c7c81f86e3ad98fc4dc59568f277b{zPKS=Pxp (2b01eb933c806edd78dea49ddaf79c98acdf0fb3ŸPKS=P(9a94406d12bcfaddb61aed44d1e4a63c7904b4ca3`PPKS=P3uJ(ff3fd21db4964baa70b27a79500fe33e2593eabc|PKS=Pڢ(6b800002da0dcac0ab1c8befee5d44be547980e0[PKS=PMJl(a148f6d8cf9af6d0a8937405982b6ec85defbc0f{YPKS=P4Ճ(3098a28afcbc49492b6863cef6d588f50d1db499```P``0``peX' +1 2!TCC# Pa/X Dc@[W3/ϰÎ3 F f12tq0|x YC_@34e4%;IL`MP<* T(4da9af5b87f312c567105027921794e05867933e[ +PKS=P2N (98e181f161fff899d1c30e0afb9c15bf5d46a15e;ƭ"IPKS=PgJ(2fd1e4bb0ed67bbbbd09cc6838ec4ec30578955e[b PKS=P(be4881a8cad6f9a3863477e3a6535fb51e526485İIPKS=PZ(bbea897083f01a2accea9782cae73805badf7524 `PKS=P _B (873222b29f245fd4edef10959060b33c6cd35789ưaPKS=P2(4cc3a39ce93e5436827c8445b0c7a76272cc7d4a;ĥgPKS=PG(0148da356a7120c5500ff1ab6ac4879ff9009066+?IPKS=P!T24(65e1f5c588eee7a80185fc395051111bfaccf6e6`p@tFF#.F.[M,\@U`PKS=Pa>{(9dafe940e74b4a3a8b5383360f226bea08c6a21d+*P0+/00!q@$[Lz -%~. 6 ׽{ PKS=P^ا(da0e0d7ce6bbf7d1d36eb59f50fd83ea9bd58450PKS=P9y(087940c4156a7c3bcd4beaa03b657058d2009b960PKS=Pxi(c0403efbfb8af1c948fb52cf68379e3288307017{zPKS=PtU(d55efbdb687da5bdb9ec92fc8d4eebb2a0ca33da8oPKS=Pes (02487239abc31ac04ea2a54f74cf5a90d7bbad270АPKS=Pb?(1d5906aa7de6e483d18bce07147c97e23bf2073f{-bŽ *PKS=Pv(8f972c621dddb3a59ba9ceee774f4630ef02b2a5kb4PKS=Pe^n(655788646a397c967533daad1cda14c7dd898dc3t?PKS=PA2(6004224ce2343bb0d8c814ce5e3400c6c3ee51b0РPKS=P+K(a9a5feb40f9cf793d37788337b7a5e643e0e4944 PKS=PQD (1991a9d8a568f24ef3c0e3021e0666cfeb58df43kbcQ)PKS=Ppa(5bc8185ad6390e1df9bd63b235f83d137fb0a5283PKS=P> (938e3346d9e44a61d4aeacc94005a8bc95efc856[PKS=P(c77bed234487aa2cf95e30ffbffad6bc4116e949#PKS=PC_(34774e5d1d997d51eb02cf1d81d47b44a708946d,q PKS=Py{<(b1dc2fca4339a8578057fd5dc57052b92e6b1e4e{ż#PKS=Puq(7523cd920e3e4203b12730606f0f37e51e2ac6ceĸPKS=P!6(9861866f6fe9ad66ba245df7cbec9dc1ed121658{tܙ3PKS=Pݛ(650ed08cae2505530050f88bacfffdceec08d80az~PKS=P*(B(7233bac232eb2d71d43de9961479708f4cf79bed1jA&A9CXIM9x=FIR!6H'1)WY7e'~Ϣ~DwMIn$x𷗦e?4)eGhmu]Ŧ&rv/KgP"@puG @S4^OGN Q~f× ڨhq}PKS=P|+ (e0d01f90ec82cbe19c44a1317ef277bb4b7d7836;ĸ##PKS=Pi(9cb46929bec421ce528502ec6eb195c91855da60{<PKS=PV|X (595d3aea3f93b9f50f16393927572c0bec43e81fqZPKS=PQ (593b26c8e3becb5915d52ec0a4557f35752638f7hxPKS=PX(2ee5a68af388a9c78236b9c36c53c941c8f66dc8{PKS=PCy(6428dce72e0a57dbf5e76b8bda3dd5e4412f0fd50PKS=PI #(739b8bafa8195467ae0d7cd405fd8d5b2748ecaeĦ hIqPKS=PBM(d3433794224b63a48bd78307f83727e56d39cb670PKS=PJ1(6b3486cb853a6c063b34840011182e3bdf30ab37PKS=P̌le(09ff595d46a1c0c14c69ab15f4b8d6b32e9de14dPKS=Pt (bc485c469763e43697e9635bf1e239ac5881c117APKS=P+ (f54a7b9f320f12b26bbe4a0214ed17b6d8c57d6cxPKS=PuU(86a9b77d427f3365a2a05d347b98f93111748242`h``WX˨ѯkQfzߗ?< V$r?]3Ά"F*&FQ.B- )w0`0%(t&L,^0`RʜX$! kf2Qd!i|W26L=/&f? <v1~r"!f.!?(*e>D53;f Ln134IphTHp+5sZp7\ܙ ̙o0O`X%:n`Vb ?o毌5?ScÂ/PKS=P)IS(018bb902ba2f6ea7f37b7278accf6aa04e86d76d/~PKS=P;0 (249ed8cacf536966be36619f2d8b24589eabc552]0PKS=P҉A (d96ebe7f38b8abbcb2e37ef2c43dc83d412c791d3\PKS=PL}(0e4b56b45d2b28d04fc2677175182d44dd8227a7{ PKS=PT (5409b39c13324ba4aeddf597f1d7dbf8a90a7113{ 3PKS=P(a129eff4793cc020342fae86d2dd28942aa4159dPKS=P (166670119e67c42214e6e70dac978730403256df;=PKS=PB(6874c27c18d74d2f4a062cad4ea481ce7b69befa{ PKS=PKʧ@(6ebceba2cc2d3793372272aa828d6563dd097b52PKS=Pt (a046429406900470d10d7ab208a7cd71b8c95f17PKS=P& (2b9cde9b49f460ed65e23cc17e37e9caa62d4679kbSPKS=P=~r (c85ec95afd9683360c8800b11f7335b391b8f984yPKS=PFz (a97c70ca44d38c4cdf8f6a8d52caa37bf4e7f704;k`PKS=P9O(a14d45a3dbc69ec0c73220e880478219f4342f3fPKS=Pu (0554abba54fec2376856189157b939195751a5e8{3PKS=P (c5ac5bc60d683a4ff4b37f6c87b024518a265522;ŠPKS=P#}(e3e795b4cd51c09cedad7a911f92c60adca886a5_~PKS=P12(48310611e0a0ea5ee753ba34a54bcdbce2b78d33bc` J PKS=PJX (973aa2af55e2be727fab1fabce4352dfc8a46ed5LPKS=PS6(437fd8ce17cb49b5d5de875bd4154dbda42f598b+b(~PKS=Py(fb1fc4cc03cba936cb0f6ab088faf62befd162f3xģPKS=PҚ;(078b3c9104a5e1bf9359d4cb544b672835d0455f``PKS=P =[(4ae76da31859e2c15b2b9479a877c8a03a3327ca;zPKS=P6=(ed838a6d0db7a4cf5be1d58663a3c9e585f7a01a+bPKS=PeK6 *(ed7cce051e223d4542e175dd46014134b54b3393[İ/ePKS=P'-9(1454926f20e0837ce1786239e4034ab909133567((1p10bQC(HȂJCIlZ@JEC_@ _y]l ?~ʿda߀߂h/#?3310$y"A 5.+X L ̫X ,9X o pAi#,F.66o9d@\":ZPKS=Ps!(e3b7c05a9fafa62a19859bdffec1bb0a601d5bd8İ PKS=Pa(87e6adb160a857488255f6f114a74e6a98c83bf8kbdu `PKS=Pn;J(5e6fd0d5e1f74187cfa141ec3f9a7eb72af55058&PKS=Pو (4c6c38e2f70f356e629b111f08a9c47e76abb0d0PKS=PA| (70e383e1e56038c70c90ab0d42a8c07b86d90e96y PKS=P QN (9e6b7a0d37fe2fad512c0c88eb466d25fecb6d91Ÿ~PKS=P-(0737f18fe0cd4f8faca94798f666874fee3f77093rPKS=P(c4f922152f80a58513278759accf7d3a8450dee6{İPKS=P(45b0491239780cb86d4b52768aeb06722994f225{ HX PKS=PJ!(f437459b8ae3044a8e51649bbe7fc5a71a343eb8khPKS=PU(a3dfc0c77acade0ee48dcc73e795a597d0270a73`PKS=P`(00fb2ff451c5314114955fcb34262ab09d96ce56kbS縟PKS=P D (dc62c5dde6c7fea0a593bd8d2e4fde5447d2ffefPKS=Ph(ece1197d56f2420c2e3f7a101096dfe9eb23fa8dpPKS=P² (325871cc42178730170f62d3a52495aeed22bc35PKS=P_C(d84451838595f2a51d20a36b424eb235bfab21bf<f&F~pB71i `*U6R%PDKwqPKS=PިY(101390d20a8a66718b52cdeac55334b4c53db3f13`PKS=Pam: (8f7de639b2cada43b548ed9d887e14892c96f803[8PKS=P-0C(cf7a7e3d0993d2387e6522640e2e954cd7ea6fdd$/+{`YY eX$/ GG@?PKS=P0 (afca042cdbc3aa38ce157025b8f0213a934ee14c[4aөl\LPKS=P"(6735cca6f8f05c5d3f750129636759c6accb0c4aӐ%@ 0GbPKS=P$ (5a9efbb757586ce022a03ea17278787d2746f2981`0PKS=PL(af65f8f415b2627c2119e51bacb90a0f39913b55X@QсPIPKS=P<(738f834adb32e1d07b06b26e50438839fed1c7f2kb PKS=Pf%_1(6ee4b892035dc38b342c01a4cc979fde94c53fa9 0 D~0+d fCTB@blY՗N[֥"y֒EXGVܟh}hdMi$^}F,dNx>J"\.x-BG$GlI.]^AK#r{.dOaI~7JƆ0J>bWYb9,,g^ptWNm^u^6WВ= 7F7W6UM^PKS=Pk(eedb68bb0de77d3311701cecd81018fe5c427157kb7PKS=P (21c033fd0e0cf28e7889d16c50293623005bf16fPKS=P;n(b8815ccdcd9af089051090c817253cddce8074cab[PKS=P,F(60b9be2e6dbc24d3d2e35858e60b9640efca6f46+``aYLPKS=P"+(5f0aa2e37d6b9d27a29db9ffa038781f07b7c7430k@PKS=P,(3898f220aa82feed71856b45de07fbd6fdd95999+b\PKS=Pq!(faa152671fec0dd0336870c7d89bd505d1001cac2PKS=P(e814368e7c84e70de848e7156c7caeb6dfcd5f8b``P``0``pe  C'@$Ha?#{#ɐE  ش8j80x444|ƀƆ_?3c0a$FY ]ll p141mbS` 1d1_PKS=P0|(ae9aeeecd4a1944f96b039bc76e01bf3488e6c7a[İ3]`PKS=P'(1f032cc30a9964fd82baedc27bc3fbfba58eefdddZ H3 (A PKS=PFaB/(023f3a82646809d9862756ad24a1961c0117a57e}PKS=Pe9(8952e817bc1bbc44b4e7771d12a67457ab936ce8(ĬPKS=PG\(c9de7edc51d3f599f38253c6effaad108281a2ddkbSPKS=PB0b(ecf34eb1c2bc7ad45bcd1f651ecd31ad5b201b6f;pIHH@$PKS=P5(a63d0682d4f79e2c7aff2bf1149d488d8e70dd10PKS=Pe(d1d25603628f2dcf15485b20552e226655cbdb26Xq FbPKS=PjW(ba48f8ad5366e1e1ec07fc7a99b7c32ef80ff5aa PKS=PYj(980d75af206153f6318da5b06928d15928113126+z~PKS=P}VW(3b0c434c1bc8568aaf0ee65acffbb1d76148ac54 P E8Rt`PKS=Px<(56e34615da8a9260deb7a3ab067d0c0e496d4363hlجPKS=P(38651cf55839a6411e23c2365ff16670ce8e113e{PKS=PkzZS(e75ea6567dd13ca458858942ac52d28c9142db27+~PKS=Pt (e6fdc7be984329150f100d511b4d58686da12c6bp&gPKS=P8"(97ce88a0f19ee5bec346a68b8d45745cd9891444]MhAfncfŃ^ JP-j,ATCK{(Ux*lNRADAGZZm:&&MҺiv۝ח|M;m.R9ftx|ђM[Mm]fGjb+HxXi=kM&<+dm֠WwqVظdZﺟ7ģܸAHIQ"Vad\v.LSVD 駭9:+ɕ_ '^Yzvq0N\5g -Faȡ2cyT4:鄲\5%wČ݅mg`{(vzD|Q1o7Ba(e-$uR+.dq5.IE߈ *JLA["WP4@`Wv]< O{WyzL-c3"e<HLa;J|9Z39(۲WNV&e@7+y|3[34͊TIuYt2 (3:]!YS58?9gEw1P9BLQb6~TIN|8 }#Ƿ+11c9UL! &+G׮F|_̳oNo  +0W+KoJի]Pb袩'₻pR<טX7<5Pl 8- \<5'IA4՘ܪ[@Z$l*L)25S +}1,˔bkSBo`ư |xĬiGnkcMK$tCAΈOH4. h=Yv$X3v1c-uYiADJf Xga%K:$.?&/h FՏ3/PKS=Po(0c29145c303af48b0bb32fb6a0751db6d7a235fcPKS=Pg(37e43db826efd8bc33e209f9e7010f3625f56cfb~PKS=P[b(a3734a8a923e51310325c4241d30c6d0d4f64343/?/`APKS=PT|(fa52b8217a4076f64b46cecf9f3992d0edbf303fohesɚkjp=i٘ &6P82J[^ᐽQbNVT C)vo8hqhK?Is鵗Ot~wwi.<+O)_*[GV8ɪ}\`8}66FQSԤ_EX99ߎ\s>4%zrٹˊwVɱfL/nXYޜߌ5 r:o)~h~b4g3J:8 *ae5`K\}(ZWx<s r e'K;'Iu'q|('NlqC܏r{f>I͈5>Li%*Q{{raUNf=(h JXE Y8kp]jxlPշOގ؟ixZ5ii% 3Lp~,I}ʹHK!m8ԧ)gAn\\u=ɽ%R|mK 0v)㯜 wiQԣJneoFёQƜH#"#;(܇X3܌֎t 4T! tsP Luȥ;t2 Đ|߸^2bo;5}P<7$7~*Jy{v=I^3z @tbPЏc X1ocMX6eg8u]\7uݪI7!ZFIj74:k^,mXY4SmZ?PKS=PD@ (d6e49e36f3e5d29b2289d67e9c7fc2902ed14bf9p 88.!PKS=PU(957a7b39e363369692b341bcaac266cbca7c7f9f{PKS=P! (78ec3ef6899d982aaa513b53bba587c8c0db644cmPKS=P_(559753dad8183048ae135f753199dfa60f381756!`qQ`PKS=Pב{(548986497f5d90cf51a2cc30a2c39185656d6149+bHPKS=P2(e175d7db97e7cce682cd4821bd59009dd11e747d0k!PKS=P)*@(28e85ad53d94d285950cdd797d8b52bfe9834ea3`0AA׀PKS=P4(b8200966db47046989abf8ca253a62c7fe4be798`ÐϠp#PKS=P#m (dc4cc4cf3b2d8be5fc74853fa2fc50df7eb83effSPPVfPKS=P (e7515d9db96fd589a31f15b6c58b0c6411b59ecbPKS=PJo(7337070e10ba097f10dfe76fe7e2401a4e4acbc4pPKS=PS(47866b10414c7b5cbeeb5af11b0cef74347cbcafT$. E PKS=PMQ)'j(3137c8f6b32055d9fe8ede7f6c2d6abe3d75d089{$3  @43j)S #> PKS=Pi2 (542bd3d92f83854980352a62c7c8e1edd2ccc039UPKS=PJ3(e448c9355f502a6da64afdcaa9226f723115ad09`I0` Uif`130U 1041q1p0Lb)``d c+ yv Lf12tq0|x5EC_@bA@=@Zo)04ԸD~fA3`W1w(b1202b1`Q(z?3 }*y_A_C4=Qp(.PKS=P=/ (b96f28802bbb4ee2b147715d14665fcc509600e4İi"v3xwH Cṭ) ?AC12PKS=P(97cfe6c5fe93c753585e668ff3df1ee5b1cf53ffPKS=P;0(c500f555e0291857b50bfd75d8f8f5d65d11726b[İPKS=P2)(345cdd09426e366280d230cdbd9ab954e6e51e3eЀ  HPKS=Pդ (9c8e06af11d416d77afd691572b38fb85676edd1@ PKS=P8 J(090a9309841c5287866b57363c4fa4f02889da2a_tҿW{xPKS=P̣ (940615cd19061aba3b42a8b584d3cc5e387e0120kbS_:PKS=P2> (cef9a77808fc18933be712bcb9f7bb5848b874cd;ȡ PKS=P˾(dfc60028b1ea3c1f170321cc99d93e9591efc958((, p:D2PKS=P/>}(1f29488b86b6ee9a90158031b2a30dfb2abd3176cPKS=Pö (45b5712d0987d27553eee30ce4450f1c5c7c47faPKS=P_ (93869573a68f7dedfeb1000374164bd77a82e2fb PKS=P쀏q(80d2d68994b338298695c08fe0e58b21fa2f5746;?SPKS=Pw(a9e8579edaaf634262d6005e3df1f92532ea84ea PKS=PRe?(85a887aad8781c4d2c446a4910e59f1850fa374b+PKS=P()(241c9fc3f51a69a5b463d7c7eea6af8ef87d097a;`+ PKS=Pq^P(c75c3c69716981bb2e1fce26bf352ed966e10192PKS=P (b3fdd06946b756df0165ceac5013fd53fb22266e;Ħ&PKS=P22(75075308edb2e18e29778135f84ea4df1bca7d0d.@!!qPKS=PG& (62202ff91042c3a186d8ff4ccefb48b6310434e6{d(90e0f7c0969dfd39f4f71efcc968754e322ab1b6{hPKS=Pd(cb00e8058ae46a7c6b20a5046f41e3e86bb59163̤.`jIv\rϮPKS=P6 (738baad5d2b20bf0633aa656702f389fa56badf80i#fRPKS=Ps- (b4853bab084d540f96678f8f6f534ba307cdca8aPKS=P g(531a1ad8f3bd777a54335f52521e3d6da31f1ec7kbcPKS=P~x (d02e27f986f33edbaec20325df404202dcf6172b3PKS=P=(6e354f8e51a2ce887bd96b49a4264801282f0f83PKS=PzT(a2d396cbbd7d17bc9252dc12ce14a15301a8414f;ph!PKS=P+Ҙ(a472cfdbd1835d4d6804ada3fb5e6bfe0551f20d{ PKS=P-Y%(6c44eb8676753cf4d3e61b963893a470c801d1dc; ~F .PKS=P]fGY (890354a6f7cfb0d5a177714d995144102f06c9bb0aEva >j7. =nGv@v4.D53J=T>5pMqC\HDPKS=P t(38b9ba18a0c1550137499a60ac079d7f2919bffd+PKS=PU] (df0ae3e9d43c97778297e6967944bf290c6c53f5`PĦ PKS=PC. (71a880c6b0bce144512be495b1d25595dc263fb0ύPKS=P"T(f16d078f466eb3c5118c8273925e75da52898fcecݤpPKS=Pޕ(5ed2d90efaf1e86349efbe12c59f154f5c76e564]PKS=Pt^#X(7bbb99b10ee9fe1755e995191de0362931fcd72d b1W$9 @PKS=P>(5d477ecd967a07bcccc9ec10405a8074c3407dd7krPKS=P?"6 (f01946684d5bf50252113d39fc579af81bd47072{PKS=PÌk(598ebc70d57bda33378490345d822b0d7eeb86ca`PKS=Pȿ(1fd84ee194e791783a7f18f0a6deab8efe05fc04ۡPKS=P""(d7d967695f7ff2b9c13343b734ea5aaeeb6e0e13{Ĩ3 0a@03PKS=P0W (54cccc20b352358724474d125bc4e30e12212695İ bfPKS=Pa,(45264dbbde073c4fe2e4ffe71a75f2d4925bbbcbż?3PKS=PZ(be8bb89b2d2119b2e0f6449adb6dd6b4b6fdc69c9PKS=P.%"%(214f56bd087348528484d34120e3018e513d25b2`pNbȑ fV (PKS=PE(e53b44385b03d72ffe25ebdbf9ba9fb03f196ceb+b/PKS=Pq(437a354fc8c0b9fe89fcb1d1e3462c0b82084d40+[PKS=P>(8acea7f2c4155241c7bca418705fbdfff23459f1ŨPKS=P@͚F(f302b8f8f95ac42cff7c3e4c394f7fa5f69da6cb{i0) PKS=P(cf38c2b48338e7ac351e9def0103e171c5feb38f+bPKS=P4(dbbdadd4eb745e3564312225a40bb3b804cf3ac0;PKS=PU9(1e8613544eb9ec01e48d73b949565847c9413521[İ,PKS=P`w1"(5a7015febcc62013f72774943d38866bf0b7fcfab*@Z`ZyPKS=PP(9be082a0c2ca1b273e301a00c45e824361bd27e3PKS=Pe(47143ce31e3be5d28a2c418337c9c96f17d448e6oPKS=Pۺ9(bb1816ec2ac4a60dd3370cafefd6e12e1a3fcc10&$M 03PKS=Pj1(3db57d77661b1a8fa6232770998ceed066b31243~PKS=P'(ad77b83375be86c5cbe6d407ad068ad1284136b7:Ѱ??PKS=PA r(de9503c9d93d2f538e4739d7a9338d1173e83c83An1"?H£s慑8[˸<-Vhsן=/ۺ4| <2-qϳ5s ߠ1d*n'TT7z @Em dlX| @EmL͗V !xT,L 2[yeX| @Em @|ݸHUT9;PKS=Pvc(d5bd66377778dec6a309d1b6b4c588fe1674b385cTPKS=P9t (30e546fd38991739f1b0b1279383c0703d11762a+PKS=Pa (7fc93ab495b315e875d81c709116082f422d134e3PKS=PJ(22343319539b482b2ac98b21f1636735ba5f8967xsPKS=Pdew(6fbb8817216a3222b338c972442fdcf63017a1cecdPKS=Pv (001480ec1a4247c124b923a342951bbd98cb1007PKS=P6 (057581abfc9fb32f31557e931a25179a7f11a49akbbTubPKS=PT (5f9161ebffe11bf24011e0494e11328f777de0a2OhUn6?cHmHm0A UۛAsA,I+`zӛ ZK-9A- 9")Ӛ4yl7ۙ7׺}n-9_bCgea\~s M|ʖ?dg+W+J2|o+;W=F;;$F }x4fGg ΤXލrg'_wyg37E8P}̊}lɾ\s:m%Fa R6=/  ,5V/7;h;R.oZ}f>?W*#lU*|_oK*-/yQ@؃kDkI})!)\@}@)j\Bg2uh*zj!U%:lկ4xAݠٛIDXf=zя@~V|TE::x&݋Saglמ,F?{??]|Y\#{6f9> nЬK?}[ћ|Q?&_VGN9ю?v`AI%8'A<}8!PeR! N=Sx,6?Ԛ2[||ɡ&zL > 6}VH A0,H1け +bxp5H#]6F*$HUäjʐbU ?2P!$Hq %$H=H $@ Ӻ$SOWOc c8WKdE$ ?r&zL > 6ePդQjL k}x"Pf7 $(J&QfM43fdY-Ӈɛ>"5d`}E)Ӈa{WJrw?ROVldcN3Dz|u{ QS5!E a/#O4{`JfX-9e(m|F5f̘iqP S!~ʯMcOLPUctu(^nc hQ@9QYAݢͰ(mS[0 (sʮ1(=Q6l*4kͤ1Di]{E)Ӈa{Wҩ9` 3뵐m] ._{s)PT&j&͌juu5ڼsI?ӢZ3gOJ̷k;߶kͬ*A>Ҝr;ի o]?ڬ<3Qwqw+qϠPKS=P(ce15793a64604a6389000b5a70efb04de37755d9{|=PKS=PX(3fdbcb0f0d5d011f2e6a7b8a7187dc8eb162187b~PKS=P{#(b379f5f39108e0a270e5a5a32b78a1ad64c2f242;ĨdPfPKS=Pst '(2976766296b20f0999bc284bef2c1b4b5b1670a1[İ&AXPKS=P7J (3212d72b4352f9226d26a077c72af81d980f803e[İy #f(PKS=PPek (9d415f3f0daaf5a7f670d51c55428f7271e526773PKS=PzY>(22eedf70a6d8f798c2ee8b4bc9174535f4ea5024``W``3`t0 5.G"ϟw 3_Pbh`hR"M9X -~w0jMbdbD&L/L O0k]bfhbSh%3*44 hl]l~puMb hP@` 5`fh4ѣ5D/}PKS=P?9@ (c5903948b50eebf9613b0042fd5f9b881b82cfdbɴHŊAa@#f.F9w(`w$g- =PKS=P%(8e2fa8e5250cec10694e9d44539b2ea0decc6b39Ũ$èchd\U P#$PKS=Pj8(6af56f656a608582b6e45cff8527964824e0998ecPKS=P';(fbecd29d2d422e7a754ea76e4385e4addef3bb06;PKS=Pp -(989b07231468f4b8f4226e01ba39e0fa0f803688{̰ zČPKS=P]{(d7ba074cad9670508e45232cf96b7c8850234fdaPKS=PM(241f87f4c3566bad64d0359fd3a3ac4052873843[̸ PKS=Px!(26cc693ec6546ad5346fae2188e82be80604308a;0acPKS=P=? (3868508a7596867b0e50defc79cf0db92208dce1wPKS=P}@(e6219284a3818d23396ee077a80c9f0bd3b72d02mmMPUTk Yl%PKS=PIrD (33bd27d8c59ee8cf4ba8e194a3fce215c6f06f548ePKS=P 9&(33578325ecb0d49c8f11804eee1c31fd8781c128{Ũ,11PKS=P452(7157302a0b7e82b128f3fb0460171c0ad6d4b0610֐Sp`Ħ"%k`c_PKS=PP (c987ca951c58cb68dedceba12ea671b86890d392PKS=Po3 (7f3205500ee5c3cfb7ecd3b698eef2a73818f2943o PKS=P]\% (27b5c3a90e4c7492f4edf76e59525629086ff8c6q#PKS=PS?(b6603192d18c1e03c145389c4e2c6b359d72eb68x=PKS=P' (b484aaf4dc773881daade9af2c8c625b0fb629f9 PKS=P^U (a0724379a35ce80c37d23434bdaaa18d5ff4908c?-PKS=P-(3cf549454a7253f742b018a64697ff148788610fX\PKS=P<n 3(e5db48823d8ba092332877a40bf32069a55a9720[İ&APKS=Phb(8d7c6d8679c503a66bac3bc0d81a1a3397b92695PKS=P!9 (de977f84aab7ce3d9b78f99f7fecd13fb85d674c8P!~PKS=PiP (59f45b94a645bcfc6381730fc74aa36edd58444b3߁PKS=P@n(fd2ccd185c92cc4d83418b5d8f7cdf3bb3d2ecead PKS=P]T (efc18756bafbef7a038b369c36e0881d8a003df6PKS=PY' (07e60a230f8543aef21caded81ad64eea7ccb320Ӹ PKS=P(6933178a61c4236b52ace847017b5d889823cddb[=PKS=P3 (f440216b00ff20c8d35824abefe1478ecb66ca73lhPKS=P9(2911072a56e57a0ca88e10eaa1df0d576891b46234PKS=P#(722a8ead2d536bfb715ca51c3e14923cd37828eb PKS=Ps4X(1f84056aad79ad2263ac2c3618aa497c23a8bacfXpR=PKS=Pr8 (cf4ef01bd13bf8777e4ff92a0b7f3c25c3be7bf48 PKS=P (13508c3853593604299d38ec91a46d74b94e49e3kbcbP#@ PKS=P@0(e0844e309432d4ecc74fcf1f6c9955f40206ca81 { de````PKS=P (9d566bd694d285e6ae183125835a0506e43a2c4aPKS=P (867cb2db46fa1d38c40f033214c56e2ad54e10fa(PKS=P?8(e887f22199b12c0b7a62c45300321852a2e3945dPKS=PEH(eee379c79729d35958faef341e67d89fdd612d4c`6Wp`t=oM߅ 9X% 4X X,t<e_.* <;8PKS=P/(5cd94b7182529ace7626aaa7bfe9c460105db14bXyNPKS=Pzf(f05fb1a4e26907553cbc773f22bb78b0bd274ef5kb PKS=P)!V (e31045d6b4eb22ef2912cdc47bb3cb7bab616f82{Tdvܤԥy(wӊ7F6h#TBCbh(X?VYk0!iIa36H64.mD@CKѕ531sϝssg}ι{J tgUoh=@H $*4+R܊H!MELnoK:\*Пyg5M'$VqTq%IU<$f+u{wmJKoh~~2F uLYI+7ʹuwMaßZIqT@I!1GlIKu#{[|Αw:GV3+u\PFjB/VO-8q5öpkPeT4I @6n|7UB) t=4R]4h'-^KQ"L 㿍[$| z3O2q+ !dzV:@ G ϒIeA|AkafURc,bh~2iiˠUD-+Xa%tCIs-@\\&szr{24m"ނӢ,&I/Gz|xj6OKLLKe}X1ֲu=l 7րNUg1d߭_>c!IO+ )#Ni}SMfQOk Rxfo(Ks8qIpgDr ɬ7<,GTⱸ;,t_>XCsoJzїZ Gm #^פ2uiӱq/^M4{@=iե: H j !=Ψp3nz'2n1S#g:RjI2;c#x&1ؼm@x,^md3 sr#Cm.c lwyڏWXO◯S5{V8e e+&*Y٩%@O.nS inb,̊߳Pwo%.]:x׶͊m=7lp2Ɍܖ}ظB<[3Nc?/g\.Oi"*4^S"m--(iXP-\:-Tu'x-CRnu}n"m_.>׮9u²²0Y 9AeuN UPr:Ufqb~PB8Qqk .dh0?||WGemյ<7E&,Hby4oʹz 4L2)h?a/ }BR5'(q-R0AIs:t>(j"WĭDUgƭ t_ DT:ACey WCv6wԻRtՌHa "win,~,6B;wX3tkc<ѿ8P̈́!X?U}+@,~MAZ͸ !FyT?ܗ}&e} 꾢2yYU0%tՌh嬋<HC?Q+Wo[[ ZOzPm":֓I6U:^;]5u{n3zBٳ:ҟE ӯZRJӥD 0Z\B: 8 \e$ N[$y!YOg 6M,b_pܸᐢ=Nt&/v^vBH_,d>/܉zaY#//JnB}Q˅/ܹq[H#7Lx b/NE(=:sz#?` `oy9sLOVtek>uJu&xqvܮkm]_غhmUG ZA) :S7D p\~USFcgltdduX=-+pOb H=Mvoo[t9W(,eCw9f ,mY,tD+:P_l Zp2\*V^-\?#M^^TEU|滤}{!~p+Hʾ!p1C1^譆!C~uKV Lm@ӚctkFk5/49n49om6 N:л)E/O Iߚm'v: KRrh߈fwT^i6+T@}{ M73FX[sĒVI/s)!\[kpwkvu㢇f3PKS=Pd\ (882def76d2c548bd2a646a7773efd377b848540cPKS=P (b878d505d0b4e05422fb4a0ee15408c86aedd4dcX[[kPKS=Pg(3fe658738d01e5ff5f41de613f53764f4256bb85 PKS=P+!0(f22ad6bbe90064542345071628554e418c8ea6ae[ L1/Ba**@eèaPKS=P1kq(bbd13e26c2e7a6464d0fb1e16d21a0f79c37e3a4["PKS=P%q (26126642662f0adf32d7a4462dbe0a12d111a010kboPKS=P}=(6963caae482d869f4ebd44e2e62e9c3a08bee236S`xA4PKS=Pc2 (11e6e1b5dda7bb8ac2297fcc26af0d9b984f8b0bzPKS=P ((55b03b4d23d7079d344062007de57e7e0e045d75;{GN8`:xQdAl],zFPKS=Pb (5228eb61664c552d06b57028a66834e018dcfb360 PKS=Pl%(fc555a4c8781f0974f392531b9efe80926869948`(PKS=PY (a88a2eb2f32008db7d38b738d2860fadab5f35bavPKS=P̈́ (2c09f77cc41af0c5370aa3b300509f825a25847ccz PKS=P6(4a36d0b8e391d25e0cb2c528f18ec8bc7ad84954۴ܿ2PKS=P!(bc2ca38eb806201f6bbfabfa445c1381d4b4135c{lPKS=Pw (37a7e3fcf8f11d45d84e79f61021d5d147238f32xPKS=P (3a7bda7959d3cb5cc752844b814af06343fecf4a3@_PKS=PG-H(fdf1355661743c21caaa1c523fc032b1f62836d0{1A#ft2ePKS=PŠ(a576d6a469834d05a52d98016d136fb4719f57f3`yPKS=PͲE(6b016f19fe97c7809d867d046fdc78cd6f5c8f51[?PKS=PٳH(cdc896aa20e7b2886f2110fe976d408bedd46351@la b5kPKS=P _(440f4ac23852cdac54edcab730f39690e588f6ab{ Lq<PKS=PNc(35e430a4eef786909d28a755ab9ad4cef0d356d0XPKS=PS)(a53053e8134ff7b8dd022db870b5308346d69b8a PKS=P (b84b9f20ddf44ca76f833cfef11c9e38957cd48e PKS=P7(07c0b4ae7af04a366ad0d723648724009a5287bc+~PKS=Pw2YT(4323ec8980cea2466082852e6ce112b57c911d96TY j*3?aGEm!+1 (08-@ HP>( 0 F8EM0$U PKS=Pt& (e3e7852268ae8b96f2977d99b7af81c5b3ac3ae9?EǾ " *6DJBDBJ"5 PRA@h(L$Q^YHH$J+ |ڞ};ߛyw}ox]tz}b:{]On?'W987fnsnrb+ +bo`Aψ:OTf.|FU14ŠV -9`:.:w ړFW NE-GW@W`OSF-RCb)xW-<`+}_HM[e4TBg\UlK %u it6 f5&Ddd4TMf4k٤8k $1s{R[KF]NFC%>y54IPIc7@!@!1EJ2}5)wr֌c :gM$fh%:8ܳI^&JFP|"vc{Z3H$y݂A*̂b+ +bo`{ݡW`@ƶ~v.p+u5 m'+v3ʻPY -X#dI@Q˛` H2 -dl;40i,5O@QA˭X1[0IŒ{kEP)7dl˽5U:M26E (jp`2h+v  @yty>=rdg26?Lt2 f dl=(5 m'+v3ps6d2*y54IPIc7@ sDJ2}5ɭwc59X&YS O7%yu2qgMD QUUW-\JU*+Eެi Q'po*6L*N;֠sR@U0^I^r tLkjs2PzJkޠC@^xUx58 ^xCK,=J\ɒ7mH1dX1[0ؖwhBaZӔY0k csٟ&+bo7 (jp84hH݋Bap ^^;7Ē.R36ƂW dl!6L9c+$XϤ(='u㪀7ܿR^,<ӷ'J2}|ްi` 6 xe4T ;rҷӎ5lRKr2B2*7k pqv>qx\ju̡WE5n/xi7Z5[pǃkID +m~c>Oowz.k~+FxݕQTcj6"[~E煂~툶=Ez~[NG+΍.Oq8ӈ۽[rlkϞ+JocVs0{X*̡j|)75 bU*|GI V]l GtCNcN|4z&G-9K|Cٗsßgŏ.|+sɵz>{֟A˭lCV.w Oy9m' ٠+q ZxH謖¿ڒ[X<>]9_ ZZƋhv԰7ʽ=ߋ>Nۣ_^C!V^A9ex}Ȏ  ܿ&,b1@ \8 6łC}ૃQPKS=P(b913af9145cae54049fa13ff74fcfa91c2afb4deX !PKS=P8^[6 (35ed87d79cbca8487a30175fa36212a62fc465feİ PKS=P4W(0665280356c1c0a04f79b29dc020b8dfc872cfe6[gPKS=P ](c4a4c21f5ee437a8a98fd768ea2b4a283285f829?3PKS=PE(31b803b33bf22682cf89320b29fa6b3eaaf57cedPKS=PFa (30418a6d29db14265b425f94795d317b4941e01aȰ PKS=P (319d2d45221e676c4422631cfc4c1b92b8e5f3d2P$PKS=P(56a5a553a0e88f92cf362fab09fa8ddf09a732e5bPKS=P PF(355e65d66022fbffd9569088c861381194d25f3aPKS=P;(2d35a424170249d3bed425c8cde658587cba774apSPKS=PL¤ epRʼn :^AzPKS=Ps (1979d3c212551c001ea94cd39030cd8dbcc52a54PKS=P |G(9d60c793c1994e8edb58665a897bd4e3cc3614a7PKS=PW (331927673279cdbc1e99810a09b5869ed5e2e184pYPKS=P?(z?(c638cb8bb35b1010bcbfe7f663fc8ec444bdbb6a+(P"8I & PKS=P (5e225ed5758f4e4f9c2300a922fd864fa011f96c;t` wL:PKS=P(3fa9aee132a970e3cc35299853c0daa94137bef6P PKS=P4(e521c74e6481797902cb2b3629a7dfa996966497XPKS=P\T(a51ce95900ac8d958e1b73a0dadfcd2ebbcca9a7{ Lq@(PKS=P*d(10f4978976aa3e50b9a1ee11800cf53836da337d`x BY , PKS=PU (a31fb3d767f3dfb143ca2a3a3caf0dbfc81e1389;PKS=P)+(f8948309ccd0fd05f3cb6bf71c666125079827e83PKS=P;C(19bdb8b7daee89242b50de2ba7327f99ccfa69aeİ -bXPKS=P2h7 (05fbde156bd5baf26d36063494bb4ef4141d9950]_lf|ޘo 6W5ksZT FJAr*B:\L>`Z TJ$J}Ay ҂J"WjL@rNcACع7ݙٙ4I8 T`@4O6Ѧf@  vh.D5mHG 6=l9B[! >}}߱v }SANe; gs!A!f: ;REmS]h2hc|!g'c(4:~js W(0m0ETx]y'3nIIkUsR z(,$41?US1;l62؆CVM'Ƚ},Vn;J3=_f$ӽ3n448(Ǫ2Fx.5QQ_~g`MZ*&s":jL:o^bl$7a T5sYZeksY9]]z ƷFvc::z1h~s&z<8?m: ŧL|ʅ GM_uY(BFמ,]PozreÆ w+sCb,&7#T5sXG0RBxi}^X.f=7h7618lU2YCiy`9IGaʶ;גtn`K;n Rگ+tHq5br5<`ewUB]Dv*^o%I]pp?ad;NÁ3h8SVx%qJO.[HJlW/_B,3>2#z>C,6.QW1s7TLPZN6Jų[('1TGrk E-Lijo)M*^C3ݜP<5nFt~Wzj>[ZCu(K M;fozt]nir}}˵ ._+u+ AXb;\Q䅶7iw Om8<4ꘝ-Q7!kʌR!iWWᰧ- 󯞐7Q+M $DA4p@S)~QtTH'C)gr_߱Bӥ\f1[._6nZ&@ c_t>0#BD#6rUt+3:sLx|<_UW>e.K**;GdY vj4w;pT7IG U1/ L+ bx_J5z<8xn՜Ūg@_GIG U1k$ڽnc gD'퇘` Qviƭ]֍-Z%>v0n+v`%-YppMo?Aя]vL9%뤕;X2e2=P"ZXsVɹ䨫 2 W#,58Ntߪ:F|&S0MbP#PXףH./9|l8!O:q`"W1&?A?9/I}l󀜕ϑ߈., m=fGHXg2OL)A/.I,l_Ѵ;-(fgKoDͨ=ƇQP~ BIоv3'CwBsWg:#lafvfhfdFG5#3:g>-d-]ɒ7~0F޲P;n 8!FGC"ulJeE}?S~7߿8pt~B٭f~={!)CTl|?{׍ vlvYNmO}5 #^9Bߤ)ڱ}ׯSXN c}ցF&>OLIGaʶ;גtn`K;n Rگ)qM3j_f+RFQ̗a:vZ,m<W>}=bR%ʹ7%}ͶZPI X]$RЃR>>NC3h8SVx%qJ_^f==wnuYЃ;޳]|F[ p9pndS9Pb6Sӟ U]Bh!#[Vy:7 Oljv<ʶs'd"o%YJn^Rǝ5- ahyS8!2spB$N`mxgZ.ŠL:պ6_iRiθ>eky\ufS1X݅5'.'NjǿVM443iɀJdW]tdxu|NGɔl#R+Wpjj70wZO;]VDŏ].{ m![0P%YЌdy =H&D:ž7 { Tj:*ԑD DuS+H9(Xz~~?!<|!EBԵtžN3jӄ{98)平HKKKZ`?Ꞙ8yS#d#j,3%0\NKiт "{^@ܝ[ߔ"űė{rn͞;/&勥6dב.Bq_4+=w4lb?PKS=P_2o (991bbdaae9b52af58f1ca6b156ecc2338de35f4d }g;ZYX;"!+!l"#"+h]b N;זw7EM5&TBS.m2kv FID"I 6,!53=3OGs~wϣ+Ou~&O$y2'3liÅ˿7<|-GfAVgٞ dl=OP]o5r9n닊l(|oe$KCϩa\Z2Lo؁GvebJ!,g-ksWeRVhw^9hcv?$q?+yMdE;)Od+!/O~nbJ,-t5uʍrI٭T뇛ݍouEvNHscz7 ƫ&Lj \(U64tsr/))ţrߛC?95c8ύ׼ c(0{t,!@J^ MԹPJIKZؑ-ȟWoiRC*%-NJjk 2MP+cB}6tl'[FkW%oK&1C(Jͪ ųPs?gMi]0Li碃CP[QekaԚW[S6boOʩO^UUZ_"=p>4 .kh"N4WãBkT}Zj\ +dA9<݃tsљ5y RBEԅ2/(0׻?yKܽ GYY3S{V'u&J;DJ6"9{0ȕUyȵ-lݢ7+8uٺa65m̵zU5N2x2"Z:C{>(ZQ g3dF7OʪO:MLA#DI;Y u35Noz]`F-8`yyЉ- AHwӟ PE_ѶMiz7%Lҩbq.Wu)_B.菩:o%yP{mܼn6zU[;6z<풌m,䤼dZkYT\ԯhE$][IWR_׏i+]cYaSJ#h DjL{,6cU1'eD >x_ e0.cD qRnS]iޯY *D)<@z  ;s>m6?$v&ٷzDMuSrlS'd M] m]չpF8獾 a тLXCZF\KRjM4F{,X@+H$ZAHX x$뗨O. ҷ 1(Z@Bhbvv F, >DfL"V,q+`Œw-?n#ڗnx}{f\ST{T?\TƾN=Ly%_MO6Xc-8"G!\S벦'%%/JxL#, , X?e9bg82! WܛN4uruLz@ׅ1B{ֿGOvM+ KijM2ulsJ> `d?*"s{x;oٓkLPmP؝z)9HEJ֊V F"^^h/5HKGY րC nn fm jdÆIwL$7dXS'w0ӄqhxJ]F|R.ĪTO ! q{0E!\|3Mn 7C[:;1BqC)̝;w%LOthe R|z(GA9-Ia[SNU}ъ"5HKGYD1uoi.$1"^Hh"^D^|t,"Nsƫ"%iļx ˮsk(g?S՚x b]iksֲ.Rݱ؞x9$5EUDE^|tc(3q6} ]R%,51Q1f!jݕz\GW_!33CxdԀ)fAan*0+o3,Ȱ|]<8MaƔ(;x y F=dR֥"o= yD%&^+R{YûTCdТF㘰OҜlʆOKCx{S0(X$͗W/Wۗ:xH5ΎYuZj5+iN6TҸK-Xy,dCې4_wOsx_r V848jxr7oRE=zIbSH [~rwWGSmA4GsT|pLe,?Cl\ykGGc-vG~u#96ŬZg;KQEqao{Dl?Pbd'Ly7o\GƊ׈Ae,/ѺEq|=B vq$ܨA$te_쇮uA8\fV~^w㗃(,6ep7FDaU䂸 jc'P`!h/P{0GTbR]Em^yRl|p7~m^QYڼKƅtޥ0Q.iz3@rj?2M<`:Ajp9 >HB4{OH'#a7i`bZ;1WVL_hdژ{ܖ vqߊ\~7;B[}JTo?qGno]i?O^oW<{}۫7[pNCM@~R0J t.XկlL._KՓK!Ȃ|O>/)>QIj^T_4qU=':DF lO).-4F# Hwӟ>y~E62\ 2Y*~R,yJ_'$T$rEz+gv9cy횴4" nUÙ0 @(]:pOjA|k畒D-uoV4"Pf5l ]| |B"~_7\jGt8ad]r둇ԷyY>`A˟4 |KQ@fȌw%򵶶u%IR 5zVjOFёcjwyڵh3.#CӺEU"6֗mrO'_S<(ܯFUzк45SЌNRߡM;0{.Z 홆T0SiCaRer>?$RW0s҅z,>WuI@B.R:o%yPHQ~X |? [FsҶQK*jˑrR^^,*.g3d9J"#_T!W,]>v>.%}%u#{M9684J^Ĭ%Rcgb3]cy^FD+hGօn) uA]cI<P}g6[I3'd~~ɔ| m\ӱ{$ "*\}G u.Թ|SN{KxA( Rq6 {F^EuׇXoutaV ƱF2W*Z~3-W#܍_,klr2fUY*ê@v7fv KgIp`_^ %!~KT͝R{3'cc/?`/|,N^ @.qÜ (8𗫬G"jx ye5u׊|fmI bCr6΄G!At"oJ!$x $XDZWhψ7vY`ܺ"^^h/5HKGYD? %\yZx&fj6SpIu.$i޻@vVX2өtl i8zޙ&7-wƘjqr?!Ν;ǒp& GG zÃIb_+O߷u>\ZH 7Gdq$q* !_v[5/ׇ32 T<.)+QN̫U'p)qTx1ykhn@u )iyftQ #CWzhHڧ| ΡtO0*NLL3Ak8Waj&Y dAEPT?0N]ZڥђFe$4AZ"/>"zj̬EK+~|727xyfl#:~i'~K/8v4K->I4g{OlwպMg7SB];:ihp| K?C 3Ir$Fk MkȋnEdi$X Tm+"^Zj#."^"r2,,A^ |e37F=C*=BUı,^*ȋn q6} ]R%,51Qxsnq\-3Vi 1VԎKs7|lnV^'QEd\ +KҀ`g { V,J縈\?"aSvVO]jvhyeRYeWM+皳iHĔ?W 2= 0Qv%3<튎DmL0Di&XkЪsq"^<"2l6SKw[?"^Hh"^D^|t,"F!.0+o3,HI/1"^Hh"^D^|t{*D񉶱:a+!/O36 3Ytq3پ&W7ɬl.Ml- W)RXgo1C?s|T JMSw`no4m]i7 &K)(SZ_" AO ~|4u\c)1,)/gץK;ss㖯/9[*`؁bO!otV^Iª9WXCYu0/uNvofbL+W օZk]oԧQː 6ԚpX]E n Ǽ)>.FOA+9ܒg|oCOsMo% k{mCU6a3Zl]+J-^wD ^2)xǑ TeD|pg̮cՋ.=xlZEoX-XS >xX87t52l;fa}bon \@ lC"ZI0qjT4HrB1 nzg5ą8V!,x3}?ГD :v1Ь[{ cٟ%,0+o3U$zlhV}u"T&4&qRh] l; +,g:6L4aZj=ݗ!\KaK'Tm b'IVw^*(VH}7C^,"Ns̫x4gD;pg 8s(febC:F߹{g4( miNS!N'4׿9ܹsXΤZ&3( &}h>}~pi'"-[#t0"!0;  SDm黢]mKk!&Fa.P>P̦D["[;1VWd( z1R䭡]"QѬtQ #CW*&fǻ|^>F&˲\!rL]|sFZ3Or.f ~?Y@Jc_;l.)p BP`WD+}AZ"/>"zpuI1-P+`bLdf" M #w0%#9!G(c'0H`ؑr԰y=%mJnwGj,ɾ:x&p5 :ًT.U˜=Kːw/zO)jd-/\NIQˇoͭ1c Ǫ/ӟh71cjeY- D|Ƌ5ޚ- oiZSD՗^?܏I<8d?=O5,/}~&v`bN0C)z0sI ֫Y@&H4:BjXB$(\" +c \ Y‡EMD@jR\ZNޠ< vv ͗Fwog&`-?iVV\-? h Xv&wox\i\g3T BaRPPGK%)r"^H!Zf+:ɭkEt-%`MO|fsrH5*dY`g5> 7Z\T@췋GIAXfrZbz_W/գu]=r wFp19>ǞFQSj<<➁`LvK =iܻԦ^:67xewO<3wζCV>ZْL:4 ~.50TZ zsVZRSxNbԤ[dl?h^R4';DᓨKcX0-T-A;17i̊3sO{LyO<*Z37:5# Uf9gb6L23avPa_£ d: ja+ :{x* ,m"2>ё+D&2=Œ)Qv%3<DmL0Di&XkЪɾcSO@ނ c agbX$X߿4BDt@B%⣛`6 iv?φPZpx x 8.yFӹIۤ{06J5~6y8nGaLT$Z)z B;-yROp9 &+-Įe3{QaÐ. C^Ɔ!7 |*E<1/, }x4gI -]X%X"Z%+bg^-n9ِ6$͗FwmqwMQhK#`뎤d\3S+ #2pg|pg̮cՋ.=xlZEoX-XS к71~wjr*Z0hK%V׳ۭ;LZg,jE!#V%ɼ*ZK EF}:,͐>x;1rJ|Y0 Sn[ڇUCe)[<']18p5Q`&r֎vj@kmm922޶*ؙ@~2@W.ҶQK*v~hc!'奱9\Ϣ~ip6A..2E%nrɒso0!RWR_׏I ;ȟaS턔 YKƴ7/b3]cypFʉ֠?G߿5яRw&Zpk2^-ewz ʤsvSKSty$qq)mX{kon7z6z f・14Omqbɖ"&[:ty7&9 HB4{OH'#a7i`bZ;1W3Zf3}&6uw|c?>%]ܷ=ׯ?͎P7G6O.sgSI^{yoްn} B7+] M_',?AӀg,}l'q]ɻCgJJeUO?+c}b% *k2xB47)WGlew )D<O3LĨu[fv\:D=KĄ]&w0i]]/{_!Ubps' :7ahZ {Ƹ aB LU#W2—„%,Kk+b/]vYy)fA#51JV&b?qm B "^D BHtH ;͵$Ѭo "%uE D_kȋ.~(FK8=\@&70HbDDi&XD WYAQ> Z21Ao&&]kn+ekWg;Z::1|-*:9i2gd\=|RHTlļ[_q'BHŏvT3Sb[nLކaE9)!k45D7D+Ј-Vzq|kPZ";+]c dW3 f{ǥ}nFni_cglf9/ 6v~AMY<Ȼ Ifs'#U=Vy(F&KAs5<-2[SO}g1in:{CD+>i4[)=@ m BO6 B$]Owhe'͗F T 7kIg2jXv&( փE+{^MQn ~CP ?"Acŏ/0b<$hĸ *EIK7*0+o3,0Vl$IwL$7dXS'w0ӄqhxӊlK Kץ5j?wCHùz}vv.LQlH;yLЖNcL58x\F sΝcI8jsAQox0ITkE3c^7:>q@twc M9< `>5 0bϮF'n"{+1bϏ?%!6CHnʆOnx=cCk{0O'O)JL5%wMTވ4i{Nl NB I}THU<8MYXDd}##4S (5HKG7*mGr#h'V<ȓ֓dy//ƍ#;X۪^g [FknJ0ĽLPkzhw^_T\Tg3l]4G]d䋷o+C Y|N=ҒaBؕ-[[Ǥby唷4_VK䤔5JW'[F e׫.IUv~hc߸ !G 6al8dL@]fิZ"0[)j٪HF;YQϒWv}v?j/slM7qRFZF)oȡ-n!Q 5ƄK"^Hk5yIwNQ5ŗ_TrW_$`&rS(5h0SB T%,* |9`3ּ#P(.=&<%+.oΔ>ģvM>%ǭ~;ٽ1\-FCI\ 4vRb4Ԇyf{jfҜlʆKCDۋ<D4'zwa#QE݀4g;哰|J!Xb$.ȭR):ոx(!O䞖v*TKvBˌ2ZeS7Nѹb[6oyJڔD3c6jfɟެ/k"^(Kr$Fk*9Q)Ptf~oWޛ򝇜`"<,5/:,5>ڸQN!b>0כ82kZ35-vcf・X)DaSL,5ZR-10ֵ̆5&w T떯z|ӥ*;y!i;NIcBx 0W`&p#ll!>7X3[ ^&!EBI{L@MQ1a?-lt^L09k+xvi!͚<)vgXÞ2E=1]9U22@TAp#lLK6>ll4=NsB&Hudl#S:1ђn2&8(zإo9L' Xɋnn=(ߴxuK\8ܨ>kOT~Oi)i/M{b.m1-oxB@os87W1*S>zc| _jYU02TްH#Ð1Jfx "qL%a9E)W,>V(_V0yEB;FOI{J#12T{d2*.4up !nrVՊ47I\;ۯzT׫kmrz{3cZZ(BCcj|OZ> `+#va⡯TF"Ztic{=+a#\IsӀ|"2ff56I$$BvKt\S+M+U{Wef] ~X%.mX(i`c]R%,5^OhLHњ~I7X@ <8A&d"+r^{O I0U)Ml@U Tj69 Xm XX 0OU(VL~ T]A&5t1-o~V ło!~?܎yPI`0v@82hgĴZ5&wVD>G<$Zoq7n}Zk9C^Xԭ'd&ղ-oqT%򵶶uk[Suf{n,efۨTy~Fο⢢48QZG(|oe$KCϩg]Z2Lru{Kbw#[=?kC*pRk\+R-2Ui*C^o?1g|0TV~gcJڛPEKrhCpmԇˇV*?Zm,{&ٟ';A>B7M+Ϭ:37)Y9LyOXS$rc'V՞Ven &@.a6gVpLy>~I]S)z|yJ/hFU$qŢBrf$a-c>;I\ ̖E.P;-17˘Y9$p`zgTo~:cVn9~K7赎ݼn-|4#ZPVyJuo׶Gg֍C[ l)Ea}*Fklix{Me9g {t~O' ;(Y8uZ,~jw"=Z*nޥx+ 4Wbd)iKr3 [s}yͣ"W*&P=XFT,ASPYz}OU>KHfgj|ǜZ2̕Ǯv톨iY{F}B*=겨)J?fb:|ڋg?lnh^w}QjĮ~A(/J~U%nӎ(.8%6J?z-<n)w%Ee(w0@ PAn)}LRsBiN6Owhe'͗F` #|bΓB0{=Ǝ:xn("e49!K9g:?DsĦ{WQ 6UNV*Xɬ:37)yC8ɮ\Pz )Ձme'kc_3˲;OjQ2iߏ\C`k'SMTlj"p _#?^L%PYOYnbeFڐl=̚7-0L 0ʮQZSaWeZk@#ҼwlA1p-f7F)b] >:.?_GU;٥. onG&~RR*PZu]Z]RGQJӶ{CK#`R:!.k Fq$R,V2T0y4#\AM1昢P0XŁ+s~[НS;+3Ǥc[C,2}fw+Gs}3~NmSUYwt1;m\|5E1S`<}ʪj@mA$ZW'V1*XdRA@S`4+}fgO|Ǜh/,V2TFfDVWh @rV&3CK M8`yyЉ- 04k uP3DZ͒x7ꡓVIg3bM[?v_P? }V"ʇa&2NGInbL6\MԌ z!Q},10Y70mhaC]mBNK 0: EEF6.z}%Fj'LZ"5ynvX˓ 8;iD2V#Cm"# .(ZQPsIY޸Q?,HYqYC99_ fo]uI+U읖O|ur*>#ZAOV&FfiUDE@VZR-Srꓑm؃U5 qH&KAs5<ڍn:c|]+ҜlʆO.=7 \[0?PV5 XOc*(?`/((e7o4#ZP=A/Z e8Pn sV+Bg33L?o X H)b@Z-NS':zO ZINRߡɭ6'7L'qpBpmBIGC'\.Zıtv(s)i'ch;D! 8jpPy3Ղ=Y"k(_2Uul_Yk|nh28>ŀ1.6pM2I霚eKjVqG!Tio#>KF.tݤOJwׯ[wIpfso *|wB&G1 = X)De)Z?%=ҕD#X~ڤVLJ鞾\R] T{EoX)S"/OT8_Hkmm92kǚYk[SεImRh#5>JQʠEsEFx2 %˕CҒaBؕ-[[Ǥby唷4V)I)۫iA5EX |?2:b^uvI26 +VۍݠX,Z5(uԿ.Սd{/=`ENm 8duRگ;̗+;i(eKקQ\)oqJmd#~6+D*eF$m垸|Jk q\Zkc;{sxj,?pblMC$'6ݻZXr|*Y1ufnSr͙xtӧd r¶K-0A3Hl[@]D{۫x7kķ=o6vCi4K<_ɖElX-+(PXDLYW@p!F'Az_-]itn$QvO ^*!5HKGil}4Zf<v߮ӝC.7)6i>Bv|;Z8;m\|I;Y uN.0I8`yyЉ- Q{{+3\{5]")?S- Um xsQ^`ZZ˼;xbS2=@ $H/_yh=ZIڞc37熦.uOmy?~53YhOlQߑێZvb5ZH:Ǭmg{Dl?PbdʚQLy77.ڤau[{R]8nʘȵ..6pMHz|ӥ*~i^R]%&}%{2\OQ#k1~y\{pZDj`-=&Jl HsyCD+>ѿ4X=Gkȋ.,Aj9G/\j:`竕k,2|((hBqNGHsߡo҆)u[ Zf3ژ{ܖ vqߊ\~7;B[}JTo?qGno]i?Oe-rsϳ/|{u RGqCM@~R0J Kj^]_\j(~z~Ѿ6gdCfFm{y_MORBO׎+D AG~J b`fAv.̀l nU @(]fD'<a-WJ -ZЈCְ)pw ċ`~pv}huiGReYؾ-F+~|727xyfl#:~i'~K/;n8v4K->I4g{OlwպMgJ9u="'gSTg;k]jhm6.>S4jLy7ŹlU1=ֺoV<ˬ:37)YqysO Gʟ*c3hJlA:Y(skG;E܄vIPitfD 1Hg3U{6ξKM_+n2F&hĐreңJI`=v&N$"ZT4;`{&Jsx]\|/2͎Ia,ERJ :kdj=ӖY-K!NK2 KFNld"6+;dfFլY9ƹw$2"|ik^ѽSln3cV_'IIhnTF6eYQ_W똽}dT59NFq݉53hkd\|Y~26w%:k*։-xUȤ;RD_>. &b:"OhO# }P= zFAs5<ڍ݋ѥ1jx$U@tV6||i=7Q\[0 XO>3U IJ7dSpږs"h@YAirԟlrO~-t)X8ejE7n2>`ď'F.DQ=|Tӯk['b] >:XSуzhu^>c#8:4,`\|o(6cwfhz1C\cOh<sH#sα$IQϠ7<$*OۙS$riRy})y]YR~|O_+?%^浽֯-eսV) RZ6ʴay 멶a}qp~կrn(ֲ&ǥa&:r-Uqґ&`-1*` Uԉi/GWL5%wšET {"ܟU<8MY$8 -$6J!wW4fMn`ia|ăfL) -ݨ=M^Xngx1n L|0B (e1A2 G5=_m]/*.*JB..2۷!W,]>ui0!ʰ^Q2Dh},m69^ّm-J{ Y).%8v&|#I?(j*%d e8x[G3/c=%5"-,x "qL%a9E)W,>V(_~Q_}PzӼQZb?Rs'R֖r;˨8rKZn\@ÆEyc2MF~U؆qFdf&ƴraEK7|ꃕmk6$6qMk} en9JivK5a&>BHnP;PWy,R):ux().F MReGA%A#5&5HKG7"2lTإ%]T]\AQ|4"d&n AD?9.|Ͻtsxj癱?9[ugd)wUf|6ժMǥQqGw歹dR.)a\V;xNW{WݼcH%MCϽtL8->#}]\Ӑ|xrV[ NKd >}J19sӧV,] #(h1 ,m"2lyxp’&Qnao,x+  UҟTP(8?\>/E+ڢLe}mzv忠~DȗJ8žt)[<']J?\P`7y\Ѽ~кZy|mzӊԴH"L+wr=Օ;OM+{J꫱568NHi DjL{,6cU1'eD$!Z i76SkkqS $I]TkךNůOiZwH##nj^4sřmɑ!i]"yH*Cs. ʙ?U])SuV"*=h;T:I~7 $iG]2f } 9' r=Hwӟ)MnH_Ѷ7%'שbq'Ţ:ez@BI"w^>zDw]=Vmgn4 M] AXun? 0 )L)~%+77E+m Fʌ2`]ǎD@+H$ZAV))J V)$ J `P H&o!Z@#|THXH"*{^XMpE/ƍ3$3$̳#$#rQ q1O/-1͂([[ YƤR2U*T-2/jPmF΀eDoe"l'+-~2XY*ib<7-SMjvzoylQ|xP#L|>""xpVK< d  ,ޖYV( ,m"^&) btOOoUtѹ)BFQk 6w>yRgZpf|gD { D: #]|I{nw]Phe_#˯?|g2n2~hc[w7Ưs[.}+s__{o}s)*mS=mҎ9wq=<·WoX B-CM@~R0J t.XկlL._ǁf'c5b"03 oc-ߓK/(jJO~:o?M?~v\U}$  bô|TLgX\@IH)}xx PA]᯼OڅЏk:`kUg4?_(.ьh8' >JItRѺE+_|(3B^6^.>`H)@* a~Yz!m^e{(H(@`Ԥ$T,".:(XQMM 2V0hB{!z3cDg%B|v7I#e{ X|^1&&ꒀ\ПtTq9KLkG;LGAfʹL{Ù3{W[i;BgQqQ48p3KԴg\o{]c3aSJLZ"5yf,6cU1'eD >P1vQko]  [UyI?$3y&03)0L,C~y)Jb@򋊝_}QV ͌V$DV@zp[J Hwӟ1*md紴|iYbq'"ez@BI"w^>zDw]=Vmg874u3aչpF8籎!`LXCZF\KR=XBt7hDY"; G~IAK~ ገV$JEzE+;b 1bh!2cb ;X+$nu[ѾZX駛oen9<}GuJ]yd[%Uffv~js/SBlNwߣ;7U;J]vL9Uپ~AS:ٞctЩm3k?cJMJEnCf^uXqR {oV|ͬ:37)Yqys<'ݷ{lp:LPЉ-'lh052Y^ /4"㳛Ks![i;Fiˤ44T"b_}KE`Q>%PJA& HPQZіHA/gvngnvs;w{O&w{;旛'u2/Co8]piazw ԄMXdw&C}95?0B=+QW~+TqZ}(.xXыe)N^|aWS~ E7kuũ-_IU,TuFUu\9n:*8&4f%p7ڼ[.l~Zep;D)r?PJb<7I:kE`-G,wT]yeU/Ac1"-岦RIbTL'[;DɗFŒǛ'f?yfir,9TCL[O.IdHEjfX|O%?mAkHaVKUUn%;2[3_ ʃўo/x6sRm%O?,<38r{ݿsߵs9~ؿg'0Hl7,bOpј?ZT 4fqHs6ro\GK+B%>V"glapJ݆kZ8SVWxdk A-<3h5ZT]3v6vNrwWN䷢0EyY(:x2?d@E~̗3߇ׯ^H|D24л4fd'Cn!ځA r/w r* :"!Mv4oT~fsg+7/>h? ڛu+ ۑa^R;',&;J¥Co)R-?2$-t#JQˆZ2%(aD)D #JUzÈPC'[;D@OBAH"$jd=:DOb1˼_v+.KdO48^hH=o&nT }CfV Pٛ/W7"z R1;C{M<$2+27/hd'SSŧq^"%bF"F T @ݨf@`5`5P ^=QW-s`phRP *wkƭ=$)o=UFPW|(7Tث:j!N5*aqv]Y?c^6!2p uB~UeVcPKS=PKC(&Q(9f309c0f1e08e5409174e704c6b2ffb5057096b3[/,&``a =9ox||\~{lZs.Kj4*JӰñE"G0fxf|>Z{הL$C0fxf|>Z{הL̨;m\yw!=5%SԮ5A/}ed"q6;P M`DOD`w^5x/;99rWxf|ێ-+oc"T@]1F^x^l215HmN`!B0"|L&|9.=~y'S;pv\k|)&L;0ڻdb 3 ށJx>/;J`TSN`;&ZfՔL̔w`;P - &k]S215Hm?-N`I0"|\0w]&0? ,Y F^w6Y&{m 3 ށJx>naHmf\k 5k]S215Hm?C #/;P - `+>[ ǿڻdbjڵ&岯l@:fx* mz/UAaHm"9~#ww`;P - زr22>V.K 3Aj+OkSh&SK "#/;z 3}sS;pv\k|)&fxfTU)8yAHmv\kAj+OPTq sӰ|>>43!inOOۏS~oPKS=Px (827a9e6ae0d0a88320d02fda34f894bfd81782b8pmbPPKS=PeE(c8b51c4140b2f7fad3375ef17f76d72ec9aa1dc9X@PKS=PA#K(8a73039551e9fdbc13cc54aafeb40d0ae8dd52cd{~PKS=P(847fa0b8e84faf07febdda0ce7b9bed7cf476562 PKS=PMR(56787a1df935417630dff85aa9c14b41c4358684W PKS=Pד˜(69163d7cf0b61f59c4683cb7daa204fdf8170cd6cPKS=PӖT (ab4cbb672f9efd00fe123bdff2347158c34ca5e9{̰ PKS=Pm (cf04031b5a3f41c8bbd8e5fddfb8f2545290662e[Ĵ%F@PKS=P?M}#(4389da33e039c0f11f3e9362f871a1b15f8c405e \ggBH P/&"WQH*DWmiEvQ7AUQ<` 2\ߗ1yL "(J@ؙ٘8i؈| f<|bPd1!FĂp ̼&jل0%\]ťi{ejkrfҚpMQ}(r $b]- "_V]W!q׌YwER85Z1ʖNtSZ>#p&MUb($!խR7,eݼ6nMbBU83=XƫufnȨQ7)rNZi;׌*C~df Nl뻣Zπ`CR> k({K6*ܿx_nENA0E9V+fM}v)Eҽ{Ww6"$@>_@O9؀")Ynl#8>Ȗ_%#O}BJAy|jل0%\]ťi{ejkrfҚpMQ}(r $b]- "_VhԵdOdpM0iB/g˟xߌ lgV7MVRq[UdtARk'q׌eaZ0|wm-='VY+qhTRڞĄٳfFmŠ굛fQ҇ZVM;SuJQBVd+nK7w[WEFl^MM&v{k= !F5IB)o !A$ARVGN9u4c^!^5Yy0E֊9Vo -]NNatxyeKRdD t%':y{cp~ؕR;vNٟhqn}/o3V3P JAԮR2BHFŒ/M󸂾6Ďf"Fa4* E?LJƾ-\,ْbR76lSOs I:m; ]Z4XUr/tkܗꝛYe胶侣:r>Bރ54r'lkg+Y۠fR,ʍʏ~zK}6pͦJ~bT{N?;z |ek $#L w:?uq0mO|-^33ߘNӾiՍmRx98|l~;:U.~Nς7-==޻:~',_rLP6ar6%s$Ǭ> ljۦL%7.?092N|ao"?;$",^ӡNu}sRrh=wc7۸R6et6'=NM3IWv'.ܚpfB~Y[ج*1 zkV.޵Z!LQܷc^\Y?.)Ufŕ{'?pRw-smyz,g^IuNz7 'ˉ#7HˡǦ,XK?>xoJHr6Ӣ_ַ|F9?8l'̻sDRP"tS !1a_?w!G­'Z]r9hkZ>c/¨3yr)innf@tvv4se~SҎXke{QՕفUP`_7|-7,4O&HS%2{)_O_,Ԁ?SD|n?gWΒ>ލ0wZqV`<%࿁i?lܾ,{oW_8|xi̭'·&~tCI90ϒR ƾ}nUwLO0eqEVldn>tK{Nf_wlhv+2pU&/wF3(gXeL{1hA;*t@ whdMU[CJH1;h\@;}]ۚ;D\D $zab#PTDNH bbfrJ}@u0Kb@ $t@۷oq^pHifp]qM-VpRd#E4؃}Hk4Jhcx}Ik?I𗠉ۣJn%*+(۠ v2"tV?O3ihtInz|B006&#ú }.F6`ι )F6P>Z LNq0+s (A*>A:73]WP0YC" w9kIlyNN]D *Kt|/4r<171'{ΎHC5 ܌ Z0[u5ߏ÷~қ%-d{Y}dUL,\ eh9@PKS=PGY(545e9ca1080f5fe91866df76971890a11ecce127[=PKS=P(292fc09520ef5e5156f912db3133b2e3587bb9ed PKS=P1+btK(674b6f59f9c534e1e7ce1050a94252602845aedbS`x BPKS=PS(e5b9efe6d83a5f2fcc629cc4d999cef1d8ef2bbaUPKS=P (c5b5ec94a336507185e4471e45c8340222c87640PKS=Pj (2e20f4b0a028e9b8e0ec2f533a0d8818d75e2b20PKS=PL0(10b5d95a20c1ae75050275a296ad6c8513fa9988HPKS=P (abe3aee5e207b575e8241a3391d319b9b60ddc0a;PKS=P (d844668df145fc055e08b854b6b5358145b29c8c`hbb`PKS=Pw1#(aa7ad6604350161577d07df8872537248c3351a3((oo pq0]f12tq0|xĦT$&H/ϸO@c ?%33 @"3+X L X ͛9X \n j r{$F[,P0 ! 8KvpPKS=Ph<$(c9ce621adcd2eb968d840caa02f944c42efdee4d{PKS=P6(85a01cc50366e553dce5825e2e19c83691be7ece{yPKS=Px,yU}(3532e687a0b703d8e28e491a3da746a718435888{ h(R (<2IPKS=P6K* (ce9e8d51d512ef4b07f9b3359aa983fe742ef30cx\33PKS=P<( (bcdebeae69a3e3956cfe106d49fa484a478f95e3p PKS=P-(2da1bd1489c4b2cb4224a2bb6212afd7e4966087~PKS=P; (b5185974e99bfb3d0f3ede6175caa05525bfbbf5İi".&PKS=P03 (563a2d990819f144cdba1e30c7321912da0641aakZ} m 0H:+K`ЀTsog=гpaAsWTY V-Fyݵ +߯7gWnn.4EӔϋ9~m͝8@ӣp🝑y]G,XM{7jeahh`wz[ &_3 0h$,0DBh(3+ 2SVP@Hq@y\pEL, \ЩHZqR> M@24 yc -~=w8RҧwɫTqנX . QqRX "ڡt';Bo@(,*?qZGxL ,\PKS=P[ (4f42f8ade3375d664bdd1f3256e24dce3061df71PKS=P5Y(4ec42a765a174e9a811eac86f1b17af5980f8e0dSx{PKS=PT3:(fe2c5f700964068e542054fbcc4ef88f39e372eapPKS=P4x (97db574994eab96640bb73393f34d6099354bf80SPKS=P((47a8ff8b1e826485482cbe6430c9d6299c22365bb*@Z`ZPKS=P" (9307839d86e16e827190611a62b392f18b449b64kbuPKS=P_(cb88d58da250b6f36d14048c6451adb824bb984ccrPKS=P (d24bd829175a30bcf88093d0a912cf6ed8b79afe0 PKS=P (b429279bdb70ea18f0795f659388b8a12dcae89cYkA3ܙ9.5%DHlRhBҤYRFF"A$N* GB7ُKNnggv͛{VysZ5;׀s-3(VqZ\jR0O5;Pcɰ!524X'hkMt;[k e=j8pl!5jwa z4Q]nwaSJN~IsJ(>dh'CM:urjkaDFeB3gBљtĩlb?V N$ [Po@q7 wli%QF]%f) 3F/LIVm@UԐ+Vnؽ ƳRO>=d{넶[)}9?[zИ=Q.rKjQ++ oЧ,΄n4C2g28%]sSH VAh!Nq8 [vĹHw"Y,0r9ӕ?D-;627`qnqX u8%d_ⶓ)tʭΦبkrp~X9Yѱ߿! R^5D;jq|e: {lFHAG w*LHY9N Mcixz=9Z(kZsގ:M 1 O ޼Pp(\N' jU!F/"h-V֥h㹣4sXmGm,wD&2-菚tPKS=Pb. (c6816c0ef3c956fce6b1268beee0f08756d036d2} PKS=P21(cdd316f55d9e664233cb34284e3ad1c971acd5c18a-PKS=P5(bc8229f41c63f8ad5464921076be0d717e750108PKS=P. (54bebc6ff04410de82c86d7ed86335dfa0764dd3ŨuPKS=P (23eb81d603767a821d960f3de6f0547488be53033xԽPKS=P̗(e930d2998f01b5ba626461deab22206d960b378fPKS=Pg (15fadcca00ac5c3aa27ab0681f2fb60c3bc3af47{ܰq#PKS=PIi(b5b212966457b3def8fba4e50271a7244f8901ee;#PKS=Pp1Ĺ(b36edc3509d6894b5e60866cd8b4ef8307757beePKS=Pޤ(c3b98ba80b16aceaf4d14bd2313d3b8e556e70c4$PKS=P%7z(bd41b5e1497bcf9277d42a31d71f5b3d26712cc5+PKS=P y(3765190a1fac66727ea4f64ca8beef2d71e9c472`Б6Sp`t=`ob<;8PKS=P}recK(4c94e26efb8a76f58feb905c396b12d73643fba9횿N@  cǎ]ObDL<ܱ`a )$%]ܥhggb-EQy3~^}'4~yvvA26~/T);錪/7t /:{5?.>uTCܴx_)-BD= Ȉvjƒ8whn_ɔ~rp IuL⃪k*J<+袲诈(N,Ǽ D,-& ] ` K8j:d8" ??|/9lE#g8ehl(%b<+2NzVG ̓om:TJx܋w^uQ$UGn@K8-\_B0ҘBI 2461,'8ŗE$4tFkYyJ z-z,:+"1/CcC)KKOC0xJr[`Fkoh1E5q$$F 2461<8gJav9/Pבs3yEPE@^k+nVSoћC>Ѡ߆ @UPKS=PTH (b3b10af48820730a8057b0095a4260fd4bb804a8+b($PKS=P:Q(5aae7dc659a1bf9806220e1ec70f0c5d591bc87f c˿PKS=PSu(73d2e18b8f8a5ba1cbd26776fbb48c5fe8a26827xo{PKS=P (46e260ab2bb53168c91c389c79cf705cf64e4461k?CPKS=P .b#(f30e11f3c3c4ea8aa23fe191fe6f5b8f038ab19ckb5H_?z?2PKS=P^(310df8b6c1a50feab9d511f431ad1f7706d35370;PKS=P+N(7f9153d8fbf227e4a174e759fd23a46abf4a7c99+:PKS=Pˑ*B(78e79a267336ca51f48b95f50f278139be8298c1I&Lbd,aCE>6bOPPKS=P-J(b8b07414311117928fba06c44f2d4768bf27309fn0DK?Gs"rd]k ?^^DZn o"kKzL|y^w0d,kAfX*x0 */g\Bf{X,L 2[yeX<۠i$ vK737̌o`7PuCf_zL }'T`T^7Pu7BBf{X,L 2[yeX<۠i$ vKV.o`7PuCf%Z=fa wkzL }Q'T`T^7Pu7şgBf{X,L 2[yeX): TyE}M',|y^w0|]|Mk>H,U 3cc Tyohxcj+8<;.rBf{7PuqKKA%|ޏGA+70!cS0uʻ5Z=fajپ(X*x0 */ ]!xcjxhm*nX^5 VYdZ9|y^w0=So?r|I7"TTx y??86|s <;2ۯ-q<15 3_[xcjg'T`T^7Pu7Bf{X,L 2[yeX): TyE}M',|y^w0|]|Mk>H,U 3cc Tyohxcj+8<;.r05lˍX*x */wW7@lo8kAf+,7Pu5mRNPy ` 1dBI,|T^7Pu70ʧ039@E &Kb}05l%TT^7Pu76 |-^w0d87Pu05{+>2;?Z=faj;(j ׭Z7bqW7nR;dPKS=P (a0ca13f5a6e717785ca3988b510d6d364b69438b[İ3PKS=P6H6(d0de7b6c146c06319145d817f9f03ae7709f59e7{tPKS=P[ (c1e3cfd27b16cd67de46e07b32bb5a026c4b895eŤgf: PKS=P_ ,(924f6bf62febb3d5c036bf123bcf6293cb76888c[İhPKS=P(908c30894a031717deed901c2f795e68e4316fb8PKS=P3u# B(5cfd44f2ccd1e30b8aca7699b1253c1187009b8a{̰"PKS=P  (b6de2a417edad556f90f04145d06557f2d616424kbSEPKS=P^L#(e1110a4525ae35c7a2b4e817c6c093a76a733a941j0a@ХٖJ,!̘k$X(B^pZ!)uV)K]G(6yyx xV>"`\H~࿺StEL Ev\PKS=P (10f2fb8c9a675b1e863c9404a94eee7e9c60ce6dbcPKS=PB (f82c21224a333d46d330c1290c2f212ef4e3a210;%6L UPKS=Pkq(22e9ce76f4559a542c9a1f499a6ea238a212b2ca=r1j(J:C r#P1t$)8@.@id2M,)}zxiu|jyY~wov7zuɮhH_{6=nKj]MmiպsF wR[pwڌk]S01? J`< wRr\k40x*!hjqk & `Ex*پnxVo^]8yBHmOr\Dh!~\NP_]L^1ށ@%<71n3wM }v `Ex*姀w !=qk &n>M[NPN0"F7 ށ@%<71,??yX53ǃV5Sr*,L:IwA+u xN)qCjWګ?2aTqCj{Rk]S01ށ_gSCj+Z{LL R;{Tk]S015HK~_* .Lfn$Ɨ6%C0r33 ށJx>nbHm[qk &f;0&V>ŵ)_.b j &f;0&V>ŵ)O S1Tpa@%<71V˧w !=;P `O˩*X F^w|@0x*!w͸53ǃV5SFOǫb$yށJx>nbxZ)8yBHmOr\kAjAȶ D~Ciw/k-bxY4$^w g;rWxf|ĐmNJEPcbxʳzއSKT EF^wɄ?׼~mbjʋT-wM gk-q6:Vx~ 7IŻr\kE}շ]>r33[:AG$"9?'O 1'q9wM gP-Ց;z3sӰVt/PKS=Pn#(3bdb1371eb502f85b076ae4787281415d6947272 0XPKS=PQj/c(bfd2d4821eafd29401aa979823dd86e6112f659aKn@D 'A"{8Ț@ ,njMwzH z^[üM`0x*!>[XuLxf|_hZqkJ&}'b@%<0wq8'/Z{הLL R[yZq@%<7:|" n;ȋ6~=G_U/<2qxf\,w4\wAށǙѱ_{6>ЂnZyށJx>nar^SwQ3'/Z{הLL R[yZq@%<0 ;q89#ŞPKS=P 3(5790507ad15abfb517df6956ffcfb90e7b1e6bfbptQ=PKS=P㗙 (4ad4385613a7b93fb116b30566473abfb2368a45kb PKS=PO{x(d76d37a6ffd09215782ecd1c935f261ba3c68edbkbdtPKS=P1m (e93ae97e624b06bc697beb68c9eb47da5a86fbcb[ bPKS=P3C2M2(672ddb30a44d43f672f7df2a597c4d6706c511cc[lUn T`zIS %FDL \L M#Mqx >h44.⛀Q!ϙ{wY)_s9s7̙N pG2(=ddJt98y *I̿wgsem/r|K&Ƈp9bԧ=|֤׈y}WtX(ܮ y׷lYfZd/ &-HL3יEf[r2rCw@%V**!5Fh6 '1η|Kx<~3.Nˡz;nAܥ˘ @ Q1~QR{W̝Ӿ+lY5$qίGJV$8.VGъBSUld%P8f(wnG &Gu wj8`Q `:^O/lLűT MujlSå4|H%Yrq *)G >…UP %(! QT`k8ݛZD|!ho5#nykh]y+t̛C5lqɿ'Ę1rCʜ]L0EUG S[8߲g v?m+11lYztWn ¾FQ1QQkȐ/SCZ3eEJ7'$^ q+y~zqЁH7x8|fkz}T P;O~~JN-y?<9mrۍf V\-qy| CXED'8>M{h͖}w\ק%dPKS=P8#7(a8990753a5bc332be3853785d0615125703efa2e~PKS=P]W q(81763389ce983857949f29ed8d5fcd5069853245k7PKS=PW퍢(e6f4110c01b178b1713f363d0998788e1f04a81d0PKS=P{3(88e04567079a031185e14d278d9196b285fd34b6İ#FYL 12r`dPKS=PM9)߀(1bdedcb9197787f0eb19765c614ca1603fe4dfb9=r#EGED@DDmE8 CD 8'#8 8X駿}UTc̸m>~pݼwq8=Fz4,}~uPQZ]_w)p~!G0jx|Đ޷Z[L?ux5HL7x*!o)ǵ)ItwR[ں`bj_Q1Tp$yށJx>nbt:Ͼ_{ro]%-ӿں`bj3#r'-ċ|T  ȋF&ItwRۇ~5OF9Cm|Z7kvZ6CT UފSۧQAՕU0"|FdRNP`Ex+}nA'W;0&e'ku𚂉텯+Z**ךWL R T 0 F^wZ|!D [I f{I^1#dF^ twRr\k뚂4L7x*!hju? aRԍf2#w`;P M }K9uML^p ~H;P M |HSkm]S015HmnhVS01A#_wR[ں`bj^(bI0"| 7wG:z7w5|Pת`Ex+}nå~#w`;P M }uNG)%#ڢ[1 =qk &.^}BF^ twRx!l_km]S015Hm>_WQ10_< | Bj{Z[LL R; e[v/.޵۽v|0*{_~*roVٿ[UAbHaX;rSx|Đ->V,*nw,|| j &f{9kvo6VP1Tp!yށJx>nbKtk~p`xNRӿں`bj3/ :jx**?b7<]1q6]m.gurCWl`-r\#_wO ;Xˆ%. 'Or\k뚺>W8x")Z\k뚂 gk-qtܸM:ݸAzƟ'>~d??n,nY}n~g]>j.)LpQ=Wܝq7ww !=u$$.ǵ) ŵ:u013v觞#%ܲPKS=Pz(3c3de49bde1e92931b33b2389e46e20d79d03bb5{?0mzdPKS=P p(5aefcaf6c8935ed7fc778b9b26905ac205ab8849cPKS=P (05a18c3b5750c90f1b9140d8e64fe1a56e83644e;ĴQAn.U L,9v11`E(< 0 0a Π *1,\w!KHNm*E/^A4St`02@ƙ!E FSdE8rZah'݃&@(h( HXe`8 bQ x| j4)$s¦2l"x#m)D"UXLG'hV%"8uϠDB:FP#'X@{+b_Q/ET`TU ėqA>pa"{<>J̳+#'–$p IFadRQ @.L;,GZwf 1puxÌpp`u9R8@܉Z$JA0ӽ)0@/S,"/ u72F a46 n莤n H18p|nG  PKS=PD(fc839887920d7a85771dac200bcea8bf3ae6a1fb~PKS=P (de8d80f68f51784d9a54c292df5770a592791bb7xPKS=P5#(fa3243ecbc0cada206627000a927facb4ae3ebe6pHLb$6PKS=PĹ{9(746a547e8f886a92f31cb3b4354bb7e539e9dd75{1A# 4qPKS=Pg (79b7f50607b09f366b96f40030198fc341ca8d07& - PKS=P74 (2865936490d3421c83d455b2b1f345079d5d243a; ~BPKS=P26(873c4c0406307ae5cb9a82c61f84244a893215f7+?PKS=Pe(a2d2b11412a6faeb8553b981c8679303806f4547 PKS=Pt (1b04867f9e4e439f5023dd53d259e07e8caccaea8 PKS=P~܆(f120d933c03d9651601b3b8a298f3b99d02a8b28[8m 4ePKS=PްV(a0f12add9cca03dbe48ebe6ee3907f2a48c81d35khhkhPKS=P9lp.M(4235833e71fbf2ab3bdcd11c2f5f1acdb8e49827} `bx71`PKS=P}? (ff322a3146f85438755ef0202ed6dac3d2b5a01c3۷PKS=P_ (01cc36768053f8457752e3430a267fdf2ecd4440[4,PKS=Pq<(6f5de63b1a9737092eb2022eb5a58bdfe6eea2c5xPKS=PQ(9b8b2a0ffa259bfbdd58287cf2e6ff46ae7f748f?~PKS=PN^(2b7aeeeaa668302c897774d48186795421d5a2eckb߿@PKS=P}ރ (5056d0179c3c037bbfbda648f5599205817c27202PKS=Pc0(9616e1b37f74b4950bb0772a00e76b7e2c8df94daPKS=PU[(8c688e3f02394d32af136bc6f78c0124a647002eWN0"8M$I !A&By t.`IvqhJޝWz$"AϠTt P2yAX^ߏ PiWyy_$>``>*u`ub2]' v^1TgQv[CqƧŢ]$S!"BQ2xÃjC4MITekQEs$!m+wgŠ Wa5CRZSl q(dKb$/,\AJڑ#P|`hv{|;3& *&]/l"VX)JkJᤛ0Ub۾=E1E&27qH'PKS=PY%(89dc837df5ab9a7ff312fa77f7ef1c46f59d2d21kbи~ PKS=Pʤ(02da97d71128d404f679a59a7ced26f45cb85d9fkb36?PKS=Pj((66f7a1cd8cd91cd766e0124ab0dff2528ac78a63SP 9PKS=P-(1438083810f918816210326d592101db4ec2ffcePKS=Pl (090dbc17e07ed9523ec0e2d924fdaea42c79f079;`p PKS=P]B(bc7a16c2e6433cc7781638088150d7e13b07b6ac@`PKS=Py(a1936eece67839d63b84f97965320d576b5a4fe2khhhhPKS=P[(732d1e0aeeac9469acba144908f0da67b2781c7b] Uuz=M.= C4SKSHHH7u=+j٘NPzĈ1a񣮦&aJENhZJv{ͼ̼ݙ7޼ffΦI $3( D/7X`QNo렺 -*7ȡWmt9><-!mmSȂ" VDIx<{ D/7D7b$kR&P7W7d<>ӫ; I: yv1B`B۱ ]^Z] |`Bư2})}iH=>! 0c܂X!mAīYpF:9Y4r0р)2-%g G=n<h8}. [ EkA埣̀#0jLhv$a씾nŚ|H iXn^߫@&~Y$@ [oN7Pc,Јo' b#h-O!mmSȂr6= 13sх>Qˍ083#زCۦ EnAJ@rC@T^CV{;%C3gq%;> ߀ (KKWzEL;`Dk-3C|]>OP"}<݃jSȂIx؁hrЏ sQˍ00c;tu—.0dIQ &0cZYv'| Y0р;_X͉xwX|ܺb Zr arT@r#Ϊvt:M@~\T_V`}p"~?F>3v8?m Y0р[ iaq |?- ^1cGʮ'`*;xaQy |f7uWVoBL4`B*%>0W'ˍ0Y4r0р)~ &0c ]@ur3L?, x|B@T~)Lga`Ɩ͛V6,h-r bUJn|a/ 8Y4r0р)W><@ 0>a뢦՞}PwkㄔE) (+ " ak>pԭ1fog x|fl%CV,%ouN]DN?7F`4WALuZhu[e3pSCq͂Ԗaa|P: {(0rsKWAb-=|N0rԥѥUovUC+p=zg樱qfqΣFU)uuqF p̧tP>@~0\qOеq3?ڃ .KGt P{GtQߍwƑ(+zH[y``V#~'"Z[++m Y0[Bi‚!mSLĻLY7X 6>3#زCۦ EnA'yg x|! *҃!o<@D@KF YK>9;dRxUS@&n.(s͕C?= 8 ( D/7X:˯@~3*dݶ9|_pXӾ 5Xf;YꩤU1XwNy"NK|Z‹4^#w .nԅc݇M !@+®NL-՗foMYE`ƖW(!mmSȂ" VH[gjA|F8F=WE\9%g !çNs*VӔ]CL300cm |Q!%s>F$7nD~3@raVy4* ڄ/Ị|0`3ȭU r+̬IO3!7Td->|z-p5E.Δ͸wej^\>-^8cI`_5ۖ2qqc%K}ʻ[ڀ:ttA*Q`qsi5}k?/hS`Tɤ-m*`Rҍ"iQz2kud) F/خZـ+'@=7G6֚FU)u6#0f !ioT|J\ t^:`*u4J;%ᦶh[deF0޺Xȯ,z廽R?5_|f) 5n>uy볚 Ե&8* W*[jB{]9VE}oy)5Uٖ%X oNI +dWKшjKџ'ֲ&]N\>F+{`ޙ([A.' N?coikWߜqI]o qGغtc| yV@.0s`/Es_/NU(:FS Rv*G<ӽBZ)nq\0ԝOMS+ռ1R gA9G0Α=;w5bn]e:w'ICVXƘPw#f[էfS"3={l|kY)u֟ zKSz}\~KtٱnA Smʨ[rq^C(6uh!R'ޫyY8EW- %gI\lƔ ^xDW 3ʥx6^t  eC>(݄.k;pdwMCYp>(U2GC33݈n *4BoHN7TrrQހn;hs9eh|Yc`Ϻ,zVse5 XWD;ғHw iCWM\Xgp}A-]ؿA3pst'A氼:eM?6Q0cj|T~ŏ'sĸhdpȕogPKS=P! (19485a2c5690f3c7ed6ae53bd655ecde103ec2ffPKS=Pxb3"(5012e9f849c48b4887d65e211cf70a0c33273fd9b((((H(@P# PKS=PF(ac4444a098e771faaa25027659958717b106f99f;`0PKS=Py; (38da95f7e2f5e2087ff9660b5cf524998780e0bd;PXx` PKS=Py(a4654aa1c5d83bccc5ad08f1e1283d16dbe24efa+(((@PKS=Pc% (3ab8bfec83e94e5e79d7bb30581c05e2719f617bXx PKS=PF69(a0b56ad40b2758880cf2cad4b732950a94c6edf61K0ǓǁRqppKăvpz_GUEnt QD=9g^i.XQח!XwX $nnSi Y`IO36{gF`(14d5e147b29c819714b3c90afedd1f6186c5ed2c{PKS=PVt&(f87aabe4fb19d288cdbe3c2894f5e1bdbc29b170RIJF@l PKS=P>jm(51e69892ab49df85c6230ccc57f8e1d1606caccc+PKS=PUE(ad0d0c625f23e9a3e739dc78fe2d1660e9665587PKS=P(JJ(b9f9dad3b739ba9cb12931b8438d767dfb973a38 PKS=P:l(a4d13ab7db73cb2c8c16bb643241c07781beb7ccp n!4PKS=Pdj (35a349bfc027b31718263621f809afd6697840c46ACcBPKS=PR(84e9cca509eb8b9d2f623790f4d7016aa54f11ab+~PKS=P (fbaaba6f117ed9851971774ac9647c7de8ca8a70zPKS=PD,(3d06bf6a5bf304155e9185b422cd1f75b776fcad&PKS=P7(670873763c7d65e74e066a83e72ce6bf5d8801db9PKS=P=R(4a1857b3e4da373985af2abd8574709668f3aa68PKS=P# 0(c7b7c64bd19f4db1d80be368a09a118ffe4829b7[İĆ]PKS=Ps(9479696e260394a287da383355e3fb6c490849cf[:PKS=P" W(58e68246fb5d1cc97fdc67d699a6c55e4902b89dPKS=P_(8ffa3514664f720c407bf8b3b1fd257d6f0e4e2a{PKS=PQ1(84fd1f7d4bb8f5e1b05a0ee68f6f790e115b3b29 L 㑠 PKS=Py (e668c0f55afc0184be7481b964cd98925a237c36ƢQPKS=PQ(d0643e9b0d176ddbbe9778c8342840181a6eec53{ "ʁ2DP PKS=P }H(e5192cabd42946d563f86d5bab497f75049a4008+??PKS=P}!(e56e91aefc30952bed710950750d4d4287e23f37[İ/PKS=PO;(36fa32b3809b0be449f71e14ac856bde07001d533PKS=PN(bb8b0d8aa8fd77570fa554f3785826a227304b29ڳc?~PKS=P}&P *(8a710eef6f55cf5771ab6513e35fb9cc894077f0@2`RS+PKS=P(62559daf305d1824308bf24b4bcee1a42c1f8b1a;NPKS=P!(688ca0ca8834ae8ff08ef94442a320bd169b05aekb_PKS=P((8322de7ae6a1dc883aecec16db8e2d6e5dbb85e8{dPKS=PBL(b7dae81710fe407696ae952675b1a622994435e8+b¨PKS=P4ҭ(4f374618a3a9dca2730ecb6a1fccd2a2f1dc947eSPKS=P}E(0535f26ac25eb9c49f1f9fa63ee001224a14ab17b b4PKS=P7(1d4f24266bffd3dcda93e7bd8977aace5b8715e2kboPKS=Pb(53ad753219171c14e410f57c50477ae4f5d874b8[ȳIPKS=P(d5f0d6a003288e72f5da4ee4f4a14e0e8773ce7b+j?PKS=P0M(07b88745b46c0c28d14ea1eab12a755cce4f4212 PKS=PB3(3baf993fa1dc8e5b87ec90533b3f28fec7f54f96kPKS=PF (fba7d300384291e51652162f77b2e49cc1e8f0da3PKS=P (d2031915276cd439cd1c73b5410c07640fdd23813[PKS=P2(45944bb68de6fbe14797a29ecf5022d01a3c7fb5+>PKS=P6}~W(70a18d681e0171a8aded4798179baa41247419320PKS=PF (497ae960a6890d0eb4b2409ac79b52671323c37dkb㑘TPKS=P (261853fee0d4eb35889915ab1e3bd4ff2c7eeeefkb8@ PKS=P(480a302c5e7de369aee98a7a92aa4eef505adbf4;& PKS=P#(bf6c232f4627525c3e2e11a6bfc5a5e580b4f8a5{ҲPKS=P".(f0368958ddb449fa090305d706e396bd92d8c315``W`7o 5.\H @&ߡд L61rrf?;&12b$~I &L?[_p30,d~ 1x%Ă[61RO `ֺpR| G(`(QT@f bho[ Gv ͯ0C-mhk k_%;PKS=Pr@5(50ab45700773fe9609c128d9bd6f49fb0fb01a61;PKS=Py[(0d7a4e20550e3063c1368e7fc03e020d72a900e0 PKS=Pv(bdd2522da81819a4b18b0a8a9359ffc89ceef511``PKS=Pve(96eda0f8498fbeef09f812a668a50de9e883b920pPKS=Pe(5fc4a15cbd660483f3fa6e9073d7a9d6bc95d827bbPKS=P 5(973464b9612093d1851450462253980e22a9157c+b(zPKS=P]b(2a8b822cc2792193fe27d831da13153046a6b7adz~W~PKS=Pp> (3481da7cb9261374aec2b4b53e3894a03a48682a{$PKS=PFd=X(96eed7c125f23f9bdf4060e2a8169fa83e2b9ba6+~PKS=Pb(d7e32e00e7942b068a6de75e9bf05959b2c6f7a7bbPKS=P,95(9001e98660eee7789b1765a5515d8c8c706ade91{8#PKS=Pi0(bb79728a9e4f35537bd2bc87d5a0bea493983cef;PKS=P?:(e26b3e2e7d25307cfc9863ae06dbe57397fe9eac`xͮq߀߂3/Cj\"? L0wECI4mb1~w0jMbdb)_?&:o.F6eCSJKj[ #F4p?a 38vŨ!nC&& ,10%&11@,&EL|0x/h*&۵611bb120<&6(QT@f bho[ Gv ͯ0C-mhk k_%;PKS=PW^(8e5eb68c1bfc803ad5358187eecdb6c85909fa46PKS=Pʝ(9088f6b1788b19dbe13e6d51a41d2bd3b945d675[` PKS=Py0(bfcbff051a2e72ad52fe99acab44887b443c6a8c)PKS=Pg D(68163cd224fbfa961f9257f0d0a2c52fcd5a5133kh0PKS=PXO4(334b9d705219ebafb11d3e08e59c9ad835302631;ĤPKS=Pkqķ (f24f8de29efec47faaabbe6c7f29a956312eb66f{̰ PKS=P1*c(ac05b4374f77d2f54a36db35963a3f6a0ecc2d56+~PKS=P\b(44214d94d3da3a16ff6c6031c542d22a2ab4d587jPPKS=PCf(4a35b9b44934a1698025a9910c9716e3e66ab35b+_PKS=Pa (c6b9da3334e7c5a3480d2d6bf3a8cc89c150bacf;5PKS=PÓ;(487957ab9b3be4a32a1813683880a1271d07a4a9=nGcr@:0G*PXgn0:B! aCj3WVWzfz"~އ]'oCwׅ]Qe/'L0m c6om'/v }6?eN壌j3g\[F Ԭ$6$h% ; `Ӏ'QFC/>Ѱ)~[,AgB$FgjL.DB2zq֌Z\5,Ag)D|E+8/-`M (A8 T4PU UW-\JU *+Elu Q '75,Dx @H3j(7bB3d;4K0+voP^y]B^Og+boa Tے4UIy|)Y͢svM$imTN&/^%#(>'ؠ7R /vsK)Lc[ؚgO@xי_gZYv+bo׀POBQn+boaD|c-z޴#̀W@Wu9YZf/>0ME@[AA1?3Ta+h(rYt02Mbd Cؤ$Ł1bcR/wqPKS=P' (922124dd63f2a8c734752dcb787f9e15a3cd01e6/ PKS=PAD(9eb9d057927b0dd5d37ca67de4cb0a19a60b6a4b[İ;PKS=PLr(6d42eb407b709a31701f62e96255823ba815bcdfOlTKč*jv(` \h U'mRTC0IJ9@ǘCRV TqYU1#0!TqلHP5<޳$N.6N柳<=W2xߛ/~Ri Zs̬MґYǧRŷfn"*X=P;B%y3 /[ .ϰϽj{SgdN>Kn%{ˣ)╏ooٹ3Iχ8;*W{ _9l CbO~sփut[T;ю YK4kvw$体޶Bum4p9z0kԩb~5,zF|P[978?3u9Ŭ\8 ?'NJUAR;+XZQ>_AVLC lY+fu!]iwlVM%į}q&"X6MھTꉤ"4Y=ᑏs>J#c'ꗃc<q(ޫV#/B=!0z47MP-6j7(ta(Mv˟ZMؓ \[1 ɯxVe>ly*WUUSt>3yXxvb8@\L>4jtnݪkJe"J*g/~p@Q.p;@MpY61i %w0q{#6p\ \˽ p.cy儭z{޲Oas |;E Ɯ8Ԗt{S),E Rp @OGp8P}8dw;׳ 7{/{'|{ F;O'V^zp۩Wosw̏N wqZ~9)/e0rRu>#J(!A]VAb/PKS=P$(be8fdd329b7b4b1aeceaf114fea34b7082a31869PKS=Pu (c6d528a05d8bdc718546be4f086a52f2de95a023[ PKS=P@ (aa97bef711f8a35fb9c5ddd029c84c9f3ef3fce3`\Ģ PKS=P`1`(e18b18c12f74d89219d0123a8386d03f0f279032kboPKS=P= (f91beec2eb9c427fe88dabccbd7ac6c2fd4f670b3@2PKS=Pp(0a95a0dcf3512f0249586315ff5f2ead4e6b0ffaPKS=P K (1382c1fe5651695fa0cd59ec8d845b5833cad84dkbPKS=PJ(0cea828ac6a666a30dd3fb81bfbed58560c65207jlPKS=Pġ W(016336202a9512246c068d78e6ffb368c521d5c0 >l PKS=P8 f(a6ebdb7cf5843321646d1ea04eb8d175f2526cf9[ĔI[R PKS=P,_ (18cdda7ec20b6f73aa8df20794ba15c6899e9e69 PKS=Po)(c51d5f63f00e9f0ae218ce110d6e6b9063ed598a@PPKS=P< (b89ba28fcbb5513af86ccbdd83a1fc7c3d7d8699?PKS=P Zq (8159bb872f7961412f5d70ae2ebc2435e3b3f6a1? |PKS=PIV (e9e6b8075165810b9582a9879d9582ed72cd8f2cbؤ$ 0,F.66o .&6-  } px/ϸHd!˧c` 47H,bbD1bB?10G1us{PKS=P (8dddef1597174d46484ec256462e353603325033_tPKS=Px(ce6144a4caf366b2d1ab81795f44951450a7659f0 PKS=PbGZ(74afe2a49493480e2a7dfad1b7290221406bb4da;LPD{ PKS=P"tIT(73666755b1250c16d05d61344ca1a26392e3132a$/ !l"QW! :XpJT726H09T%h*LqUpPKS=P1|f(c2578fed9c1a1a8c30e238808085227e2c3ee815[İh#PKS=P1B7 (103954e960c089f2d147ec7dbba9701fdfb7d015b00PKS=Pݩ(f4280ae48840ccbbfd84b395d3caa75a2f2779c1kbo PKS=PN (63dea51e860861af88badc42114776040586e018,vCn0 #F(PKS=P|(8a4ea9a6400c01285ca2889de493670adcb76b83JnPKS=P"O (b03e7007498bae2cdf02d9f4d83230d87bdff157xaPKS=P~3'(97fa8e4d0f0e5ef47944f84f42924ad5feab7222A`c(PKS=Pg (31f65bdef7bb7e900c32751aac302019cde26dcf;PKS=P G(6adf67a8d24dbd9ff2f230f41e0854624d63f3dc_PKS=Pڒ (1d1aba854c15779aa5fcb47debb2f2a407b3832c3wzPKS=P#,I (adcc21ac8602586dcd4178851e463333c7211459xgPKS=P(d76dd9cdcc082c616bafece6d555263536f23576{WEL @$#PKS=P_ (2b8f4d36bf456d119e6025320a55d36f4198e79a EPKS=P1ڵ (028cb8a65447cd8a37fe382c85f850aba85007c3_TPKS=P! (fe8118143483f62ef873130df466326a49e6871537PKS=PPp#(86834a328795078dbfa5706ed70e8adc7738dac0Ũ  BPKS=P?s(6b9b497997339d5d611635b84422b0cbe78d3ecb[p`PKS=P(?(1e7a441bf84f49aa6d52549fbe0514030b8625a4{1AT!APKS=P4-)*(5253d5c714970c605ccb63c085a15aa3dbbbd9fa?N@$* VL'ׯIQO|hyOPKS=Pc=9P(4c9eabdb35ccbd2531da509f0251bc57319681c5p 6nxti'bpꁳ `~~(d`e̫ PKS=PXS (94537663c8c854a98beefcc3ef4702c1f58db62eĮwIPKS=P, (20f2640716227b9cff1a32c1ab2ced5ff6e1812ebsw'PKS=PTTb (363eebded207f0aa35e48fa8a11120eb8bf296ff30TPPKS=Pv(68330cd6135a0f2f26922b06c3439728c523550b{KPKS=Pp(67b153dededbd6f942f442fb58cdb673e188df60{PKS=Pžs(f428a3beef600b21557ff560ff509a93d4271616;nPKS=P U(02937537e3045d4b572c459fe540629028e904c7[İrPKS=P\8i(a3200d3c292ca197c4fea5bbd0e5d3001ba95011ĠoAa#,F.66o&iqE%X4 ,<&@y]l ?~ʿdaTo <@zd`q\PrU,M\,7~D~ Q j< Y`!6PKS=P%=j (ed2a1fe9f398e3186ae89da52d897fe4f9568fa5kbdx0PKS=P (8e595cce67ff2c4e5b222aba6f867fc41e3147f0[gPKS=PE (277da25414d344ce3ad60b30df0260b9ab08f9a6[ PKS=P}Ud(70cceb62f9b08642ab4f383a76e8028510198381XPKS=PCq)(75cf653ef865c7d75c0746e9b6cb94eccc11505dЀ  PKS=PN0&(7e69da30589b7762dc30845983f915cfbb9805f6ANc1D,Xpqh9 Ft[idR:}_kG޶u;Aif|y^1d[xT,̴op /t'7PuwƉN"T`T7Pu7y/3. !xT,L 2[yeXk(y 'O6 NoiTod/xT,L 2$ LC*ncQ#ؼ!*} wP7Pu =8"'0SoʒX*8sh_OI,= A!|XcAf%Nb$3 o/6o0o_Kھa | <~'Nb<,t|`5︠4| <2-q~kUIpA>}5{ Ar&tL='霖xڄ);n5.'%8 &'ZԆFLD[ʨX"TOʃ l* PgPCKB[ߐV,=eW*=8.e E>Hr 3bO+g2ۥׅ{`eMQ$=ҬrnMnؾ"-XR E+'I# : I< qX%ZB GLMLΚ}m@F )SRkoN\o Tln"S+ȹR 5g߮x7#;ų!UZ.R0]ns~0u%J8ῤTNh'UBu}צk,6\VwsVs^"GAp]Y}g0sPFϜ4\RQP 4!WAZBTuL…*DycO`#4ఇN4Hʛ"z-7kտPKS=P},F(db96b897d2ae1818eb4caaf2722a1f4d142a1b52sbXĐ#PKS=PQ(bf5ec6969d6c95f066f051b20d96196133a1aea90PKS=PQ6a (674c864a8416fcdc44d857a00984600d6504e993``W`7`tP@.$2E,U` 05a#&L_0`:`)s'.13bf-Ħ 3JgThh{.6vo:&r4 ``P 0h3ނ?F_PKS=P '(f9423f72d11b335d1fe38e20d2da07c5407a7f32SP \PPKS=Pu|(360f60b5948ebcb4da59c393ff0d9cddb80e810e+PKS=Pkj3(79b8d677b83fc78fc23ca7b64dd1addab6543bdfkb3 PKS=Pȷ (56882bd6fb8cdaa2024b9824c4d4fde76c244188kb00PKS=Pv (3d3bbd9c33d138cce6cb8b6d7854f0372a6ec3e2X΁ PKS=PDZH4(9e1235cc36e377b4c939fb058b12a4c045865d56kb_PKS=Pٺ1m(62037c62e35cef8e58727a6c0b5c1e6d61be5db6 "dhabbfnbb`nln`ijjhfh.\BX#C W@" YJ 9! a芐ݍDsP/EؑPPKS=P"(ec65f4fb1fff6e20c097dead0ac86053bdb7b291{PKS=PTc(24b57a7624e30f31d8e4d8d3c818831b3a3f940c[XUPKS=P*o (4b89c8731bfa9d82b4d778e2da0e40fb61163cbdkbxPKS=PMN+(df0d5366add060e6fdb5ff256f5250ec33d0231cg``021Z!PKS=P(005141d2185536e855c9b62e6773d3b92974904f{Ĩ3 @,*PKS=PT7 (125ae488bbb7a69a8ee6b6e50d96c56804847899kbPpPKS=P]?(c9ec22b18b66932ce19244ac178bcf01d97e5cce{ZĄa*PKS=P6> 1(bccbd1bcee7f0e2b0f6e378cddaf8bfc8c966c33b"25PKS=P!y)(705f7210f3d61e2840883369f16ed0ad6c31af0c3yPKS=PH1(d8d2233173359f50ec185cc55e371fdb575371f2{0PKS=Ptaj(3fa2c6ce8c8f96fad01446a1502a8d9bf5651a94{PKS=PzK(72e115685d44cea0f008b198916434304f3a67bekbcPKS=P6>- l(4763a5785e3443d6aa72169ca11ee24d78a6ee15İPKS=PFk_ (652608b8d0da3736176dc974991b51abd4170bbb;_APPKS=P(85e53271e14006f0265921d02d4d736cdc580b0bPKS=PL (7c123094ccbdfe3bf242e5019661bd64642f222ckbPKS=PǒK(2774af1cb2beb5ea554fe92852bd78e0bfe6449a`p# "PKS=Pg(845ea0cd54f7e8c7d3993d9c92faa09e42dfd989~PKS=Pʵ2 (67527052b36f7545ea5afd888152a4ee3aef5ecc??PKS=P[(b29523066a0db00acf0030dccf05c413fad131f8kbPKS=P ,/3(f30c5b258f640bedc9dcf498048e8f0d87a438c6{ 6vIx5S:UuF;TK9N1[1PKS=P_^W(0d8fddeb88b9ae4a59d562090d07e8ece0b3968d{ PKS=PG D(58668e7669fd564d99db5d581fcdb6a5618440b5PKS=PTL(10ee00e09d656bf4c829dfdd3871a355c72fef7b{PKS=P꾤k(234b539b841d9c708f38cd76ea5690617031d413```P``0``pe_  bE2 Cɬ11T141pw02LbdÁd\Ç7\ ش8Pq`hlhh21l0gaPKS=P 7(2edee6084f9ce29ce4bf8550b6d8a861d7e597e7{$TPKS=PH(b528352006657752f5d9213032231238f4cf1c2a0PKS=P/_ (f7bd2f4e5d05552d9339df69029c7457b50b924dkhhh PKS=Pڜk(f22e4533bea75c566975b0539c4ba4a42e08d5dcPKS=PbmO(3a2e0b5c73908f90a1d591f547df443efb9870b2XPKS=Pq: (6075454a5213e65db812e99fa0f6d1a4159faeec`O 2`}#'EL|\,F <~ ~`K 3- F KWL@$  v F @Cj\`4100Ma`b`ԚdF@]?5 {F{ fw =7bɾÎPKS=PIP `b(7eb810f22bc56947be2a8f72b5e4d50f6d124b96h`h``W`5(`pcf+E gla`sl_(gCRC(s! {FYw;Obd:dpLL/?0)`bleN,eT71Q1p q?wXAQ/!?ض5O03]bf&!P!p`mcPjEp;pg/0g[8G<٫wcx7Y%2`ƮwZ4O NXvl5So4wgPKS=P ((3c6fcea37dc086c202f4989d0337bda12facd0f4SPT, PKS=P~(dc4827220c568ba6d3e07c7010fc28cff57b0c12=@w_z8D ~PQH*O"$T=zq;dk[ 6\ciiS8O&oZ~:ly-wFў|GIPV%h^LY:jT?PKS=PHl (528bdeaf7747586dc3bf05dba1704e837a6c58bdo PKS=Pd (2a64c14c4e38e3125ddd6e2641ae0d2df9f534bb;[[PKS=Pkg/2(ccfb61e2c400a41fbebd88dd213feda5a331dbe1((oo!AA3 *10pk+f93PKS=P}&n !(edbb5fc06b332db271dd11db164086f709d4db40İ mBbPKS=PD (9a8868decc3ef6a5d47444f870d9cca73e3c9b90.mlPPKS=Pz}(21389dd268cf1295b75d5b9e9b843f243d707426X$6 XNFKa J_ 12M@- y8չ1P+;0P 8 J`udZ&Q 8 Y3> HM ~`b01Vh On_ "&X V@%AF]L ɀ4RA/Q&E#pR؅BGl;`o( g5mQ0(L8 9e t䡭l~XA *(f0f6b27eca39fe8be0f0ea271c7395b4650297f6QPKS=Ph{(0a3dc3f8836431acc93075b900acad79f065ce21İ PKS=P(961a0ace3a33406238acbd6dcef8d2164b79a593;ĜPKS=PJ(649a3c911be2db3e8a9c71e9e0f5283ef17873c21 Ȅ `[zEk"I {ͺPKS=Pm=(e0333f075901075e351a5e00a1e708db68bbb820{E UePKS=Pola(be683d6fc272c78ba44a5da41f35638fd2501ab1{~,PKS=P<(ba545ad8aa47a3efb75abcac758d18770589f1b2PPKS=P:6mk(b45f2adb22b728f159b7f35fd2544bd8ae328546{PKS=Pѷ(37c1e46f695feb76015fcfcfb9acfb39c3158127{PKS=P}(61a84c6f8e471217b7a5bba4f9567ba751e43110kbc00PKS=P u(5f96c31caccf156cdf00ecbb3d2968444f40bec5 PKS=Pl'i(e506a8d044de8593bf90528f3a2f017fd2d12d8f3PKS=Pm (af3797e7420bb442ad26c8c11b06ebc356df094dPKS=Pl (a9b2cc0938e52b2834303fd4335807375a47f6f6PKS=P7:rT(efa325a91fdd3b0ebc4d24640f961260caaad3e4PKS=P (846bb5d8f0826c693c50e36061e1830ce61d85e1?PKS=P { (fc07dd2d0c50c13bfe7be65a2ff804b2fde948ccTPKS=Pn, (fa5862bbcbf36d310b43fd499dc6679ddddd8c490 PKS=P>(213f45edcf000b8feea57495a762c78f0d193390+PKS=PA%(b7918dca6f6b7d443f1129804ca52dbce5062de6PKS=Pux(e1525426f2869f130fdf6e129f8824c1db115cce{?'PKS=Pȗ(0df5a03533bbbb867b40d1a2d72c5cc98344ee15ɠ`uPKS=Pz(a7434f29b95a7107abab9d5ba05f67cb3a18fbcabbPKS=P l(4dc7c9ec434ed06502767136789763ec11d2c4b7+PKS=P|O(Z(ceda9ae50dbf4acf898555fd3cf9e5a1981e3171```W`7`tPKS=Pڶ (71ed31653857c1156cf913d574cc32e61ae62dcf[IPKS=P(d0f9ae297704305580d10cb14a089f260835bd3fϧoàpHPKS=P=%(a129c88c68a9457167307e836c9c681a0edf67e0;7a@Vun0 PKS=PIq (c53ab4b772b1c16e07f232140193ab1176d84a05kbPKS=P (5e628639f0268af6839a89e5d264b1dc13e26a19{ bPKS=PgiA(d54935f6352727581c8309129fd68d89c59dec04RPKS=Pi<(76d07f44b2b941dde25ba23f3e7b7baa90f53b7a3PKS=P> 4%(02bee856071c41c7d81fe16ca529c3935585eb65SP PKS=Pi;(0a4e02096822716574e7ea1a7a7865c31e434de0PKS=Pz(3f0b88f2ca1b46a12cb659c6945773fbef2f5a33PKS=P2b(01dbb5323dae6539956d06ec3ceee97967f8f824vPKS=P' @(2196e21f3bd95f11784c613ea6d8b09cea51deb5ZO@~   2CBbb##2GƎ??V׾I{gUׅZsiձ՜3>gov3Re%8gHSr]l9?~ۘ P!餓z*/ 3E:icJ T){v2,;),FR"I.M% _ჂMWǟÕic$s"> jic)utȣSt+3\#wHe0l>(.mZ#C8nDE Ek]Ee8^cW5xüW4z-xLg.ˇtzzrp{68.xGXpZkiPKS=P8,=(259e2491171633b8bbc16a89d6b4410a63b7b2d3϶PKS=P=Гnd(31995507b4acbe8ae83cfe042e53bdbac88ab260?NADC rMטXXWv=g(Qv]_2 a7f}}㡯y~jc"/Cy3T/:-k{uu}}yFqA#_-;7aR:Z9W; 9^O`4~g|{uҟ{q`h &~ہPF/h K߄1Apؙ6?|ę69 \ꑁ9PyU&Ζ!R?V4tsљ1Ah8l^Q|Xj9#+hyc uLl/n/&}PKS=P/VW(0996a2a90121461db59e26300be26e348523afc0+/_%PKS=Pw$T(c9c48b5d5a2c74dc729b240fc9b2fb71b4cdb7b9ӨPKS=PN5E(59505663b2c336882404b26c39e36cdc1e87f9c10bPKS=PVP%0(f41f647c4cc904f43c33b3bba27cd0b70a1da552xSa PKS=P717j(8a51a7398aaa4ef097914ad32c3648cc5b18a5f2;=PKS=P%6(c3cab65f8d6f8e5f32d648175a3204f96e9524d3{ PKS=PUpV(e5fe01aaccc20898a74078325e0da26d2a67daa9+zc"PKS=PoV(ab61b456695f1708c1660b2e9aef7fb395644822ՔK@ǿzfЀCQǎ"8(.JŎ\*^ju(T9/פM!r{{]e  O]K-r;A"m&Hz1gg'  QCսӌ~#`cX" LZHwN% hN3b(t,cHg '^%(\XGDU!uտ[m[ӮFBO/U\!&v(lZJ4_VH9+mHQ>R4=6?폽ɵ? nyh~8:zL ChV*XEQ˽"iXCݷ:!Vqي[5lةJ)sY&d>Fq3΋Cr)Sgqx/IduT:~~PKS=PJp(a31834bb5e90d2fb1dd8d8c15c6799aff0567bd9fPKS=Pg(7ed1f6127273094681ba5f65a9de808154cf43e7;$PKS=P *(ef59c2ca69d6ca9b79e4083dd846aec7d1a4b96e{ -bPKS=PzOs(1a6239619fc8edaae9d4429b8369dfb28c9f4cc7{TPKS=PgI(172d7e91cf5992bc584ef2465a50bc982323c784PKS=PJ^(1c27c44d4ff426ac19e6e1f740d00cf922f89ede+PKS=P 3(4e062cd4def1c0b90f2011c5a2541f45a06bbf0d[?PKS=P3(c7c54fd9c04509617154d7ecaa104bc26411cd7fcTPKS=Pr**(93a3f5a313d378f7f7c08d90c518b2f39a039bfeŨ!hhʨaa`22ddge` PKS=P](9f37c1df860ce15cd635a3495707df5285140029|y+PKS=P1*(94b3022d9678bc4f61ab971c0425c99c9a9ddf63;#PKS=Pm2(b9eacbb81cad4ac9771fb6cafa2d486f56718ef8;PKS=PFg(b676932748d8774e5e2c66f40ebc3b2dfa168cf2PKS=Ph(f7737df83a86e4a0448b93257cfe021b44f8bddb{¥ PKS=P%(74424256f00c788f92b20dd98e474d69cea50a7a{WPKS=P: (46d81fb6ef37d0122ab8a879c6cfd2cc580e70ac?7PKS=PU(20d783d980a8b93eac754f058bb80ba370d1eb6e+š(HR&O6QݿM tdk 020h⓯"F"|y# Rl=^BHPKS=PӒ (9d1c0b6a00df4ecb55252409223f53bed20685e1 PKS=Pn|o`(faa92a4575b002f517e64e7b037e958e6d16d51b+b_BAX>^4PKS=P=G(9bafab60374268a3399fb009b090b1723ead09d33x9+PKS=PpUA(8bbc40b8143fd2805034ab195b6163b898742245kh 0PKS=P`(1e2f4d025eaa4ad4fe6273473de320bab3d45f55b~_PKS=P(493d181975aac63fdd1fdc0f98ae00a9f4318961[(PKS=P3(f61abdc1d9b4088d4a7711c534792f3c8923a80fQPKS=P݉ (ff55f2fd9652040fca491a0d5d1ac5d67c311fdbkbPKS=P!N(98fe858f1d768795e6dd515a82c1587e74d746ce3;PKS=PNf6 (3a55ffcf7f25e87b3a3ca2eb0bbf76afca3bd07dӂEPKS=P7Q(f4824bf8d9523ad923c51bfad5e08e34655ab602?3PKS=P s(8ec7134b194d80de3a1a0d25b24a0a9aac02aefa{PKS=P(7ec92f5a0c441a22a1ff0b70d1b649d7e37075cbcPKS=P(c(463653eb6da005d27f69808aa90e4ff6f75543e7bBPKS=P·(af0c6874cefc7c07f7dafcdffe879d3ac3b3b16f+bpPKS=PUڛ(8a2ecc799f71c74f6b7966ec292d8506ec2def50PKS=Pl?(3e8530360f33ea974ceafc5bd623897717132abfPKS=P?(4c9260a7cbc411cbba9c7f2c5695a35b99aa5161kbSPKS=Ps(30413e9ab35a0a7dacdd49cd9f4353e99a6c501c3xPKS=P-6|W(ed3db4dfc6a85e38400a2bad9564df6966fd599d`PKS=P}l(e3ef34dc5ad64dbe6e4aa785ab88cd0346e599fe1 ѧBNg!gqe*+ -/R+<jj K ~H9^ETu {mx]-Q~(3@PKS=P&(b4e650b9f999c70e0d44ab7aeeba6735b5e17f60kb 5PKS=P8 (668e5fcb7931f66262dfa47ffd3d118444eb48abkb0PKS=P o(e8b6d05149d291d308a2ed695ba153f70d1eeaa10xPKS=PX (89c1d3e2e6c3f1a6e9c550addceff9af59e5c884PKS=PH(215b64937c934571e1de391eba9abd2a20380fc7hPKS=PmJ(26162cfa73b1b26bc678b8766db957871bd4c675;PKS=P(44562d86d7469f68568c63c1911da8ba93204a793PKS=PIW(3b5f8542ec41a2766a8c4e0502ac439ae7d7d9aa;3PKS=PQ(d41d0afa33adff9d596ded95e627cde9c6cc4a66[PKS=Pzs(210d5a92646e3fe211649929af1ff54436e84904;qPKS=P0 (412abe82062aae5eb2564940585f7d26c5177483PKS=P (dae4c0d3782e923174030c33834690e51a0bdcacPKS=Pi2l (ce44decfea67f658961426ab4d9d83b285d64b64 PKS=P0N$(2464add5d36d92ef8a9e45cd728c5d0501e7ac470a]dbPKS=P (baec424100f2c341b88b1fe9464a0fccd2a98cb0 5PKS=P7(6ff899efd99c021f64abd04201c6c2c727307c47PKS=P<o) (5ed80899c75601dc6fd7cbecc60e48db4e6cc16eİ @PZBt.EA`Aa#,N42~SˎX*Cn0\ghbsH h-\C(U@RʁgAL%6z d@jd/#3n$m]Nq/rvA ` BqOIq4Cidc ad XE,'c1a#;R$PKS=P!PO(c3d367aa47dedde00a8f99e3db06cbbcc922cb1b[z !1n 020ϸa2!F+ـY4/bde_a iPKS=P#qpI(925ad5623d14dbcb1cc36aeaab6e2dc2cdb65eff:8WPKS=PRD(40b6b038e1109c725e204b40805d5cfb4095eac3kbSPKS=P] (37dd002cc4dd1b4ecf6c53a59107cc9257c1f8ffkbhPKS=P] (8f2b7ec2f4d667256f83d777b98d85e440faf7fbjhcPKS=PmT/(a2f3bbfc0a1be5319b7f01543c1076ed0080d6bd+bdPKS=PIL@e(e25ffa5580b2bdc2485dcfa522091fe80020492fPKS=P\ (9305e8ee9282e10c0aeca6c86dff2208ee505709p PKS=PG(d02f04b87616e907044c23ae7073851501454c62TIPKS=P =*(6f417aea9c8e5020de455f758602d18bf5db5ab2cDPKS=PsM5(e334229486d967de4263d09b0a3fb16e4d39c33935PKS=PBc}(e2c1f6f521f517693afb6edd07f188a83509d1fb+PKS=P (e8ae6a73edc074f5df6e70252b433c0a2c0b0446[rMPKS=P"(5cb55bd0c29982b748c578b1469f13ac7d1f8e80{PKS=PЀ(e4ace6c22e4231a0d1208e2ef8ba4f10fed18e3d=n$E{BDBL +2Vdd,$`#!2&"3 TVS#{]{{.um=>tz\q8EjeKew}(pYo#G0r33 ށJx>nbHm[qk &f%C0r33 ށJx>nbHm[qk &f;0&V>ŵ)t@T \#o;P Ma7O~Ƴ~Z@/%>o0-ZLL R[yZcDB|c!y3iaTqCjЯڻ`bY)@>QNp q]ߖ+oݚwʎ JP;cT]]PZ#o;P `gJʩ* FބwoȝaTqCjϲow9:yM~ʳڻ`bj>QZNPI0&|Z{SM y ,ao 0ט3_&C0r33 ށJx>nbHm[qk &f;0&V>."WNY{Z?gLL]7_1tiŌVLL RGNT  Fބwx;H 0x*!o)ǵ)ûn)x*!ijqk &ǹ˩:Dlu4 xx*!hjqk &T \fVP(yށ'~~9WACwU74zMDO.ށ@%<71-?J)9݊_k]S015Hm) _WQ1^ގ#@%<71V,)8yBHmOr\kAjA??\m_0*:_fCsZK&ĐYǫ8rWxf|Đm3NJE>}ws _G }^NZO+ &-0SCw7&f2u@ws LBj{Z{LL R[yZE~AiwS1 ,_{qY,dzz3:+61ﭛ\/LVG>@%<7117 ;heg|ŧ Bj8ڻ  U$9Yk]S01l%FSwʎq{/SFz"@#Yj݇'{}k@pYo[wW\pJ]N?0'O 1'q9wM gP-ՑS}z{BlQ pmPKS=P<(df644dda62079fdf4b63348169f70066a4a2ac23PKS=P1(9fe4758f5bff96c711ba82922ce537e040b4d21e D N0$pZsXۍ[]fy&NBծS#r;$nD .O*t T>XLXHՔC%X: D*1#\E6P{4|F*fNPKS=P7(48997c5e03f4a65954ea24ad4bf6a6d77c543bd7; pH0,PKS=Pv4D(833c7a41f0f93531d32c33a05bcb330acf469574[ z $Q%Q`*A PKS=P|j(03869acf7a0fb28079f30f5ac7a6aaaea893874a??PKS=P;M (7698032dd951155553abefb88538aebeb9c3d2cb3PPKS=PQ(#C. (33c823d8f0053beaedc0a819de924371d2f65949ARB 4E$޶E[PKS=P*0 (e7fc4ea91b62702bfd53556cf39a48532802151cưi!PKS=Py(0b0f21503786191c781df85d11bf5ca6f8584a13{PKS=PKA9(616bf12ff49a1967ccff9fa349879c2f05dcfb4c;ϨusAC brP187}@G qTHl>U{ZxPKS=PoM2(ef7c977b8d2dbf5c83911623d12d443a3d356714c>PKS=PJ (26e9ff0ca7b3f1f6b0f3fef456d61e20ce88f18e[İ1C@PKS=PXQ<(18c84634b920c75014174df6ea17cb96d6ff7623ưI)"&&F PKS=PO (8c2791d15a671d7f4a0a3abee40d55efd87024740aPKS=P#(e03e6bb8a40000a710b9b5ba0508d2f548a1eb29uPKS=P (1a7d66bee7357f3f8b716c89723962d6fb1b75fdcPKS=P  E(86b4dcd47668e103ded98e997ba8a7b5dd466dea{̰RPKS=Pu (ddcd7ecbdbddef938f41c5170c0e8e9b9e39962d8:PKS=PC (519579dac4fba364715446411a412b937fb5aacfkbcPKS=PI(a6b17310d81c2808e9b3101ca6466f1f6b87627a((1p10bQC(HȂJCIlZ@JEC_@ _y]l ?~ʿda߀߂h/#?3310$yPߡ̲70Mbd C6' sC\PKS=P (fd873563e4db6d73d4d058652db4584a470810623[ PKS=PwB i(bf2a7e6e8c9b29411a9d19e3c0235c35eac7076cpLPKS=PZ3n"!(ac406ed530f0fe80bd2db17212b3167dc71e193eS8tKAAA^^APKS=P#" (949e2cc769e9e40fe76a82933ad8f3baccfe869c݀ aPKS=PDD (b0f13de85aa54f8f52545d7762c00074a3dc749a`P0}`aPKS=P|$(2cd4a211d3e647b62333c19b7c1bbec72b059647`"g`B C(,OlPKS=Pc{(9080d0b14967586a3126993f84347948fb99c2190 ` r"ʴ8PKS=P(fd49d068bf75655b3aed915f524a837719433bbc[ y0Q PKS=Pѫ (b0312515e4664d9972bba7275bd55bd490279e208uPKS=P(7e82db9866b51609f9cebe69fa977418a6c280210 PKS=P8H p(ae85ad4f660ace14ed117f91e3a47b6656d05c12bPKS=POu~(5f854996438eabb1302fcb7faa6b68ab9920986cczPKS=P(bf4695578b884b1ed65fa3610a36ccd7afa149b8y PKS=PWIr (3ee2276d49ca9447254436223b071e738ca836da??PKS=Pנ (c819afc73d5b711f7fe0fa1b6444a0159f4e5e91?0PKS=Pz(70b524d8432bb469b985ec7c4b77ce3ecc2d95a6kPPKS=P(4ff447b8ef42ca51fa6fb287bed8d40f49be58f1PKS=P(561acf99000a397e497deb916fb167dc2e1cd392{Ÿ?PKS=P(k@(657e6ed5c642e48711f16a4eae671debf02cfb0aڱ A] 569'!U,p=ɾTJzR6yJǺҡKO0rMt㴈ޖpͥ|/=BECPKS=P:'(7bb8e86550fdd99d3c3747e75cfb6897ed46cf7aP1H@}?kEiBQSptEnE7Lt :87 vEg") ~V;?ݽ/;`:x3O9]X(U&@π<c_JuNh67(Zsy,™w-b̏*Xj\@b?bBk-hB‰_gq,[-9ea20m6tהH Mͧ=1ygΔ_$q2rU_*lhJ8 zw{=^\tȎV?PKS=PH(5ea3b5035f78ce13d62895e1e12f10ec0ce154617PKS=PwԼ(351f5523efdbccf06e270fd900c46a37d889f75cPKS=P(d8f296c34f669e7d5af2b9e7203db8d5cfa9021c{ f1*PKS=P.(429977327250d9b7609457b684a9571779e4ff843. PKS=PY (3f957d0063766eb44f0e5be60fc9ec66ca07f6cbbW`gxPKS=PT(d208ebea7da835a7bc284ac15b7b5339e82a44bd+b_B }PKS=P(36262815a9af09381be2bca96bd2305d92bfe904gmPKS=P/N/](3bb05ac6b5e904b479ed1ade46d91ccc1271a6ack`ߤ1WxvU4Uًc< z"xO΃ez /#Lœ A0^ߤl4y=_6M<͛y}5~)JQ)]@"Q[ъ8JeaRZġgZE m$VUdCWPG uR6v%ٹٚ-FX[ha4;TZ%n-iEIAbT1>KJZNHq5잺lo9 6ol_ BY"6G~=[# ue;p H)(A<qKde,2?Dlۣj%PFϖ⡂ pwVRPx: ,~Xd~ H))S7^339ظDءE-^-ZW&r$n-h>~n5)%JSWv 5){rA ll)ޓ8qY"jR J`OA Y̏?5)=eJkfT:w;T(U+>2EDZ.d?M+,~)8%IU!&A5)%0 2V/XY"6p=[K ue;p H)(A<qKde,2?Dl(IC=[ Y6AdCۮk:hKde,2?D)SlY"PݢT J`WoΫZOi`v|s 4m~+;66z B,~m5)%0 waEǟȚ2%p53c*;A[JA *ޢyUi"-L_W-h>~5)%'?IPKS=PT (826227c3ee4e48a97f6265fc7d9df665b948c369{3PKS=Pf$(ba568ce850200e97d5fceec04523310269e0f8b0bSPKS=P;9/(8e60fa13ae86445962e13df1834a013dd7b4fb91YN0K%&TBbԥb3 0vb'@l;X8iL?S]6|}n=kJ%@`Oij]wn(/> XQa;T Ⱙ/Rxӭqʺ l[^RRGr!0 JxWv`J7=F_}~Xʥ͏DQ>y֚w:bQm@*!–X+Hߍ< _-jl]婼TC _az%ʄH!bbSxz_Ne7>` Fr__B"xJzsd%#ްAc ;5C'0^{K_a~/ʄ|jnX>iBQ[Jl]ccX%)%q>Q%fy׃Epn@ꆛM%8tEKe,`uXS`u#]jiŜ+k_f{3=;!9<>iaHPKS=PR (5db00b91b2573692fad55ba557cd2083cf03eb43;ٞ1FPKS=Pq6l(042dc4512fa3d391c5170cf3aa61e6a638f84342PKS=P<(baa2cb33a23b6a88b6e6240a03fadd84113e8a35{ HX )$>PKS=PJ (09af192577205e93086185637645baea1a216172[..&PKS=P1t(5883230412c8b14b276dfb0d891c629996762d27İPKS=P (807ada01dbb0b021b0c5c3da8c780b7f77eb3485[ŰDPKS=P6,(8c84288f4e1a9427bbe44571b108b87c73c68367{PKS=PoO (a9452b5ea2f072d91b9da38d1aa23d6b25bafefc;1,{ PKS=Pp9%(b055026b50aba18aa1df2cf12ffd2a5ad81ad562[PKS=P|(eff779bbae75752b292129344b053737df148095kbl/&5PKS=PI^a(c1056cfe1d99cc66417d3e4ae1d3fdb634f39357~PKS=P%(7f75f8e1a1e5aee4e08c7cb67f1711d2ea812aa9Ũ$! J L PRePPKS=Ph"ئ(b9412dbafb6d23371aad888a259f80da434a372f PKS=P+qy(460b0df7c8e02d94266a3a2309163af9f3720c861n`f"zJEHXfĈ8D -``A]L$My%oӁ5yUUwy1v;cSuxx*]5;')#]Ia`?wmz7RƢuI5ߦ;IS,oK!6. oV# +^_ѹx}ǃ|R(6cb7a95616a144dddc8a425bac99788fdae1d1220 PKS=PJ(2acab87b19375d3a74eaf8bebd9a23d2f15dd4470 PKS=Pxi(a2480e60388490393d2c4eeea7e7554c9ef51547Ģa.&&PKS=P0 (10db30bf59553fdc95560d79f8b472493e859b343 .SPKS=P 6(1c291eb78d923bb6fa6ff971ff790ada574446e9+PKS=PyA%"(7021a0e2e76077b1dd2b3981815142ea68f51ecep' ``:q"EL6PKS=P:LwS(f95d369ddd6b5aa8df9aee04b235a780d20bee67[0PKS=PPƁ (f722f29e88e8a3fe39428d1c4a8af268262940e73PKS=P(d7dd235de37bfebc579372bc8e9f0b1c9bbc66b8İ;qRTh8hU ?X2P $P*P[W `jTVUSUr$~u71)8(5g9B,4 `oc`2tl&&4]-ب^\&p킄QE\VD-i T$B%P-e1)lB?r2LR)\# $21l`l PKS=PM(45b07792ca6dced1ae2ce6fd5de118eeb4bfd4b6kbPKS=PJ(7dfb783553dc434cff5ebfc85273e7e75de5021ccPKS=P(44043076ef95903c7b1a6b72a759f01c2a7df305+PKS=P֧?(d0b977d6479365a483f2c0f218ec351a54509ddc[PKS=P!(3b930560ebd796d115591452c0dd199a4e220500{ĸZPKS=PT, (7a11114fb05f025a418179f0e92a1b9ac3531102lPKS=Pp (2e39d2e38436e08af07fa5ec43298faafff08b49/bPKS=Pg0(5b1b97afad507f9de6ea46610831f6d4a04dfe22İ "$2PKS=P (173cd5944f1a1ff6334aa6fab2003402ce84f21bkb?PKS=PH(862d932ccf10b86e27d2d0f11915a22ff99508213PKS=P˘ (b03069f7bf88969bf9faaf136057b556415287e1PKS=PPc8 (d7aed2ab9c0bf08d4a0ab40517e3d73fec296ba2bc8?PKS=PQ;(bbc4a751b8b89b1429a99298e72a1680a1912d6f5PKS=P~"(390f12ad0740e319821fb69e01d63b8e45d4e9c4+bbPKS=PSK(69a3451586110710c65d19a59cf2da6ed3baffde;$#PKS=P8H(30aff2a09135ea240fd768fa9a0110d79a92081cĦ+PKS=Pߦ (57c359c27efe25bb96834eb8db300c8f2e12004d|PKS=PƘe(07d962d995ed904e9f2ec57634d5f64c268c717d;>PKS=PԶj(5768ce298d2a70d4b6f95a36db009088cffa933b``Wxîq߀߂3/Cj\"? L0wECI4mb1~w0jMbd[b)_?&Bv1.00V_0Vbd11p10,bb1204x'aX^k.&!&ևMl* a gϨ*?wqp}x7-~@uhF 6x4µ/}iPKS=P5(3968cfe0d350c552def5058d06913606928bc31f3PKS=P(65e48a2b33acb922bf46daac37f7fc96fbdcbc58PKS=P9v(2eee9eedfe6a609dfda2ec1d8343f5b29adecb07[ĨPKS=P\.(76f27ef22670f80d95efd25d3cbc158bf764557bdJ_ W+PKS=P,~(ae5ba6f5fa77f567d0cad110aff2d0663e3a1863+tj3?PKS=Pe (f86cf5882863e5d38a35b831df653e87937ec06e33PKS=P5'SЀ(33dbb5c3ec37bff1156b0bcf9b5ea957fae38b90MnEm!,XBl@@a" 8R1@]fa8Bl#0LUQ]O}Zό츦;=g.GONq]s9yvv氜:߶]Ma?.kC#ށ@%<71-53p Ӛ$rxf|Đ޷Z{L̤w`;P M |@Sk]S015H*0 Fބw>^>omܫk9_k]S015HmTk*O}k=t8*z;b& 3 ށJx>nbHmZ{L, ?(g7ʩna:eFޭIځJx>nbxDRUSc؇QAՕU0&-I/|^˙`Mx//80x*!gٷy{FZ')R[yZ{LL R'J˩*0 FބwA+鄅$+^cW$v 0x*!o)ǵ)I wR[Z˺;XufFf2#7;0&woL܂s&b9wM r*κ09[`b& Ef8a?|Đ45Sir* .L7&wЊ/l6'OACW#o;h}zۏO=DG.ށ@%<71-׹jnt/ǵ)cr;,8{#o;h}F0r33 ށJx>nbHm[ifGHmOr\kAj/xQ:,Tq;(w0v4Xߞ3o::Lrz o6/.SNP]`Mx*Ln]y'hw !=qk &nbbnSwʎ-. 'Or\kn+Td-wM ?s넟53]Z"Za\#_wgkw !}\k]mw*%ETS01u>lt 15xx: 7I2n޽An,Ã=xޯ\|f3E^@D鷭]pJNkOBj{;H I\k]S015HmTkuT?`y=È= Sozv(wJӶPKS=Pf(9f8829b8a3235f0190052d2166c8a8d45a4ca9bc&PKS=Pc(63e631c134bf5cdf5afd75eafbc9319e7428a4bd{pQPKS=PZEA\E!Ѣ*ԁY2dգ @QLuԎ u8,)1 I{GY2ɏ}%/? {⯖^o/qF7ѾŦݣ0ڼ{Gq_ź{;g-!ojD[uC!?qom ھ?:.yt+o'k:]q r2D-ݣ7„nwM+3-+韫bJv;-v+'`o;h{W89BqHav}#OD;-U{V["QbϾ+/~m~啲QMӣs|"H.8)ڶ1LI\Zskf= ]^);ihNS(̿'BkE6ǥ2O>޽5䕲A" WV1ʯU%k. ozr0]&8R"B5ڃ.{FW)6@lT@*4t GX 2k*sޖ*~42*"~3Yo929!E!;Rj ` TDٳ)4 P}UR[*I1uۚy*\,s"ٹ L)=20d`{I\v|6J)`tz*1 ,Ӑk@G1s~?TKYޘdDWN#.v"ť:R\Xw$Л H呥!xQ^ByEcM 8Bwdd,0;:)4N;oJ NͳML;]zb`1 =fQ'Nq4ԩ6N6y[tԉUTә6M0g>77[JwmǤ ֘kT5ة>Ntbۂ]Tk<G=t54K:@fQ v|7? j1/,!yJG(TEpL?-c}^t<2ǙShNQP7VB5MQhf fg@+GC yh݈H<$WI0$j#<&5W*(Y+([vtz7a$<|RYF 1eGCn,!c$8\MTY\PJcmjX>($D=:# sgrO't>{77f]rO{G_n}<싇/NCO2Bx[xv?PKS=Ṕ0:AM(3e2c6f0f99ad78ee8e5e7f47830b0c680976fb12``P`\ 8n1rg \ii:],\61py020TJPKS=PV(5b5bcc66cae9cbcb276a3a0abb5912fb432f0311bPKS=PNɺ(9f7749d4d9fe6f2a14d121592292edcd085f910e+PKS=Pzø(44e695962e148c3d3a58b02d201db9f7aa941412{ A؏PKS=P(fee1724f117e3cb8e108f477f558392abf1404dd+(UPKS=P5.:(c68dbf191a08b8595a28a6f5f2d2e60823be24cf0ap1p)  n97 FV&SyɾÎPKS=P%(a7fc13b2e317fe9125779026830005c4c8433cb1~PKS=P e|(a680124e672a3ece2d22fc5402935a720aa529f1y9PKS=Pub(76f9ccf36ba8c95995d607b3ea375ebff8207870KAǟW4H ĥ2ih )jnstH\"!Z\%Kf<=w)QC{x{wW#,ʡ$B jh 1_/K">6cgQ< ^fٺݻqxnջ;RDR~l") ^TH$a Q.S؎Q2_&Z *R|7igT )ܩ)X DšњB*UU5! aZ.zS/:i.,|'al#mm}[eY]fQ3;6m XUVSy6[Ǧ:ڿ҅ sg7s[yƃoobh` 6A,˸hKvPKS=Px_4(dd2065d2763e1e15ed1aba870afac2f5b9d59255흱n7yTX;HA5FA@4ܤHҭKWNJ~"e]:KΒ㐟@dnn柙ffu>3ݟu?>0X?2Wϕ]i-2J_?4Ϯ>3o7?1 ŀr%f V%k^Xڪb_.@}V׋%lYM\G,42`/:6Kؿ3tD,Hy~70_ǚ},iLm#Sp6j Ǎnuh09<Ĝ ̱' QЌJ9%8E9b>8dۋiG-=63`J8]/Z"L1q 3if U)W1,AVn0,h(}wq Szkw65;nҁm8g~r)ƜPN30EHL.9bhC8C?V%s72:Dl5BM8}ԁK< B׋C.z$X_':ky-H[ܜ<3Xo;Lg0Tܾr_-?#i}=c {IA6ODk?pm(Ε8t|*ie7lj@q %-&9E! 1T)2_}ǰ(YY̧2=,u{pn.ۋiG-=ż{aW.PKS=P`(a340b897f8c5de34fbcb01c7f50704e09e0bc4f1~.PKS=P4(cae5dfb752db1277b06014481ec61b2f4756a6ef[İ^Zk'PKS=P]X(051a35e41bf26b4a05502b8da2876be233a13ecc[PKS=P^Ù (9a77a5163a636f8fa1db9c470450ebbbee009f6aŸ}~PKS=P m(b41ade912e26a9ab53f384644d1389f58cd68814[?PKS=P (c65b1e036618e99a06f91b6224f5828b2b9db9c3İPKS=Pu%O (f6c5c50c3b9c6a856d0b4e7427758fc4186f39b1+,DPKS=P[& (df58248c414f342c81e056b40bee12d17a08bf61PKS=P5 (0915207ff28f7d424ce47262736d778e7637b3e5bdb4b4PKS=PG_ (f1d137c6e4306842b9a8f2b01198c990655b0832kbPKS=P"@y (31250bdd6cd29a2ce46be08c3ae081ba7986ef354l PKS=P$(e47842a5c2f9106fccec75c758b62fbf765c1848PKS=PsQ!*(e5238098a760c9d8061ab88b6f9cf365bf740313`Ũ` ll 0:PKS=PHB (105ede92610b028ff6e731627981cd1e036c04f6xPKS=P(2dd4a1141bd8885096011ab2d064e47d38106cc5``W``3`t0 5.G"ϟw 3_Pbh`hR"M9X -~w0jMbdbD)L?3_=zP@%f&6 F3jl]l~puMb h` @ADk4(`p2z4µH_PKS=P`5(1131410f199703f8303f0853b501a2016229e8b2ԀPKS=PLt8(4cd06b09659eee484957c41a7e4ab849f3e615d3;4 Bӌ)BHj . F<]U"b*ävzN$!A%1+&|hyt?vd߄/h='kۘ`_CK96K-EH!PKS=P[d((68dab8463281665f113093554520efedbcac6dc0PKS=PV4(ed31b95ceed9fcea5d51c396553ecbddee924735{,b@`#PKS=Pl(965b8992c7c43c1d13c9fe25d901427c73f4a868_PKS=P6(d6489f1599b7d28f667524a25ce3fe562eebf8a6 ePKS=P \(a33a5cae02b786c2060461df8c6764b4c05e9423+bPKS=Pj(51c5eb657546380a1a1e163eb0fb97472ebed6ee{ m fzě -Un>9añYZ-a!4a#CÇ7\  9X%4 ,<(620052a982fb6496394169e7086e22f39318a103`xAPKS=P< (f4c80a59f9f83fe5ebb724dedcf58d02082d51a1{̰ 1PKS=P(020ec1dbc68fc105c8bb526f0d81a2b12d97b288  r. PKS=PL?(59a0b9b21be6870bc907874d5fab6a24d16192b4kPKS=P-\ (acdb349441ef39e69afed9bd19be1f077e4f853c nPKS=P' `(9000a6dbf490b47197d87662267aacb92e528623[İ1CEPKS=PLG!(9873f293bd950a362e285bb17705dff55b5d9849;.L K! Xv10PKS=Pin(6126860afa447400c7f82baab29b5ebc83652aa9?3PKS=P>(b5b71d4f3977a73f3e6c2ad3a9c31d2c4eeb41dc[ yPPKS=Prf54L(5f7fa04be47cf0fb9dca382210845c73f892b6b1{Ũb6!#:~PKS=P/(4a7869ea5e475d1161ae2b4fc1cb9e218dbce57f0i"PKS=P-K@ (0b1d26b23932b6b1097f4f9c1f82ca829cd1f8e8kbSj00PKS=P)K K(40e3470cbd10f5ff439d7a6ddece84f8130302dd[İ&Ad#PKS=P10 (55115bda20b6fa9a36bdf618de77e0a2637fc29fkb0PKS=P*{(d6bb9237d29c9db4df31dc9c3b3dd25d6f8feea2X$MPKS=P9\ (b88557a87e8f53cdfccb93bc886612b99a57a609|PKS=Pmj6:(24c8070a4a95c6dbe8864552f0fe9c4094ef0c0e0if*n!(8e!8hQ>b :w2n%l.IPKS=P5wW (312209803aae89b6e90d435fc8d0320f71e0aadbؤpPKS=P@s(11dda2ef9f173bdf93aa5e37c7bf7be655546b9c?3PKS=P ӧ (d4b0a02979200945f6013f9ecde1c90aa24fed118s>~PKS=Pz(060b6a2ec3f939726e0e6d0cbcdea91a1c06c13f(PKS=P8U #(c47333fe9c327304f76f2405b7131909d3795aef-PKS=P^(ab2e195d021f680c9b72f379f70b3ea325d05cac9PKS=P,_>7(e1900f37f9981cdd7b5071c676b86678f74f38414{PKS=Ph|(f2a82e0d264b919b5f52bb599b9edf3f7c223385Ř`PKS=P5 (661ca505ee545dbe38ac5f8b3da4ddfaf62d7955SPKS=Pn~(38b0f8a98da2e5a0587dc4ee5e79cc7200a7958c;Ȱ PKS=Pq3v(1272618c9acf003af388ad1d5e7bbd0ae27596d7+=PKS=PG(fe23538b2ddecdfc5f8b2fb8f8503e211f5a78bdkbPKS=PH/(f43828bd3ce452d6e7408f6e654ce9c53088a026_TTPKS=PƗv(4f697c459c92e4741b5abe596fec69e860dcdbae,PKS=P*]aI(766ee127523af6e580d348a44a28415b4df44b94;L B3sPKS=PX(8b8355a080529678722ed86b1899a025d09a23d4#PKS=P-Z(870a4febd0c5682f4efa9df433115ad49d67073d```W`7`tA 5. (t`~"CC*ib ``Ԛ0ķ\R`X¸ X) X-`|(qͣ( &?& $&]L X~7p4E?FP Il @%@4F 0 `p5;NsPKS=PDV (1170da669b928a6ca0c05322a3a3a59daaf7a0f0;ã`pPKS=Px (de4a51f4fca270afa2b9c176a565191cfe1e17d2+PKS=P-|(d07a8fc670218d226c46b4455107b4d1af93416c(PKS=P:m(fe3022bbb05af62d493e8c72d85f2d6ba0e616cccXPKS=PjN (a809ec345a28fda678750ba836de87148df51b15;PKS=P|+ (a260fffddf81e6f18f700403c929eef4fa36e919kH _Y PKS=Pvo(b892ef457f0a065f96c1f6d3da4e2525e3445ac8[PKS=P:wN(d84bc8dca7c8fcd227254c06f5b88eaaf7cd5fde{ PKS=PG(5aefff9eee5e03a21c4a99000fdfec66f9a48681İ H32qPKS=P?KP-(679f41c5cff9614b1a12bf836a6a6b5e904c8eb1;?PKS=Pw_' (f5f3a854d2fa1d35d08de47a1a76694fe45eddf3PKS=PJݘ(3c363836cf4e16666669a25da280a1865c2d2874KPKS=Pڗ(5b0508573062b78b5cc5a15432fe25c17f0b0056~PKS=P8U (2804e12a4855820dad1ee8f0d75ea29b7a3c1dc2{o PKS=P (aafae7811068c7de45f7fb23c2f1cb56c3198958;TPKS=PI9a"(553438491bba50c500fad07824f441b57cc40580cmbcPKS=P70 (0c6e0460c327cc1d8f645595c13bc12f37a71f54yAcGvPKS=PA (f2d535386579f881ab7916f561ced2d4a12db2fbQ_?PKS=PRg (1ab84aea4b11684f03f080690ad8bb0c0ce9c17dRPKS=P9q2 (0eb322139038dd6bff42effa83ea929e37fc77117PKS=P[)QG(12c01686e13db1e721b7de0b73225578f8f3d66c+?~PKS=P$! (b2b8ec58e872eef46ddfe456a03f9e4024af633eSo PKS=P\ja(9f549e8962b1965c32a592d39a5b2f53ad43dde7vPKS=P@3 }(ce32a5d2759dfac5881a430142564ce7a9d74d7dİi PKS=Pf<`L (dd021a767bc797d12110b4d8c3a1bc0c643df5ebx PKS=PMwC(6f98180934b01d7b534887514c3aaece49076f7bаPKS=P(b019769f36942f42f37b25875394586465536362JPKS=PKf&#(35d8bf862945531d06dc785d942cf64a72f2cf84{ŨY3 s3ãUPKS=P (7cce58ca120213eb9dac8194b2a3e2a038e38de7[ PKS=Pge(8061b37e4c291d7e2eb9d22d56ff8faecea965f3{PKS=Pl (60317c35835cf423e7bfbfaf79e051afbe2a333c_N-PKS=P\iX(0e5c86fc0dd8b6579244789264a47e551c0a32220 PKS=Pp*,@(7d2f62a40629d485edc69bd8dc7e994b1ee19baa{D `1PKS=Ppt (5ec6a26cfed98d7c63b30583de37b3cbda0fbb9c{avPKS=Pp.(06542a9678d6753693bd36439756acb4c8850b443?PKS=P,h(76e933c6947c511f08c113e5432bb3bdd4bc6c00{|9PKS=Po]l(7f374c51c3fc1344373f0c59ec22c8aa6f11c038İ^PKS=PP7(379aca47c55928e427c1d23b3ad8775c34735293PKS=P^7n (271c4fd3d06b66fc0195c0fa382021025bd8f1eaPKS=Px(282b0cf6f00bdfc569c91f4e0403e06118e42de5İ PKS=P%4(e4a5639fdc5f755712fbaff31d95d076d7762292{6PKS=P*p(6c3e95db167f75dce3508ef7d239fd8742d529dbPKS=P>(ee3daba4d294c6d6b29aa1fcfb3d19ac03bf978a;p|PKS=Po(646b6009fb924063a45e718fb5951eb14aa06126_PKS=PI/ (d2b21181ec8d9ef33d6ab5038c01a5ce260cd6210 %PKS=P!(b25b6119b2954017d8610e21a343353e135fa033;lPKS=PT(1b5eca4fbea2f1c7718be5a04f0f3403b770bbc3 @LT%MIoJQIkEǖ?Qd6Hl섥rk6 @:!*Z\KBҀVVym'E[&h o[PV "3 ""NBnKvV[ mAsSeg\JKcw zvEWkdiG| ͪQ#g;^:`y1dmچe%~&;Xe %o2?5/fTN˯TYE[_wxZӃbޱY>7bV3[t7>O&͈MΙ=w,VN7{[#;lVǻ'>#=r;1 ozXcd~ɑ'njx+ @Q٫dy2Xhx# p.mI?ؽoWu!^ /_; eF6kroP®VB87| ;6|ego^9%??LBwPM䭂haX)߷k ҿh7U~Q. }:Ӛ1ޯc:sF/!'*-NtMÆ))0+ ? h3riagF캌fZc췩eM @ 䱿޾4.z 21lM6V00)>2mӣ3)q׻NL.v U|a>>಄^tgѴ3YvDșx+ @Ga""k\&MƙRt" Wh &M[ "wnjj+JlJG5B6PEu>Hj}$]G*%)iRy[DZ:0; j Qnh+6nTwq;`dȽTnY \$-ZP$פy(C3$"O"q4G ,>T"GQi5#Lq'oǣ:}.՗Q0 I;\ +h19Kh|keЕ/jGQ~r͓LJj|"vs ꧏK1S3G4al DlV+J"hɣn;߿$ݟzSf$4yRj/h,s)f=3EW|$nҌ؄sNbtÛ~5rfuoz{:R# ~=Oygk{Ɠ'l;fD=ne #TO:NyYH?:uGInű/Gpovu@VO .4}i{B^WWIiJ PSI\OK8_;1++ MX99н˽?jVV8sp\=~ k#4uR=B#V_ȹQ 2pT<܅&"ŖlBCqPl0J3&i ID'&e)Ŷ΄J ٜoH{ZW\IH!p;tk9j./?XмG WdnNyb9]Imo{|@xRo)rʫ+vF)sR*4<\Y>4-[xu笣sO׺0Npjnn!R hg%W66JB ΋#(HPA`O IBW~|Y}jJwNbLn*B,Xw4W@ۓy!YI۔lh$0IX7i8!Ta@d0Ğ"&Y6:@F %+VlۅC'\{Z{:I{d'oegs7HFt+@rHP.zcA5Ex+@́C& ay}'+;ca-0g o&,@7- 83|>)y|6n МF@Su;}ct>?L W\܀x\0  ǰJHax -Dr r*tX!0ȻvvZ[R|?iEbRVIwwDfwU}/s~^vwr"ZPQ.3'=TXy=Z0Xt툂EI@p/Q`,N: o3d3GA.t7D M(#NCu] K,~8uɟCʆI}ˈavHq}M^kՠͮS풣1}g;^1ƪ~orcSej̰w/^1L.yc xqo* 'ƗqgW䑞vz۞wG,{*UOB*nK?"{Ik~[+{!s)u,9eY+ݗ_>;;] g;Gb׻_|1'צ:tƚ_fHhߏ ]\q30qK~GQ/qkÒn>3.遺F7ƂKz+hHfA^k5d%-{dQ۔J|X>on`]VivکޟE|c9aߢR\3l-M?E`㽣7[\ST_@$ ~?`8w/(I{O([Toz Z88NۇfΦ K\$Q: ~o0 -lz臋nUmn/ 4Ѩ1Ǝ|eh9 0!̛kt6uսWͽoxj,-gN@u#.y?6͜an?)5AZIaW%:o]Yw-,YDe(O{W|p狠+gw-n2 _ן!TY~&mܲ}/{( j;nuJtF q5:ULW];Տ,gڇ+ m?cUZ6xӪM̌Y:2?`hUE c ypFit+҈Y&fb`%q̞'sz,^'QL:7.?:ZV$s˻7Gˏnc8](rŎ zm~aߡ&3ax$Z__U_6۸\=5i}m?+k?yaC/;+nKowfzEŸ=Cm>P7'lέ9G_HwWk}gݼ`J3wZuy'g>e1%̟kqW-MŶ<]Xc$K ̃rծ13^yԅ=v[3gk;=34g鈌s K -lYӬ"/Mv19ND4}N^Wr٣26ikKCe+4"`#BfH@^xGN.&OMrb5Ƽ*<­o!3-}H5{J&' HNT}LQ j)aYR D]P^'yRew)g.}YC'·˳}^];>BU5q)=j?|6eiDS"P8n*sӬRy%  +&.iYfYj7G׌)}3̠.&**A`ߔr\áCa*OU,pN쯚 z*?D<6uiSĊ$`q/RR;o<Ba5x!ԥk72*|QŻ4!Jm 5,m-x焊ZSPKS=P %(ef6a2d445bf8000e61f71885ee1f8905cae7e00dSP 47PKS=Pl+(1cc71ddb3a65fe550331d3180c8383b115f98c5f{EA(~xeA3PKS=P\cy(9afed395dcd2662b431f1a35fd6c94f86428b2a4;If1^< PKS=PDaAw_6Ͷ^kɃ}#_pؕЇ˅0rȚw&E J=tס`s.B6w+7ER>{BMr2\l]Ξ)+*կ ҳm@; /뿹bav2((W*G< ZEXlYK[W(J ƣCJ ~ԣFX%2P'vc.\Bm.pph ^9CHrԪ1`Y:ZSrg;z؟E9Th ^ECHdjltJu"zOO MS*v@^֟Ǵ[m2tSm6$D*TAc/gSU(Uuݙկ s?Lh(JWPFBB5#J4FSו0W251o`DǮLLӭD+0-vDK(Wp԰P[A5h4`e3%ò}p)Ű6z&*GzHAFBB5]j|/-^Sih0%BW%iVN* Ei D .7.%&'i4}LfVNf7 1S)019\rWP%G\sxaWP_U;oP8glޅz\BLLbnPJů&I_PKS=PE (76db67ee4e2442f84464e963fe9f1493532de5e13PKS=Py (7ef95dda556e3497bb28833c0d7769f0969ba67ek: hPKS=PH;;#(e61b104951c1ba159426aec546db38aabb34ce65kbRPQ *+()( sPKS=Pڽۻ(15f41f083a4c892942f4bf8d3cb2b7b9751bc73fcbBPKS=P (5dddcd1ce74c2796c329e6313931828681ffe6f8XPKS=P#P(fb8cc44af65d78a5df6a0c31ecb88c39d43c5f393zPKS=P7j](3fb4deb50e13ff978931118aba470af6c2c47fd0``W``3`t0 5.G"ϟw 21_Pbh`hR"M9X -~w0jMbdt@M?0 gϨ*?wqp}x7-~@u/I60 `p2z4µeɾÎPKS=Pj(006fb17ce2953c715bebc7908416a84bd2c05bdcbPKS=PGv(8206301f8b6e8ba55a76b4f06be427b00a04a850c~PKS=P#W3(d9f83c027bb7f6cd9d95985b88e45d8c6b6493a5kb3xPKS=Pp/(5223f076b3df62d762292a53b5d246761d25e0b5`PKS=P (cd33b55b789ca1085836900dcad4753655a78609kb~PKS=PJ (a2be66198b58d72894778afd6f4e9ef2d18f5755??PKS=P=$, e(148db6ddeaf23ef97eb8dc1e95501cd72a461f88;pMPKS=PAG (de4cff3870e3adca3666f0514ae10051447426483PKS=PJ5* (2bb0f0e8a4c919a1575143f0fffb705bb3f4ca59_PKS=PPT (c41eb823abb40c2f8b533ee2a6f1031a7efa6e57`ư PKS=Pl, (ede60ab640857f2dad9adb4f53310ca453a87012;ĦǠPKS=P (ad6515a3b71fc442871465fe427ac576397a88f5PKS=PӖ(2282320cbf11a3d05e18d2649595f884c74b34cfx+PKS=P1(e99a70ce639d8823887f6ea500385c5c268238cf?PKS=Pί`3 (3ffa6622adb5ac89b5b2b5aad1cddd03f58acb1exFPKS=Pŭe(d40de99296bbbc6e386c7f5f3bd9654a8bd4809fx~PKS=P7n; (c0e513553c076b50335215d20de6b62cdde2dd940aPKS=P`(cd209019f81610789b5a2fe8e914f2c899df5cac3*kPKS=Pm (a65d36dea1e440d4f1f8231a105e4c83bd3821cf{ PKS=P(2f09c620270879284caa06a6627ab1bc3e4a8593yPKS=PL$c (e4713e2f1da02787647c556c49fcca089ecf3dd8[k^&.PKS=P(e556eaa2a2c383d97d684c13f2e93dddcd0132fe;PKS=P5*(a440412e3c5cbe62b3261ff47ea30796545772ff;XPKS=P6f(157cb90bf522de79fca492642a37049fd71d692fsPKS=P (5dc52d9fcd614004a46beade8141c22633c207e2PKS=PY](523e695cdd117d80fa52d5eef036e3a02177b276İIPKS=Pp(4fbab226d560ca0a81aef1db5b85075dc16c8e14{ N9PKS=P(88fc908145b79c039b24b37a1164075598db690eĦPKS=Pp (1db01e592832b84c11741cf0419096ed5d3f0fb7PKS=P&%w(0655356ff3eef073a4abb7adedde4d8c5838bce8{ _E D1PKS=P 6:(1dd45dce839a2d0b76e3a5d731f0e16bddf8582fnPKS=P1(f7a31e03c0dfdecd35483f311ab5dc4a30b2224aPKS=P\-b(c49b06c528c4c6d93bed8a3c353bbeeaee7bdf4akjhhhPKS=PJ@(b1c24975a5e255a2d0beffea7f7ca78d7ce4bde12qŗPKS=PY}(50c1db9cba419d7e27f6ead5af630e0c508608ce[ p7k]l@i@ V DDM#kQ/P  @-p_PKS=PN+(2558b2edc7a10d66de11925f892377fc9dd45d77zPKS=PN *(1f77d2893defbcc5a6deff96b3be90bf6af0aba0[İzČPKS=Pi3 (119d2f75a8b5954da35dd8f68112c651590fafd9bxTY PKS=P\`(19c6f2b0ddbfd111a35837b3d304199c962ab047;PKS=PF= (11cae88693f5acfc88c7123c4b25e2a571ea1972ȬXPKS=P$l(eda24b36997426e1c54069fc2d2468b18f40e7ecvhPKS=P钦(3ec7dd91bed9dca1657e6b83c953c8ebbe695bc83PKS=Pc3(b4f662f4433125bb3306c83ee69de0cb53fc0213AC;PKS=Pi(K (4dd35ba039b69649d992b168b94ef4a0fd6f4629kbPKS=Pg|(730ecce9a8ea685d74355750a35ba0f980c6001aPKS=PL(1a61a6056446cab7445d93757434fa1d808c16edİPKS=Ph(d0368ebefb31eca5b75a3a0be8fdf5b5c6ca7f30=PKS=Pk?(84abb519d5c0b85d6f32ed616b83986aaa21686akbPKS=P&(99abd040b8c862297e49a10aae8a842a6d0b0195PKS=PҰB(25298a2a25c86bb9b3117883e1866a49980c7092|PKS=P/&(7cf184f4c67ad58283ecb19349720b0cae756829PKS=PxZ6(f5307b891c605b23ea12c6ed8623eb54c3a029f2P" EL,\  DPPKS=PSĩ (f2054d96949d327c4c7b6bf13319b45d1aa140fd`X PKS=PC (0773965c204ae53534dbac6d901a9502598d91c4;ߜAAPKS=Poc<(e5858d67582810fa59a8521d620df715b3f28bb7ȴw 3xPKS=P'H(0294a755ce92456b1950d63271b013f3955d46eab(PKS=Pjr Y(3d59cde1b90d9a6a39f58b55292f746b7c8add30ohesɚkjp=i٘ &6P82J[^ᐽQbNVT C)vo8hqhK?Is鵗Ot~wwi.<+O)_*[GV8ɪ}\`8}66FQSԤ_EX99ߎ\s>4%zrٹˊwVɱfL/nXYޜߌ5 r:o)~h~b4g3J:8 *ae5`K\}(ZWx<s r e'K;'Iu'q|('NlqC܏r{f>I͈5>Li%*Q{{raUNf=(h JXE Y8kp]jxlPշOގ؟ixZ5ii% 3Lp~,I}ʹHK!m8ԧ)gAn\\u=ɽ%R|mK 0v)㯜 wiQԣJneoFёQƜH#"#;(܇X3܌֎t 4T! tsP Lu=ȥ;t2 Đ|߸^2bo;=5P<7$7~*Jy{v=ݘIn3z @bPБtd X1ocMX6eg8u]\7uݪI7!ZFIj74:k^,mXY4SmZ?PKS=Pf(c26f955166e0b6aebd3b8fe1d8d2164bd8ed47d6`p , PKS=P:{(851f68df934665639f9079caea0912764881e704ҷ׺(PKS=Poі(0f293ba834f6aad958cb694b297954813ae1c987cPKS=PJ;(48fc7c6b1e11fd6be9cb5b8afd40a7a4dec35f3fPKS=PuB(c01b4a4187cb99fc4d1adeb8923959bf2c2394c0{ vXYbM" PKS=PT(f4932f5ed4dccbd4b9dc8d513b99f18c73a266fckb㑘PKS=PW+|'0(87454bcb10525f941e0dfff476c8cc88dfa2dfe8xS@WW<< FxX4@,0`"\PKS=P{j'(13b9f4146d79c8583c0c724a3d9dabe4d644d388+w~PKS=P5Q/ )(be8977f5b1a3f25fee519425f068365b259d719f@78 pPKS=P]i(5560506f969be8fd813295f19081e4e6e5f94b91kb3^PKS=PT(b02309b6264c047721b9585ba18f3cd0d217bba3 ߬ue;ʱRu!;%]%:(g~kHrt려D)EEr%BH: -K}?73;ffͼWPz~=[؃Q1""# ycȇP6KQz"Mr!`C3&SCHлejwj9sGh(̠[S_jQR'Yh楲ᚷ׶_֖cvw^0k>B3{VۤuAFt]aj^FK޹XC?یu7?\_5Ykapi:̠[#qaj"̩-ꔶ*4t9By,G&Gz2&K ".2aح,i;)Hc  v @X787K7Gq {$@حtkҰjDg\{~F/S Ӧ|pߨM^.?wUh6HV&_uэRS]NRK'HN72} b  HMg۝Q~wEnǴ9C*_FaNn(bIߧMYD~yT#邔-/p=!["wDؙkN٩}h?t (N!On+8!pBt=WV*1ѳoz7M~ uX;Xa}*.Ô9ĜSwh v< :Rv[>Yr!Q![nMFY:8=h:/RSqT=*R6Hxo Q{7[d輾&)XiS Gdk}gꜵh|gc_9O2å:ΰp.;ҒL>ac9B AUh%v5GU5O4c^Ƙg~6hS\6&NrW*[6k |;}LC7p LC$lJBܞȕ:r˹S]WyGһxXȞw zf͹#=nΝ;OPX7_>sgNY΍"pMIK\|N؝Zgʷcy+oEd\5yu֐Ug6{6t~[yzGmuLJ_n_`_ӻ*t;>Мk3[n"CɇG /53T3ϻ'`u*,EŇI[orމfh(gV_9xӯ3rg->/'謜/ƒEk]3Q`ᛗ%\b<~xI"l\P6q1ۼ Ϙx3v+UC<5 <ˏ@*{“+F.0x_~nekC4 Rt? wcF |z+{ac'C w͜p\dl kO[X -y>an2El28֡yá D(8=Xuuu|;sbǏkyVJKfĀ';4*DD'&g`Mga]cufǟY?->$@saVv\9Lo1 ;5+d\Zv{>)jMȬJ6%vW2 w *+w95iW獣O<2 =Y$tiNُ׺M[`е̏/HLFm);Vet\}nztƯJ_ˆ>ͥ1&jCy-'gmGppun FeqV• d,#0gl)s)*!uFP=O}nsl,e#WӨ ,zڷ1.>)]x}Z]B֗[{nrN5}׏+YaX+)Bs%lO\vڄ!.ڲhA_؞7ĩzDlUZI15E~НKVN/HM!C"1ˮ؞)*.&ϤW5ߒI;HoqO:y[‡!jr_7T?ŚWS 5ҔT.8o] BNLx(ƻŲ,aq+_]&z!KFcw>/$6zf#{rrwL ?AEhT(<&?_ť^1#Ow5xg?ZVIgMys$O97r†E\WΑ_{ֹw:mT*9$8n[a+u}E\n}en^Sr~I'цqq[VK2G>+==<|Ta7cUoLu:r%egi_a5HL^$RAClmѭM÷uW_b{qWʌei1L~(] x^_;9J̝_GOcԪ|O,чzsK ",X>Fۥ%oo%>)PDc3YJae}l(~80[3HݾBo{l)>`b,Ŏeͬ6/06+,?~x">AHY{mNl1%)sŔ%~YbCbhԥtYm44#eߏ/q`b]蔑~2AT+Z2eᯄynj-\W0Iᤴrw+r^SFOx~-P' <8& G'jLC=/6lq\vAf7~GZ.Ԏ ^(&{nCYj6qm1Xm1?3I+篞YA&cְf\|{1>Et ~& ܶ6'm(E`V.' ?sDo*7r|yH5kX<&}ʽňk~s7`:FRIu:~mҌ#l [iKz`i+2 2ZH9)@=>+`sR go'[|xQWKMTwʧh.B<m(u~t{[#u[a;]ߌ{ |f,yp1NUcѰK9ʓp&.Gwv[Iv8~Ui=BjKkڨ$Hk7_Uy)hgII!:'FΛ\ʯSC;LاC_o?o?٫lM>#R*+\wmzd3*<$?L{}I |}yxW}Fx4knj!=)sD/7շZ:GL_=5z3%CK[-U*i7ȱc2;}JG6uMަ}fz=+٣Uv;o嗄TJ ,[}!q0xg#Ozf>Ed31;j!R‚d_<1q}O @{AhU^ iD9z :I ʠ6z6e,]޳I_IbK6츝F+86ˑFR\ ]BU2'!s2G.NN'x8yb^Lc(JʔW q\H6P .]!as a>0IKd>B)4p%[Ucvح2@cmmmXSY`@H@`w нnExs*))(RUTIٺiyƇTT*JTE9%v Pح:S O/urv#Ԡ;Z7O7x?cvYY/P]k٭@YKV-$W;^'7%CʝjY*FF1_AN1p|3"gptthuBLS3{.WY đ4{(ȘKZ*M(@HN<$2!ѻ9_s z3DT1ibJgKq1,gֈqD3ʁz#""U0sMbL*T9:CꥒKYV傍PF$]W9k';V6L5ZLZh 4+Dz|k6sA~xs/܉5q5yyy*U-_wہTBRbrזѓn:Xgm6%}ǡ-W4FoR_柰\ ޓb(6raYJg;_@jE\ZisXZmyWed<܁L'#=L$C( c~Ǔy 6dDDT/,`UѪdʆ;-6NGFQ"U#|H>F5K!AoBmBɨUK:Ve#9O#5n Q Th b3p1E P (\83Z \{bDDU=@.fjOդ0C$&#磼9QBPȡM'Y4J?4ٌlŐKt2^+~sG9΀AsggjpIQ(i F'ɤJ5%%%u5uV! 7L] 9J 2YL{376R^."2D&u6vhތoq8qs>z0<ska*W KQޓ*]k2rXӉtkJaD~3.-nm Ջv:J}3ֈne nCLzIIûȬ*vOmj6TgUL+xʁZ2%hMdɤdQA봂ݶyqV}xMFh|h$U#ђf,!͛ OF, ")(LO1^;-COP,t?cmԼVwGg[#-n,ZpQsQMVt[u-oުM{"t]x?XO8yˆTW{VxTZ0r߅l5#XPKS=PC(7cb49f1e82a925f6d6be892f1a91bdd8e2f8bab8`zAsPKS=PAč[(64cf9d91c341acd09353cb976707160a3aa86789`4PCL3` P%Pī0Tg*{# OAL=bV @oj0sb&vKn^Zˈpb6{ Oܾ#'a@ # ;{ [WPKS=Pv(0135a5637b5210900c360cbca73a3fe65c31f9a2PKS=PXD(5d9d995c06798106d8340f3de086516a61af52f6~PKS=PEO!(3ea6c91e241f256e5e3a88ebd647372022323a5330PKS=PO(+(0de1ac9c1fc062cb33a6ce26f21d371a640848e60i@PKS=P@A(2bc2d1eb65734666ad8ad9b76bb3c778ab9fe3ffS`xA<PKS=P(ac2b6dacc46da8d2a6d12a52e819ad18a9335b5a0`RC PKS=Pd,(b91919b29405916b3e053a6ead14799d3ff63b96;PKS=P1(6dbab331968f0e71cc5a2c717795983031de34a1373W `hfX$ȄPaO|?}Mbb@$!: HjyM,\   f1AU`GCb`B3(YbX08.)2@hƧ yn#1ly&5rSqH42ydF>h?|qOMTIXQz4#"Ȏј,112Ào".jG()Xm<2#~Q4@h(nca"G(ԥPKS=P}O(19b957c0d31ea8cb77d43ad4248bae643012f378[PKS=P+(396c124a3f48bd41ca56b2a6d328089c4ff29becİi@PKS=P$ (78d5fcc220cdaa170d41b2e5d63c9b3b40aa937a[İaPKS=PUB(b0afda8de1cd0842e7078f1f2a6bb2d9670e0e84h_PKS=Pg (185bd8ca7684f2f14ec729e7264b464871c2ed33;$PKS=P_ (76fa2965d41fa43963b4f443a5c2e758e72e245c{`QK<PKS=Pk: (dbe4848efb73312a7aa24e5e9337897bdf848ca050 PKS=Pq(05a7d47f4799555f512bf4f754160701378be112;DPKS=P'(4a3133a5d1280c7342679ea6aba15ad8633fc7a8PKS=PW#(b18218b51c91e89e7c6786980ebd95a10e1aef4e[İPKS=PF0F(cb4db5825f0e73c3c8a46ddac3d7b95123cc9a06bh`h%#'3fbn"^01PKS=P! +(bd8b7a33384046af3a80b1cb005e22fe3acaff4e[İh@PKS=P(bd062c67c5be7a59d8ad04498934fbdce53def9d{PKS=P (4c454cdad783c9195cf0ac141bcf921693db4d2fc77p5PKS=PX (78502a7796e8751b8cfdddf11a1db692e8b4e680;..PKS=P (5ba70255d340350a629476cc3843c002d2f92c1a; ~FC PKS=P=j(305e4f713c65e5fd5a86cffa4ba293ec1bc77812pPKS=Pwn(c2143b1a0db17957bec1b41bb2e5f75aa135981ePKS=P- (f9129be6f89939ab9df9f1af9f692bb0cdd66a92[TUsa43PKS=PDl (4d65914c5c343c14aa21e1a51820d8d6bb5240cep PKS=P#(68bde95a2469837d2be193da018e07afc8093a77kb@PKS=Pˑ/(e41021b1e694d319f0b4db445c893461d1082f73p PKS=PP(15b93a23ab8124e0dc01cbe930c99d16315ccecd;PKS=P~m?(243914faab9b6d6e9ef32c7241ebf5ea8475f2dbPKS=PzW%(27fb79d4fcea95a5fcfa468453676741a280c952 ^PKS=PZmj (9da673f85bc4191d6170f14a06be6b1c6d2c1092PPKS=Pq(dea56158c992a648db23fc8ef582ae95a2b65cc4;hTPPXZZYZ PKS=Ph(37a79e4daa0c3054a73d444493dcd186179e8089;@2UePKS=P`P#(8bfb32eb71b668fa0f90595456f2dc76771305a5+}{~PKS=PF+(f54c4143096e294ea186c9fda231071ff212d8b6;PKS=Pl*x(0f36a5734844430ca4aa1f90d6d6a36cf4c46cdf+,|@` :ٓ 'dpyX3@3lPKS=P (f6fcfcfb6b602cf0540e0cd14b5a8016cec0084b0 PKS=PM(2cff8a53552b92d6aafe881c70763341bd5def43X PKS=P\Fr,(3a229b032392e2fc3404c0dd456cade375b71463+[PKS=Pf(864a7db910a6485698b28b5fc85f62f3ae84fb19$ PKS=P@(82f83a7a9a85ef8fd853d3b794c0ba1278fba79e{ hPKS=PD (63a775efb6924dd14e95910edca50a4eb4d6a6438PKS=P3(791a864cb9f44e46a29a767f89143f86a5fec0a2;ÀPKS=PY_(d9ae8e229642e05bd3d050a125b9c669d734773eCb``Tʒ 2xQXj#*)6Z J{&-pznᚅhG%W..6 RH* R!DPKS=P(b83645e65b4f6f9bdbe9a15345dbab9d2b573470cİ PKS=P(be1b83d64133e79a688827ad1c805998ca63a5d0{ h(R (<2kPKS=P/(88e3c05f67d8efb99ee29ae3a28fa9749b9cc483(`aip PKS=P/(178bd15213d001288be39816ee1e14a48b5b279b; PKS=PddG(c4e9c3e0cb12ce72af996c91f06de98705ed444cחA |c}}}Wv0~sd`pfLko E0q383 N_ PKS=P (259d045d17d5642cd94de889b41a9287edff7863?/PKS=Pz(3989f0284ceba09bf8440015ee01cfd98fd02c07`Ą@    PKS=Pa'(b2c0e89dd299f8a27f368e208966885878830903 XTUfBMG#\DM(z c]R't$GLV g3JrAA4LOC%ܙA`Of;;s}s{9޹ 00kY TImNwɗ:0V٣o|fOsE'#C ֞Zxyp>@c!&b):rq>@+ؔ xf`OUt+P[[ibmm.R7&bAࡄޢb9k3iQ7_QVhK$eKf~0\Nkhfy"ޗ/ s̱nM0{ed^ZStu2`Tp9?슻ͮRNLtO9&hn] }[{ĸ8GKT(S9& GǂYQ 8ֽu!սKm&΍MEDJ?^3TV~j|ߨLʔ~/*J_&I źקE$ylA Ur4 㺼r2V+[fᘵ?^P~_a]d8H ,h41h @c9{iaomw~"\X;%auu C6Huf`4~{-Vx.PǩϓzmKalHJZ L?m| W#YFa?dY=^x J=sJֆ&B'_XG|FSPOõ͘Y8nҳ0t!1ArJ#nD EZĎa(eĂ,vv g  | V^ޱ*wf>]杻&uS(Λ& μ# I͹~=(;'u×/YWڝHa˹k|]3~B T3{BӁտo~3-++y_eu*]tb˖]Utgg~GCYbB:=.Yq_ݻWN?k[CI7\jDWo{>E'/ek nfꓙ',s]$C3Eا&FYon鷟F3l}|[ʕGO]Q2q_Uqx峟/r>7Kn9m;.5d.FƆ7ߐ|I9Գ7NVZ:mI^̮O9;䞢ăhقa.[cJ%D-yG?\muCO85#5 ?P-v!zk+~_=tѐf+;'\ dsk&zzB,`cUϘN֕\-o٢o4;67{^s[Mk*6vDL}W9w]߫ !Wo:voW^>Iҋg[#2|W(7~0ײu3m~غ& ǏU]j@ex?e7?Kt۽of3u8yG5y<{j^#1qeӀuU'wCM2(w~f?Ņ'ǝ|A&ƟNXF衤z}2Km2iͤ66[g8(U+X6v*p̓ztrAC}.Wo]113)g9wKU(< )y֏Id$,WQd,.K^6,$153){> 29,NHv,v[-fcU?VZT1j{6mOC쏙0Ӣ=\5MX Pm<.Xm&b%Gޅεvz`]aMqm9uyXB[T<äpp,GjG99Հ 6fՎ(:gҜ* EǃemUnE!:{ڡuz]Kvnf7 wnl󲶏1M0b: @j|[#ʜ\$vpC7 {F*}&"D[\Ӻ[[ow{ 6=1\aSDܩBs6Y[Skfb^8 uTݹ~G\;;Qvb1$-!i/̜ZNk8oXl SA]Y+,n~hTW]nԚ"Hb+·A]2Sp B=[ɞcT2Ã6gdV3ziNqn]PsSݒW,J"Ej7Gme q 9J)Tjrz?=/v@c3Uƍ˺v\f9ܸ'Gt4.SuKpICǂQ~ mbIX7ܬo)ZNk8o;qkekdd%ƨemcOέvYMbWl-vJI$wE2I+?rP^,Z2ҍ\ZCzړ'ɧD7%uvK9Y$ܸiDT +wwC-)E:6Q7lekx6Xz~Ϊ .5R'*{TmX/rss9_L>A6駟8!_0X{#k)6 6r.T& P+e9@uCRb(nu7R@ck4ɓ(h^TT YR`UT;AJHTDrJjdQ65Qʍ_+';%)CU[^@ L!&b):r E+ؔ Ltĺ0^}df tX[;:l(fF Ѓ'cxXEbzBoQt_7m鬭PKS=PHK(c647385b125d49f0708d8177c2461e93c64cfb03xPKS=PT)(d61bb621d790f18973e785dc6da4539ab77eb806S`xA7 PKS=Ps (359b2a577c4f17d61e28b8689ca8643d1e4b99f4;wPKS=P(9572e79191ad3e1a7f6849fcd71f44022a70a332kb PKS=P(8fad9c21d92f8f25001fe23096bf264563ac8583``P``0``peW HaCb600d 2@@CC# C#$6- aGcKCm ?2ga 6a#CÇ7\ M04  8PwFY;8PöHOa PKS=P-(8321462af603ba9242b0264cf44d8758d9046e23{xPKS=PȆ (d78dd9f119dfd48a9dd98212f8bbb37954acf556{ hPQ PKS=PQk(ed44f9f618516e7025017214ebfc2f110432d4ab{PKS=P{h *(1efd08dee74ff53478ab60fdefe2465411a5006fİ '1~ PKS=P}2(475677c7f8906690e50109d803954ad10c56ab27+ZPKS=P(9aac8cc92a1fff050c7afbc623b06869fbe74268+bńPKS=P (9ce1604d659135925ccc4dd1f526affe42e689f1bPKS=PD(063dfb9f795beccdf588fb9c624a849a02738556[ PKS=Pk(ab26cd08dfaac222ce3eeca6bc51e9773e7bea25 PKS=Pz (36879f3ffa82d0ef21ea6588ecb7d7ab6df3651dlbc3PKS=PfO_(af0886cea0503ed32b2cd2fb967333fc905499f4`P`0} PKS=PLu*(e4bd261dfc799ee9934c5fc2606bef6b8744841f[( PKS=Pqf%(cd1164099c7267ba149b041618b09cb07da4620fo3PKS=P (e5b5ade1325dfc5c5b580c31149c62d5b6141880kbcPKS=Pff (3f71fa2777ed9da0503f634db2fd06f87e1186ffkbx PKS=P-&(bef9597334f65ef28c3d8e3e1f807c7e9565ebe6RIJ#a" 83DPKS=PŸ5 (569b093597037ec35d12b701cf8fd23fc78b6a31+b(CPKS=P__(8cdf49bddc4aa82b9d5185aa94effe5f6e492b3b`0` !fzě Un>vV؇,DD^Ħ"%!!`ik7C#J2p0ꬹrЪG͊2mzʿ"`i)Z\t[MȟQC|6|DS )@?Fm&/Mť /%9Ex)!ğ/w5*vJݭ [`x]t8-̘!s)4F89CCttq3/O2'1}PKS=P=(dee162bec7e5606479d7f05a030728992a72e8c3x}r|^аfPKS=PtZ(f16e666a726f1a7b6aa201364a62c09840263814+]2:_PKS=P/ (fedbca46299e33efba174e1ab79091ea9eaaa20a[ LPKS=P~`(9f0da9512dacf7e31646581762e93fe47a5c5d2ckbPKS=P= (513ea569c733414c113300237276e5378b8e32f3kb?PKS=PD](a54a0994db606e0aee28b102bf48476d2d89f80f ߁x/X +PKS=Pw (927dedeab14f3cb5df77d585894276b3156cb5d3kbShPKS=P%(314c4322dc1a20f0593aa9101b3717131e024e10`6PKS=Pi(2aea9359fca9ddeec4b0513584400940bb399264İ;qRTh8hU ?1P $P*P[W `jd8(5g9B,4 `/b`2tl&&4]-^\&p킄ѨE k.% `HU(`%–$ Iߍ0m#P.'L.0& `uAOP60PKS=PMT (723c194463faee5b4b875dd037d64ffc51418e84PKS=Pw (055853411376a0b5526431b2bbaefd8677770b6dPKS=PR (0cd07d2c95f85fdc7a819919330ea52069017f1d8PKS=P"s(05d219e0d077430e387434c0a316f02e85e694cecPKS=PG*_'(36f664f7f09c781704a5ddd4e374794598286492ba]L a X*|(` ]\,"El-B?T# mʄl+E."]N, v9PKS=P),(49c16603ef230f06319512444ee55007e32df348 DiPKS=P (f8cbf5c9644cad66796cde14f52a7007906ba3c28s~PKS=PL+hf o(f9658cb1311d33a098b47a24d06096811a6c2d5cİ.PKS=P; (234b432d4b0eae39ab64ab6d78118e21229eecabkbPKS=P%(1348100910631164229648be6907a085d01f6818kbmFuuWi4"}JgO};O엎_֮{gWsOMs~ `TbJ2-V4+|EvB:+̸[hr"CRW [s8m}]ޠg无WLs>\9`[ zٻzo.->Ib o GCt|ٞ xR#:h0?:%>~'meKߑOF;;9'}ߟ-?e>_^".5"ϙʇ'76oLj^atnXCQ}Bc}S'C%Fgz!q.DvllKt@ @N~V7ř4v;,V`jʷ=uvA0G^aG @=mNHe =HlPKpy0>rOɪrp}$d풶jc6[9Lj15wf,*KvSQ F;ٜulQXGgKQ6}rykgաҍ {_ǰty_‡ײ ]tݮ.CYAJhCMѨD7T>$5GtxuJD #<@Ԗڣ%o8` O{nϸj> wپMY>NLsSpq/ ut+zQ[󦕼XfjlAuZ{IT`=pG[c2&7ϖ}O(vv5IMv_wMىtn*NYu.־l{XVeon݇H ST]?">O+>_:7]D`$.dM˭.Gst6Ig'SSYl&79K%wP/ QKyZo: i9r]^󞵾+=NUKK^1s[߫_|?TK3T|{?J^vM#%Hw(p˙w_ּi"Gj16~Jdqy s4-Dl1F,V"v"Knbw.{Ksx&lG\Lk!j>ڹi^}ge/=zGkzR3l}s|Q8Y7&ޏ8՗\|Lo< 4,e跚B_@_7W#?P+j}WQK7 @W3辜o[  '0m D_jvuڼN߉bȦ(h֢ 3zLN?}}!Te<)=oKjW1 b}1E.b@"f]D%Sag8RTT)Εe8)J:H}r<3)z ypm7Q PKS=P /A (5bdbb1892913c00bd1bac6004edcf2cb3e2f02aa|APKS=Pt (88c737f84b7400deb4f266ba5fb3fe9224340c43{̰ BPKS=P9 (31f87afee2496edfb5f12bb140635cf48fef9152[$PKS=PHq (1d3ecef1a25e28648471ead03833fd62adcb17e7+MYb\ ׃G,\PKS=P&(d5a6d58ec559c2a5648d71e4257947a0ff9baabd_PKS=Pi%(0b51145f526d127fee8facec378570c5394efac7 @/m)tBˏ)L6ѩRLɤS)8uod8 Cy(& y6--pr|siswj8H -ix!24&@eh M7[YwsFli08ҥ{ C@ Jݻ l4C6Gqe @ @ @z4Y )$6ӧP^BҾ&Sn)!bIVvp@ Ng+pT@ M+eȝ:d h% |-%8N2h i؁n'v_/l'6u쐃@ H$`X$II6Tl@mSBV@2I.WMOnp.z\!~l6J.J{Hg3Cs]=[rz @z l 8\`H9%tGb6z˲<0 GGjpP(qFumT\H6q0IGQڤ+K&*jia(]AoD:6i2fa:! `2F2A(j)'MP߀z9ᢵLgva$ N:f2:ԷBycOn-[ ZY۱R1 = vسQ\2+w.# hoS~q['h(p"DQoŞ)pBhGBOBOʸg Eew H+`m^G(Jߩ .On$cj" z;Vp9#d i:D(Ki)eS1r(N@ z#ؑj'|]򘰀sf#NI3^?׾^zg'P 63g1!<9lXOg ZRGK7 " NdR-/f6^B/|׿'Aou6]韖H6J@,cYRnkuLT6]GIhH$@4-nl5 $&H m,&p#ߥWdZU2 BB]b,~,6<kEj#*J\Tlo 8t+EoSSESh=qtcL Bo"+I= m eIJeD]@$b5{-~E@:@ʖAtxi\2긒?TFкtRkp2Hd0eK@ q4A h$wsʀn|)yFs(--TddεپJy{+u(b򋿾iyf3wa%w²},b؃%vEL$J?,-Y˙:`Cbۗ+y悩Z_F\X0g.N.Ms "]^Uxa&' O]~um)3Wc~z$,)p֟ ׏g61lNGՙiŧh_ye#_ݺ 1i:Emb_*ke:xgǎ,rxeLN?H^e~fǴϧoޘaGj5AܢvγqsB<sʙ{}rއ,6\5P7|hg^3$ H׻UiJbID+<'m.?z@o =4җǓ}+je+/e9=y;sHtƄ rqy?8M)VM{*(Ybg?Ou:]`{!%:,:P uoҲ#?s,477O9`\C 2&Pl뼠-0̌_x墘)X;bMjtfg:>dǚ524 /vw?WuֻZd\cRf,q7v*v$cPo>=nW~M^2iם7쀑#_Y|u%u'o y7E>+KpǷYVD\aZ%aR[az ;V:8z1'{E׎فoF: k?^۷D@c/gK*ߚ|t_c/,*AУ4Ϡze,q> ,6Ou(bߤ>wD'ŽomW) xw/'z)mT`f-o;ZWٛMq:KM2f :ԛExّgbu~O͒W > rgYI>@ Nk jtvikeC!C Clt9@6@dF;r*!C yCV=u:G:4D&=UU_;8n.tp:d82`p:d82CJt] Kt&EUU=I:2}L!F$k)d 40qL6K/[Dn->!J].QĨdjɾ D0%l+_H֒ %'p@2)ղ eИF-݄5n[n"lDW,{ĩ!ê4ݽWyjՉI[<5ϗaŵHmF`ˮ!BC,2t~Jd!q"  mVp!24NN(iimBEe3kM xְBP8qDG8|>| p%;(]9+`Gǯ P'0ea|1Wi0ҘȬS O*I3aW*B&X5\-"q|C([I;bfa$ڴ(T~1/-Ƽ4ɘ7PY#HeFʸHlHD.'TV`#>xO,mpߚ\ي\ 6Ke}/Xk @P =뷚ӊ D.!R$w{9vO-"+E@[v6&]4"=Ƞ7m'e(0//1mwoY`.mm-Úٿg/Gmh#[qDh%4MzdtaHGRdߍ竣i`qYɢQ +GWEfy qy<Ϧbb7od ùV5ݫ 0]V<]Dw2Hpu^$*}{Xq< Kʃzoɺ%.S"vB UЉ [֦ ?+% 釦~jgO PN^Y: IW JJ; U6].@10 )(mb\} {)>ޜQy 9dV\zSɞ9C-Y=TW0 nR&۞͡ebE%0DS\tH_mѯKAr.rɾd- 5y5kcL'܎ز+ݡ!ጦDE Ī#lmth,Cۦz@ 慴Da%vUhU Ӄ\l,XJ*KlTD[p% @m=;N|ߔO}j o@z. Yr1sd>sg7(tS @_"?)-C,U鞩nZzFo.iG{ =Dw%P HEt0yH!&e72&(iwoVLMC@4__چUm9PH=D U!*[2}(Ma҅tPKs:vnY.ŶC$ ֦TU@FKh )F&}.:FNjwB͠TR@ø>66ca\  HU,X,D.qq? K=]@,cG!Zz[iN%}7h lϕN$& y5\uUQ)Kt$r51'3^PX ;ahĴa,$XQ:( X ('iȮ[-[K5@eq+ 2@N`@0'i -ۥ0-m F$"b"EKoC}Fԛf0B.ڌ $8btF@sc/E`#~?m@#W&moT:жop`E4jkӅh ]\Ğ|}"6]P!KcC{x}L@6IPWvc#X,B0plīFcU8bDF78QXnA92'^EicQU~"|(x=A;pa6dPs]R=G.<4 N.i /|LкZT\s4_Ib$pb7]{ {hWSna m,GhҗfTlo 툲U5# OOM*=HO3ի%t_E&.d3 HJv@ }B:7Q%#+8tW@ ؠl^e @l 1Fr78x/(//LzGt5ix ءYE"P%"A=[ekeK@ q4A h$wD@TvDoY1"&ij{ƍfL!j˕RsT/#.,h_EoҦ9f.sOԪZ^<0f`Ƀ}˧.?6\vN1Q?U|~=_Pr8bl3N^\G_'cw̴B4ݯX켲{ϯn݄4?Ϣьi1E/rq|52tu`fcM9<2y&k'sg$/2?W[vcZ]ҀʃͷHo̰_D5zYnE;_ZYE}jȌI Y!9CuwNpL1mQ {yM #oq;s83lxfûa1*|N&׼ϵ+g6޶Gu4H{dm;oe&";>q&ڊUzZ5<:4򡋫IυAƬ=xI^a;iG;+ 7yǢ4L,&/]/÷xdZێgge3!>#lӗ]@~m5n*V8{|R,Zv֏{0ᓘ)- nI\ ޘWhיM 1n[s\V2@@/Y3eQԷ':.m8^'Gs7 nܾipbm>~9zS h3G/ϙgVݪs4%w1LW cc=x>^G|qoV@s̲ͼ9v$[:c_NU 8g{w&v֔[+=, 1 w3:.Z钏hglLqR{7qiGk9'^ns!SnL__wak(u^?yjBk fƯxrQU&of{ڥם`RU5k3Ƴf]cM{\`;ҫ\:]-J?֋y{38{?{;1(q7+&/qJNv/G,Ce>U[濺7ݼtgYo%NY[,KC"n@.Xu0ۉK-0)-0{+VrؽkG7ja#~[] ǎ܍v3i}gEo?XYw r1ovV~̉F_qQgu=\i8v}:os_Y;h^ݷ6s+㔉QGE}t^?} ;Uq=6*Xt^o}Ԗ7k+\VVͦH&z JOJMMb Rvȳq1:R?ȧf{+opsf9 ]ó$t%]E3WM osfN`0*핒^wP;rig Č B~ڴ]/s5w7{3.3;Q?QjҾa<0C;{MNM˱6μ\(=fLKSMMTLԲũIZfg)-Z>z#ZHO8Ac$4reI|tV4`[, zB!)Z,J: rۆVd h% |-%8N2h i؁n'vOMחԽC@ }%O.仇|6S8>0ٳ*;AP :&0ؑSU|@ 0%'"-t}!S[=Y±GjpPHtt)@sC%2)1Kಅ>x*=.yŎ$~LH5).hI;,Mco:HF?X~P`m_p8#T@Rth2>mT\H6q0IGQڤ+K8u&8v -?ف im}tMZDMLO{ PtB4K,P4 }36i6Wlqc x 'YK!KT}Y!7J@@ rmQ% OefVBw'F%VOD&)YDe[D\| p%;(]9+`N<^CAN^wmڱ:Q[VZ+׶k-rGD9\rD [~Ҕn^KW-옲7al_l:B BoZ {| n.-E7aT  9_7jMY bb[f3@:ad ܮzmt[WZKΛuS? 0%^ѧc?< ДR'Z35Œ~5r, ];^1%lu<4,3&.Z>NDzGNHN@(Sʔ^褝Dn@OA%Jw9Y7(PqN%lB6)t%,$L6sHgrI~fhTsi3C|;m1]NO`:;:Gn*{  Z ퟵY ԫ5\RrZ@x'o*I#o2=Z'= V}u|ȒuWV777?fQ1 y P"JH;o G޷~Q7YS dI%ץ{qKٽ;kvc\X8ߣך?kkkm9M~GWh!M\'Ӵ%mQ' Sz~SشSg9̆4Y ȹh/tf($7nt\BO :IbfD/?=^ɦIc hܽ>98GęL+W)^5#ZS~ݢo޲x"PΫ)q N TC:A'rjV0OQ ۫el%SG1f4@^2TtL̺%7n(Q?tqEWjpMekn8~zXl>%5 1/l(Sn:)oM2e>a(|`ȒҶB@hc{;0~ ʗPt Br\U(÷AAW}g)^?PQqrem)Q>R Jzer/\35X-:-+r Ř;cØ;%7u|;3$(/s1w‚a̝R#ybk%5<ά ʫ[|JT揍PGyTQPKS=Pr¡(09e6004a255f55af602a50fd9bbc4d579ffe93d2`Б6Sp`t=oM߅*7BV؇,-Cq`Ħ"-``p0K49M,\  Lf12tq0|xĦ`W`00?04IqqKvPKS=Pl (3b186a355a3ec0e9013680e14e590a0d08c94dfckbhPKS=PO:9S(927d4e0b181907aa23c80e90dcbe8553f78c4975UYW3 .EL,@ WTT(TVTV@Xȅ)0-PKS=Pςg9(6813561f987165abfbe96e9803b82c5e0fcfefc0[İzȝ"PKS=P@!(cf4ea2ccea38cd056f41246c24ff7ea192d97c3fAA#d^bHaEPKS=P(df2bb2464b68d7e1517cf44d29a0fc7cc128d565_4 PKS=P0(0469ec90161c70ec36ce514ea021ba97c96af352[ zL+JvF PKS=P^ɸ (62ead86ca2e13823c58dc4a04c9d264720567344X+PKS=P z5 %(777f65c257922d584b204a0386d6f2cf3d23a57e,XPKS=P(657ff2d3e1bc6cb29f384bc67dcad05dca324469PKS=P`(95c4e5edcad970996f2f47a61eb9032146f7defbc}̤PKS=PON#(480cf74daad69804ce6423f1e8d9fd2f9c303757į\ `d%@ ?PKS=P g(c192d6c625d6f16d12f3a79cf3802a46bc799221PKS=P#(a7186eff4144d500034371a64bebbb5d53d910e7=PKS=Pt0(5e59232d8e385573248363be02ac4a09856c0fe8@9Ź8@BE , PKS=Po$(1ff39773b9a7714a51b61b1964a317063a018bba[p j?odPuchܠPKS=P[J=L(7eabf225c6a025cb47c69a57e0cfb21f44d15154+b(PKS=P\(ae441d9cd18859d7925a0b1980e9d24819283ac0 !6~Uăr AIDPKS=PM(f0c934e40612e06719f617d86a84125ddd6d5e0b[?g`x#?&?.F6! 3RV_2Vbde`XcQ 4`W0a DʨHDT/F 0'"4/ad0a*&V&&]L@;~PKS=PI:d(bc1958bf7406725dcca45617d1df8d47699b0774o􈙅AaJ).$ATaPKS=P3(7dbd9677d3785802e2bae26693869433f958078d[PKS=P } (211ff72632249527fc89c0596e5d05b244076c5ePKS=Pj(b76b9004998dd071b4c9ea341d34429b5f0185b9]PKS=P(Ap (ff7cc78c86f24cf6f3255142f24a38bb958e2324PPKS=P= 2(734b4925d5502ca3bba17d225ab08068dc3addcbOlUߛnb(cJac%DL$B$161q"1Qԃ4F?c 4y3v;y7{^Gc71fȤQ=yw(XSspR󵂨8ߝ7 O?Í1 ?W>hܿpQsT'wm0XWO\|xro~V3~nc|E~wslo}յnM˾uf/KY-z8a oZoy[^J([/%ħ׷ߊNjt[*0M\( ].ηe իyWJmGrh>NfQ+ *"V650 Rs Y<#Ѷ(eg^.}nmPl ̗@ ab8g,QG-BޢɊG&! ݦN#"*G*Ϻrjёs%M0:sᐞk8TƛxSȖfHh^grPдj:u\BK4n4*BAMvD?+hԠcM-!h\imIR6̈]?$'8ukiTxދbr EoyQtPS4k\T೥ 'psR_|JZ*V÷}Ixn,`6dckTCӪ:FUuiRiFs{uJfD[,tesbtTp#TsNWTէd8ɪk0U6*! U|½ G>>Th*|Xr>PB.:0K^)x`Kaԝ#|yvFU錶E);{ k^KdCqmPl ̗@ ab8g,QCvmu @8xu|:\8.-ű^'mƂę m(k!Vi5M Xr hQӼVJQVJJI}׽=NXq}˞7~=~2Q31Ú6|T^0MȮjPKS=PRȾ(06e59d907fc7709abbfdc989e2b109a5c8e179ea((oo X8.L0.&6-G@$gK?%33 @"3+X M@y#'qSPg;&12bd1:f6;1_w߰kܴdPKS=PD(67d498119945eafb69d9976bf95d8725bbf5c858)B PKS=P@8@(377e383c69878ef0559f4d232bd63236d3ba7cc6bPKS=PS{(70c480af4cf959c7eff980b7f015a77dc198e906+PKS=PITQ(26ab61d85f2203b9defeebcb7f8680e1bb56735a{PKS=PRP(e57f715635b2492b9133fcd1ee55c870e08a9874=PKS=P}k#(9a301af6efb95e1c05575626d8255fd113778ca6ŨPKS=P (5dc3156fa8144324c269204548ee2f89150107c1;ȾPKS=P (d3921956943f1cb6861fd465de2f4cbf1edbac1eAPKS=Pl(89915090cea6fa454e54c84abdd76fbc8abb50a0o PKS=P+D/P(b5c02308ab43cca92d84b981d583201c99021035pL6nFL22YP<2PKS=Pt (7e6d78a3929abdf0bd32b020248e5ae2960116f3d˰i"vYh@;` zZPKS=P"$(4980cdf7edb5830166323c59613544e764bd467c;.L K%J%\ߗJgBXv10PKS=PȨL(316bf22f464caf25b63e4d47dc31fdd03c9d440b+PKS=P97D(993efa4b4d0ac48c875f924a26d6934424c270730if*n!UP qFqТ}ĨP'taGL4\&.IPKS=PU ^(83f57ed00083bec467e4c9cc206c4099ce565ec7PKS=Pl (6d154ebd23ec738e8c1411902c3d57ba2162f8630iPKS=P&(b2add0655798e7614ae79e3987b96aab8c40719a;PKS=P<(31b0786ddc57cc9aaa341a2313d14282985f5975{ L?bfPKS=P (4ca980c926a95c1d5ba7c230f872e6a511c9b8bbkbX0PKS=P(m(a29716dbab901df80f9c1d2b3706cf8c3b3a7ee7```P``0``pe_ `Z!"PP0a#Cq]ll p1Lb@Ɓ ` 2 vqPKS=P,(3b0a6bc51984e3f49500db125633cd4b383db6c5gPKS=P ;X (4f21d8c52f176cdede00e7e4705706e2b1d6f73bkbPKS=PYT(e3d1d4726c2bc655e508ab24395237a719239bab{XPKS=P((12465abcce69f7efc66c1e88609c5e18397770a23PKS=Pe((065595a0f1323390e5b957df8b4373caf439a762ba]L a X*|.0SIJ`d53E自cDUp[`2!ۊ]-."]N, v9PKS=P{V(2cce42f11a2ede7915051ffa98b386b996a25a33;p+!NPKS=P4(7380a6d5495aaa711d07db6250add692ffe601d0^PKS=P^)(7f2d0b8a69c15e44b579644d5531e09f0962c1abbBPKS=P~W (dac88c5d62beec6354bf9e0397a03c44720256b4/PKS=P)i(86d91a413b48aab9d8ceca852d7a4d03231bce89```P``0``pe_ "" Ȭ2Y;&12bd8 kb@2.IlZ(90x464@f<;PKS=PRD D(4dd8b3d5072a4b5216317f7f9790e986ef291124[İhQPKS=PO(e11401487b627245d33ba7c03e2f8562c3d1beb4c:`PKS=PK(9ce52dda67e97691875d3c6c10ff2c642d0cc072[-PKS=PR (56ac995d962d53ad866a3e6544c32d9d54eea00f{[.PKS=P7F (ee21eee28211bc7c4eb204186fab023910847bef3u5PKS=PXJ (6a349016c6ef0f783b8c054892578b965e5d2e1b{dŰȉ ?PKS=P)(da2a8c7879c2a9199137bc35f3d239226ede164e>PKS=P_ (a9b45a20290d83be3e9ce232d76e314d8fe4996ab PKS=P:+(4df2eab469bcc5eb2a1341b957a7faf245c73400!nAل,鵶I G(N {eQ)r>O2fğ?Vmx2}9R޻S֝ub`xܗy:fW t QئƢ V}~ =Y0㹇 5pզfૣo: h 1 F+]@F~:PKS=PJ(b2c7c0caa10a0cca5ea7d69e54018ae0c0389dd6 PKS=Pwg(692809f5a3ce98b209a4e3bd093f96fcf0b79a24[6PKS=Ph 1(4bbf3d48e1f8f8f2de26917474d7cdf125eb8920PKS=P잎(1eb957027f158ad88080a017247883a98330c8c0Z` PKS=P<(fc2015efce232f07f7e647c59b28cbea029d3b21=Fiҧ1r\!M\#g)tact833#a Q|3R4uu\z}wznrt-Z绗H/tmOcnfm? ۾_ \|!#ށ@%<71-53iaTqCj+ŵ)t@T,*81 FޅwA+rqV,*boe xNRÿڻ`bj#ZGǷp򑛙u]frx*!} XT}E^1qHmUKZen‹Aj?CS.B0.|L&27 [hHm5SVAև0Q,bQiE0.Fǚ#:[\0r33 ށJx>nbHm[qk &f΃V5SԮ9PntS, NLw} OS/w !=qk &mk׻&Đ޻7+|twRmr|XT,f 9R[yҽ֣e2c;hḘ˵;pڳpk &1'N8bnӢBCz_,yC$Iqsds?O8 mTꐉ]f_+v8%cN:㨏!6&qlw=w%uT˿ގs˶g'yR,,w/TSɽ-RLq/~yrPa H2Pa<(;e &5)6lЧl"=c.7oJУ?xAE*WzۮSPKS=P|(003f3f134d1f43b01b81ad91423cb2ece7791b7ba2g!1i bI-PKS=P* (b5dfe46e5f97a991a983ccdf003d9d68d75cccf7 @.+wM+I2gk@4(g&ZL+eo Y޼ ʼn>RBS5ŤTk&E9we7 ,a̙3gsC'˜3XEFTOz̃X((q֮Zih-a ❱3&1ݴe59MNv7u"Y56V.zGް"B( Gqorq5w&\܃,Pb=1j%1a\Pd~DOry1׀}< ̘B*TH#!*B#Ccԯ%L$2F)ƳKXy2Ĭ"\#I&S-s3j.'`L!WJqð6.8ָbCջs߆u*R$7.dW:o **N$r$bk|:榼vavb,6ʞKlMQ{gmrrc?U]C6i;n('AfG᥊37am1mȎ> ca'G=ӄGϧU~N.q'^}e|z7*?]D~@%/+"i.g(|jHgDz,n,hdInq 5PWzPHK S7NA+16W^ ٲb^66&d E0Xnݥv_j&QLqh/E` se̕F ck$ )3cgn+aI)%P`DʸC*x4ԧaZ-;YU OeF\p;܍6\0xH =~8P֞Emఽ]„h(#|:'2f,W7]0%"]DEuZB]s mr]3|[6#+:`+W+ϙդO~;TpJ/AWJ12JAi 2s`-7!1Rz [8OħqTޛA~c4T`ڢ6EZ]U/P~ jQVj=rsB )>o{bw-PDCp@, 4tTX@3c\&-qD*S権h(I>@G' [|B x!0DH`<1r>|El/ - Uc4&0jnYiE *4(f)xzi`@+y-_ruGisQz%)(Gx&۔ Ki-aC% }2t8 uXhqѾ1;_O4l]ܧg -?Љj+E|^b5@9:$`*ۦٖ-t۫ C>\ivB(E!,ER\dȾѝ56 sFec.;W V%t3nғlBy8)ii:2h&$V~i5N&Fܙ2hZ$ZpZh h#>e MW5W(BZs!D+@#i@t s+0¸+enS酢#UG Ggt|LKkXg$L@kF-sZzc9]Qh:~]=_j6򡵪XC E)'1D*|[E:Fp\;\M3ߒ\iLUUCs4$CSF)X =Dh&DD2SBK#'?G6uwS;G.Wwgj;gEA$fIJ7WlVW2V~@r  %mx8Hi%t%xdF! ]$m$Hh%=ԝiVM߱lXb> ; -WfR][ZK+ ~'_+ t[gX0ɫL[yr p׌:~ r.崇FWoteiL,i&3܍y*sP.` Q*3B @#U| V/ʥQ\2`q6/yTt\z!oƞCs|uvIV&,>A9mya{>ᶵ$ .)TF:W.IGl?Fe ޡ .5b9rqa}Ye*HX/;KLR'{SXSZ:-z.X^Sb 'Q<7,F:v97U䦼CמxzZQ<)9)rjAܚs-ʘ6Sԕ gn~~S|=ji3 ڪ뜵liH Z>']ʻ1[:U/E.ܲ/1dۓoJʪM|ΧevMEE#/vImcR?;2ZiXGu}όk~xSGLICF_?xy|a'y&O,]_-#\SPVQjhѺ1͸}ڟ,)>[Hs}U ?3gL<~=/NN|Sd׏R%"RnW [ ukv=tTد8{|gQ;vWr.vǍ58Wr}uo ZG׾9s_;I_}ώ3lqifW簨Bmg+^~PxɅNz6e_6~mq+?xaWS_?;|h8e=ㇴФ?ێ<6{ۉG~zO tʛV~YtwO|8ե%ņ.Ek˟;=䆴<{c7G}kf s.},}ʑfgO|=WBS6Ȭͣ\;>VSF&2i s'}Ls9uҚAO/47}sg8c繳=%[f+~|֯oȢU{c_}ɴ{ 90mi|ܭic_ٞ._\kW65a[^3ns~1d7mw`~ōkw/ŷ~ՄOrϭﱰ*^,=';7tʪ>)/'߼amr~~w/oO94˃PyIK .v2=]"L+U5>[t&a:(PC^<=Uhk|!Rh(8N6r1g^V~dh\41z2&)HcuC~E+ ĺ%K+ ,WG[ t5T6>ΈpyF nFBևgزHer.X/oJ-W'`ItG k$ uv*̦EZ~*2H0VIdq c:Mnz;P P %,\ؚmpMCk|u .f=̙XPKS=P(ca412c5303105497913d3bf81ef18f5ee6ce96cf+RPKS=P*I(bd0c035fc349953bf7df5b2a392493a3ebc202bdPKS=PL (71a86dd780b63541bad62426c93ad76831604499{a :PKS=P(2d245fc55b0068f6043bac8d013aa33d26430048k PKS=P^~(32c3d940ea89b000878d960baced10de7e91edf0kjPKS=Pf}(7633d2de6e4b8f777161783871a1ef96a4b74ddcPKS=P (fe6e64b569f91c96d9e9a9086afb454d49f9eeb5$PKS=P`)(1f0ef056263657481013bf804d73696588caf040+ T sӅE2@U]Bj';6 PKS=P˘(a43f249bded23542764ab61c0292f610ee34b362PKS=P)o9(11eb47021baa2e6d3696d83ec46100af070856183 PKS=P;(d35cce9519c97b1c5dbfe9a44ed5d59802774609PKS=Pa(786d8c9411693f325c8c6685628e17c9366a465cSTPKS=Pb9 (6f8e4392a2b9f3eb614f773f3cf7dd924070551b1j0a BХeɖe)=d^'e@@BmK]ƺSɭ䥷2k6cJWJ70$ނ(`hlhh k_%;PKS=P 6 (a2a473b5c55199d209838a1c2e5407d091d8e20fcqɩ%PKS=PHT((fa0221a3482a611f80132514ad9790390a8d254c ]Fsɱr9R"9+tP$ɑ"GRtH%JQ)B6Jn?1zͱ3ݹ!ip4xF"b~; JDRCXt"Т;^ l=0/" 6ҜW3 f<{x5m4K٣NE#(xQIt&rcnAMBL"t#I$N jBA&F #P4ډFBP'5f1i8I?W 7U$*ySM"@ .LOz ҈DǼ ;*AQ3$#&{,_@&H"Rg ɮYLv?K-m?'EyeK"EE fk"w͚T- 47Ff&MCI!p"fJ/2 +ɿ=8aTH"wE <}iD"c^KƭOD%7 L~a Hiz9"&Ap]DO:*v[R~4xbFqìCNh @nq[2gt> OLid-p`9-=PYrGņ&Q$|},Nle˖4?TE"tD5Zio)L7ٛ_ׇPBDh>2^dfv[- )`#"`' ݫ+ IگdB;?Toh4-LOI FBN ՏLI"NNu^?K)"淓z0l:̶h };ip4JFrޢiA9,3J٣N%E"t<&!~O#rh򀇌CGECC4*59 "\C0DAMcCj}׉􄆲2@7& 9vRPP¾i$RTGy`pxQN4-m>^BO3< ;#w#Jm0J u1eʝo-8E4?=82)J{ČdSSrD#H9zrk/7VM(D!$´(?GW "@ @ @ п Mp ہ@ @  *|%̥8aڿGZN$LZxD[Rt $t  ɮDW_C*@I+Aؑ-WHYgDߣü ;h~va{㿇hX;‡ˡjS9&13 @!Ico{lj{7||.D coN;!|OnoCB3@8JhKDvt/$ߚjI=$IRLj"#& G>0!XCИHqFiM:@Pi'C7^˴_<&b#FRDYD'[ HKMZgٟmُlbʴDrnBÃ݃d%}!;J>#}߽'@S-Ȅ2O+<&; džX B ? [r?V8 f"(;K"ZfqƖ{zT72?z]k:Įoc{d?*RxR(烑Cj'gVĿ3o5j'|ʨ쉤_ys|l~Kr+ϛ_q׏G Z{*PDFyTOȟ9,(h:"x#~QMl=> 1˳ƻo/6 16]ڌ37K66#!;C ?!ڟ_Y_*Tn"m5nv(nxKO{ G7HYF D]EH,Sp' v-EcJ!An{mTZ %~(%'}6K 0\ $v3OdVSli/ b%諙Ǐ?)eh e ŧaLο/.󈃡Yt#> ~x*@%CLO~y@0Va~SeT*cpw5kHNv^e)6 U캲£2BeI)JzG\ql5QiR\cj}"5+`2`I梼y>ňW,0]x yxgXqm 7+Q]TAkf)\v孴q۬=yq0ZUn0.]7Vsw0MU\7(Ӿ@Jݲ$q XQY!*K=K7R('-nڂXk7҇7&l<.m3(d.cr~3SS]"\O{@Z `cr9AI{nt+-]\Us9vMNbX"An00a´ʵ.g氰oR})JqE {vWf+ t7"6:uy ӆ}gA&3$wfpu3%U'N+M>8c8UUX*ke-oe]p[`c]bmq:^i_Q7ù38[pյgG*^/5[NalkBbw-1ҿEYܻM2~Ǽ?rou{ %/8ۖ*PzɕJ*/ rbv1,zy3f2ޜgQQG]qP 4m2o\y*up2AהKryo;l_>HgTjN"OWC#@dnv5֗+0kg n>ȳ?J+h[*2|>Vo˱:7/pOigZ(Wm۲RQ*T3&/ ij@w\X@gԸ}U>|B:էfH 3i1V~YwT|]KowxiI,F/ߢV/x5NEgrpς؀8AEV1C2;:)sLJD􃫉\J+2874JtNc_i|?ۮvք聤roRͪ%4aeBgmxZ)83J8'/՘ \8Oq7}n5#+,꜆G盎'&؁Y9%N)<9}1OL2Bd.7ohLEU;p)bϖ޸G;zDJ4+n=YdQݼy#/?4q}tU4qIjvC1ʼ[Qs3{Ss|>zTNzQ6\ڎ#ۏѽ)B>X#* Dt[^5˗]_9J.c]5Vny ,Xq2-fѦ sJ,q1߸{mڲu6\R;®pҡCbO7Z|!~Kqf6]/ZֈhhSC[]ٯ)~rC1D68H2ΝvO۲si~$u\km2큇Nf~vbSfջ'Z7'!qCTV4J{*ׯʗʀgs%t8Gډ=@!,{nU)`hѹ\WZPۮy 4/f,ni9֨/Kw{}69;;XV#fh2yFE@![GL]=3rV*8 1FuT.?USwѻ~{5e;D֐(8#@dڜ 6btB\t%zFά]GZR:<fhvyc ݲ%XQ9X"oNfލ[6Glg^q_`]UՑFWߥY,峔Bi8699 r̒vtwۈ9lev(. كεb*|z:K%4)&z-5(t\UZx:Ӯr{FjRyi[L:+yW9/Zb@__3L~5gaKOٓ4ᖔAJVJJQFV +$-# #% CQST")H+lį4caij0ws;-Vm/t7k&+ +F;U ^70"Fw Xna•K⪳/fF@G4g}Ęu]?u[3 um 2o=f ?j4ew/+IĆO B,c~ibSo2i+]n+ٶʹ*xW0'vu%xd-X1Nphl#x>~af݁'sXPh$|CM9᎜sz̲ߔ9ƙJbb$-}f\mnU~Yջ/V2doʼn2Wlwlyԙ̙)r8[8wwUTRgg$ #|p0L5ngxbăFظCNM Oɬ>4'+]*c 6lZ>立9:Kz2n;o{ܲEJzB1\)͔{ {*Tix>E5Np >[u .`e͹鼹*6$rSpjOsJ.Ldv?3~ws2;϶p^)3PϿɳ9L̠H\K Fw5i gRx3 _ylV4gSyˢjNKVZƓ+<wB+_x59 m*u+a}MxД~o*:yg w 7H}"ub('gt̠;rCy;+򼏠.l3I_!$u" s\U^:\xu,W8g餯LDH9g=<ܖapX4)/*{3ћ:Bp4}t^4Kí,@٘{ص_AÈV H<92GXĸKGxFwj)% +l 3><8GXE\3<{9.Q]'kMi##KcwDaM <ü:樠 |μz:6d~UJXܾ JKé8X:,pIJ '-L33lw"߹(p@^\Dꀋ:r[]DY9Z40_/ٓ4W:iY+ط [7&:%$_ʹHSAY zӶN. #JqWP*,[2w9t%] d~hl%[ MŠl]tϧglq<'cuIZw6W5iUbS4g+;孜/V:c-D cM%|>˟fY {ѨGbt!òLԟyy6;af`6l_w (9U(ㄞ^:i]S,ћz_5jdfͿok傈WA#M &zkWx6V:m>wqIt U0ۗ3,׭cPݗ{쟖tuf /OA鐷sV7gYԯeT9ãmZ9>uءoZ,I) aҋM^ ]G"LIv臎bᴓEoJ6]]*zce'|W-?/̽l3eOo_uӒl!iΌe=͍Q΁>RIܛK\zx6Or_~:5 qup |8WQ[%5d¦߰[[bېg7E~oe!*Tj\sG-xK}יL'i3"Ӆ^x_Uau,Ɯs_ N/yu噶'be^YJ]KQb/oc$=y*C]ӎkIoBU)JJ J woNWiN&q4Me{G-}:S wK%bƩW}MIKv5YU8?61y&zC62uU <h/5yg=Z(*FncDDCiztq}s0_iՀ ,| wONJx%A8@4s?@Z, -T$0W@U@|_/Bj+mnfͪn|nnsm,@.@cCt0x5 }իCJX•ґ@Gd8iܶ?;(?.G^" 9 hLvw][+bÅ/jю[0] S\h4-LEEiIC٩8U Gs{`^D.<єAx#OEcm -f>Wr Yʃd9 R؞9f2 Dy !)5*{%=KuOM:XĿ>S NhdWc;a@ i4 ұr mWa?Г1sP$m<ܤs~=~?7?r6Tqd(Wydb\cyifUaIm&$> 1hЫRLP)e452=]oPKS=P(ecd3734c1268c3dbd184187217c98661d315157a{PKS=P.v(7387759956d26dc5a107cba2dfa855c5f16a4d9ePKS=Pg (13ddfd388a1fea314fa6af371c641a12e8af141d~}PKS=PH (20fe655f4266cf1e598831c3877df665800b5309ckjx??PKS=P(fba094dc3c68b82eb061b5fa90c28b9db2ee4e05kbcPKS=P (e5bd7ff7b324b5ab845b3c2d2a62ced6a3fbd95f0aPKS=PHy?'(61f91f81c74467b01630b1f517695888f3c134e7Ũ$^7  ?PKS=Pڗ(b8a7eda8978e3621b8fc10a1765916043c4e9b93+PKS=PI(688a251e33c604b73c60ea633fefa0a0a8beae47ŸPKS=PT (88e9fd1abd8990397e581e6bd3c59fca6dcbd64ekb1xNPKS=PDJ(678f275a8e0b4eee1a354d66d6c41e9e005f3647```W`7`tPD 3@`ECKiH{;PKS=Pn C(7fbddcc4c3555a9f8ac0a51ff47544d52b3ff631;*@PKS=Pnں(97d82667820698e7bafdc14f3605ddb2e21ceb70{̒ YA@#PKS=PGA(9362addbc38c5acb8d4c14f5a9db345b9572ca2eOlUnbG cfS %F?&Hblt"1A ⅦGUhIb욦P|3f"Sgnϛy3M{3oǘ$Fݛ uʼn.{!"29+ǹl]X ,/D#ә 9 ;]VFev)9Ω!u4HsY}ݫRX.~%֧x``?7pE+nKt̞dF['9zU.ؾo}յq]$uL?uYBۢ܈&"mf[9ݹSP2'Y k'D uXi!s[ P4jea5"qH(]nMg˳#ty~+^o'B1WDY)L[4^"JPIjy[3n Sj *]s&:S(#˽fVUǪjq Tݽ[a`ȳ'(dXUY`u,Vh_Qbxq//i&9AtX`h.]@Q2%uԦcɝ@.ao*MٕB/ $)IUDsEI8P+9#[Ʃz|7 OMrT|ɇ[R"T,hՔXmofIƇrۂHݻh\  >闛ٽ6av'E[$L-u;󛼅J,&|ڱQɚ+wKدrgմph^y&`x =U U˚9eT-^(\@2@źIڍJ Mr/Yq`U.ØSOƀYvW NrOr6sKoQtTDtyJ vWdvr䋁\Ǒ-и]10A:L04@ ヶ)셏UM:?C~1h >ucfxn F  440G J?W-pg-L?S7Ċ~!7z][(NY|xO] ~d8W,:G2ve뛆[=c:qwCX<9oDXO.|.VUy-6xIsXANJۣ^y#u杢m2.Hݑ~~B<1Μ XTihQȃvLUE␼@v1[C̻97]7;-f 3xv g3qYLmKD+BV"4,Pinʣq년//.B k%gWݾ͟|ygkaS;t)e?k;7ªz;e(:Z4WY *9=R[JBlyD1s?(r`SpPKS=Pf* (b923717801e86e455768edc940d6fbe813c0ffa5-PKS=P&F(beeedc9ed4a433beaadbb35d632fa9136e61d481```W`7`t°A3Ħ$X4 ,<ƀF )<.6?_ LE,U,M\ MQ?3{#-F>C̀NP u 6i#,F.66oP)ۙPKS=P73(51bd79237f9d57374d39d8606bcc5e96d737394e{PKS=P4Ѥ(3eb2ab4adeedfed47a736b5dcc350634ffc3eee8_I@VAO@Ђ|s".&G,\ ,O@ȗ10_Ͽm]ݛmyfϞ/ͮ2g[~Oz#w;0;P - }K;utMLx2x*!_DqkJ&PI0.|z{kw!=qkz7G Zށ@rUMjJW5%SԞyPI0.|zǦS; Rv\蚒AjvC&ȻTq ;N`mr,^;utM OAW~OwᑛȻTq`RU;utM8iڍ =7 J`$yށJx>nax~^ey0\@\蚒;Ёw[Ro{1<+~TQ̜<[ <]l215H홏yl`.B0.|L&{/^S)8yAHmOv\蚒Aj+Ϡ(Otnx* }gCvфwPRӻ:dbj3(kucx¯ q sӰ^|4 ;utM gP<2#w3Tq Cj882֣}bj/ "#;P -d›O^Stu5׌v\蚒Aj+Ϡ(a~9cf+LaoB*Fޅw:#.ށ ށJx>naHm[qkJ&f΃VQ\蚒AjG(]7)PI0.;gƔ;>r xN^Rӿ:dbj3(k.ށJx>n>P2Hm? vO'w "#;P -d›ϧSށ>va`+<"?q&0wv /EAaHmOv\蚒Aj+Ϡ(Ցdn6-LMbjz(S;p`i[ަo]4ޅw gC۷|4+ʯꊙ gk.s3A/fnCM0ށԞ}τk]S215Hmŵ"\#?eTq Cj NqkJ&f΃VQZy)+DϚ #FPKS=PmtG(8fa9dde700bdc7e0b1183a97e777971ba33c52ff[İ&]L 4>Ȇ&PKS=P(a577b578c4b495b39bb4ccf94ee2747ac297c06dXv?+O@"eȞb12d2@AC#$6-T  Z71W@ ;&12bdbc` h@2 }9 ɾPKS=PV(ca22576bc6a3cb828510d885eda4feb16b568d9aPKS=P%c (37dd3e8d66f240be60043eb5bc0210b656ff9171t?0PKS=P(1116dec9b162d9615165677055f450f2677502be+RPKS=P5Y*$((95d32f93bdbfe983612cb4e984e48963c84dcef5{Ũ,b6L@0T00u/#PKS=P]Z(714cc77953a9326f691548467bbcbe05da81c798kbcDPKS=Pl (46dc1753f2d2916ee2f00e31f789967b7060df0abPKS=P?O(a37b146d94548e8c6bef1e01a876ef4a73eadcbb0 PKS=P@p(1a3d4c76397b2324b3e4915dee0e6410ec70f161PKS=Pm(5409b5dbda8d8a7e3d3cb36a9e172b1608e51165cz PKS=P)~(f138835c425c9caca207c51c0ad697f580f7b6bd`PKS=P')j(6413de6dafafa53506de050ab79db48649cbdfc0PKS=Po"(2714a0c6f30b3118010e39f9710abc73a9eb78c5PKS=P,(daa50e75ea959dcb29b3787ebb7fa89b7321ad33+bTPKS=P;[ (d7981f7d693434812c5278b882a20afd78ac7c62PDVfBPKS=Pb(9a154525902719bb46aeecb42daa3c2ecb5cb814{̰a#LPKS=P(04b0428c54403a1efe5283ff6d96d1510026644ajhPKS=PC (62018fb6cfb32a0663ed1d1a528105022c3fcea36APKS=PF (5986e8b844e0b1b43da0aec86e3756027a6d6fecIPKS=P*'(5ea999b1b4090a86b58f49707414cbe023306117{PKS=Pnݳ (e0c487dd0eb6913b980966b07d2eca18bbb6bdbd;.L K% ]L Xv10PKS=PK(fcf5c1d9494fa84ce3f2d23dc60c7f991cb9fb61_PKS=P7(e8eeeac53541b910afc2ccd93b65b81bcdeab4b5kbcRPPKS=P (14409738e847af3c69f763ffa4ff07c613e3dec43oPKS=P8 (70aeee2f1774c8a91e7716f75ab01856550a6409kb PKS=Pl| (15618de42ef7e940fbc50a7ddd15e45dd0234f1c PKS=P%xW^ (0ecccf73402d868725d3cde056096033bf8fd371Xq Xq٪PKS=PKE(9459f26e79f93b76475e06cb51b47faae42c04c6ZPKS=PCt (099d5226b86f22c99d4f60972f0749c7320d2ffcso PKS=P^ӓ9 (54c3424f234d31311182296bf26d1422d2e1883d[%PKS=P4:(d953937b4bbe1dfa949e6540ce2c320cc95428e1b"PKS=P4iͯ (eef973970e9e53213d811e9da48b74122c60c287~@PKS=P3s(c29208b7179f6596e1fddf51882a65ed775f9e8e[İ/DHA5_;PKS=PlU (efaba465f1a4b50d2e09423bb40ed021fbf18304kbX PKS=Pv(391e0d5947df36292d5126be4d1b75effbd0c7cdPKS=Ps*e  (b4b5e862b247a631f2aa297c5808516fb7bdae68o PKS=P) (5a3dfc62d6fbee073751751467713987b9582d26ʹPKS=P?(62e612cde71eb59e13acf226ce22fb213e306dcbPKS=P (41a8e2ad90693b8903191fd848e78148a198c2bbPKS=PIP(33d483f1e50dfcb7827d6da5301d3fef4b04580fŬPKS=PEn' (09039b0ffcaa4de95c31f8a1aef28f2ec72292f93 PKS=PS(1cf18a8704f045d972cb35d8f71496c31eec5e78{$PKS=P{1 (6ca0643703569537303ee1a52b8e7bb42bc0bbe23PKS=Pg(67f3d6d48b2fe676de86f5152d64e53b4719a7e03PKS=Pk  (283465efae9397bcd74c949924723e11826caf373~/ PKS=P)(e1016f8dc7f114fe198d2ef9249aa40f42a76628?PKS=Pį(a9a682ae51ab3d7dd68b51dbf30df921e2539eb4ӰWPKS=P{^ (89ffac276cd4debfc887da369f5c5c6cbb392fb90PKS=Pla(3148c892ae55347c88360963fe1d86615b8822e0{Ÿ?3PKS=P{(cacc58e7f182a47a4015a46b1e22685b887c3017+b(bPKS=P(a01023154b0c3f384612242a81b733aec0f2f83a[ĴPKS=P> (c7c5c5056372316e7b5d1b8240f73c4dcf79a34138 ޯqPKS=Pg(118b485aa779aa9f94b071638baa5b563942fcbf{-#PKS=P=;(5973868525a9cac93e96191e354f7916594027dfMPKS=PF(7e95ac207c1dc1183507f598bd1aa1aff9531eb6[İa'W# PKS=Pf(8b8bbf67ca121810efdd9e7c5a7880480cea612a;PKS=PQ (b24a99225cea15525db6460c4235b6ef7d31da9d~/ PKS=P~qN(efea7271551439f77587aeebd756f849dee149d6pPKS=PG?(87ebce05a23c2bee2865b86e2a476f042a84429dN0]DVTq&%iC ڮhp)6M( О\zDAZYqZbN.?;?ӂw_+**SlGKhxN)a k:oJɂ(z]@*YkIzB@B2Moxo(c42610119be8474f5cae6a9326cbfc690e142820^PKS=P}FH(2d263c9844613e083ba7f0f7227e215d2ec967eb{A,WPKS=PY3(a07eb0ccfbd7027a83cf611d3005e82b1c0e5bd7ePKS=PUS(18ffb8c5e6ac67bbe9372dcb2a78f60b5cbfe3b7c PKS=P= (60f53a0474bf087e594eb3361deca084868168acĠPKS=P/(10a83a541a304859318421c27167060e18faa10d0i(#PKS=P (0301ad562598f045aa5796b278fd06059af16287zPKS=P8(30b567a63b8291368fcf44c1ac74f81e06cab1a7{̰ PKS=P ؜(3e725034ef32a21d0e1a65ab86f2d2cbf6d65138;PKS=P (1393a3571a1a21df9e2acac5184a26f8a7130db1{ QPKS=Pһp(065abfccb95d375f46779563ed47887f7da49442cPKS=PuOh(2f81ad5f254d9f24ca0054832a56cfbc4eefbff89PKS=Pq(ef15df8997a73dbbdb900fc9830c85a07d014939c4PKS=PR?> (4da219e1209bcca3e807d217510f9ef542db027e+b^ngPKS=Pp(fc89f47002f1322ea8ffb18de516e5da3765974a PKS=P? (ce444fa0b208ecae38767dd3d2daaf34b275b364PKS=Phen(3f8aeed0968aa4822bf081cd4f243821f5fefa4c+PKS=Pa (d733ebb39ffdee32230880391f043d6248624eeevPKS=Pޛ%(8456c471f2a6feeb4daabed1f60092b78b79b5f2`ĄPKS=P̜)(9a5a55b28c6945e5cb5adf07f792dfc059d46e853144374 ?`,hXٰPKS=Pv&(cc75ba246693ecb6864db12b3d1b5d448ec224aaRIJ#a" 8LPKS=P](49555fb1235acdd9354506a7c44d218b94be6d653_PKS=P.D(c80ad147eb8e6e9e755893cc1c15c95047cbead7[ PKS=P((c1c9e1398c871b3240f9b2d39e5d7ea154cd9180c|PKS=Psz(db20983012d33dd476751304654d2b58be6b713ekbdĨ PKS=P;(50bb01a72276481efcaea37e99ef7f4fc17e1301[h @RPKS=P@0(45d5ce8705b13f8ebea34a0231536779bbe37dc0v PKS=Pcd:(556c2febe1c720601306f447553007550b9d85c1cPKS=P+(fc30072c46947e5d26beeafdbdd9a839109dc48e; PKS=P !Q(bc39ae050d3d5194c14a8b039afa0de17a10cbdc;I# D z^xak1v hbC@/ Ï0`DB`*:=4xBD*PKS=P-i(f057d138aaa0c729f2e2fda123495890651f234bvPKS=PDd(37703e28f73c22332ee7663af94a1dfa8415a7e5zPKS=P{(00686eeff01e2c7a80722c19be086efb8d7f8451kb1F j`PKS=Pi(20e1f02c56a5050ae5839e033c16521518a3540f;Ī PKS=P&v(9707a89a98008f5b859f5afbb81c4509df04d871{ #UL.gPKS=Pz(5eb7f341fb3abb992ceb8dee7a3ddaae8068cd76khhjPKS=PA} (df04d1fa9b0157e57304e401beff07d1eb61166a0S`PKS=PS((2b14ee0d695eb73de1d8bf7b784cce7d3e53be1b0PKS=P)Qh (4f5309de1d1b8a36115a142cf2ed59624d460938K  PKS=Pt6=(f54fc96833f5c360dae8b8fcbfb2f38c9b4644520if*n!UP qFqТ}ĨP'taGd4\3J\ PKS=Pu@1(2642fb423e749f999ef8e053d346943fd7940bbd(3PKS=P<{(30348e07ce6bef89b5dd02007d7f6a4dc35918e1{jPKS=P#b|9 (6e8936e3e508555d14a7c77c96d439331c80f9c3]_lf|ޘo 6W5ksZT FJAr*B:\L>`Z TJ$J}Ay ҂J"WjL@rNcACع7ݙٙ4I8 TĞ1x 6m6@ l@SGs@ qnش@:Rf@ DJ_ I PJ *ՠt*-n<^ d4 n(DޱǗ*o|BA9;A=\C1KU0G>1n)zD`;ytLJŬH^sCpR`Da!n_J aa6'j:A|Uert !Vi52#YqϠA9VT蝕6zds $<k҇Uin6x`yQ;fo c# kD^Ԥ3U*[D-B!r[0m4uӰA+ |0sPĹhth8g(>Odjt'S.l8jb >D+p͈N1\ԙ+FCLoiAhheoJ6!@\(pV n@0bktYvt%=ehA}#ȷp˖ưBj=1dU}Փ-6 =UXK_<c1ټ9#Œ>-w=rijH<쫵Z p1ky нA+Ѱya"ɂO (L:SݹKw3lF8w_[ofVTqc~_ @3@,G×a:<T6.Q^!f[/:S,B":Sz.I풆`I ;&KqmdGÁ2ǻ (YW}r6WvGUwŸgz*?/?fᨗLהbŴtϸ]f7u*Q*ߊF18qŧ>^sШl@/boma"LKV~Om"VURzTQGq3C̿SUyJ~֊ZukFYگXD}?xHh,n1@x? rvK+\L=_UUp ._[-V{T"/MaN۽K5M|: hQl!q]SfD1L==_GvhaD'퇘\z]ynZgwN' A#Z^'0Jp R,D: Ȑ`?:O9`̧.%2rvyq2,M us |\&љc(i:|>.Uu^ UT9%{ͺXݴ3VہҰiL:6ym^`Z9fVhh7ƛRI/Kw;,VvT8J:jL:Y#u{O+XT8#:i?\dhpL{T4nnm:%,q[ p(Qlvk~` hE~LW8vć/['w֧ƒq.Q|o֪ǚ:@M=$G]UYjainqڥVM443iɀJ7%Erѥ~'c{ y։1ycW3L@!iaHǢׇq$Kp=xjZ'Gxat}9C^_؟}K1HϤB G),S`N8I(fĿ41qMeQkrJlo?Yf5"vΞv1_'%iJ|tDShG~#3G<ÊN3 2?w+#*H C?R' s{? 3my yLe|FwaaX /w|o7+?BºGu<)|d2hM zqWOfaiA1;[z#jF]1>?-[(T H-/9?jK >+a 43C3;%3:Шq9i!o).7(L4dyS1U4qN @ 7:0A;$fT*(|+`Łx Okn68Ofsh n\pp7d*veh{_ R<z&.N ׎U<=~r0|\N@76)8}Z`,L:SݹKw3lF8w_[ofVTqc~Mk"QS$0[5戢` abi[EHDqNf %,[ψ)_ҮpGT~/Q΅)kEJb*&iҭG5YfqmdGÁ2ǻ (YW2;ltݾȂߡ0Zȿw{u%H1ddm*?F E\ ש!VxbSIV LqbW;ݷjNLX5HTg%'wj&'CЭs8.Ndlqf>Z*>U,~WV"i".~`ryl(O$~^Hls'`ނy('df'sϋW A7!б_i]س)尶RQ$j jßJ]u@qEGIf 1 6 I-5%uQ˞&!ġH/ϝEZZZ;,QUɣϝ!Qt\fٟ!>.tZJlܒѧuf/-~׵'՟ݓWWtk}e|1/_,!lv;MGY49?/aPKS=Pv p ((a068dafb1d8378cf659f9e87a5b7c512446bef17 LPKS=PI(6cc31cdc3bf67c762a459ce4a714aacfc3a73bb6``P``0``pe_.FEL,\ p 63X PG$H~lF0!(bhb+`d`Ħd#,t`gxj76m#,F.66o`j+0m[͕e4%;PKS=Pp(a8896183214b241249ea769f9dc931da0aae2de9AX%$fPKS=P/(7ca1d9bc95acf235528f48cdd9ee56af1b2f1b46{ PKS=PFa,(2b12767fb99a50587881dceeb430ec9ff864acf3kb`p4PKS=P+Ћ:(831200ed0e13e8115d37cc7702b88dd5639885b6e # 9cmVW\P$5QsK8] pso,SobPKS=Plz(3a73421d7f8531087e2a85a5228649e4f744aca4ư PKS=PMUv(d22774f0302eef5a0d0f1f87a3e6249f91a1be7bkb˔PKS=P8] (28f84821cb4860b768660b43ed328544190ededbkbPKS=Pq#7 (62f4c6bef96e9339119a1f6e5403976dd20fae9cKPKS=P1(8e03e4290a2a2cb2d61d7351b56b5d8f279fde78c:PKS=P6(93e072b4caf74d61329f14c882d17c1325bcfd54kbc`}?0PKS=PW (7c7db533db11c5aeec093c55585ec6b8ed3f5de7bB5PKS=P3E (dc80376ebf5e25c640527243db11227a2dedeb23;Ȱ PKS=PQu(92301961cacaa67cac7b4a618ef651e6602a53b1+/ PKS=P2L(606724d57a63d5e7111391f38b04d4de341506f8{:PKS=P3Wh(8c0d2fc47665cfdda2fb4abe59a8cf4900caa184PKS=PJ(b3829ab9dacde0296046b0bf604f009466269a10kbKHPKS=P]](773626e1ca85179d89ac591105f9201a1e1639b80fPKS=Pmѳ(4158d2f013588c4150c6899d4bea14f31fc5c5ca3`PPKS=P?;B(850af390b2d785c90e5a7c4dcd02039a343ab6d2h.x D P`gg3fE Z_=~iPKS=PӈV (66b398994ad30f21e32826edf5201a13e0737dadlw\BҸ4Q4C'$BGR-VL봈-S40# ۬[Pe-t)4#-+Ѝ56@- "y;۱|l?ޝΜCV.1AU5spR 0 ݒUfeՈwF;^./8qPٖM1Q!hsD [o{]1ļvi2]X9Uc!xgV8Lr q/6b$Yܮ=跀oH!i?jlR8Seb#6M=ߍts0siz:f -fkY +H"1rTpO:k;v>0S61W, | u؉2#.*`③x魞O11ƺP4rvҌ:as[|P]GCrΦڐxEb鈝'%jM)MDQHsNc0gRܬ8PtY8u&=F-B$=U%bR y~̀m1-O^BN&s[|Gj"V &C1 ][W'=Va&ǸN‘}K79ʑm(2ς*/_YY!,$dE3bDܪ&q^Gh Z[bbg&妊ʅTzfrfZr!K  gU]ZV<5zNu3b;]4$Rj 2,%Hmئg)ԪA[KY].i;Ɨ@"VXx>'Xvfnhh@i#Twf_<&|)5tԽ'_{k*Yb j"*e*4Oyo YCܥ&FW`Q-$ <0;3/a*Qo 3fQqqJ{,=j4 PN`c2mqd13m@cmtdb;֡iNxE>Yř(W4ʙBB*7 s+|s˸Zp|sYJ ,;Ԏ V4f5g[D_"yPZЏcLR`@TسB{uX:r M9e&|ZNi_ÓN(XT, 4梴H7%gGA#yI?V,K'Usgҳ}Ί8Ӣ. |)9b={47!j-4;r6e?T)itS\&?N=twGZOgQC~a=9oNib77;ws -˿PW G/>rsayf3ջ>@^/>6hGFoƫyK7~~e<ᓩw9\;7 {ҫGo|鶭'o<]nj!~7|x[]OԁY}w5?T3rr7Y6-.ߔxߞ:<Ϳc+*w1o(ןWbˍw"q<=]Um_n-2j-2"[d Ip @-2 -2:[d1-2j-2@$E/[d>R"CLj-2j-2Jp6 %u=:>cЗ'XL1#(pcO)e18LgaI= `#0Y gZ'ls: 4 v))$r``e|’cbW0Mwy*?Oqeyܠ H7CwWe'.c) LyhP3 44Ǿ:ZyٮyM94d!" Y"Vd$"\ЅHah'#_@ q^\)!&`ļH"m&~5JlMG<8lI<f 8RLé,.Po Iz 5u'l[%].|Q#{4VDxD=빖3$:I $`p\J3-JYt_>-JPKS=P݇ (8f43026f4951d439fe4fb47031679556ddc87ae8?PKS=P(053d8d6ceeba9453c97d0ee5374db863e6f77ad4`PKS=PD(233817da87d29dfb673b35982ede8bb2034c2608XK0spp 0DPKS=P8(fc65921914641cc9adb6de25d6d28a0a682ff01f+PKS=P}ZW(8d0494ae076d97ce5f741d90eefd30d0514526f8ĸPKS=Pc(5edf2fb80583b066abb5a40288f46560550c83633PKS=Pt (5e7b3cf851000d7fae04cdabb97b545f67d9c462kbxPKS=P32((37af4bc8ef725a2501b406eb556405170c0681489ALXPKS=PŃ(3d97004d6a2ba922cf3b55d8a697be5ab17b0ccciFM42@721PKS=PQ/(16efa30942db36f3eb63d7e79e5b596a7de70762`Б6Sp`t=oM߅*7BV؇,-3q`Ħ"-``p0K49M,\   @,I 8>bhbKh+0 l8T]l @%;PKS=P| p(d5f4d4c810444f1930505be0625aec6e09be5640[PKS=P=^(aa44599244e5c0a07830c6cbdd776b63d84994be37PKS=Pc~(8d22a71ce90b9d87ff272c592d327e35870a2476{n~PKS=P\ե(69c44f7d2b91ccbf5c78758dffa5eded3617fec5P PKS=PG@13(133e5e7ff682e83923a2b8c57a3530f509ea6933(PKS=PU(b7def33da1cc5b18282130844afb95571cfb0aeb8PKS=P7(c394efb7380317821d9b37554d96f833c83549a2t^PKS=PH (16e6928606d5a9fb6cf49d71037edb9140495782;dPKS=PNZW(0319e6ced62df0db05c5d586d1d4d09e674f1491{<PKS=PJ (55282b477fb510a8e589b0659172c6fd3237a98400TPPKS=PN(a12fb33de8911424420d3f7b66040e689848d599$ +c h9@b #F3X P2G O#L((bbhkb`d.IlZ R@4 ,<>ƀƆ_?3cxͰHl9LY`,.b#?S$?CS K]OL~:tWϚhmS%I`[Q [Ud&1$H A27ze $H 7X~A< VHF^?}|P.oAׂuEwAwn o?g#w *@z; tM`+ߗ)u[_e/"/0"LnG33/,\ܑvDIS|#| KjSǑg{Gc|Ԃ,l(RY41CECC& &[Y P.?aݪϙ(!&wqmcՂ7K>%1ItU]/qjܽ% n#y86M:&-)r3#grU|Gl.ז'hurkqQ򢰒<ƶ'g3kصGK\Y7_nkYmϙa |(tnaqWnCz-qC sI|v-.BBsaϤze6LnLL?%D=>iRFyv9禎H:jQMiayOY_Qx`uʛAl6_g]m~V;V†.GN8ut֎ ]BwItVvN9ˢ*HmfۓyS? 4hRN:(e+fXyz<>jw Č0aFT5\̜1x}NSbW[C}k~~+-H!v2*l& W2Rۣ^ߗȺܵbie4C/,Z|g˕RE;B9{ى_)ZZyU8DySfѱF1/?[Z#{?N?`+†ʑ玕dW㾼M̬9ډ{k](YN0MMC [-+j}lܩuULg^~߰Z'7ۗv[1 EwHӉRG?|gځ-YӦ\ 1NWJ ?ϧ1p6_~Kv}'Sߜp{K!Tcc`È%R^E'L4Dv) 7[8ʸֈkSAMq=xpHG)WHmUpv~|\jSCQJB=s4&ظ@Quwig3Һ)\Wv=џw՟lOv* [g mY4Ή8R#mk< U[bǷnUݭjw4Ӓ) -SRds&OﵰΎ%lGkDMN_m&%T%ҵ*'=5@2qʧCoj7py}wXk\vYcIոuo/Y+^8njB)s}-g.6$`p{QAe)O|16:Jg֗we`F,B9WX˘C yIu]D_V_ G$ uވPKS=P%(5e13123c2053d7b585d33605e86045c0919187f6PKS=PH(875fc0ed47b21ab08259b4fc74da493732b4baffPKS=Pei (4b21f9d4437f5cae2963b8cd5e45c2a8b84a2a97)( X8.L 8>bhb*`W`p`hV$gK~~F ehq H&PxECay#'M@-Ab``ԚpI`Cb `c˿da 0.&d.;(1"H8PKS=Pz1k(12009d635c9bc49b5c4f90eb3e91dc66bf152567P  PKS=P\ (9854bb876a155196d7bee11e19874609300d1baac/ PKS=Po (41d8be7967f770cd52cb22807ff2a0e6a8337df9kbӖXs6PKS=P'(7193efcf138f4b5237be789dad15c97d5a239f32KnAD-lXXq` R˓YʮיciUnٯ?<}t2ٖ`exf|~oZkj&f;0VZkj&߈RI0!|Vq8Ց;P m`qKw;ȇ}_#;0DoDb[\1sfq55SAiRI0!|Vaw!=q\kuM '(kFYwi$zw;*>5o$*_ڹbf  ށJx>`Hm,fbj>rX*1 F>w;*>rAj#Nbw;*'Zkj&n>X ^ށJx>`xּX|i犙16x*!ohꚚAj6x*!:ꚚAjf>Nb$ށJx>`xK;p8fbjŵ:cx* ;+`]ށq55SV,5##;0{KZ]S31sfq55SԞ y$ nLw'Zkj&w;*%8@HmZ]S315Hm Z1|F8`Cx,ₑm OG 8fbޙyfy;8u78̣t"vo {b/Lt;qߛe#bu܅o{X1#<'~dxZPqshH5,/nF~_Wk>} Ĺ/^81}wEzK~~KtGc,|ݱq}ӁgzmHLEM1۲%EsuлvA4!+/Ԟ. MzTXH'ʩfkySCry~T5` bh/c o%)_VAV [”%;pMjlW d<|oZO,g^QjSheXզ& ‰.bt7Hz'-pX_y vNz_<Bz 'A]QS}O0S qur65K( :"Iyf\tpB ܎YnП|>0=r,߮^P58#+bP 0~:NC|JvH{D~fٺ=kXtZ:Q1)xT WDv]J$ !**,FJuPR9-_#COPul'8*~Cɲ&t*,FkBl#uym c"}Ϣ nHWnf纤nHHΛX~w8787y \zEٌcRUJwKدrgU~azK(r`z ! Ujgiʐ&Eu~Z1@x0 4`]<h>{L|Xeȍ!7 :?@n F`hh`|p/[n9pKsd!7z0(AS7汮Dr/^ud횻v7 5f9* 50?{iqлa}=pps-ב4 wwz4o/{=.-֙wڶɸ#"C21N襡O8fv.YN:@JhHx@%n["^"%Ba!/hP⢙}K? uVrf͝eo'v{:[m|Ð/]A)1u<(OaS2:5ļk\*3]: ,LE*9=R]IŔll6xH49·gpPKS=P1k3Ʉ(c8a7e23cc9e46a3e6b61332dde919ee9666e23e0;ĴQAn.U L,9Dw11a 06d %D'aUG+4t# C#$FYX(5 h>+3pDf-  R #'jLDЀ8<j 'uBu(22Ml60Dv1, _^)fۏē\F8Be6QҢ 3Y|: ړ(?Q)lwR9@;b0Ěf#Ggf4 <jѤoZE93 qE~PI" 7vh٧PKS=P' (3522bb534b5bba89fa6e5477d93693c4c4c5b993{ļA.PKS=PŊQ (9ee3585e96948f757281e780829cc0aab755bac3p PKS=PĨfK(83030117c50153f9437af40a6889bb98b73da7d7`xA``% PKS=P `Rkj(c377cf3b3f7b6d45c868376289f7b7bce7ef5216 *FL `OC@-W=sYq]=rq#tN 繸#~ M$܅7 opIByӡ\VPKS=PB(3dd3342868f71648b80bcfff527c06bbfacd1b77cPKS=Pl~ 9(cf43e10971a3599cb7905d78e3eddebb029ce35e+b("10PKS=P@(4a4ef54c4703c2ec1bf45e258e95102a21c22a5c f504(PKS=P (9cc9711465f4b5a85f9a645571aa31a0e6067c19[иPKS=P\ (2befaddd1e7522074876a516ec2b4c05f58e7f87{ PKS=Pd (8a53370599c62224ee9528cd8b66ae4fb0ebded3|3PKS=P (a954b4016f4743444d6319da86d394e933460f08+--/-M PKS=PoF(c86b65ad6eed68f85297e6f91ecb981569ea7291[  4LPKS=P(bc88afa2e3b4b18a8fdd4fe22387edabc48c7778ao~PKS=P0(eb72d97cc242c3ee2319baabb62f9c8e5e3b8342+_ PKS=Pb* (04734c1ab04167f68bf63860cc68841b3a2f9e1fcPKS=P( (346b82b3748f30d750ed3db7ede4539aebae189fkbVPKS=Pz(ceb3b4e852684dca73ccbe71b37793495541da5bPPKS=PƓ (3dae51d482544901b4c0396c125b99d56611c4f1{ PKS=P尵3(44502b41c464bd988cf80d5a8da9c6c92084f678{̰ !MM PKS=PY|(e1495382935d49a2d34842d6c136b705c461cecb[0a$60bPKS=P(0cff9670d5c4b6519147edc6c4761f9ce5fe76898PKS=Pm (2c5a722a249fc994945d82c68281609fde3126e083PKS=PsZ (d628c9e7265d93f331fc957a1808623b85131000[ɰƒqPKS=PiH+(f05a164dc4aa46924abd731cf1cd2d729f622458pAU)j”`pĐ#F5hG-) PKS=PlR (3ef3a73ebf9ecefa051eb78ebf77458c1686117dkb``PKS=P-_(5679b0329383742d45c502e3bf3a8c18e0f83132;pPKS=Pȓ" (9bf146caaadab72665bc065a04a47f8bac2c54b53PKS=P~z(f8f6179dc33d2e6d13f572c70c7edba78fcd43f73 PKS=P(b6dd0eb4b1dc68eba7ab501022aa90d3cfa65c56oPKS=P; p(e472b7537a3a446817f4d2da9c2c4de3b0ae26f0 PKS=Pv$E(96b341576ff6a8c7966e559a2792093607ac8474{̰PKS=Pg(8d883f1577ca8c334b7c6d75ccb71209d71ced13PKS=P\= #(d16944b81cf411f41e2273d81eeb88ca27858e60;Ũ (PKS=PsI(546d1f3f064f0cd869051f53cec49736cd0c4edf= EPKS=P_m(6caee882815368be62a7e885e76c5f6a46a5e981{ 7PKS=P"c(43577997bb0758cf5fa52eeac622fae8c4489559+bTPKS=P}(7d04dbda98df4c31f615b60aba7171b320b7350eZPKS=P? (7da3aeca68e188f2d8af797282d5fb979ad6c8c9cx:PKS=P۸ٜ (5a5f8b956eb057c47088c39eee9a8f126bfc015c:*!!v PKS=PHe!-I(2bfc1ace91058e4398720e9aadf5be4ca04433f1$(4H`?\T$ FW #fPKS=Phw(29f4be27bd36b2f84756d61cf27d2b508837c060[PKS=P* (0a915257e0826e7df8154269aa446bb42b438c3e;TtPKS=PE9 (3be921feedfc1ecf0d58b325a083d446f9277ee30i PKS=P8~(`>(a327b35aa200bf534a2fee0b60f2c89439fc3862OTdgӱ ]Rt)-]w{u<*C/ zXfA €eN=H9Z Q)aAOj.յj/L&d&&ɛI~ lf3oڼMN3 ]6֎ԌT^ vwղ}AP 48<axw塗ԧ|uD Z߹;R 2̊yf(,c%ͰM^-"mjqOӸ=[~jb*Tyv~-@#H2%BH[TՇ=r[@-j>AVǃYzԫLشun]0si!{fZ c0N%O= x . }67;\.~<$V?g17`m[ie9W /='4zGx 1%9M ď1'@qO xH@Btq zC'nz\EH@ E`U0IHQ!>  :kB ~h0iUf6!D`y  &S: KBt)Z%C +` </x9! 2s81(H /$M? 0Hg@$(vN_#حݺ~{"?9)eF` kr]_ V_6V?UNJuU/W%|څ#2~#{îõ¹I[ɻ*y,^b\ =טBh?JvPKS=Pr(085f81e3e683235ca258ddbf0d15853f1484965e[PKS=P0(b68542373c05c0ed25231d09955b2c699d37c45bPKS=P/@)(88d44708fb11ff802d0f0e3916fa70a577a990f2[İq0 LbPKS=PԑsZ(3827752efb81c3f06e4aaf79e2ced6ec68e9d664dPKS=Px0(d5d070960f210500c2e1fcba4106a3f1b25e63ab PKS=Pq(f370e58a3deb15f429a722d57b560435133d9bac; PKS=PS (95db098dec3868070f0e4cb69fe90f5d50cfc155(P(PKS=P^S(4436f2c32398e27e82fbbf5f11c639387e5566ab`xA%E,`PKS=P;4 (ac339ea5a36fc0703c03019c9acf3ff021b04876!PKS=P-(a53cac395a63c059771a96a495d38c8a7bef234b..!]B#sr``PKS=P+a5(c2a80624664597ff97e7dac8636e23555d6648ec9 #f.t RA\4Id"&.A cE "`~.((a0i0 F]A@;`P(܁n`l# (P׸"F7ZD0]#|!4>PKS=PO(40d68c19b58eb814291385f9314a6e56ee3a0aefPKS=P (c4dd8f4bfa9f77c6be9bc693363c319500ae3434+bPKS=POr(789e09f7b449d04c886713f54d36646aea6e63daX !PKS=P51(b94903940e7e5d187d4f2087a0850c1490c76d20OPKS=P 6u(bc8cff29c3f73080a29e70c27d22e262cebe5d7e[ĤPKS=P0(81b97851a2592b7f365618e395ea136369fa1d5f$~ X@PKS=P0 (17c360097c2eab24f8eac7155013c981ff1d9fc7PKS=P# (e1cc1d6d72d368909f0c3a8b15b115429f712c9dTPPKS=PsO(24699318bbd5188f792a574110d2974db1871863PKS=P*t(36fbe5edbcbdc95cd78c0f92d0f21755ce3cf5d3 8PKS=P(979f5e9265bda8af70bb0c3e611798154fd3ffb0kb1PKS=PRdB (6d16e9038b3d4f59a14b7b8920e36adc1c900a967PKS=P6& L(d7bd1860e7aa1d3e618ea3017591c611530965b1+b(PKS=PǏ(cecd66910eee3bd1955756fc4826283495031ed7[PKS=P(6fbdf66609ec39be88340cb3c8a0ec34750d1f54o_PKS=P '.(3612dbd8cffb60a210b5c9a6e345fa2be750c955;hPKS=P@t(abfe39a5f80a03e358d3d338aa18babc93bacb453 PKS=Pf (3edb294ed16098565235b8237a95a051f5ff2122[İzPKS=PU2(d64a17fc1548aba4354f9da6d53aff652e534e30kbc`PKS=PAL(a2af9717566b7d9f7ccb15d37c849dcd5c4026e83PKS=Py+(d05948ba57fdd1703955a45393ca7a1cc2c31dfePKS=Pr(511f3254c8e47112886a3b458d6326d6ec915f0f+`PKS=P5 (95ee1f34fc2074ca5f96b65ba69dd2ffda938d35;s"_PKS=P&pQ(4733656896059f75e80997cf8564e175590b827f+=PKS=P킅m (bd7511a9460d6157c3d7b0f6f07814d019736717;zM5:PKS=Pn>`(6096edc948bdd849e5ae990e56b460a1e260a202"PKS=P:(a8c2d4fd87913a888006920752aa265f3e9e5461;/PKS=Pa@s(d8cb42032bb4391c44986edf7487a5ee50946006;ã`rH< <PKS=P#PB(5b73b91496f8aef4c24cb39a570b043a949f7ca4;??PKS=P%l(9699f9c846f1f483e2c34152b6b110cf2c9a7291$PKS=PE E(f019d822f4c4a5b624e9626723aa3c6bcc0b94e03PKS=PP(bed4eb698c6eeea7f1ddf5397d480d3f2c0fb938+,PKS=PE=/(33a5c24dad25172ba610f3dfdbb96e460580e734Ĥ PKS=P]_P(01ead626805a3cb150ca8fe330c6d22d618f5244?3PKS=Pop(f7965ea06921ecdcc8a8c2e76fa64a29be371e25;ap.EPKS=Pw (f94c074f984dec9c628afa84b3e58f134dbc061638wPKS=P"T E(c133241556aa7c33e803c1754d27f3c97f6761dd{Dt CPKS=PR5(c4d10f21212f7904b7c9a990e2850aca7a1285ce``W``3`t0 5.G"ϟw 3_Pbh`hR"M9X -~w0jMbdtJ&V&'.134p4FA4g6.6vo:&r4 `P 0h3ނ_%;PKS=PщT(ae38075f977523bbd0bc19324d329fb6145de993Y PKS=P$3(03b707e28a08072e770c654e7bc26ba735bd3897ĘPKS=PA./PKS=P f$y( 1383d3d096cff711a7c60c978ef1fb5d59d763b1PKS=PH (c38c131b07325af5920ea10cf0390d52e25826edPKS=PН (0c4738209c79b4aa23948dfa86253420d056146bPKS=P/(bbf4c6a3f944c86dfa35a005418143800b3967b0PKS=P,(c1a46896a5f4209ccddd451ffef42426ad3b93dcPKS=P^9g (a02e7ed030df131c3f9abf08a6712f8a594bf79fPKS=P,(83f9cf59bbefb18ca64a27df65a5209d5c8d2f70PKS=P (kf0ecd1104e3f541c380398a81479bca6152b1ca9PKS=P0*"(45cb228dfefc104cd9cad3c225635e27076eba95PKS=Pq( ad72ea307dc764c47260d2bb8992c16333d67551PKS=P]a<(U53e30bc34cc3e8443140e7817b0a19b18ef0fdf5PKS=P5Z/'.(b005ec06577015bce33b6771ea1cf3c8dcb84a3aPKS=P^ ( 7d3fca43b5d3787d22ee3e0fbb2b8c55382f9effPKS=P#Z(\1d115976f2e573c04caef396ef257a9f44352a66PKS=P39(6b8f89a3e205180653d1c5d42c5540e7cf3756a0PKS=Pcl(r 10e54a4f47e1b60b6ba8528a711adc121739b4c9PKS=Pτ׏( f2f0453b9ae93944c0e399937aaa456f58c89f5dPKS=P[M"( 7070ceff0247058e62b8043e7eeb3678501db8e2PKS=Pd(^ 3c2482f60c0eed187451b89e2ba53b97a9a6989aPKS=PZ5( e64d3709aae0a1127a7e86c07aaa511b6ec036c2PKS=PR( e1cdee26058f2a9d8dc7705e656eefb2515b30fbPKS=PFV(X b16cf3324ca15ff0851b0f99dd86ac638c3e0caePKS=P)U( 0f74cca881cb241661eba1ee634a91621623b880PKS=P p( d1c98c8a072167f7470a710446cf31245b0f5e62PKS=P?p(d053f8d2dd0d1906aca2a864d387371aacd04c08PKS=Pw4P(932b76afa91cbd43b327a65e651ea8083f72ba925PKS=PLU(%0724ad4e661f8a1f020ac7c7042b016129d20c15PKS=PbzI K(r198ed7968d7c69747685c643187dd6bc598cad30PKS=P(6e40b208e8865a34d298c9b2fbd448fba23eaffdPKS=PG(e4eb4f8217d8a02db009bafa2c80aab65bf42131PKS=P9@(^18acf6102f6b3127c2be717d34684bcda7dcda92PKS=P(71827318ca6a8e1f9f6f860cd3c8e7485b5933daPKS=P+(dbfd7f80f28ae7855fe10f0ca2f66f1b02646f03PKS=P9e>(Ec20406a78f4076b26f5d2019ef41d73dafa38699PKS=P|(]300f8a6291cbe1a51fb0e71fb8c5db1d63e46f60PKS=P $(56050057610fda8c3600564ddff97c11db47824aPKS=P9(5ca53964a1fefd6167b35ca73a0640256d8223f7PKS=P~(b86d6b48a42c75ef26b9ea26bae4bf182e79c2b98PKS=P뀰(4c51e17e94596fd0d9107d10bf33af5d3d7df2abPKS=PH w(1de103f31f12636be2dd4b0409bf83c6df44b1f9PKS=P(I3fdbedd3e720fdfc073662771f93cdae06030bb0PKS=P(b7f373cdf8e904496db9ff6aa9be9a49c8209551PKS=Pᬍݟ(E1a7f17b3b6f7881c3813f0a64c5e7bb479083539PKS=P.(* 95ca7814f53f55b7b94e48d735e9db8b83920bedPKS=P(x 70e96894fea424509c0dedb36a7c53e390b52948PKS=P DH ( 62ed6d7e5a0b22320eaa21b6c66d171f425a763fPKS=PP(!bfd2c55d3af368e3bd54f2dc571ce692d024d3cdPKS=Pe(]!2c665a38015d33ca52ccc269ad765412d4894bebPKS=P!sP<(!82e2dfa3f3e2a4d9d8d2e657695a1c4bc76592fePKS=P }(!60db1520df8fdd6bfc0c33cfab39085e4ebaaba9PKS=PZEr(V"8d4812a6374759a0084ffdee277b610ceffea017PKS=P`s("44f70f7ac927feb9680a8f32715d1510539cb42cPKS=Pa4("08a914cde05039694ef0194d9ee79ff9a79dde33PKS=P (8#3d2da68fd36987c1b89cd202185c57bd7d01d5b4PKS=P ip(#8151fc9592b354828f7cbb2459d86fdd72b79cd7PKS=PF($b06b3383f095edddee224f3e1f9984d654927b43PKS=PǕ`(%0155512511c3b57377d93c39942c2587edea74f9PKS=Pv%(%34b0e43d9788f0f42b28ffafffe94a6807aeec1ePKS=Psi(&4444fdcdd6c5c875c58b8e5f097a286f301862d3PKS=P1 &(g&2556d2c5f5b0b652df4792e1faf19ed4d259c3bdPKS=P8 (&2394c1e6397db0852021f0286d32b73ebd859542PKS=P0R( '3c9575bf704f2c0d9a085a4c4654398680d769a5PKS=PzP% (V'214f5bb9bf93e362a03074eefd77c0e1efc99a54PKS=P(('5d973e725e34155e0b42a5541822e1a442c8dfa0PKS=Pjf+('4d5df3ea7d7f17d321d4befe77ab05e3c0f2bb30PKS=P”~(H(a40b3f8cc2f6d1144471aab0202c9d8ec2149d0cPKS=Pj((9ede96daeb2cbb136c8b2fc83fb862b631703b09PKS=P(' ((6834c5e48089a513634057edc2681c04318e36c9PKS=P+ (2)6fcda3187dc567ada60afaee7a492f96139b1662PKS=PYJ()ad7a259ffb1147ea7a5bb8da5f5ad788ca561b6dPKS=P-()5f48ba99f4b9d791bf64cb24d16d86edec1e92bbPKS=P%-P(*94d554d115a2b4302978310e1be16e001cb8308aPKS=P˘&(d*35ce189b203c6c1ce8975c30223d78fffa2a5c27PKS=P (*3999543c7cf4b48eecdfe5414e02b02b845dc205PKS=PβC-(!+82cf93860d317e9973bf3bd98c21bc39bf2440b7PKS=P;(x+4345cb1fa27885a8fbfe7c0c830a592cc76a552bPKS=P (+4e2777efc3132a5a6dce07fe486cee395d21aed6PKS=P̔ (,ad377fc9f008b2ca5fcd60ba95700b8764a13b97PKS=Pn(e,d854df4605155b0ef08c849f9f75300b584cb4a4PKS=PA(,b644d7c9b27562a79f2e0e79bea3ee2ff9a85dd9PKS=Pq (-54dd3746e510a8e78c759e468fd6376ae46222e4PKS=Pcis (R-c9bfc009792e3cd8beff052387df128160bbffcfPKS=Pr$A(-ee8d05e52edfbb4be6178a224955f064d7d1d145PKS=P![ @( .c1611d1e250bf6dc5ac278aacfb764576bc95ff7PKS=PR*d(Z0325f853f300caf1515e32ede1d285b00dab111cfPKS=Pp)(1ed35fa98c1382df539b929539d6e33c04eed5cb0PKS=P?6 (R10f693af2f36ee79115243f315c2b90492530531ePKS=Pi ,(19ddbe0275c81b07aa89ca93b2bd2f0356df6bb59PKS=P: (1893fc9c65e9d79a8f9d37227bf632c5ca63f4535PKS=P9CA(A2a91ffb95b439c54b14cb3a14564c350b5eb371d3PKS=P(Q (2aa0d5a81b60e0df6ae3e9534ddb635c7b80b5127PKS=Pp[ (2b99108537a01843f2b9c868a67cc6d029afd1c93PKS=PԘ(03212f3d63b58b46ee7b119b4859bb70fea348018aPKS=P~(|3abedf01dcddcb2ce106e25e8093f87c07512bd0cPKS=P:zD(3f185e60e37602a83cf501d567abbab0a47e4e0d3PKS=Pk62(4ce10a2b2761459b9fb1964f09eb38a77654a1852PKS=P> (Bb0699f5ed08264a6c9055284321fefa14e3e1b78PKS=Pzi(B31137901247e61afd988a38798650f0a8cc0882dPKS=P? (0C65c3f48ee3f9aac0da7c14d8b769266d60b2451aPKS=P#_(Cd33cbddf149c1c7031335037e1cb6f7dddefdba7PKS=Px_(C93d3a5610626e75cc4eee9e9fa696fa5fa5d5e1cPKS=Pm* "(D3e916879fa294106d14e2dda653a444ae1348a0fPKS=PS(eDeca544137e2ea77785bd33e3b8087d09b52ddaacPKS=P[% (Dffbc5bc8f856114ad70fdd4e0af7b317aba045b1PKS=P+o(Ea42c6cf1de3abfdea9b95f34687cbbe92b9a7383PKS=P (PE8771358485bad97c1414d5e326b6a3e309b19ee1PKS=P(Ef121f40bf0d3915ca263e0968b2a8e2e6080124bPKS=P=C?b(Ea87b842d1699db3fcde9f77aeb299e76ae7f1aadPKS=P*j(sGd8db6b5f548dc10593656c3d74409f8702cffa1fPKS=PV' (G52b6c2fb2a6af41a5d52ffd422760745ef52d35fPKS=Prh(7Hf721dab18b917d2eae52ddaf264ab9e4e30dff72PKS=PS&F(H0e3808238b738aafc13a2a62f36d2a49dec4e191PKS=P?i?(H501d2c805e1d1c23c4e6ac3e683d697dad26d59fPKS=PL(Nc89a60ecb806f720351bfe2e59f213fea1ccc102PKS=P/*(Ndc1b3394608bc2582526cfa1e84f0cb04d38d181PKS=P0(O11f4de6b8b45cf8051b1d17fa4cde9ad935cea41PKS=P[o(^Oaf08ab08ffab78b3afbea799831dc5f66679507cPKS=PwN (Ofba251485e28587b017e870ed5210aff8ad1ad20PKS=P7? (Ofcb9f04e2b223ce23218f4b82e5a7fe2da1334ddPKS=P[s (IPc26187999cb81ad31beae311c9666080e9bcc0ecPKS=P{N B(P85f13d84160cd63ed2ddb6f532b818bc12cf3f07PKS=P4I(P40ae08910846e2b9d5dee5cc65955e222d49805bPKS=P(9Q2a278cb59633c52fa61e68afbfad982b073f2bc7PKS=Pjʋ(Q987cd5659f245dead25f0009777abe72b3abf3b7PKS=P;hu (Q9e138d3f3adb88895dddaa05ed49563ce9af7126PKS=P (#Rab5640852d9f5a6064f4c07bdd42ba523484349aPKS=PF$(rR4b0075ef7389905ae2b0542f944a4204b4ad0381PKS=P.S(R986a3e729d66c0edb156ae23eff018bb69e114fdPKS=P(S9a91701f8a1ad3ca2a48c828ca372ffe6e5cbab5PKS=P)(_S3c50ce0f607d2942855c9f76ed524fa21034d630PKS=P(S0fc3c3e4c2ff2ea8b0b2fe9e04795eda729b8b38PKS=P"]H (T3b39f23148603beaf1e0a41071bbe89ddeb8950dPKS=PU{ (WT88c71644801bdf41aa105748e681da79e29fb840PKS=PE O(T225fdfe027ceb2c9a7e334173f5637907723a55cPKS=P7y(Tf91077a44623d7a37bbf65684734b6723bf6aab2PKS=Pq:Zf(BU771c129766b7942ea9c88a45e424aabe5ac431b7PKS=P * (U639fcd1ff1e7626594313dd0468781c5e55c972bPKS=Paʑ(U50b4c4efb5e5a3b28ce2c439ba87890d4b122077PKS=P]w(+Vc778d27d6a4d53e87438b470bc6c902adb669502PKS=P$O *(yV8f7eaf9769661453a5808e0167f6faf95590b234PKS=Pf%KN(Vb87544bd23b4b2aee1f4b0ab560de5aa1bff00bePKS=PC("Wa117c08441dd98ea8dea0f66c64b27b82208dbe9PKS=PN$!(oW6b46e4ab25667638b32d4a7f8bd503a60ea1fd34PKS=Pk (We5baeece42b964f47f080944f247ba68f67773b3PKS=P/('X97077a5709a188abe28a060453948bc1fbc738e8PKS=P;(X32c556e20f04e23fb2d7361a6243f4180d9ec198PKS=PlZ (mYd13733437e59653b4030a10c64ed771738db8902PKS=P+0(Y7198a9cfca50f2b7f2d5f3073b70201449e3e3a1PKS=P˖(Z72fe29e233f19803a75aab95fb6316edd7e806e7PKS=P^e{ (^Z4e3b6bcaafed206944f58e961ef0ea3ddd89231aPKS=P_-(Z33cefbb25a94c1c22ea7c395a8e0e5d77b1d0763PKS=Py([68bb53243fe7364364250623cb6a5af7ed12b5c8PKS=Px)^+(L[0dc35e813667e3dbd9457d953a72c265ae8162d5PKS=P>([85c0bbc8c5cd361fbcfaa2fcc333ca10279e5612PKS=P"j([5caad5997907bf4c3d13538e7f66e35528af8465PKS=Pw-(W\243266cfe17b1f9875ddd754e59f41af40913933PKS=P_ (\cd2e753e66cca8cebac4db3b2169253f2dc3cdb1PKS=Pހ-(]6463e769706b6b8762bd1b40376301975b8eeb3ePKS=Pn~)/(X]afb594ea3e415628aa85763bedf4b5b12caa117dPKS=P7(]8d4fb6f5e1dbf809875e42c8ecd297138ba0b992PKS=Pi(^bf448f1de55058bc353eb8539a828d617c2e0594PKS=Pt(i^58e84df86c3dd60f5424b1fa50b7dae554e702b3PKS=P%q(^e905eeab931c5233a0c682ef7b44ef9bafb42a62PKS=PS(_480277bb62cd9428294a21e505e02d6e9a283482PKS=PR(Zm772fe75d27d9802d1ccd9b5cef04302f9317b7bcPKS=PxUi(m68eb0cd079edaade79fc0bd35aba7305f107435dPKS=P~)0&(m6b2da3037416d6294592d9761b2f8628fe3d6ddfPKS=P.o?(Xn1496bbba6302c8ce4cb3fd88d5da9d88de871ff3PKS=Pe l( o28047781b861b82390acab4acea59e5ee9c35a35PKS=P (^ob62f98976c11d79674b019ea78a7ce4d6d78b479PKS=P>u(o558d63baf07f3eccb060f1736a3b8869fc3e70e3PKS=P>(of8b6bb181d2d65425995c1d45d5c9419a0160381PKS=P8^Z (Tp5b88bc2cf8c28ba82e7844b6ed36056d65d30fbaPKS=P< ,(p3ffbf1c2621efa474de06a9293bdc66999f03525PKS=P }:( qe0482604e816aabc6e26bcdc222aade89669a8a8PKS=PVYV(Uq7f1997a6256ecea8b28549652a4a5deb0fc9ff5dPKS=P(q32ef566e0c35abb261773cd2964f3c0e680871ffPKS=P J (r5750e2bccd5c5a207fc6e8969d1c89cf8e8cfc25PKS=PO@7E(Tr2e13b2d804596233a3a2616b53e79c9dae434f24PKS=PAy(r5ca34c97cfcd36defcf0955f5b1036bffc689a31PKS=Pl](re710ef5a2f1341123f89a7616a49a91eba690c04PKS=P^ (Esda043c78e20c62d8ca3246b5311bc7c2bab9b88bPKS=PyX̖(s1f40939354c50fec108e56882e7012b90e34ab36PKS=P5Ho (s4e821429f6b24c8e840d4b5feab6f7c14c324a6aPKS=P (@tf14d7db4d193e88f5d99a7571c4fcbfae0aeb9d6PKS=PZ&(tb56428e3e97537d9d1316ab0267296fea9926742PKS=P"(t442262c857ef10ace40e944952f9cc73838c9307PKS=P' (/u64f8e019009f6854a588fc041ed981af7692a400PKS=PK (u89a0805ca3b45779d23b1ca081ae555ef9141ef7PKS=P. (uad6fd0bf6663bdf130969561cde821f13904f82fPKS=P,a('v261ccf8e28a5c0bdd49c6c3ccb64eb9f1f334bb8PKS=PE*(tvf9b72441578cc0ca268aeacd699c2be47e52fdacPKS=PJ* (vc80b9b1c8ba4824b4ebf6a28567ead47797a31f3PKS=Pw (wc16b22910be813448117526a6e9f72545f3fadeaPKS=PlUT(cwf8461bcda9e1be1b86c57984c088a045ce2c2e74PKS=PB(wdff216aa6740da40055a0b116c09f06a6b25124fPKS=Py (w525765915184a68fa1fb77ea59f065620aba793ePKS=P0EI(Px8c6b2173808a2a7482a42904c4021a08a57c2b24PKS=P$C (xc2e5e0bac13e2b48434a1aa436aa9d08327447f5PKS=Pp(xc7adf6198da153dda5640676da69825b52045630PKS=PZ(~496e820420afbf20ccbaac05445941777c965641PKS=P=(&89562722b2f244c15057796ce40b251d98840341PKS=P{a(sa70b0275eaf9b6860b1c94827487896a800a6ed3PKS=PqG(dfea3862135368d1afd1a5c2fa863c51ddcc8d0ePKS=PVl(*2d74fe988aab4478fd5e16de9bcda759e91735cePKS=Pf8R(vdd594ae9fedde940145ab5931fc94e39b80d6d0fPKS=PV (Ā3638fd6581509123a3ee8e22d693f6f3c2dba6aePKS=P(\ (01b263fc40cb3e5ddbf888e8ffe8fceb5d1bb9d3PKS=P!(f6c71b8013a652657fac29bf64f2068f01f97588aPKS=PGê r(2e16477fa7fc6d7c3575069fd71e3e49e0c8f7b3PKS=P ]Um(01075b057417758376a3c180f409beef3aa181e6PKS=P&ި (e5343905eb7e0c858e4155e4ccd5974c81f66fc4PKS=P˵~(aa09bfe13ef8cf73b3ad813de9c9e48be9c231dcPKS=PqYY(N9c08bbd95674f4a3a70098b59f319c07d414cad5PKS=P=U (ea3106b843af663d4be171bee0477e4bc336dff9PKS=Po(17468132873a990c24287397fc70f3342c2e9bf2PKS=P(W8d186533bccfd129fe17ec5c0f0261c3f453c71bPKS=PKA (f57e42d367ec7e78403f151de2c6fe0d8e53c348PKS=P $^ (b1b1181972c519e961502e5e19e4bf2c767ebba5PKS=P]6](A2386e77cf610f786b06a91af2c1b3fd2282d2745PKS=P(bD520d4aebcb8987f83b971ac978fe3f683d6e1dbcPKS=PI(D8b5452da8351e8989b4cfb3974d0339abf22dfcdPKS=PP (D95b471229a173fa02e6a5a99437dd458f4b98bd8PKS=Pm(Ec481bc8ebd4819a372c495d57ccbe784d93d6302PKS=PDJn (E2331225fafa98a6ae7b94ec1b93a814b6dbcfadfPKS=Po(5Ff5bb57c90a56ae6c356045c1c0506b89da408848PKS=P~(F68e61346cce8064b08220385833d475dd6dd1254PKS=P%'\N(F8f44fb8ddbb6c245b190abd17dd3fffe69ca972aPKS=POv?(aGc4201a2a098f0d743b6aae480f9a80f8f51dd45dPKS=Pe(G55f96787b549eb321f17d77c4b96e1c30599c549PKS=PL(H461098709ba28af43ef49f68af86ff501f31372cPKS=P%(PHaf86dccd1a4047b8f7850d55a7bcb1f18267a797PKS=PA*(H3aeae8107a84285cd2b0199222a03e273ec0a23cPKS=P[/H6(H65b6f0c27a11e26cdd50fffa8b047128017ed24dPKS=PY(FI505a9ba8b67336f5fdabe70220b55cd3a0e8b704PKS=P6N;(If55817e350ecc327d828099bae3215832d97d4abPKS=PmO(I72311b2016f7d39d14e17f0a1954ef3af1cd12caPKS=PL(.J3dd89efabc1dcfed2614bdecde19c19e751b4b74PKS=P99({Jb914301f110f8619eab1bffc9f3bbac82043b456PKS=P:(J8a24e7ef2f9722208dc3931a20ba3eb709d4c5caPKS=P(K584ee6bb639042492beea008e16d776ef8cf5524PKS=P()Lb369637e961c44ca383f5fd3f1fd9f0cc69e936dPKS=P(P(wLe8f16f8bbb0b5a0d7d1e5602375bdb37422a2587PKS=Pn(L16f7f20108e653219fa2f13fcf0dee2ee4fd2cf9PKS=P (Mf69d79271c41f1b373a89eb303ecf886c95dbba6PKS=P (_Mf7548b2a2b543e90e5b6a01aa64dec7386e888dfPKS=P` (M362625a968613d3c33c6f2a3f69b07b8ffbf50caPKS=P)6(M53ec7bb42d532fed3722811ec96ef10af7257f7cPKS=P(KN0559984a6c9ae37aa2c47f00024ba6d52d3d8b96PKS=PFAJS(N275980357c08b60afe382b1b6e1115d2ec5b345dPKS=P] (Nf72de887121b719c5ab21dfa7a848fa3b8fa52bcPKS=P(! (LOc9f07631068517c281026733b582da2da4cbe077PKS=Pn(Oa691ed53cf3d9dd849ca859be3e9a907e633fa7fPKS=P !(O54e66ba310b64f5876bedab48f456a74c15edf90PKS=P+(?Pec1c352d066d12e9b945ffc6e2752422edeef31aPKS=P/[(P65758bbab10f6948c550a0a5dac1235de999750bPKS=Pjߖ(P0281cb7320feb367532b89611be04332d8cbab9dPKS=P i(BQ3240404581e3849e21143f84a4e0ea8c63b26aaaPKS=Pp (Q594720a307f826e2be784f37767946d0604ab15bPKS=Pe(Q3958bab8b989b413a6d710a014bd9838027ed653PKS=P;[~ (5S454f20467d6060b367e11bcb5b4b3f4bc4ba1e81PKS=P@, (S42e97083e8416b16fc5208645e25de9501efc37cPKS=PbS+(Sefe80431ceae7f3ab1398ddc4f09fbf71e4adbafPKS=P]?(%T568eb41f99524fc95c56c7250bdb020d34efb5afPKS=P<9$(Uf93a482ab6734cbcd5e16b844c451dcbef3be24aPKS=Pe*3(U7682fa7d63ea99d3d046856a81a65a48c34a8139PKS=P7O(DVee74569d484ed2033165a0d3ab0a420311a5925aPKS=P(V68b52048ae28de97d51894d462a72f76b7462b40PKS=P>k(Ve109843e7f1536476a10882be16d645e9f15f30aPKS=P#(-Wbdef9e054f41ffaacf656766e4e3cb7100d3da16PKS=P)({W53a0acfad59379b3e050338bf9f23cfc172ee787PKS=PUC(W4074fb78a839773a7423b07cd7ab075574ee652bPKS=PMVg(X3c8ee227a37690ba47998c78ef28c8030a1839bdPKS=PN (^X0ea1a146c2ab37213236ca91fea052be926449a1PKS=Pi791b83841add0de75ce0a46e6a73b359a4855df7PKS=P6(ibbd7da84209d118d2ff851a4df9992729dec3571PKS=P-(i03c67f754ef5add2b949b82763c4b6c3ac83d009PKS=PjJ (9ja8464f00db1492ca2f05d00ab919dd6abbc57469PKS=PU>T /(jaaf4256c68565fb3a859fe19da68dcb3d14909f6PKS=PQ (j772a768649814b2dc433a24cf508c7a355b4559fPKS=PD ()k2f541c7412ed000d27a0619233d5c806dbc9f94fPKS=PEx(xkab09c7537960b8c839879de6a1d8606cfaae1f3ePKS=P0b(ke6424bafb9e83741d1b927c2c892d97c11b84ac1PKS=P͑e (l0ccb809665732cb7f8f189a15c327946a6d6e807PKS=P(ild5d558480d8432fc68f35d3c32580222f1680104PKS=Pc(l3b81fea796a887ebe22661748a25792d85bba075PKS=P7 p9(m752811a58539b7e3cb2fe3a98ac8cdc1c20f406aPKS=P)g(Mm20a727d3c9cd6119b0452234bc5d08b76c645c54PKS=P8 (mca32f6de22a3a82978df33fdb12ec24836f5f8a2PKS=P(mf0c35c1862cd51df3afb3f5937ffa7fccdfcc0f9PKS=P!؊V(pde7ed762e264bbf9f2fd80e9635af343282498fePKS=PDIM(p252b3790d0ac7e78f2525e0a55043f34fe2f0d5fPKS=P{Q(p1ce28125828c1b82f6d925d8c5a95e856a5764eePKS=Pġ(Dq68dd67dca45358182623e449e83e524cef3f661cPKS=P{Z(q107fc08bc47806738446a3bfea1cd9fb79321461PKS=PR(qa322ab585faed605db125bcd5e0ea18b25bc09c5PKS=Pd:(;r4a2054eb5442462df555f13c1b19b527228e0bf5PKS=P#'`(r1252bf97696b4fbdf0e84b964faad9ae50433ed7PKS=Pm(rbb1615a6fe04aa04eae16a1676443cb3ee5f374fPKS=P]'a(!s6d71cd24a76987760377aeafcbb52988d9f7185fPKS=PJK&(sa0d8902468090a6810d73a9ee5612d23d06e224cPKS=P' (t2eeabee58c84c81efc01084423f8a318e8146068PKS=P9$'(:ub7babfe9143ef38b19ba2925af2d7feb857cb308PKS=Pݯ (u265cd92135dd1db888ab98383e0e379c9dd70e23PKS=P8 (ua7bb21d724fe3beaa7ee7097a0589e85c9047e9dPKS=PA= C(5v0c8d66dfc81d3d0a4033481a93d98c5e60d0a276PKS=P oZ (vd3a9a50a24e08fe0717d9233d57b977663eb5e06PKS=PJ5 (v2b7568c7328692e486959d5576e3bda528375becPKS=Py&@(*w83170bb66295ec0311a34de776c33aa0b7d682c2PKS=PЖSY o(xw6a58a85fe6f41bdf45a8ce5cf650a4ef296078e7PKS=P$)~e(w1a623597bd0f1a82b65916796404dac5f1e9ff2fPKS=PA.(&x18b7ea8c40ae401e3c523dbb4b7ad6cd845786a5PKS=P (x23833462f55515a900e016db2eb943fb474c19f6PKS=Pz(xdb0f7cdccffb409b5f859182ec1b931863bb3e52PKS=P#(&y4610a9399a7456340fe83b232cb16f69c489e8f0PKS=P(ya78eb4597ea17b230e9838a71746dd15aa47c58dPKS=P!(y2fd31906f216f6ec544766a69b89482681c783e8PKS=PIz(-z73dc347fc9dfdcef0be8d3dd056a4bbbbf9e742ePKS=PPc (yz6bd353596c5607f49909d67e1f1df726d45734aaPKS=P0(z78a78fb4791905d448b1e0bd64bd7b5ebeb15835PKS=P({af9d915754e96c107d964dea909b7783b52bfa1aPKS=P! (b{f050f6c8723075e3db46079b26e1d9341eab1791PKS=P e({5fbf2bac30b9a6c86876e69019117a735577761dPKS=PŞ%*(}69f3694e7e1b7804863c387e6f0d50c44a1cdeffPKS=P? (~8590ec70f74d9dcc807a743cacce67f4e4277c99PKS=P d(Y~fe8530058e4c0413eb09218bda8b7e1a458f8339PKS=P09*H(~fd5689fc4f6dec970a0c4413cf7fe8c48b0af206PKS=Pl"K($25a6d8a9b37feb82e02c219fe82109e313357640PKS=P?mD' u(}2d0b7cb1bcfff85626023724ece41a8576b4a283PKS=P%] (b5c465b7fe4309a95b7160c568f874578c6fce60PKS=P}( ()6240c9580ee71de59dfaf49096d47e3d67521f8fPKS=P|({c0bd23eec44ac1fc583570163d1b6dfd267dbb30PKS=P%uOt(ɀ35190e25ff039fe1200f42def804d311398e7568PKS=P#4"(#6e8883cb50878ae07659769649b17552d9e04905PKS=P)(d49abf61487b462a29f8ffb3bebf4fb8cf820255PKS=Pќ(sddffcd8409657f42e20cf0bed9ab32195ca72681PKS=PtS (0afa259a79b66260fe12f4d92ce50b3715817ed6PKS=P(7a58f48925665b3574295cf643d74b514f2b37f9PKS=P) *(]7111ab99aa70e9dc04a606e13565bce14be0e3b5PKS=PλG(6a9fc4ed6c424a05ddf452deece4f7b4dd95d619PKS=PqKV (dc8e4ecc56611f846f41e19ed53b3e2ccb809f71PKS=PXG(N8ba51cefcc06b96df4a87eb7cfd28bea3dd4e8d1PKS=PJ (be65fea7690513269adaf26442bb4422127ca5adPKS=P4<.(f4eb33092623394baf487cdec784103d388756f9PKS=PK W(<13c34666b620addf9908f2e64456b5d64982d405PKS=Pd/(2e8579da949a4078a672a064ee545eff68e59eb4PKS=PX (ea84d1dc9e866e9da72282e903afed21daa4e243PKS=PQ 8(Nb6f69fae94c1cb3dd08e572a38150006a8c20c1fPKS=Pz(f596065831f9deae3d5fd836d3effcd86c296385PKS=P(59985e186d2d1e586891feeab481475a501e067bPKS=Pu$P (A5234bd8f68dd1ac89e14db55366d62847211217aPKS=Py(b400731a21a534ec9916d4e9237c4d4f9b26e95ePKS=P (ܛ8a0be514daa3466c6491c6942cce16bc68c4eb1cPKS=Pk (*5d001e90bb5659f513f48969f4a33c7644cec92bPKS=P (z5a7a6003e96d1f8e807af78f909ea3a6d61fdb3dPKS=P#;(˜f8b6c2497e125e39e9a9ea848dfe350fd34b9d23PKS=PmmF'( 5be8ffb8bbeca40ce84a320f19dff96472046f64PKS=P!((l2fde648f80b47839187924b83af5f1199bbe80ebPKS=P (D8f4b81462e4e23a8fba9a826d5d007f36a6d5398PKS=Prt (cbc7a2ddd270c82b20bcf1c831c4965da6fd3a3bPKS=P (700c4fbb7c96dc66b7ec5c921842efe8fb5d0c06PKS=P}n;(<f570792d80afbceee4187f825b7d83492a81b100PKS=P3#f(c992eba86f2d2f1d6653339472d9ac5a1c29a526PKS=P$S /(Eafe52a169fb702c67a16682c16eda35c6637588bPKS=P*p(082e058829a94f8dfec396ad8e9d33b760ca67f0PKS=Pׅ (59b5074914d539ca831bd89d9c74bc7942c7ef39PKS=P5Y(ѣ89966604ca6ac212faeaa1f58f6b6a1998ebaef1PKS=PiP((c43d5e8f032c0aecafbef6f58550c32e1d684482PKS=PZbr(j0b6e190704e869ec30c3b0a3b02a7da1171af296PKS=Px| (Ϥ42db7944583412c62fc29447bd1f2d26295ab655PKS=PUc(#4321e5765e1a8b1c94edb64053149fba62196ff6PKS=Po(pdbfed0e64cfd73a64f0cdf2f373b97728ded043aPKS=Pf(9e2843adf7756e0bd14be6b2292799efb9dd0d8fPKS=Pm<(f584251d532851c11d949dc554b2298174d47cfbPKS=PK (Uc7a192ffae6f6d0e95ecf24ee4e90f85a5bf545ePKS=P~(46fa214b2ffe9e4d065b39abd98a434e585aea19PKS=PhI(8a60eb532bed1159d35b64798f46d002bde1c5dbPKS=P<(J30fca38074cee460195e2159762ce8f6f7bf4619PKS=PK(61dfd04637921b08ed3995e69e1289d6a4d46beaPKS=P8.(0b3b201edafd46ac6047f4d3ed4acd5678620f4aPKS=PY(?47caa692295bbda638edc19a04ef20cc61d9f140PKS=PL (8946db0cc72ed2af15593517776316d467e64d16PKS=P (רa03e66066cdd2c56ef71845d2b5132f892c7407aPKS=PY' (*be8186bfe2c70a9a5b3c7d77ba1f6a7bb8dbe768PKS=Pg({16a693a543d78160a4c3ea63568c0af1e3bc6867PKS=Po (Ʃd615559bec899b88724bd2a7ac0607db0f46a958PKS=P0J(7b42522358b21906618f78eb60739327bf829931PKS=PA\(fbb012dc4c6e8e900508630afdd4ef43e00969435PKS=P b(e0bbf8463d22f5aef3a9bba693d3c8dc98bdf0acPKS=PD (c29c81d6cec6069ac8eb97010ae37ae43b594baaPKS=Pwr(R6ddbd8db9a29733ff4445add2cd48f860e41d617PKS=P.(3b4e441a3c72800fe3c1626fa1bc94b737508dccPKS=P(26e58ef71ed4b0ecd156424b356650b160fbadfbPKS=P# (C4daf9c32e15774f352a0fb6be65baac610a81cdbPKS=P.8(a6b00f94f8fd68b8e883589eaa7cea0cd24a4f16PKS=P[ (dad90d26355eaadfc87c348898b5f55c36e4c82fPKS=Pm(8cdce31e1d25d7417389052561a73068ee439de3aPKS=Pf(3e21280095ccc0da0ea0aace536bf36562e7b23fPKS=P&c(Э091385be99b45f459a231582d583ec9f3fa3d194PKS=PWev(7a1ccdde94c9307413b51baa8dfb6e0bd91fa191PKS=PM (įf9f4a31b22c3d5565f0b863a02f9a7913e1b5731PKS=Pl(0cb3663ad56386d1ebd34e8f6996581c850596e1PKS=P(_f48c1982cb83b358e9b546bf25bb89240f66acbfPKS=P}+%(e7faf11e19ca57e6135e0ac0c0c241682cebbecePKS=P}^\(8777442367d4e268abb9de233d764774e3353f4fPKS=PuԦ2(F91fe13be9edd3ede8c90b71f49eb2f5382148915PKS=P.(f392534dfff298af05944aaecc8a7d55c336f519PKS=Prć(e451aae8c38aaa14bd2e3682b1b4e6d39cee3c62PKS=P:> (>ec974b55905de3adf76a656fcb79320555376df3PKS=PVDځ(699a3e5d171055d51e818de4676332165cbeaf4bPKS=P / (ٲ4c34a6150a4577e6e34d32cec107ac9fef9704c8PKS=P M ((51229080967e170b3d4bc33a188769c268f38f5dPKS=P7](zcc1ca87153373c1388040a03f8972aa11997e4edPKS=P:OѺ (ųee64eb3b889c61f52f8e8cbff86a7c39b9fb5a91PKS=P>ʝ (780f051ce70f2324d7e4f73b576d324442c48751PKS=P (kaa9bbd4ff594b81da2c26534e69c9c17cf5d60aePKS=Ph (50f1cad19b46e357d6dfa47cd25a4dff5f735951PKS=Ppԍ (7500e8a780e64aa2e1a44efdb91883b9a4a9162dPKS=PU; (]99312e891c639697024690e6108d608d2bfb293fPKS=Pe(202f5d09ce6deccfac7169e9fb2d3f4338091435PKS=P"X,(63c36068525a25e3b8e4969f5e052e10688a47c4PKS=P"r ([437fd7166977f7107e8e9995155fe387d8c60e51PKS=P8Q(96790a0f236b7c30090fee64fc7fb99431f5f549PKS=P~>((f86c9d0fb0689252ccbd855f34d47fa6a7ebefdfPKS=PzZ (D900d31917cd3b616a365008b81d513f26026fdaePKS=P5R (23434aae194869667205809278a1098135a158bePKS=P#9(e5e3d3d122d7fcea55d7c2449550e9bc46385ef6PKS=Pt4(5b03219272bc5cb9e8ed2c4591d194784a4dd0285PKS=Pc5(01382f8f0fae7a319a31d747898f1a4d8bd02284PKS=P4 (ڸf67d2e609404fd211f603a0a9a6c6f87cf3b7272PKS=P7z(,e2310df29db3ab57b854e1729ba0111ef5913efbPKS=Pn(w9e279af08fbb5f0c22249ca9f2003e95e33e81bdPKS=P%#(չ9e25d4ade7400fcf50172f6ac34ba46d692ea950PKS=Pr("2f3135939b1e06710a382c1339e3ed2020f8ec64PKS=P-%޲ (ob25b40cdd18ef05733d8ebc5490f22c3691cb21dPKS=P" (º25f8ab5793f8f634bb4b58dd0f62c57ea3eefc63PKS=P߱z (55f8aa501a3902b9d1ec473a1aa1511dd9fe8426PKS=PRY E(d5096774a2380ad65357916687b69221758e22099PKS=P…n(5121017f19e588cf9733691ec795276427b9556cPKS=P[(Ҽbbffaadd467e4332ac2c62fd9e81e16902079a08PKS=P (b875bca4d75bb6f7cd0e225452641d279614feb0PKS=P %x (oaf9c4ca4b2231726dce755982dd5e6e8c4c02b81PKS=P ;6(693f2375f2ec4808315a91ddd841edf53f948a36PKS=PWI (Aaca79c189f92f81e3558fac7ee6757785752759fPKS=Pb (94ae7e36fca3797a1e05afe47a24b0a83ad8f54fPKS=PZ&(b8b2d71fec7511673d4fad07859b18069d2683d2PKS=P{& (+d72a3bf74488dd8a9e2795a650d426cf5b3a1d41PKS=PN"H"(~67fa22d2c993e4553cfc9331a669c989069f7075PKS=PRz (ɿ31539a16c787dfb3cbaf71760d53176b2dc8f0b4PKS=Pdw(00a947fc0b5d87427e7c80e65ea68d89f51ac141PKS=PZϱ (cdff795af02e3818a5ec1d5fabd102dafbec60c3ePKS=P`(6114c4f9304830b99e638ff74bf5310a5789f5d2PKS=P S  (f6808993978ca355dfd0ea4e9e1de8059b5bd1a5PKS=P8V(J733f3b8be3b03bf58cde773e01e0b0fa811db5a6PKS=P2(\8ed68a2060cd3458daabb4bdb84ab5069bf7f0f2PKS=PaTz(U3f8ada085f3286739820ea40d2f2870980e169c2PKS=PEZ (c2d835c3332ca946970fc17df4bbaad1b996634fPKS=Ph(47d60a79fc88c86f5b5ee5b51029302392e444f1PKS=P.T (Qce9f28b951d08546068baaec400cec455e2a4232PKS=PoJ(be4959425c25801beab9f1b2389139994ddb15c5PKS=P]8(97c93b14cafa3bcba23ac920899eef08384484d6PKS=P=(facfdddcf31ace8a809602c2dba2ccbeb38b4ed4PKS=P֛t( b53029a90b9e00c92f8dccf297d7bb25ad93c58dPKS=P\ (X8e72f7dcfcf5afcc7be1f5413c42cfa9f345410ePKS=P'_W(e55903fcc159da30327a87e2865b7bb31bead998PKS=P(ql(36b176006454157fd4df463b146be25037e29a2dPKS=PO8<Q(>bf62c6614f131de27048f804795feb9c80227f36PKS=Pc (7eb61cc91cf6a4b65c31babaf94c2f3e3bc61714PKS=P' (e7f927acdc582003626e26b7167a657b14f200f9PKS=Pͥm(d9908feff544d23b4a695ed0f6468a3738dba8e40PKS=P+Qm (048bb1427912ca948a1da19a60ec18bfdf9c66a2PKS=P.[ (3b36185800a61406c7e36c8e020f6a90c63b5abbPKS=Pq(Ub1100ad6285f0e38c52c5abb234da2407280ad05PKS=P_[(b7a493641e649782c0517f0590e66b32ecfd002dPKS=P (37eb8a04027d5190d1571acbe095d16c4afef737PKS=P6(N32b2f8fbcf53aeb32fb2c27dbaa6363912ba2336PKS=P: (23ff80f9f7307960f434b395c47e5fa75dd1bdb2PKS=PA7c(500e8a1c6900c2cf6f950ebe49423e8e419581e4PKS=P_ (:ea41f25595e214a8cef74c8416c184d2b78d9cecPKS=P:Y] (7f0b1e4e7b397dbfa10ef3101050469fac65fb23PKS=P/ζ(2376af5ea4f9eddb757e84cd99ecda7a5c0e06d8PKS=P|p (&c5b1eaab1e4c382008684e8c536ba40e1b401b69PKS=P?(w0995d10e920f6720744b7722a5540406385c32e8PKS=P.T(e2f656589f6c122e85d4869aaa28ece16bfebf24PKS=P` ( a4713dd9349e3227282f3b2cc6b1a3c1f4316a80PKS=P27[([fb7ba0591e6aed35ff2c0503d01d623f46a3a4bdPKS=P+(5aaf9e9dabbf4c8d616d3bfbe2a95756e6a58614PKS=P(1bc1474d1de74b7970eda43afb21a91bcc0c2c22PKS=PY(G8b36ccf0bd00858aecaee0b1fd0e775d04664e65PKS=P~|q$(a810516aa0f54cdb2f6b5d056bf3d1c47c9be74dPKS=PA,(e460812f5f55bea787582204380fb92036cdfa13PKS=P,(19728bc87cf2a7bbea59a0818bb33291477e7a8b8PKS=P (568819aea7347effb31dbf4cb66cf3e96a45bcfePKS=PV(1f5cd3f0e5115c39742c03939157aa502d8878e3PKS=P.a(07b5dd688e1c35aa686e3d50f82dad629b196cd1aPKS=P~ #(~2bfef89f2375030cb37f4b1bb8834565c6969fbbPKS=PW.(2bc9f8ce6e4d8b930e97390293265788de67f045PKS=P(7e89460907b115e28e969435361e6126e586dbc5PKS=P$^_(i4b5c325022a674ff187152b6ddbea6d6c9a633bdPKS=P$\w(h585752f9160435444df4eee9a04d4a9f0fdad434PKS=P.'P(f3869006048d4200e9de32df4ed7a814e6dee9dePKS=P'9 z("23f83465a763f97902316d1dfe8fe79bc5536aeaPKS=Pd(ldedad7f547e97d5edfce2da4939f795293dc2511PKS=PeH<(8a761296eac0e5d6b65a22a0307d20ad3f8f4206PKS=P?R(bf03d877768b04a5336d97bc881b7369ac7b3856PKS=PEML(Z91e159c622c03b8ef82c8e16c0b55e4b8909b221PKS=P(0ff677dc3065f39c5cdc30150ac5af6421d95903PKS=P9;(ac3950b6f996188b95ca8f1018d9f0a477fa4b54PKS=P(40dc8618f3bf66fcee629e6f44d18da0ae806bf9PKS=P;2C ((Idb54d5802d5dbe99f48ed401bb8fbdbaffa90709PKS=P(38f9172ba334d50be0322c35306a5e5a857ffd81PKS=P>0 (347096c6b77cd7ae1a1323102333aac3c0264ff2PKS=P.(984aa5b1d5855d2dc100d9eef742d757be012245fPKS=PS(637647c82eb5ef5daa19629bf701fb476b4ad29fPKS=PF (5921ba8c81c0ff1b23921448f71bdeb86b242f68PKS=PJLX2(885b91ee769c95134711d583c69728e5d1773371PKS=Pu(e2b1086e9b690dbc3ba7ce7b923924b384108f50PKS=PcTNS(4956b7fb85e4c220d06f9ac61b48ed05e00f1219PKS=PZ (5669b1517ccb242ca9bb38cd66a6b26f9155ef2cPKS=P ps (d33a567c0bb30aa3fd24fa20c201f52c96cf1a58PKS=PX.(:13f140f1bdf7cd7e302aa4a01499cb6b0c3dfb20PKS=P8o(e29cf760eade6c0842b717451423c7d0d061c101PKS=PIf(a56a7d50e372e71b887c577de8912d42af72898dPKS=PP (G287c2842b353299e518b10c2c14de8c1872e4b41PKS=Pc:(6dbb0f268430207fca6ed3ddedfc71ade04c9d6cPKS=PA>{ (67eda9821179d14d7fb94d8d035d96d8256ab3ffPKS=Py (868534e500e3e17249457ff3a485d035d9f6f8c39PKS=P{^(00554dfdfe019a407b7a9575f7ebd5f482724687PKS=PUI(4ca3088b3b723effdabd46865f1afe47d7213e4fPKS=PI,(g284b4a41e957560a9f01124bc1abb6f435e11491PKS=PbW](40b3af0fee78a8532bc8b94d08775ecc49235089PKS=P2&( a70d39b5c142adc17be98ce9709185799aba56bdPKS=PKk9vlt(ed0b22b9012c027fbbb446aef5d6cf3a7cddc5851PKS=PxN (!8ddee3352c09a9aae110f739a545f34ab0f6a9eePKS=P( (p878fdf6e891038fa3f542a79a3f6b3629ac12ddbPKS=Pn(9cae6cde2971f9f2965250e0a9752f4d67716894PKS=P ` (1abd34b7b083eeb3a49164d0e0b54e550de427bdPKS=PtGN (`5cccca30b7a62182b6144c1c4d81f69f2f8b6ca2PKS=P~~ (f21458c7b02ba1ca36e2ab8c61e22727682ba28ePKS=Pw2(da185278bb43ee4e37fb6a6877fafbc470aef3bbPKS=P s(Id6ee466d9dee44140633690ca936b44cec0a2396PKS=P}"*(12217fe7064fd8571c91cc5b32b5564b46778408PKS=P3uE(c9e07715cb3a622a0d46896efd6fd6abc4d37a95PKS=PJ#(99ae2a7b0f71637a08e8ecb84b127a307df14350cPKS=Pz *(f68c1b716b6a83f42c8cd1ae6ae56c67a35c36edPKS=PyK(dba7f37418d34b166c7474c522f867ce40b14989PKS=P`>?(615f1e13af10403b873748ddf4d3367b419e15582PKS=P.&(9a8412b22e3e0403f976e53acd6bf3731b51f269PKS=P 1*(aaca52ea33bb471e9df54119e58dd42f75b694abPKS=P4%([7142fe3f48c3d3bc0944ae4bc3f596c7af884d3ePKS=PǛ9Q(286dcd2d494267057ab78cd13230289ae7ba3edaPKS=P$(&311afff7e6e1dfab0cd0ff206ab8819643bea71fPKS=P~s(te55a602bd5ab013046d05fb2865448499a32eecfPKS=P((-a0b740b2bca0809afa8e5e62a0a0ba68cd1919ddPKS=P+f (14a87dd23985ae8180bcb85cac5483773d90a77ePKS=P-(4ab159d84a1664036277aacf65459576a2f9b179PKS=Pfh(*7f5a6bebcb0cd4b450e0805d625563481ce256efPKS=P} (x94c62cce64284df818fc33a0d5159cd64fe97974PKS=Pc(d88b652bdae92abeb69f4bf4f4e9a9cc105d8b45PKS=Pp#(e705359083e42210bd66e9abc82107c0d2e6c44cPKS=P{2(j458d0147e0036630a8872f00c9aa04d537f6f03bPKS=P W(3cb352f38876b17ecd42e95dc061edf9bd49a948PKS=PQL ( e72aab5865dde9e80e1585f24ec26c84c2a096ddPKS=P}F @(]90d7814e1a51bdd5fae14d6636c5bc555fdbdbcdPKS=P[(f7b0f2b04258c061fab90e83e05d8a00f22ec9c9PKS=Pi8(75a48badcd1c9496db5bb2b664988e6108874555PKS=P=7. (U5dc9e28eecf7dd605a5000bc7629151e8c0e5d19PKS=PoU(a26a84b67b4108b5d61bf1d17034d4cb072f9cf2PKS=P`i8(c6bef0e2a1471d0534db5d25482ac1a12f2a7be9PKS=PD`(F150d88840b8f9d62c59ef182eee3177897927f84PKS=P)z(ab6cd194053d6defaf131c9647b6bc7ee35fd0b4PKS=P%eK?g(6e17d156c032db89f4061096e9551f675104340bPKS=PfU(zbcc3ba0c7e4516a9340e0b0d63dd4be48f0f1266PKS=PwQ[ (c13ea1a5ec2c5d79355ad624c1fdfd42c31c050dPKS=P_$(1a248a027c058d143c5ae1d614f49a74df540b52PKS=P!h%(id826844b5dce7ab8f1a6523e55bb430612ddf0d7PKS=Pn^l2(=745d9c57e5d8fd800f5855d610ddca2d19f7b081PKS=P*-(70fd1766cf5c2379a084728c33735402331e4f9fPKS=PV(124e518514a1942acea825e189ab9b1ce568e15fPKS=Pr (%988fe0fd3720c5be784206573878d2f28d7f96ecPKS=Pj(y328586f399b2fc2b1d4fd25a3fb31c232e1dd845PKS=P֢ (6ec9df963124306ee438ede22ed32929e11ebc2ePKS=PL]!P7n'(a6d0574fe82a51ad410137a2770c2fd87c808784PKS=PjEw (5ab2ee8d114a184cb84c717cf01643f7e6a7a1bdPKS=Px(1e9c68dd459423c0d47466a669b02a9503637689PKS=P5{(1a1dfe7cd9fa6a6186b474ef85edc8aaf949ff991PKS=P'L(f5954773a08867f35c8bc9112c9ae6ba9514e87aPKS=PB(408dec80433821591341275eb7d881e197fa1eb9PKS=P{T+($2e71ef03db2467431257a6ba6cc1bdca1c51dd74PKS=Pﯵ(|267da631324da35e4af18cedb1895db2c18d5fccPKS=P)Wa (4d55e0912f0f88a8ad5e7c79c54208b6fdaf27f3PKS=PIC(fb39ceb0284637928c2567d8d4b1b3d09f94fd98PKS=PQ(if8fe66f7aff0db7902ee016e69087d9e6e341f4dPKS=Pŝ( (65d95941ae737a17f07796cbc9d7a61c3994734dPKS=Py (cca95cf3f7e5e727f8bc6c02303b77bc9731d03fPKS=PJ.(vbeacedbcddff5a8b3ebe369b8d7ca68cc7f12f7bPKS=P8(631e5f2fe53e0979061bf72638cf4f3702ccc5c0PKS=P]˿D(545bbd1135f1c5dd7cc86d7f6b51568178016e4dPKS=P(be2f1340d91fc5fed9b59289dcf1bb77e38966f6PKS=PբX(' 71104016fa2770f4aa0aa947d6ea848dde1be7f6PKS=P(s d79bba73d8c6499c606d0807be408a66fc13ed7ePKS=P_ ( 06971813cb22712ded0e7f6a577131dbd7992267PKS=P]b( 7564900eee77b9ec01b637e5add34f35468c97e7PKS=P|< (a bf9eba0b7e5e4e9b559750e1bf149f4602b305b9PKS=PɃ ( 097a7f7065533ea97ff5992965a59d21def5ce0dPKS=PmwG ( 8c63463eadad12c820b3d88e46c71ac1337eac44PKS=P (S 90f6502b95c1f4ffb7b1cc1eb40191e6651f4062PKS=PVǩ( 16aadf8ab58693cc7860b47b0042e3a71b83576ePKS=PNQ 7( db60a6f53ebaca5e13bd3df9d1a0c1be5a11e219PKS=PTF(? 31ebbcc1c843881cf6f506725850b32df10645e0PKS=Pa(8157fd776b7389b1ede8cb691d539e9e84a254f0PKS=PZf(f561e6f55af34d9811155d17f57fa84b57b34360PKS=P#p >(&a25df4e1879b07f5afee4f69cabe94e872c7b0fePKS=P: ('8a12213c835752857ffa3a6d42084ff66fdb178cPKS=PBR (x51a96a5cc856e3d6528f91ab429abf887d7175dbPKS=P^P(100b5088946445f495d74dfb28d5cdafa6597c39PKS=Pt(cad5d5f6a033d87adfa249b3634407cb0956941bPKS=P^W(_a700b9df6265e0e1a44fef607bf7319f702ed7e9PKS=P> >(5ee6749f43cb2a3f6565f65111a32bcf00f2b80aPKS=P2v(916ebf0ef7fa3ce1290b1c3f4090368a2fd53e34PKS=P\M(I7d56d98d18c842082ef82dbce3794fce06d84d59PKS=P?j$!(0a7d616c0781d07f8d36cad3486f729ac285064dPKS=P8^(3f3fdbc1cea5dd0d4bd27a05acf293ee272e6d64PKS=P'( (b3b7e2534a65a1c0605c7d2cf1139056a15cc098PKS=P{e[ (bc27f653c38e445facba501d4557d2cde086b0e3PKS=PHC (A cdae126973381e08434810ffeb0671acf459a38ePKS=P> ( 5a57ed0c4594d3b524c644a65d8de606a204bff8PKS=P׋S (!97719ca6c917cc3b6ccc1901142d6b13f28d344cPKS=PPV (h!21a31af7a0ecc6a6d83af645f9a2607fc076db0cPKS=Ph)F(!49a60f2d72aa9f16bf9b93d6214d7d46b9b75009PKS=P;*("15dbf73071c836b8c628c6b9679a7cb690466208PKS=P(S"49a2c8ed4b17b73cec70bbf083ed69d0775ffe11PKS=PR_("5191c0beeb666b7fe2032a4aa997d340b73983d5PKS=Pw ("a622dcff130190e6430eac4c8fc7579f765422c2PKS=P<(9#37e2b0c260280da0c0523f2233271b6953f790bcPKS=P{N(#25c5b20c32f65c4a2fb052ed719e19d4d8edd6c6PKS=P|mw(#c059132b46482e00b5ce6e47e9a7343241636f6bPKS=P>$9 (:$670a0ce96c16152df46ed1d1837cf646d7682d2fPKS=PnR($c1fede7060c0a57203035b8dafc402bcdebf4e4fPKS=P j~8($1a2fa5e697ecf2ec169285c78b7928bbb37c2ea7PKS=P ( ('%acbdfbb9c9e00102a5e611c23896941ee8dc9608PKS=PH (w%761f3462b5858e94f3efeeb03ff43382e1041352PKS=P (%bd8f8a20fddde8c33cce34ab4a7b1ad6e7ba3e55PKS=Py(&1f6fd5c4559d1df2bfc918977095563639543818PKS=P1(f&a4b32d2afc56ebdc984e5db6ca7a00859a368b47PKS=P%8(&fd3496023e5cc11d3849e3af3319948fc98bde47PKS=PJg('b44f37f06091a62eacf08b295273d8083d0d18a2PKS=P39 (N'a3105f2fb80d65d7b8b295db9ff9af9019c8589dPKS=P('fe8e9f22fbda04b412dda2663a8510a22f17d365PKS=P@/Z('7ee1ab30ec590a466ff4a35525ee26caebaf92ddPKS=P˂%Y(I(502ac56a26c6237ca926e1be4be11c7ae34c7b9bPKS=P.((0cc793a2df07e64f43068c8f161562deee533e11PKS=P&((fe1a71b98f5166ae9ff46b59601ffb08abc270e3PKS=PYY(/)cee19cc9643ece4c9246375c33d1f26bee460d03PKS=Pu (})707fc70dccda44869f6f5a6ac553b90eb96e38caPKS=P2">()97e3fc6d9090d888879ff5a3bd12c41e817eee27PKS=P7(*fa3cf028780022b2713a93e9367b084b05b48e8aPKS=Pn](g*4b61c0da7c601050da1234224073aa59c7d41defPKS=P'{`(*e144e6b3b859f03aba68096b1f7136b6af74f167PKS=P,#(+de4e747caf934c4b9f1fae3304e1081e4d9c2fefPKS=PpHOa([+c6e758f0241ca694a183b7a8be6c70549e3f763cPKS=P@S `(+fa4eed0b4157c4bdef3d4cc883b34fdb0dc8c492PKS=Pp rN(+8cf7919f54b14334e3a89a785a424615c17f2a17PKS=PE (C,a300b7a0dbb3142c587adf01fc7f25174fa0870fPKS=P'(,e3e6da6c35febcc35c55c17d010dd274b6d6cc29PKS=PF !(,6950a81a80ac9090553060cc34a91eb1e6f67b2bPKS=P52(5-99c54cbcb3d435abbd9f785e967f7a7e02c88b49PKS=Pm[(-bcbd3c4735be9c28a25ba72e101473a24c7e82cePKS=Pks(-ebee397c0a3d75b1ba52be3afe825f5d9ee20ab2PKS=PDN(.c45f1f8cf72cc1af5fea7283845b27faf2850410PKS=P>m(m.64e5b5b68262d6f2dd8af884b9104e6ae0577780PKS=P\ (.1a40667bcfc598819af0445eb49e838e8a24632aPKS=P,( /6ba5f385d23f5f45aea8d45fc06bad804cf7022dPKS=P{(X/8097f41c2cc850073a8fd585dadebe65e1fc8aa1PKS=PR (/9b54d3d07790aaa63f23ddb925ddef249b56fb5aPKS=Phi (/94360605eb4640443a539982936d82f35906b8ffPKS=P>[}(E0baa1ba334c560c778ad296ba23bb58470067d4e1PKS=PP(07fc3604b6a7ff9fa57abbf3587a893e1bbd26dbaPKS=PJ?pI(07f4bf0c4134589a653082e81996a5a2386ad91baPKS=P3\(4147d5cc2f3aeda2894dd8328f47935124de7189b6PKS=P3{_(1dbacb8441d184f6e47d23ab243f254ec4f8f947ePKS=P;4(10d0774d4bb0dca0244806d61491e9e7750c63050PKS=PS(2256fdb7cec772dfbd27495f7289046b318565a1dPKS=P3TJ (3d3c7f9d6d565865415562e29f5cd2d2bc000299ePKS=PX(r3c66748182b3357e9903645bb2d07e7ae7484e3d4PKS=P@ (3fe3b6b21adec8ba4ad06272b82fdf46e0212876cPKS=P,d ( 4321c7db2ba08ec7eb835eaba05de83468691a4e2PKS=P"(\42a9ecc5a91b35593ee5ee40f2667472629c6f2e5PKS=Pv (44da232d6a02c608f65b18b2d211b44dc819ed70bPKS=P#&(430996cf2f4e4efc229695fc5bcbfb60142c16ff8PKS=Pl1M(G59cb4249e8a055eb22a6e0cc6daddc7c1d688e73bPKS=PO>(531e9d693ca168f2dd87dffc1711f50516fa7cbbcPKS=P!(&614df66be3b08880f367ef4f021409f2a03827a22PKS=P@M<M(r68dc31dc38406ce144262661511b74ea9c6e845fcPKS=PL?E(6af9dacab05e917e28f72598f5db56189789e7783PKS=P3`(K79cd52ac50e2244f85a0914f7af26530d69123bdaPKS=PE(7253a8b572ca3ac039916c3a322cb9e29997e4000PKS=P(7784c6c9c8ca0c8c364b8c7ed6aaea28f1f6e9426PKS=P rCR(18b072327083da5a84d8abbb4f595fcf1ed54cb62ePKS=Py(8c1da783d44a324c81308a4e095c1605e15cde26dPKS=P89l(8d0cb04df98377227f9898413e95cc5b68bc34178PKS=P (940ca4c9080d3c6688cc9ffed807336e9e599f4b4PKS=P}s@(l9027db3b5cece8a4146eb13c08cf18615354375d5PKS=PB2(962528975b0380d9440b0d40941a9c56106eda5cfPKS=P=(:cca4c4ace3fdd66d12d54757865170bef3598cd2PKS=P(_:c40c1a09102890f27ab23756b512fc02dfe4e180PKS=P(:0bb33372e25ebbee3063d44c41a3e54ed931de5fPKS=P_(:85877a364af6f00d2633990503a4bbf64ad93414PKS=P`m(D;929cb8dcea9459b7ae2be58f5f4c328d9ed89e77PKS=P}N' (;80ddc73eb23d8308898b84c546fc569ed108dc86PKS=P3|)/(;3e5dd3b3048893307d79a7593c5f86454103b939PKS=P] (0<c285e69951de0422359bca5e8988e556a26175f1PKS=P(<2a602e1a96408e285b0bedd4172e0b5fa5936816PKS=P;jS -(<ca37e506115755b1b7cd61c4b2dc9759e39a7ecaPKS=P siZ(=2da89713048a56ed6fd764dd8557e1467cb02c9cPKS=Pi] (~=9241ee52fc17cc19f6fc017587b3f030b9eba106PKS=P.(=752443b0149e60e8522b0a605dc5ed820979af4fPKS=Pz(>e45cfc876def69cd94c8853d623b98a8018094c9PKS=Pwʠ (d>5ce42937f44fe2e0e576f7d45217a70aa503299bPKS=P()(>3a89c6086ad2277b1a37c8eb7e62708f63fa7e90PKS=P%$V(?74a36b51e772b40dc955bb4e1e785531f3046ea2PKS=P(b?1a59ca93d5859f8dcb770a15a66610480a45b088PKS=P+f (?cc38a08f856458bc06009185084415b216f3a859PKS=P\(?b46ddacd2d510819e12e70a190810f1ef0a930edPKS=P{(J@c1095f49091a920c984bdde117f1ac43fa1f6dc7PKS=Pᣤ(@cfbe7d5e13e6448533e73f61427e8bf2b661bac0PKS=P(T(@d4ab3ca5f38db4c6785873f9527ffc8fe2707ffcPKS=P@(?A65da194c9d89e4bfce13613d74b4e00c2266a3f7PKS=P߱ (A9ec7aec7b9128186c113e24533d8ad2eda0d8604PKS=P B(A8fdf86870cc1695bebbcedf024b4489459a9c3c2PKS=Pv(.Bf2a75bf0ece016db64330493c459ce8e0120ac6cPKS=PoU3I (|B9893647e1e69fc08eca523d46746b1487e73cd5cPKS=P~0 (Be5ac152b3355cf32ce449ae2cb06ebbfc0063ab8PKS=P\^^( Cf96dacd27ff19b32b2c283076be7be7ced1f8f72PKS=P (wC31c4419c498adfd6449d332302b46b5174529379PKS=PV(Cd03e1fab935ceca199e7c454e139ad10eda603f2PKS=P.(!D9e5884182a60d6c8159178e9e766b8150e81f0f6PKS=P$W>(mD55d1ded3edadcec09d20c2685111c2c6436ae641PKS=P>%(D7f520e6cd016a1b0bd25c35f2f61318393083369PKS=P].8(E36f0765772d324ec1ac62bd3c73c90496ae64e22PKS=P"(nE119fcf93ff17ad7b601afd01e4cdca422bf181daPKS=Pv(Jbca7260e90c1bd4bce8f4640302cc8ec60901f05PKS=PH y0(J180104e90a170a2807dd4dac216c6eebfcb98836PKS=P!& (1K56a306d124ac49b63a3a65fe96f5abc2ff2672faPKS=PvD,|s(Ke55d2b5ac48214576f8085584bb31a874e3c21a6PKS=PQ* (Oc795e9761c378d25dc6b6e836cdb037ad02853f2PKS=PC9 (Oeb3b28b76924a6946eb3593de4906feed9b54c89PKS=P%Ŵ{ (.P4d0da381a04428c39c2f6e0a4561c49648887f17PKS=PF'(~P8afed39264a9aad49843005bf7237bf3a293ddc0PKS=PtlJ (P47602918e1a3444546394c6773490b23b40cf055PKS=P-hGE(-[d8cecbfe05aa064e01cd7e58fc8a80c034145ef7PKS=PF/([ee2538736a5d38193b223b1db9263b2953fd5481PKS=P 4?(\cc4c16c635ab8abda0f721b6a70d2d7043e903d3PKS=P4d?L (R\c5e537433e8d1ad945849addf06986a49ad1f42aPKS=PG.(\e8de29ffafaa7aa374fd0e02fa3a43766171c404PKS=Pr_ (_4e2c3da7a0b85503aaa613404e7153f5140f70a1PKS=P֎ #(W_f0ec20b4147bded59cbd30027b6e7b8ba55e9821PKS=Pe@(_0bc899fb2c1b1bc0df5e679ce7ceba14bcd60c0fPKS=PaY (C`051582e4d249fe276a0c8bd36bba96ca93e15190PKS=PՈ(`39e2eca87c39792d15d428ce82da32809756e317PKS=P!4(`a696f7f9348d031a549a0a82020390a84506cba3PKS=Pe"(7a24621788e220c78b783fb96902f0c9c66b7bcc9cPKS=PHI(bf37c803125287b3987717bca197428fae52c914aPKS=Pes(mb339e0eb29a13b4948774d172bce3a76e71d8da56PKS=P/ (be7cd61bcaed61df0bafb60145ba5ca6506aa5b7cPKS=PFC (c244cbebf17cdc14e4b2776ac9da194d380027e89PKS=P6<(ecb4ed6bda25d61bbf59eb23d5230a1a75587842f0PKS=P(cd24f33a978c79ef98e73b0f068571e32e3a10f90PKS=Pic(d5652f12b68de6a001fc0008cf1371a50d9f7ab4cPKS=P8gD!(id436739415f34f06f2bf28f93a05e666396ae5b41PKS=P@\(dad4dc8f916fb6b2b04a89e8023e1f8a6b44532acPKS=P"8 (Yea9e54fc1792e426897c3c6d3f9ec64a7c564edacPKS=Pn(e263112c49a12de1ccca481398880c111d097add9PKS=PQ> (edf30b5ff148e4006e80259561bfe74f20bddc0a2PKS=P15 K(Gf5d97622d4fd0d905006090e9ad75828ec412f32aPKS=P0(f5fedc8cf312027cda2d7ab5fd060079e793345a9PKS=PCד (f4236777d781ab88f6f5e3decb9b5b8f2ec0a63d6PKS=Px! (5gaf3ef28ae5e3f68bf11aba9e3d09197d45460315PKS=PBZ`I5(g029b35daf47220649c478e475df79385c557d9b2PKS=PO (i630d3fc17825b54203c7ea4350e3fd4f54797bd1PKS=Pk (Pi34bb493b23c34630aa061ef22283dabe2fa4def7PKS=P0(i9180727f701abd7515d0d32bc2d27e842ca1560cPKS=P6h(id160e0986aca4714714a16f29ec605af90be704dPKS=P4(4j8efc2f1e8e538f2d56d9e3e95a857da19df0a721PKS=Pc(&(Wkdec681ce21114918129f387a59caba6177d03449PKS=P {(kc2857ff836462607bc8b501f0bfb41dddf362886PKS=PJ (k6e67bf382cc306ece62436604e6b4964d34c189fPKS=P-Uڤ(Kl701ccb98ad7b79f622cea97406e16f5ddc52215aPKS=Pw? (lc258e40a2f878ee4d27a7e41afd19aef345e8344PKS=P>j |)(l5921064e696f7084b4bbf1996deb881fb2d2f679PKS=P51(Am4bee9504bd82eff0a903aeddf5f85313c43eaff1PKS=P}r(un9fe117fbc3bc879c8f294561d0f8e409919fe0c8PKS=PO](n229ca0175d05d5d188256982f7eafbb0744e8eb9PKS=P !(te21296519edd2d456ff5bf99bb7e1cd4cbfafb36PKS=P;ʀ(3ud6cea37ff64bd59bbd331594d1e8429aee3715f7PKS=PI}L8(.{7212d59d8f1682f2e6a5f83451134743dbc0da83PKS=Ps ({041690a5d8f757b3da7add99e2be011db9bc5d9dPKS=P](|77a4ae930c56a8d1c7d039f398b13d055a4e9c14PKS=PN(\|c50e8f00facbba54bc137f9e69949976fa5f6dd0PKS=P͢(|f7ce2cd06c4c42074f8ec5c1b216fb3e1ab1498ePKS=P[I&'(|f33b28d38d35607f9041f7680887b61e770bf667PKS=Pν (M}16c6c3288613fdf2e36bde9fe92ad56e8f21e14aPKS=POg"(}cc4bda89fc8e0335181f5ce578b4744b501c23dbPKS=P I&Q(}aba24fc69b9a369aa6aa1c8937a861a1d16313acPKS=PY#(W~b8cf6c76cf4f18dc13d722f9b84806010ef55b52PKS=PQ(~452f3699e986700876e0b0978b7a8d6b6e534b27PKS=P71 E(~d5684bcc2eb4c0c95304027d5686d46a32f348e5PKS=PxqƝ(R2fef86a071b2d4e94d3e36664fb3f7a12cf23842PKS=P'| (dc417675b82aaedc821a6d8dd2ac5cd58d908ba9PKS=P˰ (decacbeee6ae7ed3699f23e758f2b8ad442b2d3ePKS=PCi(ڄ3b37e34fa7a5cd577ca1fee8b67e45e0626b4921PKS=P4 ((04544614a5f1b31fa15c83303e93804012250298PKS=P\ (x2fe8bad6a101e8de9a9732a93aee7399e81bb864PKS=P[Y(Dž385bf8718ae5023e79011d5835f41550fafbddf3PKS=P`A(7685bcd4100c3ac81097322d7d507af9784760b1PKS=PX:/J(g8b75432087036bd98f8fc7137a2e39ae418b80f7PKS=Pعd(a79fbb10ebf45b04bbbe3b6e4b47f57f2e8a1971PKS=P!b(B728e5c68005986552afdb7146211380353fa5a85PKS=P|vv(Eb5d9354bf1fc5b62bea50b1bbcf8f135de4b8c26PKS=P (b351c4e2934d988c0283e9459889eeaa7c6607acPKS=P}(4974ad2795797a643114789c2b22b10db395e247PKS=P-mt(7b9d513e41cfb008bc0f613135b4301aad075cf6ePKS=P?Q(46089f197f5fa14f380276bcba49f81dfcefec64PKS=PT(ډ6914ac42b57a1c15c843efcea5590ae6df8f98aePKS=PY(0cb1b26e4bab5d3ad651bd9ac4f7398c979463801PKS=P " ({3b98de204c93ac21ec58a03b9d6d1173b166dfa4PKS=P%(͊95fa6b1b021075780699de91cd385ee404ee2a5dPKS=P_(d91b93b7c98fe2a89ee57bb79ef433a3e1267f23PKS=PI(f15dd95d03e77b2d54fd3648ba640fc29c7a25826PKS=Pn(a17203be23e92ad7b336009ce4ae1650e7341e8bPKS=P -|(29e5dff6f73d5dde8261b4275965ad15d484399cPKS=Pi(=5812bdc1d0dbfa37d261121fa1b204f365dcfd77PKS=P[< (180e3b6003fd95197e2641659cbec4c9ca1cbc8bPKS=P0(056dbb82bf07b580d9c7b04978c94aaaec02ea7cPKS=PyE(342d6d4de1474fea015d1def200fc04f23d493c59PKS=PDJ(~863fd2e560f64a74be0b6a5b5009314f41656871PKS=P՘cl(ʏefdb672669888e2322fe6e14fafd02dc6de2752aPKS=Pb(fc551182a97d025c218fe3d16335c5451c05dbdePKS=P I(l1e6d64350e188b9af7e8605cbe089253e026ea7cPKS=Ph(3d12f7a3d9c6a06d1cb322e718b0d54d2437f4f7PKS=PWu#(a59cbb0c3ce11ce4f1cab6462409763f6f2437ffPKS=Po(Mf3124e256e19c0e6f4542c9613465eb049082800PKS=P^K36(ce0731447f58e671f045810ae4903f4235a8ab91PKS=P](33dbc474cf44533b5c3a2e1e15f8907babc3a869PKS=P(r(.fd2da519f091cb880f12382128ea904364291b8aPKS=P^](4a6a0a0d53ad4fc275954db36ea75d030003facaPKS=Ph(K494b3e86c2e8589ec00536543ca70e99d87c7b3aPKS=PjE(9321837e81975c1561fa5505902131fa44e222f9PKS=P(1ac851d246b16b0ef26a608a287dd845dfd73ffbPKS=P I`(/e5669c31e0a9ea26c806e2871c180c95e39bedc1PKS=Pjl (ffdc6439e91c70eac55df0fc3e1cd9dd98eb1b7dPKS=P{](ڔa412f7e789c5022649da66d7c0e312d5e436829aPKS=P($ L(6dec9a986318bf75d003247706e4e78e91d163ae9PKS=P}/(ab13da866b68f102098d963a9ed972edacad4177PKS=P3(533ea74fa5ba3457c0222f0c5ea4cad526a3dac0PKS=P(/6d917454d1bfb37a285e534712b50ab077f24035PKS=P0'(}af9b30cda0b940cbccf19489931a97e0502246a9PKS=P^(˖fc67db31f65d16c229b6d222f7154ba676ce4e18PKS=P$y(3c2f9f28e7ad5b76b622113c35561451fcfe6409PKS=PT,(c3e06c5c7c9eaca3d71136624449fa6506ed1e6d6PKS=P ` (՚2bae94ea6aa67cf3dfae2114d13ce7385712bb3fPKS=P4(%fddad668e229ccc1f4adc2a1800fb205ac51cc68PKS=Pm )(qfa455ca2dcba8ccf9d73d9c8fd51a13bc0f5d393PKS=P[_ (כ50c778b6f8eb815af12b84a19959fff3b2f8ed87PKS=P=(&32096c2e0eff33d844ee6d675407ace18289357dPKS=PC1(o99d118a4178efdb463ad4fe9cf091ab845c8ff13PKS=PS (504be743a430f69b65733ee1de64c4087805ca78PKS=Pl (16a106574cd33275ab7c41f13521070348daa2f1PKS=Pe(_ae40b988b867a5ae233474953fdb580691ca1583PKS=PyP (224b10837f8a124b0a83cd2ad4e4952ccd7670caPKS=P 'y(Ϟ3fdcd90845c79c956d987b4a45e5ef35fd1c0231PKS=P?_ (a3718b75cf7bd3580da095a924d5cb63b0c8c9a6PKS=P%6$((h5d135c57c75c6bcac55ac2dbd495429c45f0ab6bPKS=P-O (91053e05c35591e677d79fabce4b0353026b7994PKS=P]1Fg ( aa967eedf3201ca70e7475fdaa385186cc692160PKS=P4(V282e58168707136993e6a9e129bf3ae15820b5a2PKS=P r(e9bfa339648524c06469609031c0624885ebed6fPKS=PY+S(56d135119c28b71d2889cd59e1e4b17f35aed97aPKS=Pi(0bc0aa1000c7b34a8225183b2abce194e53934bfPKS=PbM (905e863190ab977b6385b26dfc4005a7761af679PKS=P!(9b6589fc6ab0dc82cf12099d1c2d40ab994e8410cPKS=P!((332f511e307067341528a8fb8d7f8f764404a26fPKS=P8ٷc (4f230a0bb83d56729cff7a59a1a61f4855c1ac91PKS=P\{g(d205b17af59e307adfeedd1f970c7aaf41392bfcPKS=Pom Z (K29ff4c070da21396e9b39c4ab0a33e9cedfe2243PKS=PXa(16f2b63ae92fcc55be98aa169185a08b49903ecfPKS=PªE (8a8bd2ab9b40515f23a51c69f3e7f47a2a44e99fPKS=Pb(&8e932f8d52fc04da61d69f46d4c8432c88ba79baPKS=PWB(ra6c279a8f15a0e91229d320447785f2326a7e7dbPKS=P$n(301d38e2f11ab0c4ddf87a0b554351942e127076PKS=Pv( cbba797dc7e2a7b392195dfb7bee0188bea5a5c3PKS=P,qu(Ze335e47164b8ec51c5b96b454691f95485b4a824PKS=Pv](d0290f8c328b4a1134ce40f6d10b46383ba0f987PKS=P~w$(0668c9ecd9b5e7ef634ee06be56d5d3aeaa403f9PKS=Pe(I40935496b8d5df512307b4d5fa8452bea14fd1b2PKS=PK/$(bd3abb32f0458b37e238b116ee2d4a4982d1c0c7PKS=PG(a7800978ad282d18e99e81a58300423aeba908ddPKS=PsK (-e83a06e7720ab10dae84512ee7c02c315bc337c0PKS=P?VV(94c9a2feb33f419df2ad268e74bd1449c48d4627PKS=PG(0f330ece9ed25de93f1991a6e9a5c19f99390691PKS=P[f(i33cac09486c10024f1abf269a5863fe0984339b2PKS=PRRy (xe0c52baaf6503fc1a23fa8cf6647e075c6e81876PKS=P:r (8f78d470aa0e5dd824aa3cfe937c5f5abd39015ePKS=P$ 0(`675190fdcf772f12a3348421bba3024f148b87f0PKS=P,f-(29795fc9df905cfd9bbc8e70f6f5246d4a687fb3PKS=P]|0(56756eb9e91ea5c88118c3c6c21ca5d00c0970f4PKS=PtxF'(Raf48e7613c99069c01856878ab6e1925ddd10e94PKS=P%+(9a35f6c7a41a66a00085de58be80304564136abaPKS=PIS!-(9e75c2d53ab0da79d448163d17168c7e78657b5aPKS=P+}O $(af8578a70cde4ee0f468e71c0225563f6d64b7ca8PKS=PM(9259ce914ac0728c9e82076cf7eeb55ffc7a51eaPKS=Pnx(ee465feee3880166b117fe431ad5ec9cf1484791PKS=PX (L035ba76c96b24e8b8a4af08c7a04b45ec995b45aPKS=PU) (a336b8e2ceed5d2c47a09ff5ace75562b2ed85b8PKS=Pn (539db30c9d13077e4b4cc520627301817d7d1da1PKS=P'F:(=349a5827584e66fa6d18605121ecf7065af9ee3ePKS=PK V (7bf801c083613a14eb8eb9822b289ae3deea74d7PKS=Pq](dc4dfe0f81489b5ed47d3aa07fa13a2784b6d23fPKS=POY(<fc10aea6b8a1c0b40028e58198bc68d324d15aa9PKS=PU"((178315abb9cbaf27f269672bac6f42121cf55bb9PKS=P?ಽ(ַ6a3b738e2ead5f895f1fa0a38b125c2caf18e38fPKS=PQ$(#913c016601c37294c2dbd494c416d4bd0a399264PKS=P+"ؚ(o2dcfa86179898664d07b1b7c72d27970921227a6PKS=PhY"(Ƹfa4188ef1976bea46f728551ada07f57ddaa57bfPKS=P .a((c9cf9c9d77f3c834fbb2b0414afc7ddce4f9b639PKS=Pڹ~A(edbfa975cbae437163050cd898affaf988ea89bePKS=P ̮ (14f6ed6e30e2efb8c397bb89a50b8861c0a50979PKS=PH%^(6631efa3896d21dc7016d0d096add0ecf2461ccf3PKS=PN(562938a58a6052ca01e65441ef21a144e522e020PKS=P(κa795fce4bc21e85cb3de1f26e199b81e05e46cb8PKS=P%%%($82403e9a3c1fb74ef66da182a5fffe46731aa7a7PKS=P%#(r12b8ed383aa884c83d805ab130bdabeaa2bcacf7PKS=P$A(ݻ31d2fac9c97a8a22332745d93e80d41fd0cafb96PKS=PBQP((c0c0184000f19289535ef6864fa87c770deedad5PKS=P(u558dd27c27ee764045c8e532c3e748acb3a08c11PKS=Pew0o(¼15395c33aa627c384a1c6084618824eed773a4e4PKS=Pgtk( 9a9e56fcead341c3dbb0333764364aac66489571PKS=PE% (Z097402897a2632a089d665433236b8b7d4f89b9cPKS=PF (ee4c0c63ed7ec56a51ba3d73c5f1037db878aa02PKS=P]0(8dd9115e2ef57b46306581f92b4c2af4d982100bPKS=PQ# (G293a5ba1d38141f38dfcaac6026ac27f0ecd43ecPKS=P|E (188ba818f2ac56c72744f50e315525299d1ccbaaPKS=P9(4d2216bc6c8db363c99457bec0bae83bd8bec2caPKS=Pq (g54b36b28ac7d6b9fd1e5a6898517fc4c2f241539PKS=P (476c42c128f80001f582b6168889e6f54e7ab4e0PKS=PcW˃(49734afb15cbdb2cacb46ef7f78f00c86c75de79PKS=P# (39ce7d6b9647519d91879e96827759640efdd9edfPKS=Pi(68ab9ed9e314673e87372c72215bcc525ae2da82PKS=PQ (221cd760fd63b6efe2d40e58d986c43bd522bf10PKS=P}S?(5a4ac9e47414be4087af37d673d1c79a900683d3PKS=PH#(k1f32ce95d1e142f80bdb905b1ca4cb3ce46c887ePKS=P (52a3eea77193ecd0a2fcfa73dedeb84a2fcfb68aPKS=PQN (20243ceca6bd3ff9530973c97f44f2daeabacabfPKS=PTӐ(ca2edb3a1db57309b4a522d03fd7a841f1df11f87PKS=P+] (7504f0d4383d7137c147e45f1bfaca18ac97f4aaPKS=Pt](0d0abf89c9aba41f77e9a030c1822ee418727d98PKS=P7(L75ff96b1f08d948ea78b8d0823866917c24d87fcPKS=PB5(227e50c6f954f14d4fa116803a0a21035a343b60PKS=Pw`(aa6af75e3cc6557a533e8bc2e746633398a443cePKS=Pe(?4cbaec006fc759132464952c76fbe2067951d9a2PKS=PX)z(3f8a15fa7e0716523af6eec8ad15bb9c831f6d55PKS=P8 (22f4f30e2fb931b7f00403fd3c20a1e77d759948PKS=Pn@o(&52955966986131bc4078d975430ae54c25862112PKS=Pu՚(scd74f9513c624b9a588a7d064e49b43e38493808PKS=POQ (dd3a69810f76a52ae2f57ab7e6bf7e6170a56c9fPKS=P\ u(a39b50255769815fe1b5dce60dff1722ab3f9bccPKS=P(\e5324b16ef7238d8f07b86eac81271c7875ef2fePKS=P%g(f0626df2075623681d032d0d9d6fcb5d6656af8aPKS=P<S(acc475db3a642dc0f8f30f25c61e1b8b4cfaa0c5PKS=P,a(?b54664965911c6fe91e18cd01b68a75c8183b530PKS=PG-(9b38f5fd06561162cc2f0421ae4c7aca24334a6cPKS=P\y4@(d15392cf6589465d124c7ee5c9f16a70320226cbPKS=P9(M8c2631887ae7b39a35b219bb8e00508e58f339abPKS=P/(2dba114a12f766569dfcc933913c4735ce4e9ae3PKS=P*~(861a62fdca0cca2ce052edff862baa4edc588490PKS=P~.[76(6f91f55eb7339a186f9870840af19d37bffbe14d6PKS=Pw (32d3cfc032c5a08232c366af5205f306daea9883PKS=Pa (f823444b5803645ea2794c21a417354cf4f2cce8PKS=P'(P7ec180d6760ebb1ef7f1dbcc55390deb587d77a7PKS=P(36deef8699fdad1be9216e91438419d1d3679eebPKS=P<܂(c4c2c5c82122e60a7824f07a6fba16b15a1c8144PKS=PDD (49857d517af09990488e27e87bc5ed7d86f491355PKS=PJ`(91b57f79449c3a9944f00606aa6a82b50bad5f61PKS=P| (96067476cf1b4632a3699b2758d3e38a602f6d6fPKS=PQL(47d61fd9512b417a64b07b8d7c2f76784ec5e2ecPKS=Phi(m0c0b1b04a5c0ac357059c9bacd49249d49dbf3e1PKS=P#; (9f3eb7b5ffb21bac65848f9a67f9c90dd061c033PKS=P(B ( e8c2303f67fa03d3e9f736c007d958764d22aa8fPKS=Psz(]becf42740ac3cfb3c5856fe16286c339e53a801dPKS=P(e672526282c3421c793a84b4145c917e3c169c33PKS=PE(1e6b7286e92a0c8d7174a60709d300a4aa546d70PKS=Phn (Ea19bb061dcb60a7727490dd383fa512d4a7f4070PKS=P.(a8a4f107c78217a38eab950a64e32e4acc367b2aPKS=P- 9 (af3f788f3fc4b8c5b1a756a5687b0815b92f5ca9PKS=PZ(491861108166c6de3fa1da1541224fa79a13247f5PKS=Pc (03237b4df49331fd9aece72ddd80810c5d25e124PKS=P (16cdbc76ef49b7f31e4da42c4a796a0702f94e09PKS=Px (e89298025bbff35f725d45b14bd76c35eb85b190PKS=P4(h5226033afdd9c14555a197323f7e367b12a1a6cfPKS=PDU&m(320709bc8aef45bc35cd08b281d670a4f716eb49PKS=P[f(338fb8d054ff64272056d16254ac789dc67c54b1PKS=P(Y(I7bf8f7e1de11f80a409d92be132465bd6028d709PKS=POD(0f1ded751f4e94a3422b0dc8c426ad238bc1f81fPKS=P( ;6(9b928a49b01646259e5b66e9b7215d61297904a6PKS=P:J (S6af96fe46aa0c6c8785ae979d1ce3b54e3c0f353PKS=P&(b3879a06cc60fac28050a5ffa811acde50ff90b0PKS=Pn(12a108258a021985464cd52b6e660940173d083bPKS=P(7307afda8dca699ed0fd78cdd3df76b0cdb078ea9PKS=P[l(7684d37999f7b84632468a9ad6995b0f80695d6fPKS=P@x(fad2cf426af5eb79869c9a8ccf222f32896008acPKS=P (+0446d2ec76059a54773d81d3f80aefdb467b5f7ePKS=PȾB(~a29d4a0c29efba3d5aea283bb4ecd59a200b4320PKS=P3(5074d179d9371d9bc92179716e5dc06a549d6b1bPKS=P雦S(5b9072ff57aadc30b6e9e7fed8ecd032f3621b3aPKS=P# j(tc4fcd66f49b9db8025844068ba8a13900c803b56PKS=Pf (c6a61c58b4253ea222389cfd96bb7e0519a8b762PKS=P!J(!01d82aedfe6172e330ec86b6404d3751ad238548PKS=Pρ(kac99133e64b0534d51021cfb0c5c1234827381f0PKS=Py}(f046b188b7158256c378a33fd551e2ea3fb9f7f1PKS=P 5(46a82c3b5d30e2b62de044507d21d254e04c8132PKS=P}G (]0619c305f95778890f7c53d1aeedd0f1fdef9de8PKS=Ps(68e3e99836365417cca18461b4c28460c1687dbaPKS=P%(5ae5229d1bf3b93a86e3550629f4355b0ee388ccPKS=P(I6e2e40f41013907d7a57d27414234d8ced6087b2PKS=PQ@(86bdd1abbeee1ca694cadbade2badd0d7f82d175PKS=Pn w(6cc66e23b0fb9514d3c1918d4af77e1458491c32PKS=P:L(.d9b9c6cde078eb45fcb76cc209c82c91c0791ab6PKS=P|.c(b7fbc6ce0e87fdfa59539b79df0155dd8a5ebf89PKS=P\ F(48681c49433102a0259e5e3f9089276b1a2c7aafPKS=Pp_A ((0ddb2e793e5a72cf7cd15e9e029f77bbfd2f23a0PKS=P (w047976b96f6cc3157f997ae03d03e5316c251501PKS=P)# (5bffa09664dfbbd57dae386400059824b362b60aPKS=P]fN(134c48c1b8d45508cdd2cfe21450505b717fbfe1PKS=P ~+(49f517c255905230bd9c0a9973239ebe95107b6cPKS=Pm(N0f355af41f394cb95d92bd08834cad80ec670e52PKS=P]{(c96e6b322d3e11b7dcb6510d5bcbe0ec4f81e4cdPKS=P͗%(d3b6de2f7beb0069d99b071f7127021ea89fcbabPKS=P[l(_cfb4191e476f0e9d48898353195eaa29f7abd3e5PKS=PM&p(9cc604b85b147abf2678e9a33784a690aab0e817PKS=P(bff9cd3d2942e27ef1abaf545d8b0e0b86603731PKS=P P #(B3ff59598186707992ed95087f41a70a2ee57a6a6PKS=PW(fe5dbbcea5ce7e2988b8c69bcfdfde8904aabc1fPKS=PDQ(9f9a9c742ecd2c870957870d66f4e393990a8140PKS=Pc((a0b10d94a662ec5c1b3fa7864ea6ae74a10f9e63PKS=P(a333bcf42f963d51f4fb7ca3ed5f4e75ab7e51c0PKS=Pӹ?(c9d74347026eca85d45b1bf009e9aea7325025d4PKS=P)6T(ec52756d7d08e8f5ed0042885497e311298e57bePKS=P s(\7335be088fe0f937e7740d1e7a4c73e378ccb718PKS=PˡL(332343c9f201925ecdb9117e0b308d42c1d61149PKS=PF (d5daf079c0020941d21bfc9b8d71768474d9ead4PKS=P ~ (Cad044971431ffaecafafe341cc92fd73ad0d20efPKS=P/6(b854e7e974980afc2c0e3fcb9a17cd57e24a96a2PKS=PX(c0980a443e30c663b4d5f63db366ff22a3f189f5PKS=Pwb(/395df8f7c51f007019cb30201c49e884b46b92faPKS=PPH(xc9f56fbc20b229567690cd1b9e905f2f2c5dec22PKS=P G,c(bef77460c9b25ee35d3013c8d626d4f4f662144dPKS=P ;(99c09b2a2aac86f201568292deafd140275e1014PKS=P+oG(dbe81dfbf5a5a164cac6c51faf12dae1404ab2ef7PKS=P8A(c4a03739c3eb2980213c29f780fb8d5dab5efff9PKS=P4H(71c30805f622d14d03cf9bb946172a3279f2e116PKS=P(Jdbaf209eb755ffc000c85f61981e4c374f65af61PKS=P(54d0a8e1474dd8c05782cf93865b2f446700c8f7PKS=Ps&(44af6d9e1845ad4be3a1378c104f4f14168496dePKS=Po(06c47346137697fcad3527247df5f05f915ce8d31PKS=P(TF14399288503ed6d704025f80c6bb5e0b6afa0e92PKS=PsH(Fa159f0f856e7ecbeae1cfb4370887044da0e30e0PKS=PJ (Ged4f5872e74144a7ce1da16eaca52ac08bea210fPKS=Pc6K(TGa1a158de9bf005c68fd03f437f22e7fb004aa82cPKS=PҁT(Gd39b286562eff3203a691808fe30010233d6c90aPKS=P((Hafe88da005dc8f6f51de7b37bddd16088357e36cPKS=P(|I003655eaac2f8db736c5ce411646d6980914b009PKS=PFH](Ic75b2602bd360a460dc6923af91760273e61b6f3PKS=P<((Jec5c91d3848d2adc41548a19b5179c37138ee6ccPKS=P3d (vJc9b583f5e85de9dd35d27544d1aa3d5a61b8eadcPKS=P( M4c74007da15fbb72303693690ba86c2e387d6926PKS=P H$(N508735d6a8a3527bf803a0cf5d852d0d93f36be4PKS=PC(RN063d28a65f6d10fa31007286bacfa9f9699c6619PKS=Pjws.(Nccbb50edd5ad4f04a71f958b9cecfcc9554cddc9PKS=P(N742269e46fde4b705b001123f783b37d8fcd9011PKS=PCy$(HOe106d2c76353843785669d5e3b86d0bbc24f4cbbPKS=P֑i(Odb2314024c8ca29c23dae00b5e1c2253f077ec38PKS=P7a (O130438e74faf391f675ea3477af45a40c0eec8e5PKS=Pj(/P5ee68621eadd822d0c4aa6cf269175932c400507PKS=P (}Pfc29cbba9915ace00df20b4d30f33b162d165ac8PKS=P]! (P5f05a94e5af551eca748bd4654bdc1423578b747PKS=P*(#Q6ca3a8f465e204e1ab38b83fc9bacf88ed18a43bPKS=P\J (Q994f82783fdcd713d6ee0fb818496778fa1d3e81PKS=Pt9F(Q88baf05e8c6561632988b6e03e71b01773fc5ec6PKS=P(tRfecdee61b6bee995f234e802fec0d8536b529500PKS=P^/xݞ(Rd970cabc832b32550245839970286a8e0458e419PKS=P)(S762f5e7e8fc3ccfabce45166156b87aae0bf2026PKS=P(& (T09ee202d86d22a298146018897d15cf2cd7eea0aPKS=P! (VT540ba08fc513440661b670d64ba4e88dd7434f4ePKS=P=d(T0ed7b02af29543b21fc857d6ee4f0df70795268cPKS=Pm (Te18a25265e340d3e4460f99fd0f06d502cfef1faPKS=P(-(CUea711f3b0fe0d0b4132e47b37935559bf63fea75PKS=P %(Uc69c2ac712ce5c61cb02e78627edec94f99487c6PKS=P`w(U6c16c0e4ca0c6ab86d3deb80d6551166bf43fa7bPKS=PK36(CVf1c9b2d7fa43825780004cf79a8ab503b1f811cePKS=Plo(V81928d4cd0e8280546551dace01e32b4d9a18667PKS=PTs (Ve9d64570428957a13fe465c1413345d2b5e0e50fPKS=P`e(0W97b773180609dba85b63257c6fe89d98f7a5a61bPKS=PI5>(~Waa87e4a99c9e7d14f61391edb6ee0c35dc40ebd3PKS=P#(We84c936ce61a692fcc5a402b3b9b733592ba0b67PKS=P)h)($X6517d17ab35755a44d2185fbb89ff8033e19bce3PKS=Pޛ~I(^8bef3eed78de4246848a9ca68d11571d4a29524dPKS=Pje,H(^c489f69e64e9757d259567e0d7597485fdadb797PKS=PP!([_8f5b5f237f642fd750ed2e3ee5bd565f5affd2d9PKS=P-d(_d4e7ad2ea54db3441a278b77a44a1daf8502a3caPKS=P/ (_a3367a9d5ce6058d0ca5164c03512b168d21e949PKS=PH<(U`91d10b9e3df93471ed397bb6fccefc69f3b410d3PKS=P#XA|(`643ddfe45a6641de9b3efe7c5aea985b474aee51PKS=P}H|2(`3993f3a87644ed5ad70262a69e9bf72bade3e883PKS=P dr(Wab2b078302144e6856a652da7de542d7791a35f6fPKS=PY=(a9a7dd99b04f43d751b5db1e715c021f14e458b6aPKS=Pa?V (aedad4b6018a5ebc126146ed2d3183d2b46a57624PKS=P$`m(=b537371211ed0c6fbce559910cf3cd774cad0c4b3PKS=PIܺ&(cb6b5bd44dbadf5ec1e380195a11af7e165dec7b5PKS=Pd6(hc004bff150fb41e5c83d07b0c658b9ff33d4b5fb8PKS=Pqc (c871af868663379c3ef3b19837e3d8fc5aa3682abPKS=Pn(dac20e07fe1c8a0b366a72d34acebb006cfbfb66aPKS=P۝(Sd211435768a027d47919e909f28707606ea7458b0PKS=PO9(d6fda1a7b6bdd57a93fc258b0adeeb4b439258393PKS=P3n' (g08883afa2a385ff09ec8eb508f15ded8863928d4PKS=P]՘d(;h6354febcefda9de468327cfb981d5a345df6bb79PKS=Pf(h2f49fc2719fa4749deea24a84a10a919b7df7d97PKS=P= (h999c60bf5271d015008c1c48b845719a6cb48559PKS=P^f ($ib8e250b68ce6a749edb980b383b86fcd7aa26de6PKS=P|(vi62258d6694e3c1297d9c60dc219db36475773ca6PKS=P*((ibbe91f6eac4f52a9e97a227e29380db6586fb968PKS=P\ <(j937fd04f7ca8126fca38265690e33f9573014d05PKS=P2% (cj3df2062023a6e78cf5c62c39d6ae3e5a957eeed6PKS=PW (j61e1d004735c5fc18c9a24710570bc6143ee2627PKS=Px*(k320e70db43d8201a84e7cb07d6b2aa5d8d32a388PKS=P&(Mk10868f9ba360e007657fb0dfc83c67b83c904fe7PKS=P_Fc[(k4aa82d7984ea147d31a8d032ca6b68c50e3bda82PKS=P|"(kac87e016f608fd6289ff3f9333bb7c95aa722403PKS=Pכ,0(@lb57988486cb47ec1182165506dbde6b2db6f8cf8PKS=PO (l5a20f6b453c7a4b7a00d87a35effb69d3ec80d4bPKS=P .LT(la22497b03f957a63e57caf07c4a98c04add84bf6PKS=Pca (Bmd6177c3f5a09ba2f574f7b3a9a188da7e2f634b6PKS=P4(mf16824075c42f07011e6d35ac78e6dee6866bae7PKS=Pp(m68430f2296b868bdcb589794f29d8a2a0608b9f5PKS=P.(*nd72b0d43bb8ee1d7e40ee2312ce11e73d2315c42PKS=PL *j(nd9b7abaf52bc8a875e1ff078aceddce9d1548555PKS=P(n3644b8861a130ea479acbdbcf07f77dcb1105648PKS=P~(oe5dc0d414ce7dc334d19fc3ca66d8e4d4272b8cdPKS=PQ (fo1c99f9535da804e43c04a5ff0e1482496e5a9b33PKS=PMj (o497dfc9651e081a82a90b73f47c4a1dd3f9d8fe0PKS=P9(p623c8751ef4c7c81f86e3ad98fc4dc59568f277bPKS=Pxp (Up2b01eb933c806edd78dea49ddaf79c98acdf0fb3PKS=P(p9a94406d12bcfaddb61aed44d1e4a63c7904b4caPKS=P3uJ(pff3fd21db4964baa70b27a79500fe33e2593eabcPKS=Pڢ((s4da9af5b87f312c567105027921794e05867933ePKS=P2N (t98e181f161fff899d1c30e0afb9c15bf5d46a15ePKS=PgJ(ct2fd1e4bb0ed67bbbbd09cc6838ec4ec30578955ePKS=P(tbe4881a8cad6f9a3863477e3a6535fb51e526485PKS=PZ(tbbea897083f01a2accea9782cae73805badf7524PKS=P _B (Qu873222b29f245fd4edef10959060b33c6cd35789PKS=P2(u4cc3a39ce93e5436827c8445b0c7a76272cc7d4aPKS=PG(u0148da356a7120c5500ff1ab6ac4879ff9009066PKS=P!T24({(v9dafe940e74b4a3a8b5383360f226bea08c6a21dPKS=P^ا(8wda0e0d7ce6bbf7d1d36eb59f50fd83ea9bd58450PKS=P9y(w087940c4156a7c3bcd4beaa03b657058d2009b96PKS=Pxi(wc0403efbfb8af1c948fb52cf68379e3288307017PKS=PtU( xd55efbdb687da5bdb9ec92fc8d4eebb2a0ca33daPKS=Pes (nx02487239abc31ac04ea2a54f74cf5a90d7bbad27PKS=Pb?(x1d5906aa7de6e483d18bce07147c97e23bf2073fPKS=Pv(y8f972c621dddb3a59ba9ceee774f4630ef02b2a5PKS=Pe^n(`y655788646a397c967533daad1cda14c7dd898dc3PKS=PA2(y6004224ce2343bb0d8c814ce5e3400c6c3ee51b0PKS=P+K(ya9a5feb40f9cf793d37788337b7a5e643e0e4944PKS=PQD (Iz1991a9d8a568f24ef3c0e3021e0666cfeb58df43PKS=Ppa(z5bc8185ad6390e1df9bd63b235f83d137fb0a528PKS=P> (z938e3346d9e44a61d4aeacc94005a8bc95efc856PKS=P(2{c77bed234487aa2cf95e30ffbffad6bc4116e949PKS=PC_({34774e5d1d997d51eb02cf1d81d47b44a708946dPKS=Py{<({b1dc2fca4339a8578057fd5dc57052b92e6b1e4ePKS=Puq(|7523cd920e3e4203b12730606f0f37e51e2ac6cePKS=P!6(h|9861866f6fe9ad66ba245df7cbec9dc1ed121658PKS=Pݛ(|650ed08cae2505530050f88bacfffdceec08d80aPKS=P*(B(}7233bac232eb2d71d43de9961479708f4cf79bedPKS=P|+ (@~e0d01f90ec82cbe19c44a1317ef277bb4b7d7836PKS=Pi(~9cb46929bec421ce528502ec6eb195c91855da60PKS=PV|X (~595d3aea3f93b9f50f16393927572c0bec43e81fPKS=PQ (*593b26c8e3becb5915d52ec0a4557f35752638f7PKS=PX({2ee5a68af388a9c78236b9c36c53c941c8f66dc8PKS=PCy(6428dce72e0a57dbf5e76b8bda3dd5e4412f0fd5PKS=PI #(739b8bafa8195467ae0d7cd405fd8d5b2748ecaePKS=PBM(hd3433794224b63a48bd78307f83727e56d39cb67PKS=PJ1(6b3486cb853a6c063b34840011182e3bdf30ab37PKS=P̌le(09ff595d46a1c0c14c69ab15f4b8d6b32e9de14dPKS=Pt (Pbc485c469763e43697e9635bf1e239ac5881c117PKS=P+ (f54a7b9f320f12b26bbe4a0214ed17b6d8c57d6cPKS=PuU(86a9b77d427f3365a2a05d347b98f93111748242PKS=P[` (d196e67e05cc96139d9442c3d86a0175e69ce4bePKS=P(*(b15064a510a0c8d5e073cf31efc6bd62eaab2e2bPKS=P)IS(P018bb902ba2f6ea7f37b7278accf6aa04e86d76dPKS=P;0 (249ed8cacf536966be36619f2d8b24589eabc552PKS=P҉A (d96ebe7f38b8abbcb2e37ef2c43dc83d412c791dPKS=PL}(:0e4b56b45d2b28d04fc2677175182d44dd8227a7PKS=PT (5409b39c13324ba4aeddf597f1d7dbf8a90a7113PKS=P(څa129eff4793cc020342fae86d2dd28942aa4159dPKS=P (&166670119e67c42214e6e70dac978730403256dfPKS=PB(x6874c27c18d74d2f4a062cad4ea481ce7b69befaPKS=PKʧ@(Ć6ebceba2cc2d3793372272aa828d6563dd097b52PKS=Pt (a046429406900470d10d7ab208a7cd71b8c95f17PKS=P& (b2b9cde9b49f460ed65e23cc17e37e9caa62d4679PKS=P=~r (c85ec95afd9683360c8800b11f7335b391b8f984PKS=PFz (a97c70ca44d38c4cdf8f6a8d52caa37bf4e7f704PKS=P9O(Sa14d45a3dbc69ec0c73220e880478219f4342f3fPKS=Pu (0554abba54fec2376856189157b939195751a5e8PKS=P (c5ac5bc60d683a4ff4b37f6c87b024518a265522PKS=P#}(?e3e795b4cd51c09cedad7a911f92c60adca886a5PKS=P12(48310611e0a0ea5ee753ba34a54bcdbce2b78d33PKS=PJX (973aa2af55e2be727fab1fabce4352dfc8a46ed5PKS=PS6(1437fd8ce17cb49b5d5de875bd4154dbda42f598bPKS=Py(fb1fc4cc03cba936cb0f6ab088faf62befd162f3PKS=PҚ;(͊078b3c9104a5e1bf9359d4cb544b672835d0455fPKS=P =[(4ae76da31859e2c15b2b9479a877c8a03a3327caPKS=P6=(ged838a6d0db7a4cf5be1d58663a3c9e585f7a01aPKS=PeK6 *(ed7cce051e223d4542e175dd46014134b54b3393PKS=P'-9(1454926f20e0837ce1786239e4034ab909133567PKS=Ps!(e3b7c05a9fafa62a19859bdffec1bb0a601d5bd8PKS=Pa(c87e6adb160a857488255f6f114a74e6a98c83bf8PKS=Pn;J(5e6fd0d5e1f74187cfa141ec3f9a7eb72af55058PKS=Pو ( 4c6c38e2f70f356e629b111f08a9c47e76abb0d0PKS=PA| (Y70e383e1e56038c70c90ab0d42a8c07b86d90e96PKS=P QN (9e6b7a0d37fe2fad512c0c88eb466d25fecb6d91PKS=P-(0737f18fe0cd4f8faca94798f666874fee3f7709PKS=P(Fc4f922152f80a58513278759accf7d3a8450dee6PKS=P(45b0491239780cb86d4b52768aeb06722994f225PKS=PJ!(f437459b8ae3044a8e51649bbe7fc5a71a343eb8PKS=PU(7a3dfc0c77acade0ee48dcc73e795a597d0270a73PKS=P`(00fb2ff451c5314114955fcb34262ab09d96ce56PKS=P D (ϐdc62c5dde6c7fea0a593bd8d2e4fde5447d2ffefPKS=Ph(ece1197d56f2420c2e3f7a101096dfe9eb23fa8dPKS=P² (m325871cc42178730170f62d3a52495aeed22bc35PKS=P_C(d84451838595f2a51d20a36b424eb235bfab21bfPKS=PިY(E101390d20a8a66718b52cdeac55334b4c53db3f1PKS=Pam: (8f7de639b2cada43b548ed9d887e14892c96f803PKS=P-0C(cf7a7e3d0993d2387e6522640e2e954cd7ea6fddPKS=P0 (Xafca042cdbc3aa38ce157025b8f0213a934ee14cPKS=P"(6735cca6f8f05c5d3f750129636759c6accb0c4aPKS=P$ (5a9efbb757586ce022a03ea17278787d2746f298PKS=PL(Taf65f8f415b2627c2119e51bacb90a0f39913b55PKS=P<(738f834adb32e1d07b06b26e50438839fed1c7f2PKS=Pf%_1(6ee4b892035dc38b342c01a4cc979fde94c53fa9PKS=Pk(Heedb68bb0de77d3311701cecd81018fe5c427157PKS=P (21c033fd0e0cf28e7889d16c50293623005bf16fPKS=P;n(b8815ccdcd9af089051090c817253cddce8074caPKS=P,F(-60b9be2e6dbc24d3d2e35858e60b9640efca6f46PKS=P"+(5f0aa2e37d6b9d27a29db9ffa038781f07b7c743PKS=P,(ӗ3898f220aa82feed71856b45de07fbd6fdd95999PKS=Pq!(faa152671fec0dd0336870c7d89bd505d1001cacPKS=P(ie814368e7c84e70de848e7156c7caeb6dfcd5f8bPKS=P0|(Gae9aeeecd4a1944f96b039bc76e01bf3488e6c7aPKS=P'(1f032cc30a9964fd82baedc27bc3fbfba58eefddPKS=PFaB/(023f3a82646809d9862756ad24a1961c0117a57ePKS=Pe9(G8952e817bc1bbc44b4e7771d12a67457ab936ce8PKS=PG\(c9de7edc51d3f599f38253c6effaad108281a2ddPKS=PB0b(ecf34eb1c2bc7ad45bcd1f651ecd31ad5b201b6fPKS=P5(Ma63d0682d4f79e2c7aff2bf1149d488d8e70dd10PKS=Pe(d1d25603628f2dcf15485b20552e226655cbdb26PKS=PjW(ba48f8ad5366e1e1ec07fc7a99b7c32ef80ff5aaPKS=PYj(D980d75af206153f6318da5b06928d15928113126PKS=P}VW(3b0c434c1bc8568aaf0ee65acffbb1d76148ac54PKS=Px<(56e34615da8a9260deb7a3ab067d0c0e496d4363PKS=P(<38651cf55839a6411e23c2365ff16670ce8e113ePKS=PkzZS(e75ea6567dd13ca458858942ac52d28c9142db27PKS=Pt (םe6fdc7be984329150f100d511b4d58686da12c6bPKS=P8"('97ce88a0f19ee5bec346a68b8d45745cd9891444PKS=Po(0c29145c303af48b0bb32fb6a0751db6d7a235fcPKS=Pg(F37e43db826efd8bc33e209f9e7010f3625f56cfbPKS=P[b(a3734a8a923e51310325c4241d30c6d0d4f64343PKS=PT|(fa52b8217a4076f64b46cecf9f3992d0edbf303fPKS=PD@ ( d6e49e36f3e5d29b2289d67e9c7fc2902ed14bf9PKS=PU(_957a7b39e363369692b341bcaac266cbca7c7f9fPKS=P! (78ec3ef6899d982aaa513b53bba587c8c0db644cPKS=P_(559753dad8183048ae135f753199dfa60f381756PKS=Pב{(X548986497f5d90cf51a2cc30a2c39185656d6149PKS=P2(e175d7db97e7cce682cd4821bd59009dd11e747dPKS=P)*@(28e85ad53d94d285950cdd797d8b52bfe9834ea3PKS=P4(Gb8200966db47046989abf8ca253a62c7fe4be798PKS=P#m (dc4cc4cf3b2d8be5fc74853fa2fc50df7eb83effPKS=P (e7515d9db96fd589a31f15b6c58b0c6411b59ecbPKS=PJo(@7337070e10ba097f10dfe76fe7e2401a4e4acbc4PKS=PS(47866b10414c7b5cbeeb5af11b0cef74347cbcafPKS=PMQ)'j(3137c8f6b32055d9fe8ede7f6c2d6abe3d75d089PKS=Pi2 (V542bd3d92f83854980352a62c7c8e1edd2ccc039PKS=PJ3(e448c9355f502a6da64afdcaa9226f723115ad09PKS=P=/ (߯b96f28802bbb4ee2b147715d14665fcc509600e4PKS=P(b97cfe6c5fe93c753585e668ff3df1ee5b1cf53ffPKS=P;0(c500f555e0291857b50bfd75d8f8f5d65d11726bPKS=P2)(345cdd09426e366280d230cdbd9ab954e6e51e3ePKS=Pդ (R9c8e06af11d416d77afd691572b38fb85676edd1PKS=P8 J(090a9309841c5287866b57363c4fa4f02889da2aPKS=P̣ (940615cd19061aba3b42a8b584d3cc5e387e0120PKS=P2> (Lcef9a77808fc18933be712bcb9f7bb5848b874cdPKS=P˾(dfc60028b1ea3c1f170321cc99d93e9591efc958PKS=P/>}(1f29488b86b6ee9a90158031b2a30dfb2abd3176PKS=Pö (@45b5712d0987d27553eee30ce4450f1c5c7c47faPKS=P_ (93869573a68f7dedfeb1000374164bd77a82e2fbPKS=P쀏q(ݳ80d2d68994b338298695c08fe0e58b21fa2f5746PKS=Pw(4a9e8579edaaf634262d6005e3df1f92532ea84eaPKS=PRe?(~85a887aad8781c4d2c446a4910e59f1850fa374bPKS=P()(ȴ241c9fc3f51a69a5b463d7c7eea6af8ef87d097aPKS=Pq^P(&c75c3c69716981bb2e1fce26bf352ed966e10192PKS=P (pb3fdd06946b756df0165ceac5013fd53fb22266ePKS=P22(õ75075308edb2e18e29778135f84ea4df1bca7d0dPKS=PG& (62202ff91042c3a186d8ff4ccefb48b6310434e6PKS=PBl(m811fc8c3d69f6cbf5ae96a51e14acb6cd2a03f75PKS=PRP0(d5236f45ef8516c7d640281f31b8adb78f4974b3PKS=P (8b409f6e5362e08443c2bc4555f0c033317dcc1bPKS=P$4 (T9333d9219c8f0e707682dbcc1d17c79aea9a3908PKS=P  (146e531845b0b36255e3b52698a1f5df55894ab5PKS=P&϶ (e9032dc54ec11722264d103236678f9119f584abPKS=PҌ  (?91f7127ff94b67126dd55df5f7a3c34ab24f6079PKS=P/#4Q (87fe656eb11e385c9036b96ecce57eef3740e369PKS=PT(߸51dbb6fbc8aedfc4c77ca86d94a594c16f6f360aPKS=P`0L(-f9fe9bd8a6ab95b33807403d8f23282770a957faPKS=P$i(6479d3e4658c3eb9f4a6739c39059058a40a0acbPKS=P㠐 ,(e8815f19ae6198da5d4dd980bd4a254ee0c697e0PKS=P+b ([f0624e8bb2e960491c1ad4beabb6cd43eb8691b5PKS=PSʌ {(7384dec70dc08956768dd3168ea6bcc4de0a5425PKS=P< l(ffc693a467559841f0dcb55de8f9e51bb268d37fPKS=PG7 (P67761907083af27279eabbd3c5b428c34e198f92PKS=PT(6ad753724c01f2baa01b87a542efa040cc53577bPKS=PT>d(90e0f7c0969dfd39f4f71efcc968754e322ab1b6PKS=Pd(Hcb00e8058ae46a7c6b20a5046f41e3e86bb59163PKS=P6 (738baad5d2b20bf0633aa656702f389fa56badf8PKS=Ps- (b4853bab084d540f96678f8f6f534ba307cdca8aPKS=P g(Q531a1ad8f3bd777a54335f52521e3d6da31f1ec7PKS=P~x (d02e27f986f33edbaec20325df404202dcf6172bPKS=P=(6e354f8e51a2ce887bd96b49a4264801282f0f83PKS=PzT(9a2d396cbbd7d17bc9252dc12ce14a15301a8414fPKS=P+Ҙ(a472cfdbd1835d4d6804ada3fb5e6bfe0551f20dPKS=P-Y%(Ѿ6c44eb8676753cf4d3e61b963893a470c801d1dcPKS=P]fGY (%890354a6f7cfb0d5a177714d995144102f06c9bbPKS=P t(Ŀ38b9ba18a0c1550137499a60ac079d7f2919bffdPKS=PU] (df0ae3e9d43c97778297e6967944bf290c6c53f5PKS=PC. (^71a880c6b0bce144512be495b1d25595dc263fb0PKS=P"T(f16d078f466eb3c5118c8273925e75da52898fcePKS=Pޕ(5ed2d90efaf1e86349efbe12c59f154f5c76e564PKS=Pt^#X(L7bbb99b10ee9fe1755e995191de0362931fcd72dPKS=P>(5d477ecd967a07bcccc9ec10405a8074c3407dd7PKS=P?"6 (f01946684d5bf50252113d39fc579af81bd47072PKS=PÌk(O598ebc70d57bda33378490345d822b0d7eeb86caPKS=Pȿ(1fd84ee194e791783a7f18f0a6deab8efe05fc04PKS=P""(d7d967695f7ff2b9c13343b734ea5aaeeb6e0e13PKS=P0W (C54cccc20b352358724474d125bc4e30e12212695PKS=Pa,(45264dbbde073c4fe2e4ffe71a75f2d4925bbbcbPKS=PZ(be8bb89b2d2119b2e0f6449adb6dd6b4b6fdc69cPKS=P.%"%(1214f56bd087348528484d34120e3018e513d25b2PKS=PE(e53b44385b03d72ffe25ebdbf9ba9fb03f196cebPKS=Pq(437a354fc8c0b9fe89fcb1d1e3462c0b82084d40PKS=P>(18acea7f2c4155241c7bca418705fbdfff23459f1PKS=P@͚F(|f302b8f8f95ac42cff7c3e4c394f7fa5f69da6cbPKS=P(cf38c2b48338e7ac351e9def0103e171c5feb38fPKS=P4(dbbdadd4eb745e3564312225a40bb3b804cf3ac0PKS=PU9(_1e8613544eb9ec01e48d73b949565847c9413521PKS=P`w1"(5a7015febcc62013f72774943d38866bf0b7fcfaPKS=PP(9be082a0c2ca1b273e301a00c45e824361bd27e3PKS=Pe(M47143ce31e3be5d28a2c418337c9c96f17d448e6PKS=Pۺ9(bb1816ec2ac4a60dd3370cafefd6e12e1a3fcc10PKS=Pj1(3db57d77661b1a8fa6232770998ceed066b31243PKS=P'(=ad77b83375be86c5cbe6d407ad068ad1284136b7PKS=PA r(de9503c9d93d2f538e4739d7a9338d1173e83c83PKS=Pvc(Cd5bd66377778dec6a309d1b6b4c588fe1674b385PKS=P9t (30e546fd38991739f1b0b1279383c0703d11762aPKS=Pa (7fc93ab495b315e875d81c709116082f422d134ePKS=PJ(+22343319539b482b2ac98b21f1636735ba5f8967PKS=Pdew(x6fbb8817216a3222b338c972442fdcf63017a1cePKS=Pv (001480ec1a4247c124b923a342951bbd98cb1007PKS=P6 (057581abfc9fb32f31557e931a25179a7f11a49aPKS=PT (i5f9161ebffe11bf24011e0494e11328f777de0a2PKS=P(sce15793a64604a6389000b5a70efb04de37755d9PKS=PX(3fdbcb0f0d5d011f2e6a7b8a7187dc8eb162187bPKS=P{#( b379f5f39108e0a270e5a5a32b78a1ad64c2f242PKS=Pst '(f2976766296b20f0999bc284bef2c1b4b5b1670a1PKS=P7J (3212d72b4352f9226d26a077c72af81d980f803ePKS=PPek ( 9d415f3f0daaf5a7f670d51c55428f7271e52677PKS=PzY>(X22eedf70a6d8f798c2ee8b4bc9174535f4ea5024PKS=P?9@ (hc5903948b50eebf9613b0042fd5f9b881b82cfdbPKS=P%(8e2fa8e5250cec10694e9d44539b2ea0decc6b39PKS=Pj8(P6af56f656a608582b6e45cff8527964824e0998ePKS=P';(fbecd29d2d422e7a754ea76e4385e4addef3bb06PKS=Pp -(989b07231468f4b8f4226e01ba39e0fa0f803688PKS=P]{(9d7ba074cad9670508e45232cf96b7c8850234fdaPKS=PM(241f87f4c3566bad64d0359fd3a3ac4052873843PKS=Px!(26cc693ec6546ad5346fae2188e82be80604308aPKS=P=? (%3868508a7596867b0e50defc79cf0db92208dce1PKS=P}@(ue6219284a3818d23396ee077a80c9f0bd3b72d02PKS=PIrD (33bd27d8c59ee8cf4ba8e194a3fce215c6f06f54PKS=P 9&("33578325ecb0d49c8f11804eee1c31fd8781c128PKS=P452(7157302a0b7e82b128f3fb0460171c0ad6d4b061PKS=PP (c987ca951c58cb68dedceba12ea671b86890d392PKS=Po3 (N7f3205500ee5c3cfb7ecd3b698eef2a73818f294PKS=P]\% (27b5c3a90e4c7492f4edf76e59525629086ff8c6PKS=PS?(b6603192d18c1e03c145389c4e2c6b359d72eb68PKS=P' (Bb484aaf4dc773881daade9af2c8c625b0fb629f9PKS=P^U (a0724379a35ce80c37d23434bdaaa18d5ff4908cPKS=P-(3cf549454a7253f742b018a64697ff148788610fPKS=P<n 3(7e5db48823d8ba092332877a40bf32069a55a9720PKS=Phb(8d7c6d8679c503a66bac3bc0d81a1a3397b92695PKS=P!9 (de977f84aab7ce3d9b78f99f7fecd13fb85d674cPKS=PiP (#59f45b94a645bcfc6381730fc74aa36edd58444bPKS=P@n(ufd2ccd185c92cc4d83418b5d8f7cdf3bb3d2eceaPKS=P]T (efc18756bafbef7a038b369c36e0881d8a003df6PKS=PY' (07e60a230f8543aef21caded81ad64eea7ccb320PKS=P(^6933178a61c4236b52ace847017b5d889823cddbPKS=P3 (f440216b00ff20c8d35824abefe1478ecb66ca73PKS=P9(2911072a56e57a0ca88e10eaa1df0d576891b462PKS=P#(K722a8ead2d536bfb715ca51c3e14923cd37828ebPKS=Ps4X(1f84056aad79ad2263ac2c3618aa497c23a8bacfPKS=Pr8 (cf4ef01bd13bf8777e4ff92a0b7f3c25c3be7bf4PKS=P (:13508c3853593604299d38ec91a46d74b94e49e3PKS=P@0(e0844e309432d4ecc74fcf1f6c9955f40206ca81PKS=P (9d566bd694d285e6ae183125835a0506e43a2c4aPKS=P (<867cb2db46fa1d38c40f033214c56e2ad54e10faPKS=P?8(e887f22199b12c0b7a62c45300321852a2e3945dPKS=PEH(eee379c79729d35958faef341e67d89fdd612d4cPKS=P/(`5cd94b7182529ace7626aaa7bfe9c460105db14bPKS=Pzf(f05fb1a4e26907553cbc773f22bb78b0bd274ef5PKS=P)!V (e31045d6b4eb22ef2912cdc47bb3cb7bab616f82PKS=Pd\ (R882def76d2c548bd2a646a7773efd377b848540cPKS=P (b878d505d0b4e05422fb4a0ee15408c86aedd4dcPKS=Pg(3fe658738d01e5ff5f41de613f53764f4256bb85PKS=P+!0(?f22ad6bbe90064542345071628554e418c8ea6aePKS=P1kq(bbd13e26c2e7a6464d0fb1e16d21a0f79c37e3a4PKS=P%q (26126642662f0adf32d7a4462dbe0a12d111a010PKS=P}=(A6963caae482d869f4ebd44e2e62e9c3a08bee236PKS=Pc2 (11e6e1b5dda7bb8ac2297fcc26af0d9b984f8b0bPKS=P ((55b03b4d23d7079d344062007de57e7e0e045d75PKS=Pb (Q5228eb61664c552d06b57028a66834e018dcfb36PKS=Pl%(fc555a4c8781f0974f392531b9efe80926869948PKS=PY (a88a2eb2f32008db7d38b738d2860fadab5f35baPKS=P̈́ (72c09f77cc41af0c5370aa3b300509f825a25847cPKS=P6(4a36d0b8e391d25e0cb2c528f18ec8bc7ad84954PKS=P!(bc2ca38eb806201f6bbfabfa445c1381d4b4135cPKS=Pw (37a7e3fcf8f11d45d84e79f61021d5d147238f32PKS=P (k3a7bda7959d3cb5cc752844b814af06343fecf4aPKS=PG-H(fdf1355661743c21caaa1c523fc032b1f62836d0PKS=PŠ(a576d6a469834d05a52d98016d136fb4719f57f3PKS=PͲE(e6b016f19fe97c7809d867d046fdc78cd6f5c8f51PKS=PٳH(cdc896aa20e7b2886f2110fe976d408bedd46351PKS=P _(440f4ac23852cdac54edcab730f39690e588f6abPKS=PNc(l35e430a4eef786909d28a755ab9ad4cef0d356d0PKS=PS)(a53053e8134ff7b8dd022db870b5308346d69b8aPKS=P (b84b9f20ddf44ca76f833cfef11c9e38957cd48ePKS=P7(T07c0b4ae7af04a366ad0d723648724009a5287bcPKS=Pw2YT(4323ec8980cea2466082852e6ce112b57c911d96PKS=Pt& (Ae3e7852268ae8b96f2977d99b7af81c5b3ac3ae9PKS=Pզ(468a57045dec2e029f6bee33bcbf081dc83537724PKS=P.]W(36404d829e6363b6cf1961a5e2311aefde7f4a5aPKS=P(1103d8ad89bd79ae3bad47d15d7fd12cb200ffd1PKS=PR”j("4a12000f043404e76b04898c16596b8f56269945PKS=P(o3e812d5ef64c46e6c01fd6d3573a672288aa27c7PKS=P(fb913af9145cae54049fa13ff74fcfa91c2afb4dePKS=P8^[6 (35ed87d79cbca8487a30175fa36212a62fc465fePKS=P4W( 0665280356c1c0a04f79b29dc020b8dfc872cfe6PKS=P ](U c4a4c21f5ee437a8a98fd768ea2b4a283285f829PKS=PE( 31b803b33bf22682cf89320b29fa6b3eaaf57cedPKS=PFa ( 30418a6d29db14265b425f94795d317b4941e01aPKS=P (= 319d2d45221e676c4422631cfc4c1b92b8e5f3d2PKS=P( 56a5a553a0e88f92cf362fab09fa8ddf09a732e5PKS=P PF( 355e65d66022fbffd9569088c861381194d25f3aPKS=P;() 2d35a424170249d3bed425c8cde658587cba774aPKS=PF`(] 14d5e147b29c819714b3c90afedd1f6186c5ed2cPKS=PVt&( f87aabe4fb19d288cdbe3c2894f5e1bdbc29b170PKS=P>jm( 51e69892ab49df85c6230ccc57f8e1d1606cacccPKS=PUE(Sad0d0c625f23e9a3e739dc78fe2d1660e9665587PKS=P(JJ(b9f9dad3b739ba9cb12931b8438d767dfb973a38PKS=P:l(a4d13ab7db73cb2c8c16bb643241c07781beb7ccPKS=Pdj (A35a349bfc027b31718263621f809afd6697840c4PKS=PR(84e9cca509eb8b9d2f623790f4d7016aa54f11abPKS=P (fbaaba6f117ed9851971774ac9647c7de8ca8a70PKS=PD,(.3d06bf6a5bf304155e9185b422cd1f75b776fcadPKS=P7({670873763c7d65e74e066a83e72ce6bf5d8801dbPKS=P=R(4a1857b3e4da373985af2abd8574709668f3aa68PKS=P# 0(c7b7c64bd19f4db1d80be368a09a118ffe4829b7PKS=Ps(g9479696e260394a287da383355e3fb6c490849cfPKS=P" W(58e68246fb5d1cc97fdc67d699a6c55e4902b89dPKS=P_(8ffa3514664f720c407bf8b3b1fd257d6f0e4e2aPKS=PQ1(O84fd1f7d4bb8f5e1b05a0ee68f6f790e115b3b29PKS=Py (e668c0f55afc0184be7481b964cd98925a237c36PKS=PQ(d0643e9b0d176ddbbe9778c8342840181a6eec53PKS=P }H(Pe5192cabd42946d563f86d5bab497f75049a4008PKS=P}!(e56e91aefc30952bed710950750d4d4287e23f37PKS=PO;(36fa32b3809b0be449f71e14ac856bde07001d53PKS=PN(8bb8b0d8aa8fd77570fa554f3785826a227304b29PKS=P}&P *(8a710eef6f55cf5771ab6513e35fb9cc894077f0PKS=P(62559daf305d1824308bf24b4bcee1a42c1f8b1aPKS=P!(&688ca0ca8834ae8ff08ef94442a320bd169b05aePKS=P((t8322de7ae6a1dc883aecec16db8e2d6e5dbb85e8PKS=PBL(b7dae81710fe407696ae952675b1a622994435e8PKS=P4ҭ(4f374618a3a9dca2730ecb6a1fccd2a2f1dc947ePKS=P}E(Z0535f26ac25eb9c49f1f9fa63ee001224a14ab17PKS=P7(1d4f24266bffd3dcda93e7bd8977aace5b8715e2PKS=Pb(53ad753219171c14e410f57c50477ae4f5d874b8PKS=P(Dd5f0d6a003288e72f5da4ee4f4a14e0e8773ce7bPKS=P0M(07b88745b46c0c28d14ea1eab12a755cce4f4212PKS=PB3(3baf993fa1dc8e5b87ec90533b3f28fec7f54f96PKS=PF (,fba7d300384291e51652162f77b2e49cc1e8f0daPKS=P (yd2031915276cd439cd1c73b5410c07640fdd2381PKS=P2(45944bb68de6fbe14797a29ecf5022d01a3c7fb5PKS=P6}~W(70a18d681e0171a8aded4798179baa4124741932PKS=PF (f497ae960a6890d0eb4b2409ac79b52671323c37dPKS=P (261853fee0d4eb35889915ab1e3bd4ff2c7eeeefPKS=P( 480a302c5e7de369aee98a7a92aa4eef505adbf4PKS=P#(Wbf6c232f4627525c3e2e11a6bfc5a5e580b4f8a5PKS=P".(f0368958ddb449fa090305d706e396bd92d8c315PKS=Pr@5(50ab45700773fe9609c128d9bd6f49fb0fb01a61PKS=Py[( 0d7a4e20550e3063c1368e7fc03e020d72a900e0PKS=Pv(lbdd2522da81819a4b18b0a8a9359ffc89ceef511PKS=Pve(96eda0f8498fbeef09f812a668a50de9e883b920PKS=Pe(5fc4a15cbd660483f3fa6e9073d7a9d6bc95d827PKS=P 5(Q973464b9612093d1851450462253980e22a9157cPKS=P]b(2a8b822cc2792193fe27d831da13153046a6b7adPKS=Pp> (3481da7cb9261374aec2b4b53e3894a03a48682aPKS=PFd=X(=96eed7c125f23f9bdf4060e2a8169fa83e2b9ba6PKS=Pb(d7e32e00e7942b068a6de75e9bf05959b2c6f7a7PKS=P,95(9001e98660eee7789b1765a5515d8c8c706ade91PKS=Pi0(#bb79728a9e4f35537bd2bc87d5a0bea493983cefPKS=P?:(oe26b3e2e7d25307cfc9863ae06dbe57397fe9eacPKS=PW^( 8e5eb68c1bfc803ad5358187eecdb6c85909fa46PKS=Pʝ(0da0f316b415386e69de6a0ae72140c90f76c8456PKS=Pq(076f90afcb3c76a500a1c1949de9dcbd6bbce93d0PKS=P(06639094df2473e493c6ef9fda8378071e76864a7PKS=PV$(2110162f89eba695f0cd83f7a140bd323572f1e3b0PKS=Pj(11711cba1a909d506b85be4f74e76d4aa7a3e3db1PKS=P' (z2922124dd63f2a8c734752dcb787f9e15a3cd01e6PKS=PAD(29eb9d057927b0dd5d37ca67de4cb0a19a60b6a4bPKS=PLr(36d42eb407b709a31701f62e96255823ba815bcdfPKS=P$(8be8fdd329b7b4b1aeceaf114fea34b7082a31869PKS=Pu ( 9c6d528a05d8bdc718546be4f086a52f2de95a023PKS=P@ (o9aa97bef711f8a35fb9c5ddd029c84c9f3ef3fce3PKS=P`1`(9e18b18c12f74d89219d0123a8386d03f0f279032PKS=P= (:f91beec2eb9c427fe88dabccbd7ac6c2fd4f670bPKS=Pp(`:0a95a0dcf3512f0249586315ff5f2ead4e6b0ffaPKS=P K (:1382c1fe5651695fa0cd59ec8d845b5833cad84dPKS=PJ(:0cea828ac6a666a30dd3fb81bfbed58560c65207PKS=Pġ W(I;016336202a9512246c068d78e6ffb368c521d5c0PKS=P8 f(;a6ebdb7cf5843321646d1ea04eb8d175f2526cf9PKS=P,_ (;18cdda7ec20b6f73aa8df20794ba15c6899e9e69PKS=Po)(:<c51d5f63f00e9f0ae218ce110d6e6b9063ed598aPKS=P< (<b89ba28fcbb5513af86ccbdd83a1fc7c3d7d8699PKS=P Zq (<8159bb872f7961412f5d70ae2ebc2435e3b3f6a1PKS=PIV (&=e9e6b8075165810b9582a9879d9582ed72cd8f2cPKS=P qJ(:>e2ab21527bf13f5cf1a52169991ab953ef4e4d00PKS=Ph (>e269ab25d182479b2c71f07a7c1d71b660c0af13PKS=P)(>f0ca18ef546ff20a75a42e3df941d374db875de9PKS=P0($?ffa528781c9ef1d6edf55ef2149729425c2650d9PKS=Pg|a (q?2c67003cc479f53312250f5b07773968fccbc7e5PKS=P (?56d11da809e4b4fe629632f50e9e934db530ad42PKS=P (@8dddef1597174d46484ec256462e353603325033PKS=Px(3Ace6144a4caf366b2d1ab81795f44951450a7659fPKS=PbGZ(A74afe2a49493480e2a7dfad1b7290221406bb4daPKS=P"tIT(A73666755b1250c16d05d61344ca1a26392e3132aPKS=P1|f({Bc2578fed9c1a1a8c30e238808085227e2c3ee815PKS=P1B7 (B103954e960c089f2d147ec7dbba9701fdfb7d015PKS=Pݩ(Cf4280ae48840ccbbfd84b395d3caa75a2f2779c1PKS=PN (gC63dea51e860861af88badc42114776040586e018PKS=P|(C8a4ea9a6400c01285ca2889de493670adcb76b83PKS=P"O (Db03e7007498bae2cdf02d9f4d83230d87bdff157PKS=P~3'(dD97fa8e4d0f0e5ef47944f84f42924ad5feab7222PKS=Pg (D31f65bdef7bb7e900c32751aac302019cde26dcfPKS=P G( E6adf67a8d24dbd9ff2f230f41e0854624d63f3dcPKS=Pڒ (UE1d1aba854c15779aa5fcb47debb2f2a407b3832cPKS=P#,I (Eadcc21ac8602586dcd4178851e463333c7211459PKS=P(Ed76dd9cdcc082c616bafece6d555263536f23576PKS=P_ (RF2b8f4d36bf456d119e6025320a55d36f4198e79aPKS=P1ڵ (F028cb8a65447cd8a37fe382c85f850aba85007c3PKS=P! (Ffe8118143483f62ef873130df466326a49e68715PKS=PPp#(JG86834a328795078dbfa5706ed70e8adc7738dac0PKS=P?s(G6b9b497997339d5d611635b84422b0cbe78d3ecbPKS=P(?(G1e7a441bf84f49aa6d52549fbe0514030b8625a4PKS=P4-)*(OH5253d5c714970c605ccb63c085a15aa3dbbbd9faPKS=Pc=9P(H4c9eabdb35ccbd2531da509f0251bc57319681c5PKS=PXS (>I94537663c8c854a98beefcc3ef4702c1f58db62ePKS=P, (I20f2640716227b9cff1a32c1ab2ced5ff6e1812ePKS=PTTb (I363eebded207f0aa35e48fa8a11120eb8bf296ffPKS=Pv(7J68330cd6135a0f2f26922b06c3439728c523550bPKS=Pp(J67b153dededbd6f942f442fb58cdb673e188df60PKS=Pžs(Jf428a3beef600b21557ff560ff509a93d4271616PKS=P U(K02937537e3045d4b572c459fe540629028e904c7PKS=P\8i(nKa3200d3c292ca197c4fea5bbd0e5d3001ba95011PKS=P%=j (jLed2a1fe9f398e3186ae89da52d897fe4f9568fa5PKS=P (L8e595cce67ff2c4e5b222aba6f867fc41e3147f0PKS=PE (M277da25414d344ce3ad60b30df0260b9ab08f9a6PKS=P}Ud(XM70cceb62f9b08642ab4f383a76e8028510198381PKS=PCq)(M75cf653ef865c7d75c0746e9b6cb94eccc11505dPKS=PN0&(M7e69da30589b7762dc30845983f915cfbb9805f6PKS=P (gQ1e4e81d69ae51d94199f470836c03fcf5399dc93PKS=PJZ(Q4d8159b052451efc61a9699b1da352695bf4c92bPKS=P&(R355ed09e4ceabe0ff67e1339829b9a32a259fd4bPKS=PoqZ] (NR392a5b766456165a1d08ee592959521c24ea196cPKS=Pp (Rc6e0cb278d9094350343c4345daa139d9f112864PKS=P (R5b3a19ef1b85daef43ddc823cb58b1c9990b3732PKS=P (?S42afa8544ac4783e9537bd2689825323a7952efcPKS=Pϸ (S35c1422200891ad74529dbadce5d0868add432d6PKS=PA& (Sb2bfcd9049779fa4f83fad1bd1f2d0bbe02a3740PKS=PRm (0T40805ac5f69debe3f054a05d4df773ed2530f76aPKS=PKy(Tc1091c0a3e74f539ebf377debd39e31d299edfbePKS=PxP (T76ff0d57ae6283de0254767ce41e4ae4d9295198PKS=PE(U445bc6ddc2be23c27f38f7411a3624487f3a7c66PKS=P (iUb84b6c0b9247e861b32f377402f5df21d237809ePKS=PW @(U3b2308698a62f212890d5ee2bd0bcb95b1fec523PKS=P܌( V11f6ad8ec52a2984abaafd7c3b516503785c2072PKS=PG4} (SV2aecaa41e6704cc54add129e7a344b8ae3df7292PKS=PR(Vc56aa6d168e308803e519957c731651c0079011ePKS=P-] (Vf6bf1f1eeddbafeb86247d68e8e55133c9e2b422PKS=PH)(JWa3f94c5ca0f1a2d8b4e711ba57104b55c1aac6ddPKS=PN(W0fdce4537fbacd57339975a4d06d9c2e60946e98PKS=PA+Y(X5d90576439d13c376c35ff3a69832b37d8d133b3PKS=P},F(i[db96b897d2ae1818eb4caaf2722a1f4d142a1b52PKS=PQ([bf5ec6969d6c95f066f051b20d96196133a1aea9PKS=PQ6a (\674c864a8416fcdc44d857a00984600d6504e993PKS=P '(&]f9423f72d11b335d1fe38e20d2da07c5407a7f32PKS=Pu|(t]360f60b5948ebcb4da59c393ff0d9cddb80e810ePKS=Pkj3(]79b8d677b83fc78fc23ca7b64dd1addab6543bdfPKS=Pȷ (^56882bd6fb8cdaa2024b9824c4d4fde76c244188PKS=Pv (a^3d3bbd9c33d138cce6cb8b6d7854f0372a6ec3e2PKS=PDZH4(^9e1235cc36e377b4c939fb058b12a4c045865d56PKS=Pٺ1m(_62037c62e35cef8e58727a6c0b5c1e6d61be5db6PKS=P"(_ec65f4fb1fff6e20c097dead0ac86053bdb7b291PKS=PTc(`24b57a7624e30f31d8e4d8d3c818831b3a3f940cPKS=P*o (N`4b89c8731bfa9d82b4d778e2da0e40fb61163cbdPKS=PMN+(`df0d5366add060e6fdb5ff256f5250ec33d0231cPKS=P(`005141d2185536e855c9b62e6773d3b92974904fPKS=PT7 (Ua125ae488bbb7a69a8ee6b6e50d96c56804847899PKS=P]?(ac9ec22b18b66932ce19244ac178bcf01d97e5ccePKS=P6> 1(abccbd1bcee7f0e2b0f6e378cddaf8bfc8c966c33PKS=P!y)(Kb705f7210f3d61e2840883369f16ed0ad6c31af0cPKS=PH1(bd8d2233173359f50ec185cc55e371fdb575371f2PKS=Ptaj(b3fa2c6ce8c8f96fad01446a1502a8d9bf5651a94PKS=PzK(4c72e115685d44cea0f008b198916434304f3a67bePKS=P6>- l(eh4763a5785e3443d6aa72169ca11ee24d78a6ee15PKS=PFk_ (h652608b8d0da3736176dc974991b51abd4170bbbPKS=P(i85e53271e14006f0265921d02d4d736cdc580b0bPKS=PL (Pi7c123094ccbdfe3bf242e5019661bd64642f222cPKS=PǒK(i2774af1cb2beb5ea554fe92852bd78e0bfe6449aPKS=Pg(j845ea0cd54f7e8c7d3993d9c92faa09e42dfd989PKS=Pʵ2 (Nj67527052b36f7545ea5afd888152a4ee3aef5eccPKS=P[(jb29523066a0db00acf0030dccf05c413fad131f8PKS=P ,/3(jf30c5b258f640bedc9dcf498048e8f0d87a438c6PKS=P_^W(]k0d8fddeb88b9ae4a59d562090d07e8ece0b3968dPKS=PG D(k58668e7669fd564d99db5d581fcdb6a5618440b5PKS=PTL(k10ee00e09d656bf4c829dfdd3871a355c72fef7bPKS=P꾤k(mb528352006657752f5d9213032231238f4cf1c2aPKS=P/_ (mf7bd2f4e5d05552d9339df69029c7457b50b924dPKS=Pڜk(mf22e4533bea75c566975b0539c4ba4a42e08d5dcPKS=PbmO('n3a2e0b5c73908f90a1d591f547df443efb9870b2PKS=Pq: (rn6075454a5213e65db812e99fa0f6d1a4159faeecPKS=PIP `b(|o7eb810f22bc56947be2a8f72b5e4d50f6d124b96PKS=P (("q3c6fcea37dc086c202f4989d0337bda12facd0f4PKS=P~(qqdc4827220c568ba6d3e07c7010fc28cff57b0c12PKS=PHl (5r528bdeaf7747586dc3bf05dba1704e837a6c58bdPKS=Pd (r2a64c14c4e38e3125ddd6e2641ae0d2df9f534bbPKS=Pkg/2(rccfb61e2c400a41fbebd88dd213feda5a331dbe1PKS=P}&n !(Lsedbb5fc06b332db271dd11db164086f709d4db40PKS=PD (s9a8868decc3ef6a5d47444f870d9cca73e3c9b90PKS=Pz}(s21389dd268cf1295b75d5b9e9b843f243d707426PKS=PPop {(u53c944de2d988435279864bdbb9bc11a17a0f49dPKS=PtU(v431eb7ef7b43d33767b82df5bc020107a95a1936PKS=Px&(fw2f8b54efcf18a56fd73c0bb64a9e91353240a9dcPKS=P(w07c342be6e560e7f43842e2e21b774e61d85f047PKS=P!2*0(w7bd3d1efdb29322e0cbd4501523e987149e374bfPKS=P (mxdbd9f1d86c291d0f9ba9b668ca3e23b616729639PKS=P(x93a2faea9bae90cd6c9aec2b75ab90d57c85fc15PKS=P^zb(y773bcad3a6ed40f4bc27c1f6b0dea0771ee25945PKS=P Uz(hybd31e5e604028a15e5a0570ac17b36eff2dc07f6PKS=P_} (y4ceb1356b225bcc2b67ac5e2bc457e6f752dbc8fPKS=P(z5ae1f1cf556fe39396d31954788006ef09631e21PKS=PJҬ (z03a5491b43d556b56cac0cb216aaba591c9f0d8bPKS=P'(?{0711dadee0e917d0bbdd1717f2067c821e2e9cdaPKS=P-i ({e2e3d473c3395c46f5ced6a493d2ec83b75afa1fPKS=P`Y({9df7907a78023b0d3ac92000adaa55466dd2874fPKS=P zo()}2d2de13e7ee82ff23dd4f6b217b920689a0529a6PKS=P+S(u}e2f6907428f873c13a52b29587ff0a5d6edca23fPKS=P%:(}ea53ac0c2165ad673a7dede43b5ba7802894de71PKS=Px%B .( ~de32af82d506576fc1bee3ef0024e6ec72a50c50PKS=P (`~419f6ddb07548ea02dd59f1ffe2bccb394d36910PKS=P5k (~e14c371240bab344c786e0049a026a5384daf6ffPKS=PN(4cbce5a94b6aa0a9b60ae8ec66d0b39c29921994PKS=P>A *(if0f6b27eca39fe8be0f0ea271c7395b4650297f6PKS=Ph{(0a3dc3f8836431acc93075b900acad79f065ce21PKS=P(961a0ace3a33406238acbd6dcef8d2164b79a593PKS=PJ(R649a3c911be2db3e8a9c71e9e0f5283ef17873c2PKS=Pm=(e0333f075901075e351a5e00a1e708db68bbb820PKS=Pola(Dbe683d6fc272c78ba44a5da41f35638fd2501ab1PKS=P<(ba545ad8aa47a3efb75abcac758d18770589f1b2PKS=P:6mk(݁b45f2adb22b728f159b7f35fd2544bd8ae328546PKS=Pѷ()37c1e46f695feb76015fcfcfb9acfb39c3158127PKS=P}(v61a84c6f8e471217b7a5bba4f9567ba751e43110PKS=P u(Â5f96c31caccf156cdf00ecbb3d2968444f40bec5PKS=Pl'i(e506a8d044de8593bf90528f3a2f017fd2d12d8fPKS=Pm (\af3797e7420bb442ad26c8c11b06ebc356df094dPKS=Pl (a9b2cc0938e52b2834303fd4335807375a47f6f6PKS=P7:rT(efa325a91fdd3b0ebc4d24640f961260caaad3e4PKS=P (C846bb5d8f0826c693c50e36061e1830ce61d85e1PKS=P { (fc07dd2d0c50c13bfe7be65a2ff804b2fde948ccPKS=Pn, (߄fa5862bbcbf36d310b43fd499dc6679ddddd8c49PKS=P>(.213f45edcf000b8feea57495a762c78f0d193390PKS=PA%({b7918dca6f6b7d443f1129804ca52dbce5062de6PKS=Pux(ȅe1525426f2869f130fdf6e129f8824c1db115ccePKS=Pȗ(0df5a03533bbbb867b40d1a2d72c5cc98344ee15PKS=Pz(oa7434f29b95a7107abab9d5ba05f67cb3a18fbcaPKS=P l(4dc7c9ec434ed06502767136789763ec11d2c4b7PKS=P|O(Z(ceda9ae50dbf4acf898555fd3cf9e5a1981e3171PKS=Pڶ (e71ed31653857c1156cf913d574cc32e61ae62dcfPKS=P(d0f9ae297704305580d10cb14a089f260835bd3fPKS=P=%(a129c88c68a9457167307e836c9c681a0edf67e0PKS=PIq (sc53ab4b772b1c16e07f232140193ab1176d84a05PKS=P (È5e628639f0268af6839a89e5d264b1dc13e26a19PKS=PgiA(d54935f6352727581c8309129fd68d89c59dec04PKS=Pi<(`76d07f44b2b941dde25ba23f3e7b7baa90f53b7aPKS=P> 4%(02bee856071c41c7d81fe16ca529c3935585eb65PKS=Pi;(0a4e02096822716574e7ea1a7a7865c31e434de0PKS=Pz(C3f0b88f2ca1b46a12cb659c6945773fbef2f5a33PKS=P2b(01dbb5323dae6539956d06ec3ceee97967f8f824PKS=P' @(܊2196e21f3bd95f11784c613ea6d8b09cea51deb5PKS=P8,=(259e2491171633b8bbc16a89d6b4410a63b7b2d3PKS=P=Гnd(31995507b4acbe8ae83cfe042e53bdbac88ab260PKS=P/VW(0996a2a90121461db59e26300be26e348523afc0PKS=Pw$T(c9c48b5d5a2c74dc729b240fc9b2fb71b4cdb7b9PKS=PN5E([59505663b2c336882404b26c39e36cdc1e87f9c1PKS=PVP%0(f41f647c4cc904f43c33b3bba27cd0b70a1da552PKS=P717j(8a51a7398aaa4ef097914ad32c3648cc5b18a5f2PKS=P%6(ac3cab65f8d6f8e5f32d648175a3204f96e9524d3PKS=PUpV(e5fe01aaccc20898a74078325e0da26d2a67daa9PKS=PoV(ab61b456695f1708c1660b2e9aef7fb395644822PKS=PJp(a31834bb5e90d2fb1dd8d8c15c6799aff0567bd9PKS=Pg(R7ed1f6127273094681ba5f65a9de808154cf43e7PKS=P *(ef59c2ca69d6ca9b79e4083dd846aec7d1a4b96ePKS=PzOs(1a6239619fc8edaae9d4429b8369dfb28c9f4cc7PKS=PgI(<172d7e91cf5992bc584ef2465a50bc982323c784PKS=PJ^(1c27c44d4ff426ac19e6e1f740d00cf922f89edePKS=P 3(ҕ4e062cd4def1c0b90f2011c5a2541f45a06bbf0dPKS=P3(c7c54fd9c04509617154d7ecaa104bc26411cd7fPKS=Pr**(i93a3f5a313d378f7f7c08d90c518b2f39a039bfePKS=P](ٖ9f37c1df860ce15cd635a3495707df5285140029PKS=P1*(&94b3022d9678bc4f61ab971c0425c99c9a9ddf63PKS=Pm2(sb9eacbb81cad4ac9771fb6cafa2d486f56718ef8PKS=PFg(b676932748d8774e5e2c66f40ebc3b2dfa168cf2PKS=Ph( f7737df83a86e4a0448b93257cfe021b44f8bddbPKS=P%(Y74424256f00c788f92b20dd98e474d69cea50a7aPKS=P: (46d81fb6ef37d0122ab8a879c6cfd2cc580e70acPKS=PU(20d783d980a8b93eac754f058bb80ba370d1eb6ePKS=PӒ (9d1c0b6a00df4ecb55252409223f53bed20685e1PKS=Pn|o`(ݙfaa92a4575b002f517e64e7b037e958e6d16d51bPKS=P=G(:9bafab60374268a3399fb009b090b1723ead09d3PKS=PpUA(8bbc40b8143fd2805034ab195b6163b898742245PKS=P`(Ԛ1e2f4d025eaa4ad4fe6273473de320bab3d45f55PKS=P(!493d181975aac63fdd1fdc0f98ae00a9f4318961PKS=P3(mf61abdc1d9b4088d4a7711c534792f3c8923a80fPKS=P݉ (ff55f2fd9652040fca491a0d5d1ac5d67c311fdbPKS=P!N( 98fe858f1d768795e6dd515a82c1587e74d746cePKS=PNf6 (Z3a55ffcf7f25e87b3a3ca2eb0bbf76afca3bd07dPKS=P7Q(f4824bf8d9523ad923c51bfad5e08e34655ab602PKS=P s(8ec7134b194d80de3a1a0d25b24a0a9aac02aefaPKS=P(C7ec92f5a0c441a22a1ff0b70d1b649d7e37075cbPKS=P(c(463653eb6da005d27f69808aa90e4ff6f75543e7PKS=P·(ڝaf0c6874cefc7c07f7dafcdffe879d3ac3b3b16fPKS=PUڛ('8a2ecc799f71c74f6b7966ec292d8506ec2def50PKS=Pl?(r3e8530360f33ea974ceafc5bd623897717132abfPKS=P?(4c9260a7cbc411cbba9c7f2c5695a35b99aa5161PKS=Ps( 30413e9ab35a0a7dacdd49cd9f4353e99a6c501cPKS=P-6|W(Ved3db4dfc6a85e38400a2bad9564df6966fd599dPKS=P}l(e3ef34dc5ad64dbe6e4aa785ab88cd0346e599fePKS=P&(Sb4e650b9f999c70e0d44ab7aeeba6735b5e17f60PKS=P8 (668e5fcb7931f66262dfa47ffd3d118444eb48abPKS=P o(e8b6d05149d291d308a2ed695ba153f70d1eeaa1PKS=PX (?89c1d3e2e6c3f1a6e9c550addceff9af59e5c884PKS=PH(215b64937c934571e1de391eba9abd2a20380fc7PKS=PmJ(١26162cfa73b1b26bc678b8766db957871bd4c675PKS=P(&44562d86d7469f68568c63c1911da8ba93204a79PKS=PIW(q3b5f8542ec41a2766a8c4e0502ac439ae7d7d9aaPKS=PQ(d41d0afa33adff9d596ded95e627cde9c6cc4a66PKS=Pzs( 210d5a92646e3fe211649929af1ff54436e84904PKS=P0 (X412abe82062aae5eb2564940585f7d26c5177483PKS=P (dae4c0d3782e923174030c33834690e51a0bdcacPKS=Pi2l (ce44decfea67f658961426ab4d9d83b285d64b64PKS=P0N$(C2464add5d36d92ef8a9e45cd728c5d0501e7ac47PKS=P (baec424100f2c341b88b1fe9464a0fccd2a98cb0PKS=P7(6ff899efd99c021f64abd04201c6c2c727307c47PKS=P<o) (/5ed80899c75601dc6fd7cbecc60e48db4e6cc16ePKS=P!PO(Gc3d367aa47dedde00a8f99e3db06cbbcc922cb1bPKS=P#qpI(ݦ925ad5623d14dbcb1cc36aeaab6e2dc2cdb65effPKS=PRD(*40b6b038e1109c725e204b40805d5cfb4095eac3PKS=P] (w37dd002cc4dd1b4ecf6c53a59107cc9257c1f8ffPKS=P] (ǧ8f2b7ec2f4d667256f83d777b98d85e440faf7fbPKS=PmT/(a2f3bbfc0a1be5319b7f01543c1076ed0080d6bdPKS=PIL@e(_e25ffa5580b2bdc2485dcfa522091fe80020492fPKS=P\ (9305e8ee9282e10c0aeca6c86dff2208ee505709PKS=PG(d02f04b87616e907044c23ae7073851501454c62PKS=P =*(H6f417aea9c8e5020de455f758602d18bf5db5ab2PKS=PsM5(e334229486d967de4263d09b0a3fb16e4d39c339PKS=PBc}(e2c1f6f521f517693afb6edd07f188a83509d1fbPKS=P (.e8ae6a73edc074f5df6e70252b433c0a2c0b0446PKS=P"(5cb55bd0c29982b748c578b1469f13ac7d1f8e80PKS=PЀ(̪e4ace6c22e4231a0d1208e2ef8ba4f10fed18e3dPKS=P<(df644dda62079fdf4b63348169f70066a4a2ac23PKS=P1(9fe4758f5bff96c711ba82922ce537e040b4d21ePKS=P7(48997c5e03f4a65954ea24ad4bf6a6d77c543bd7PKS=Pv4D(:833c7a41f0f93531d32c33a05bcb330acf469574PKS=P|j(03869acf7a0fb28079f30f5ac7a6aaaea893874aPKS=P;M (7698032dd951155553abefb88538aebeb9c3d2cbPKS=PQ(#C. (633c823d8f0053beaedc0a819de924371d2f65949PKS=P*0 (e7fc4ea91b62702bfd53556cf39a48532802151cPKS=Py(0b0f21503786191c781df85d11bf5ca6f8584a13PKS=PKA9(E616bf12ff49a1967ccff9fa349879c2f05dcfb4cPKS=PoM2(Ĵef7c977b8d2dbf5c83911623d12d443a3d356714PKS=PJ (26e9ff0ca7b3f1f6b0f3fef456d61e20ce88f18ePKS=PXQ<(c18c84634b920c75014174df6ea17cb96d6ff7623PKS=PO (8c2791d15a671d7f4a0a3abee40d55efd8702474PKS=P#(e03e6bb8a40000a710b9b5ba0508d2f548a1eb29PKS=P (Z1a7d66bee7357f3f8b716c89723962d6fb1b75fdPKS=P  E(86b4dcd47668e103ded98e997ba8a7b5dd466deaPKS=Pu (ddcd7ecbdbddef938f41c5170c0e8e9b9e39962dPKS=PC (F519579dac4fba364715446411a412b937fb5aacfPKS=PI(a6b17310d81c2808e9b3101ca6466f1f6b87627aPKS=P (fd873563e4db6d73d4d058652db4584a47081062PKS=PwB i(bf2a7e6e8c9b29411a9d19e3c0235c35eac7076cPKS=PZ3n"!(;ac406ed530f0fe80bd2db17212b3167dc71e193ePKS=P#" (949e2cc769e9e40fe76a82933ad8f3baccfe869cPKS=PDD (b0f13de85aa54f8f52545d7762c00074a3dc749aPKS=P|$(E2cd4a211d3e647b62333c19b7c1bbec72b059647PKS=Pc{(9080d0b14967586a3126993f84347948fb99c219PKS=P(fd49d068bf75655b3aed915f524a837719433bbcPKS=Pѫ ([b0312515e4664d9972bba7275bd55bd490279e20PKS=P(7e82db9866b51609f9cebe69fa977418a6c28021PKS=P8H p(ae85ad4f660ace14ed117f91e3a47b6656d05c12PKS=POu~(B5f854996438eabb1302fcb7faa6b68ab9920986cPKS=P(bf4695578b884b1ed65fa3610a36ccd7afa149b8PKS=PWIr (ؼ3ee2276d49ca9447254436223b071e738ca836daPKS=Pנ ('c819afc73d5b711f7fe0fa1b6444a0159f4e5e91PKS=Pz(v70b524d8432bb469b985ec7c4b77ce3ecc2d95a6PKS=P(4ff447b8ef42ca51fa6fb287bed8d40f49be58f1PKS=P( 561acf99000a397e497deb916fb167dc2e1cd392PKS=P(k@(W657e6ed5c642e48711f16a4eae671debf02cfb0aPKS=P:'(.7bb8e86550fdd99d3c3747e75cfb6897ed46cf7aPKS=PH(5ea3b5035f78ce13d62895e1e12f10ec0ce15461PKS=PwԼ(351f5523efdbccf06e270fd900c46a37d889f75cPKS=P(1d8f296c34f669e7d5af2b9e7203db8d5cfa9021cPKS=P.(429977327250d9b7609457b684a9571779e4ff84PKS=PY (3f957d0063766eb44f0e5be60fc9ec66ca07f6cbPKS=PT(#d208ebea7da835a7bc284ac15b7b5339e82a44bdPKS=P(w36262815a9af09381be2bca96bd2305d92bfe904PKS=P/N/](3bb05ac6b5e904b479ed1ade46d91ccc1271a6acPKS=Po 3(g0090ced923f1df257b9af0c80316c6002725e76aPKS=PTU (a4e7f6426bb038d4f04d7d126dc292ae73b6ed6dPKS=PA(b4fb3bfa75eee4a4cc979c5adc632372d40a4224PKS=P( (T1b05ad61ad704c8e93b4f690ab133251bd507825PKS=P (2f882c256b4dc3051346335f1c078cae914d9c65PKS=PW (49eca46632906ee06cd2c533038e1d3f8ec26030PKS=PbB (@323bbe9196f48b278df9efc572c6c763db311137PKS=P (37645bdbe93a47af48693d03b43682e1ce181b5fPKS=P6p(655ef2525f38ceb04571231038190b0890dff302PKS=P-(,d20df0f76d39dd5c2050bdd63ef910c72ba578d3PKS=P[ ((wb6f8960bc14e9e7c923b473af65ec9be5370f593PKS=P񊇷(0cea61188c65e8ce42c790ce654cb8fcc643f2cePKS=P}( (ef2902a8f42357a9b02f108887d236091d02fe96PKS=PoH(aacb874a856df708e789006f651b814327265668PKS=P!Ţ!(]54536c6ed8bac82a712c093c1e9e36215d229fdbPKS=P=~ (0ab24f68e8481161b7b656e296689515a0367b86PKS=Pׁ.,(b204073bb84879a3ed5ee2bb4c12a4139f9686daPKS=PC& (oe20b9b0894508a4e37c33cbb847b1aa5a006956ePKS=PD&Q(511fd8063aeaeef595c3b6a5f8ba1118e8c65496PKS=PjUu,()c9399b684e447c66404377bc65b6a63903e8fb4fPKS=PB&(v353f9ba6617d871efa8ab458884f2905f090c2edPKS=P6(90b63033967d2f57e6d2e208e7b3c112d3437fb6PKS=P,(<8ab0ff8be3067800b7c4ff2baa5bef740ae6e10aPKS=PgW(886e45ee84bac25352cce3641ef2d27eeb5b27bbPKS=P4b`(2032896342532edfb6f0d459d3b4d469ff0ec5b1PKS=PT (<826227c3ee4e48a97f6265fc7d9df665b948c369PKS=Pf$(ba568ce850200e97d5fceec04523310269e0f8b0PKS=P;9/(8e60fa13ae86445962e13df1834a013dd7b4fb91PKS=PR ((5db00b91b2573692fad55ba557cd2083cf03eb43PKS=Pq6l(y042dc4512fa3d391c5170cf3aa61e6a638f84342PKS=P<(baa2cb33a23b6a88b6e6240a03fadd84113e8a35PKS=PJ (09af192577205e93086185637645baea1a216172PKS=P1t(l5883230412c8b14b276dfb0d891c629996762d27PKS=P (807ada01dbb0b021b0c5c3da8c780b7f77eb3485PKS=P6,( 8c84288f4e1a9427bbe44571b108b87c73c68367PKS=PoO (Xa9452b5ea2f072d91b9da38d1aa23d6b25bafefcPKS=Pp9%(b055026b50aba18aa1df2cf12ffd2a5ad81ad562PKS=P|(eff779bbae75752b292129344b053737df148095PKS=PI^a(Tc1056cfe1d99cc66417d3e4ae1d3fdb634f39357PKS=P%(7f75f8e1a1e5aee4e08c7cb67f1711d2ea812aa9PKS=Ph"ئ(b9412dbafb6d23371aad888a259f80da434a372fPKS=P+qy(N460b0df7c8e02d94266a3a2309163af9f3720c86PKS=P%(ec5d8309f24cdd3fa4870924cc2a301961c61addPKS=P4 (b231f7197f2dd8777f4eac5d841685307fb821b1cPKS=Pň \(6d7ead543b542fe19253cb5dec0c35b48a6034d7PKS=PM(17b09ef02f9a2091256822a53c27a560c2c65f57PKS=P ה(f0cc7c7fc85a570c13a5fe651f563d651ebb08da5PKS=PD(bbbe79d2ec104b8f1cd2ec2959aa642854479814PKS=Pke(02dd98edfc640cc1d1cca96f1da6aaa0904b83bcPKS=P4+ (^b4a165ed9162a4e96a99117d0ffb025c013fd04dPKS=P BB(f70699b1c03eae56f8740c755f95e43920c5662fPKS=P̈́(ac417a7f6f5991eca5450041728eea2aefd1cbe6PKS=P](>(C6cb7a95616a144dddc8a425bac99788fdae1d122PKS=PJ(2acab87b19375d3a74eaf8bebd9a23d2f15dd447PKS=Pxi(a2480e60388490393d2c4eeea7e7554c9ef51547PKS=P0 (410db30bf59553fdc95560d79f8b472493e859b34PKS=P 6(1c291eb78d923bb6fa6ff971ff790ada574446e9PKS=PyA%"(7021a0e2e76077b1dd2b3981815142ea68f51ecePKS=P:LwS(:f95d369ddd6b5aa8df9aee04b235a780d20bee67PKS=PPƁ (f722f29e88e8a3fe39428d1c4a8af268262940e7PKS=P(d7dd235de37bfebc579372bc8e9f0b1c9bbc66b8PKS=PM(45b07792ca6dced1ae2ce6fd5de118eeb4bfd4b6PKS=PJ(K7dfb783553dc434cff5ebfc85273e7e75de5021cPKS=P(44043076ef95903c7b1a6b72a759f01c2a7df305PKS=P֧?(d0b977d6479365a483f2c0f218ec351a54509ddcPKS=P!(13b930560ebd796d115591452c0dd199a4e220500PKS=PT, (7a11114fb05f025a418179f0e92a1b9ac3531102PKS=Pp (2e39d2e38436e08af07fa5ec43298faafff08b49PKS=Pg0(5b1b97afad507f9de6ea46610831f6d4a04dfe22PKS=P (v173cd5944f1a1ff6334aa6fab2003402ce84f21bPKS=PH(862d932ccf10b86e27d2d0f11915a22ff9950821PKS=P˘ (b03069f7bf88969bf9faaf136057b556415287e1PKS=PPc8 (bd7aed2ab9c0bf08d4a0ab40517e3d73fec296ba2PKS=PQ;(bbc4a751b8b89b1429a99298e72a1680a1912d6fPKS=P~"(390f12ad0740e319821fb69e01d63b8e45d4e9c4PKS=PSK(L69a3451586110710c65d19a59cf2da6ed3baffdePKS=P8H(30aff2a09135ea240fd768fa9a0110d79a92081cPKS=Pߦ (57c359c27efe25bb96834eb8db300c8f2e12004dPKS=PƘe(607d962d995ed904e9f2ec57634d5f64c268c717dPKS=PԶj(5768ce298d2a70d4b6f95a36db009088cffa933bPKS=P5(3968cfe0d350c552def5058d06913606928bc31fPKS=P(65e48a2b33acb922bf46daac37f7fc96fbdcbc58PKS=P9v(g2eee9eedfe6a609dfda2ec1d8343f5b29adecb07PKS=P\.(76f27ef22670f80d95efd25d3cbc158bf764557bPKS=P,~(ae5ba6f5fa77f567d0cad110aff2d0663e3a1863PKS=Pe (Uf86cf5882863e5d38a35b831df653e87937ec06ePKS=P5'SЀ(33dbb5c3ec37bff1156b0bcf9b5ea957fae38b90PKS=Pf(9f8829b8a3235f0190052d2166c8a8d45a4ca9bcPKS=Pc(63e631c134bf5cdf5afd75eafbc9319e7428a4bdPKS=P(620052a982fb6496394169e7086e22f39318a103PKS=P< (f4c80a59f9f83fe5ebb724dedcf58d02082d51a1PKS=P(X020ec1dbc68fc105c8bb526f0d81a2b12d97b288PKS=PL?(59a0b9b21be6870bc907874d5fab6a24d16192b4PKS=P-\ (acdb349441ef39e69afed9bd19be1f077e4f853cPKS=P' `(H 9000a6dbf490b47197d87662267aacb92e528623PKS=PLG!( 9873f293bd950a362e285bb17705dff55b5d9849PKS=Pin( 6126860afa447400c7f82baab29b5ebc83652aa9PKS=P>(K!b5b71d4f3977a73f3e6c2ad3a9c31d2c4eeb41dcPKS=Prf54L(!5f7fa04be47cf0fb9dca382210845c73f892b6b1PKS=P/("4a7869ea5e475d1161ae2b4fc1cb9e218dbce57fPKS=P-K@ (i"0b1d26b23932b6b1097f4f9c1f82ca829cd1f8e8PKS=P)K K("40e3470cbd10f5ff439d7a6ddece84f8130302ddPKS=P10 (#55115bda20b6fa9a36bdf618de77e0a2637fc29fPKS=P*{(b#d6bb9237d29c9db4df31dc9c3b3dd25d6f8feea2PKS=P9\ (#b88557a87e8f53cdfccb93bc886612b99a57a609PKS=Pmj6:(#24c8070a4a95c6dbe8864552f0fe9c4094ef0c0ePKS=P5wW (y$312209803aae89b6e90d435fc8d0320f71e0aadbPKS=P@s($11dda2ef9f173bdf93aa5e37c7bf7be655546b9cPKS=P ӧ (%d4b0a02979200945f6013f9ecde1c90aa24fed11PKS=Pz(f%060b6a2ec3f939726e0e6d0cbcdea91a1c06c13fPKS=P8U #(%c47333fe9c327304f76f2405b7131909d3795aefPKS=P^(&ab2e195d021f680c9b72f379f70b3ea325d05cacPKS=P,_>7(M&e1900f37f9981cdd7b5071c676b86678f74f3841PKS=Ph|(&f2a82e0d264b919b5f52bb599b9edf3f7c223385PKS=P5 (&661ca505ee545dbe38ac5f8b3da4ddfaf62d7955PKS=Pn~(4'38b0f8a98da2e5a0587dc4ee5e79cc7200a7958cPKS=Pq3v('1272618c9acf003af388ad1d5e7bbd0ae27596d7PKS=PG('fe23538b2ddecdfc5f8b2fb8f8503e211f5a78bdPKS=PH/((f43828bd3ce452d6e7408f6e654ce9c53088a026PKS=PƗv(f(4f697c459c92e4741b5abe596fec69e860dcdbaePKS=P*]aI((766ee127523af6e580d348a44a28415b4df44b94PKS=PX()8b8355a080529678722ed86b1899a025d09a23d4PKS=P-Z(^)870a4febd0c5682f4efa9df433115ad49d67073dPKS=PDV (*1170da669b928a6ca0c05322a3a3a59daaf7a0f0PKS=Px (*de4a51f4fca270afa2b9c176a565191cfe1e17d2PKS=P-|(G+d07a8fc670218d226c46b4455107b4d1af93416cPKS=P:m(+fe3022bbb05af62d493e8c72d85f2d6ba0e616ccPKS=PjN (+a809ec345a28fda678750ba836de87148df51b15PKS=P|+ (0,a260fffddf81e6f18f700403c929eef4fa36e919PKS=Pvo(,b892ef457f0a065f96c1f6d3da4e2525e3445ac8PKS=P:wN(,d84bc8dca7c8fcd227254c06f5b88eaaf7cd5fdePKS=PG(-5aefff9eee5e03a21c4a99000fdfec66f9a48681PKS=P?KP-(n-679f41c5cff9614b1a12bf836a6a6b5e904c8eb1PKS=Pw_' (-f5f3a854d2fa1d35d08de47a1a76694fe45eddf3PKS=PJݘ( .3c363836cf4e16666669a25da280a1865c2d2874PKS=Pڗ(V.5b0508573062b78b5cc5a15432fe25c17f0b0056PKS=P8U (.2804e12a4855820dad1ee8f0d75ea29b7a3c1dc2PKS=P (.aafae7811068c7de45f7fb23c2f1cb56c3198958PKS=PI9a"(G/553438491bba50c500fad07824f441b57cc40580PKS=P70 (/0c6e0460c327cc1d8f645595c13bc12f37a71f54PKS=PA (/f2d535386579f881ab7916f561ced2d4a12db2fbPKS=PRg (301ab84aea4b11684f03f080690ad8bb0c0ce9c17dPKS=P9q2 (}00eb322139038dd6bff42effa83ea929e37fc7711PKS=P[)QG(012c01686e13db1e721b7de0b73225578f8f3d66cPKS=P$! (1b2b8ec58e872eef46ddfe456a03f9e4024af633ePKS=P\ja(s19f549e8962b1965c32a592d39a5b2f53ad43dde7PKS=P@3 }(1ce32a5d2759dfac5881a430142564ce7a9d74d7dPKS=Pf<`L (2dd021a767bc797d12110b4d8c3a1bc0c643df5ebPKS=PMwC(a26f98180934b01d7b534887514c3aaece49076f7bPKS=P(2b019769f36942f42f37b25875394586465536362PKS=PKf&#(235d8bf862945531d06dc785d942cf64a72f2cf84PKS=P (d37cce58ca120213eb9dac8194b2a3e2a038e38de7PKS=Pge(38061b37e4c291d7e2eb9d22d56ff8faecea965f3PKS=Pl (460317c35835cf423e7bfbfaf79e051afbe2a333cPKS=P\iX(T40e5c86fc0dd8b6579244789264a47e551c0a3222PKS=Pp*,@(47d2f62a40629d485edc69bd8dc7e994b1ee19baaPKS=Ppt (45ec6a26cfed98d7c63b30583de37b3cbda0fbb9cPKS=Pp.(N506542a9678d6753693bd36439756acb4c8850b44PKS=P,h(576e933c6947c511f08c113e5432bb3bdd4bc6c00PKS=Po]l(57f374c51c3fc1344373f0c59ec22c8aa6f11c038PKS=PP7(56379aca47c55928e427c1d23b3ad8775c34735293PKS=P^7n (6271c4fd3d06b66fc0195c0fa382021025bd8f1eaPKS=Px(6282b0cf6f00bdfc569c91f4e0403e06118e42de5PKS=P%4(7e4a5639fdc5f755712fbaff31d95d076d7762292PKS=P*p(k76c3e95db167f75dce3508ef7d239fd8742d529dbPKS=P>(7ee3daba4d294c6d6b29aa1fcfb3d19ac03bf978aPKS=Po(8646b6009fb924063a45e718fb5951eb14aa06126PKS=PI/ (Q8d2b21181ec8d9ef33d6ab5038c01a5ce260cd621PKS=P!(8b25b6119b2954017d8610e21a343353e135fa033PKS=PT(81b5eca4fbea2f1c7718be5a04f0f3403b770bbc3PKS=P %( Ref6a2d445bf8000e61f71885ee1f8905cae7e00dPKS=Pl+(\R1cc71ddb3a65fe550331d3180c8383b115f98c5fPKS=P\cy(R9afed395dcd2662b431f1a35fd6c94f86428b2a4PKS=P49c16603ef230f06319512444ee55007e32df348PKS=P (f8cbf5c9644cad66796cde14f52a7007906ba3c2PKS=PL+hf o(f9658cb1311d33a098b47a24d06096811a6c2d5cPKS=P; (4234b432d4b0eae39ab64ab6d78118e21229eecabPKS=P%(1348100910631164229648be6907a085d01f6818PKS=P=1X(add9483d8920d56bf313b60a2f6eb0cdbe0e8785PKS=P (+3afd4cdaa699573893e3436e67b72e38183d9266PKS=Pe(_({b681cc0c3cf858a922b9858cffd4bca06014345dPKS=P֟(0c7200f7b0e406d1df0bbd5e94cf02cc95743f3ePKS=P$ I(634ca76a405760066d40a65d0cc605e2f9552055bPKS=Pr (1efc7a36dc77a8d4769e209374824c8e172ecf84PKS=P /A (85bdbb1892913c00bd1bac6004edcf2cb3e2f02aaPKS=Pt (88c737f84b7400deb4f266ba5fb3fe9224340c43PKS=P9 (31f87afee2496edfb5f12bb140635cf48fef9152PKS=PHq (%1d3ecef1a25e28648471ead03833fd62adcb17e7PKS=P&(d5a6d58ec559c2a5648d71e4257947a0ff9baabdPKS=Pi%(0b51145f526d127fee8facec378570c5394efac7PKS=Ps(,f5952d83ddc34687e9b71b0b3a0aa233bbd38592PKS=PuN(y80b8485aa03e9da9d6af2102e41b9107d86f7db8PKS=P9 (e185f12fac3552e0802f5728314453ff78f56ae5PKS=Pjۣ(f497cdfe9a54cc9fec6acd298281eb996bc1b6a3PKS=PZ1d-(f204e31c30e5bf3700e8c983ddd517e09a721790aPKS=P(fe8d94cf89c450c26daae178e05da9687176cedbPKS=Pr¡({ 09e6004a255f55af602a50fd9bbc4d579ffe93d2PKS=Pl (b 3b186a355a3ec0e9013680e14e590a0d08c94dfcPKS=PO:9S( 927d4e0b181907aa23c80e90dcbe8553f78c4975PKS=Pςg9(26813561f987165abfbe96e9803b82c5e0fcfefc0PKS=P@!(cf4ea2ccea38cd056f41246c24ff7ea192d97c3fPKS=P(df2bb2464b68d7e1517cf44d29a0fc7cc128d565PKS=P0(80469ec90161c70ec36ce514ea021ba97c96af352PKS=P^ɸ (62ead86ca2e13823c58dc4a04c9d264720567344PKS=P z5 %(777f65c257922d584b204a0386d6f2cf3d23a57ePKS=P(<657ff2d3e1bc6cb29f384bc67dcad05dca324469PKS=P`(95c4e5edcad970996f2f47a61eb9032146f7defbPKS=PON#(480cf74daad69804ce6423f1e8d9fd2f9c303757PKS=P g(8c192d6c625d6f16d12f3a79cf3802a46bc799221PKS=P#(a7186eff4144d500034371a64bebbb5d53d910e7PKS=Pt0(5e59232d8e385573248363be02ac4a09856c0fe8PKS=Po$(-1ff39773b9a7714a51b61b1964a317063a018bbaPKS=P[J=L(7eabf225c6a025cb47c69a57e0cfb21f44d15154PKS=P\(ae441d9cd18859d7925a0b1980e9d24819283ac0PKS=PM(:f0c934e40612e06719f617d86a84125ddd6d5e0bPKS=PI:d(!bc1958bf7406725dcca45617d1df8d47699b0774PKS=P3(7dbd9677d3785802e2bae26693869433f958078dPKS=P } (211ff72632249527fc89c0596e5d05b244076c5ePKS=Pj(b76b9004998dd071b4c9ea341d34429b5f0185b9PKS=P(Ap (iff7cc78c86f24cf6f3255142f24a38bb958e2324PKS=P= 2(734b4925d5502ca3bba17d225ab08068dc3addcbPKS=PRȾ(06e59d907fc7709abbfdc989e2b109a5c8e179eaPKS=PD(67d498119945eafb69d9976bf95d8725bbf5c858PKS=P@8@(377e383c69878ef0559f4d232bd63236d3ba7cc6PKS=PS{(b70c480af4cf959c7eff980b7f015a77dc198e906PKS=PITQ(26ab61d85f2203b9defeebcb7f8680e1bb56735aPKS=PRP(e57f715635b2492b9133fcd1ee55c870e08a9874PKS=P}k#(G9a301af6efb95e1c05575626d8255fd113778ca6PKS=P (5dc3156fa8144324c269204548ee2f89150107c1PKS=P (d3921956943f1cb6861fd465de2f4cbf1edbac1ePKS=Pl(089915090cea6fa454e54c84abdd76fbc8abb50a0PKS=P+D/P(}b5c02308ab43cca92d84b981d583201c99021035PKS=Pt (7e6d78a3929abdf0bd32b020248e5ae2960116f3PKS=P"$(P 4980cdf7edb5830166323c59613544e764bd467cPKS=PȨL( 316bf22f464caf25b63e4d47dc31fdd03c9d440bPKS=P97D(!993efa4b4d0ac48c875f924a26d6934424c27073PKS=PU ^(!83f57ed00083bec467e4c9cc206c4099ce565ec7PKS=Pl (!6d154ebd23ec738e8c1411902c3d57ba2162f863PKS=P&("b2add0655798e7614ae79e3987b96aab8c40719aPKS=P<(g"31b0786ddc57cc9aaa341a2313d14282985f5975PKS=P ("4ca980c926a95c1d5ba7c230f872e6a511c9b8bbPKS=P(m(#a29716dbab901df80f9c1d2b3706cf8c3b3a7ee7PKS=P,(#3b0a6bc51984e3f49500db125633cd4b383db6c5PKS=P ;X ($4f21d8c52f176cdede00e7e4705706e2b1d6f73bPKS=PYT(a$e3d1d4726c2bc655e508ab24395237a719239babPKS=P(($12465abcce69f7efc66c1e88609c5e18397770a2PKS=Pe(($065595a0f1323390e5b957df8b4373caf439a762PKS=P{V(%2cce42f11a2ede7915051ffa98b386b996a25a33PKS=P4(%7380a6d5495aaa711d07db6250add692ffe601d0PKS=P^)(C&7f2d0b8a69c15e44b579644d5531e09f0962c1abPKS=P~W (&dac88c5d62beec6354bf9e0397a03c44720256b4PKS=P)i(&86d91a413b48aab9d8ceca852d7a4d03231bce89PKS=PRD D('4dd8b3d5072a4b5216317f7f9790e986ef291124PKS=PO('e11401487b627245d33ba7c03e2f8562c3d1beb4PKS=PK('(9ce52dda67e97691875d3c6c10ff2c642d0cc072PKS=PR (s(56ac995d962d53ad866a3e6544c32d9d54eea00fPKS=P7F ((ee21eee28211bc7c4eb204186fab023910847befPKS=PXJ ()6a349016c6ef0f783b8c054892578b965e5d2e1bPKS=P)(c)da2a8c7879c2a9199137bc35f3d239226ede164ePKS=P_ ()a9b45a20290d83be3e9ce232d76e314d8fe4996aPKS=P:+()4df2eab469bcc5eb2a1341b957a7faf245c73400PKS=PJ('+b2c7c0caa10a0cca5ea7d69e54018ae0c0389dd6PKS=Pwg(p+692809f5a3ce98b209a4e3bd093f96fcf0b79a24PKS=Ph 1(+4bbf3d48e1f8f8f2de26917474d7cdf125eb8920PKS=P잎( ,1eb957027f158ad88080a017247883a98330c8c0PKS=P<(V,fc2015efce232f07f7e647c59b28cbea029d3b21PKS=Pt($2718d1e61b5477d4b46fdd21d51dcceae46308deaPKS=P(r28687a2b36a6af1cccdfdfe8c7523a4d8b2c431b8PKS=Pb923717801e86e455768edc940d6fbe813c0ffa5PKS=P&F(beeedc9ed4a433beaadbb35d632fa9136e61d481PKS=P73(51bd79237f9d57374d39d8606bcc5e96d737394ePKS=P4Ѥ(Ր3eb2ab4adeedfed47a736b5dcc350634ffc3eee8PKS=P<(b1c37fb685e0f7e95b2955ad159804d886bb1c71PKS=Pͪr(ccfeed609a3f051034f46819a71f5e0d26521155bPKS=P~Pϥ (1949b0585a7de458e09adb0b385594e447be68d1PKS=PZwE(c62e72dd30bedf535c66b38f78f2d4e807747733PKS=PK(Q3c5d8120e85f9df7ddfa44bc7b7d9468f0971bc4PKS=P3_(63f457771fba40e42e96dc8cd956bce070888c8dPKS=PFa;(@f368e4862dee607759427cbe5442bf3e3fd69513PKS=P _(7893cf206d0ae29624e5778309ab041ef71a264aPKS=P1 (f50d3454342cca87036461bcba99544ab3e182b4PKS=P5b(/73218f417030d3350ada60681c17905633b45667PKS=P|y;(y09cf91b734dcfda05b7073c198f57014b175844ePKS=Pc(Ǖcf63e987d4ef77b3265c2bc47626542bfd2bbc4aPKS=PXM (12c839330826b401a38cddf87dc2a6c4282deb08PKS=P* (nd1fcff01f53d83fccacdb8e0a1aabaea959befdcPKS=PT=vW(174e987ce7f7a1de7d2915543b6113f8dd2db8c6PKS=PT%( 4d3e758e142b31accf0f34a3ba3d655a108f95d3PKS=PIa(gde1b1880a4315e3044c95a3ef005802789079281PKS=P~(137e472dff2f7d447725f2b7383ba74dcbcc715dPKS=Pr (16b9f3c359fe3056b32d7afc3bd0eabb39fb50ecPKS=PTb(M03f944e997a662d523ca54e91af3c656dd5f4227PKS=P!(e5f4fbd4d110eb44aa24f97080dfcd44e1cc11bePKS=P9 (?d28ada632d7e9dd03c6c105b9d102616cbe93384PKS=Pd(c169016f033209c2944c7a294ff86960734c3c0aPKS=P$jq ((ݞ9e01347d7f0da1e5b9619ba239e7865220d5d0d3PKS=Pʐ| (0b566e3875ad9d06700e4ddec779be7b2f9a01467PKS=PPu (9dad0507da65ef070ab4c0ed7d219f75336b4215PKS=Pes(ן2ef83efd58da056b806e503e6fa05812eb8108e8PKS=P3($099600a10a944114aac406d136b625fb416dd779PKS=P;(n192ef2d740d62ce154630916157c17d4bd7e77c6PKS=P #<(5cf65b1e217890a1b74aa6b32c7653f0a9c3a2d7PKS=PmtG(%8fa9dde700bdc7e0b1183a97e777971ba33c52ffPKS=P(a577b578c4b495b39bb4ccf94ee2747ac297c06dPKS=PV(_ca22576bc6a3cb828510d885eda4feb16b568d9aPKS=P%c (37dd3e8d66f240be60043eb5bc0210b656ff9171PKS=P(1116dec9b162d9615165677055f450f2677502bePKS=P5Y*$((B95d32f93bdbfe983612cb4e984e48963c84dcef5PKS=P]Z(714cc77953a9326f691548467bbcbe05da81c798PKS=Pl (46dc1753f2d2916ee2f00e31f789967b7060df0aPKS=P?O(Ia37b146d94548e8c6bef1e01a876ef4a73eadcbbPKS=P@p(1a3d4c76397b2324b3e4915dee0e6410ec70f161PKS=Pm(5409b5dbda8d8a7e3d3cb36a9e172b1608e51165PKS=P)~(+f138835c425c9caca207c51c0ad697f580f7b6bdPKS=P')j(u6413de6dafafa53506de050ab79db48649cbdfc0PKS=Po"(2714a0c6f30b3118010e39f9710abc73a9eb78c5PKS=P,( daa50e75ea959dcb29b3787ebb7fa89b7321ad33PKS=P;[ (Td7981f7d693434812c5278b882a20afd78ac7c62PKS=Pb(9a154525902719bb46aeecb42daa3c2ecb5cb814PKS=P(04b0428c54403a1efe5283ff6d96d1510026644aPKS=PC (K62018fb6cfb32a0663ed1d1a528105022c3fcea3PKS=PF (5986e8b844e0b1b43da0aec86e3756027a6d6fecPKS=P*'(5ea999b1b4090a86b58f49707414cbe023306117PKS=Pnݳ (:e0c487dd0eb6913b980966b07d2eca18bbb6bdbdPKS=PK(fcf5c1d9494fa84ce3f2d23dc60c7f991cb9fb61PKS=P7(e8eeeac53541b910afc2ccd93b65b81bcdeab4b5PKS=P (414409738e847af3c69f763ffa4ff07c613e3dec4PKS=P8 (70aeee2f1774c8a91e7716f75ab01856550a6409PKS=Pl| (ש15618de42ef7e940fbc50a7ddd15e45dd0234f1cPKS=P%xW^ (+0ecccf73402d868725d3cde056096033bf8fd371PKS=PKE(9459f26e79f93b76475e06cb51b47faae42c04c6PKS=PCt (ͪ099d5226b86f22c99d4f60972f0749c7320d2ffcPKS=P^ӓ9 (!54c3424f234d31311182296bf26d1422d2e1883dPKS=P4:(pd953937b4bbe1dfa949e6540ce2c320cc95428e1PKS=P4iͯ (eef973970e9e53213d811e9da48b74122c60c287PKS=P3s(c29208b7179f6596e1fddf51882a65ed775f9e8ePKS=PlU (gefaba465f1a4b50d2e09423bb40ed021fbf18304PKS=Pv(391e0d5947df36292d5126be4d1b75effbd0c7cdPKS=Ps*e  (b4b5e862b247a631f2aa297c5808516fb7bdae68PKS=P) (Y5a3dfc62d6fbee073751751467713987b9582d26PKS=P?(62e612cde71eb59e13acf226ce22fb213e306dcbPKS=P (41a8e2ad90693b8903191fd848e78148a198c2bbPKS=PIP(E33d483f1e50dfcb7827d6da5301d3fef4b04580fPKS=PEn' (09039b0ffcaa4de95c31f8a1aef28f2ec72292f9PKS=PS(1cf18a8704f045d972cb35d8f71496c31eec5e78PKS=P{1 (16ca0643703569537303ee1a52b8e7bb42bc0bbe2PKS=Pg(67f3d6d48b2fe676de86f5152d64e53b4719a7e0PKS=Pk  (ί283465efae9397bcd74c949924723e11826caf37PKS=P)("e1016f8dc7f114fe198d2ef9249aa40f42a76628PKS=Pį(oa9a682ae51ab3d7dd68b51dbf30df921e2539eb4PKS=P{^ (89ffac276cd4debfc887da369f5c5c6cbb392fb9PKS=Pla( 3148c892ae55347c88360963fe1d86615b8822e0PKS=P{(Xcacc58e7f182a47a4015a46b1e22685b887c3017PKS=P(a01023154b0c3f384612242a81b733aec0f2f83aPKS=P> (c7c5c5056372316e7b5d1b8240f73c4dcf79a341PKS=Pg(A118b485aa779aa9f94b071638baa5b563942fcbfPKS=P=;(5973868525a9cac93e96191e354f7916594027dfPKS=PF(۲7e95ac207c1dc1183507f598bd1aa1aff9531eb6PKS=Pf(58b8bbf67ca121810efdd9e7c5a7880480cea612aPKS=PQ (b24a99225cea15525db6460c4235b6ef7d31da9dPKS=P~qN(ӳefea7271551439f77587aeebd756f849dee149d6PKS=PG?( 87ebce05a23c2bee2865b86e2a476f042a84429dPKS=PNV(f9b1e411ded322b0ee31f22a4438a3fcf6fc39e8PKS=P(<4f3f312880428a82408159ce8033542846a39609PKS=Pi(85ae25e7ab7c0887b3c14010e4483a7030a21f88PKS=P$7i(db2fce4c1a8225574ccb817e4604d02e25400de7PKS=P3(̸957bcd456d3e99105f00a723bf85ddce0e725289PKS=PHhI(a17d59af71a654825df2ac6cc8e165ab16d324f5PKS=P*/(ebe159c4843f555a9e5350b5f3082ff21215206efPKS=P!(13d41f45b804bc5231f886916d4ec62d1a391161PKS=P*<"(ac5d555398cc1be2840286bb4a81f87f7ccd98bdPKS=P?>(ic42610119be8474f5cae6a9326cbfc690e142820PKS=P}FH(2d263c9844613e083ba7f0f7227e215d2ec967ebPKS=PY3(a07eb0ccfbd7027a83cf611d3005e82b1c0e5bd7PKS=PUS(Y18ffb8c5e6ac67bbe9372dcb2a78f60b5cbfe3b7PKS=P= (60f53a0474bf087e594eb3361deca084868168acPKS=P/(10a83a541a304859318421c27167060e18faa10dPKS=P (B0301ad562598f045aa5796b278fd06059af16287PKS=P8(30b567a63b8291368fcf44c1ac74f81e06cab1a7PKS=P ؜(ݼ3e725034ef32a21d0e1a65ab86f2d2cbf6d65138PKS=P ('1393a3571a1a21df9e2acac5184a26f8a7130db1PKS=Pһp(v065abfccb95d375f46779563ed47887f7da49442PKS=PuOh(2f81ad5f254d9f24ca0054832a56cfbc4eefbff8PKS=Pq(ef15df8997a73dbbdb900fc9830c85a07d014939PKS=PR?> (X4da219e1209bcca3e807d217510f9ef542db027ePKS=Pp(fc89f47002f1322ea8ffb18de516e5da3765974aPKS=P? (ce444fa0b208ecae38767dd3d2daaf34b275b364PKS=Phen(B3f8aeed0968aa4822bf081cd4f243821f5fefa4cPKS=Pa (d733ebb39ffdee32230880391f043d6248624eeePKS=Pޛ%(ۿ8456c471f2a6feeb4daabed1f60092b78b79b5f2PKS=P̜)()9a5a55b28c6945e5cb5adf07f792dfc059d46e85PKS=Pv&(cc75ba246693ecb6864db12b3d1b5d448ec224aaPKS=P](49555fb1235acdd9354506a7c44d218b94be6d65PKS=P.D(Gc80ad147eb8e6e9e755893cc1c15c95047cbead7PKS=P((c1c9e1398c871b3240f9b2d39e5d7ea154cd9180PKS=Psz(db20983012d33dd476751304654d2b58be6b713ePKS=P;()50bb01a72276481efcaea37e99ef7f4fc17e1301PKS=P@0(~45d5ce8705b13f8ebea34a0231536779bbe37dc0PKS=Pcd:(556c2febe1c720601306f447553007550b9d85c1PKS=P+(fc30072c46947e5d26beeafdbdd9a839109dc48ePKS=P !Q(kbc39ae050d3d5194c14a8b039afa0de17a10cbdcPKS=P-i(f057d138aaa0c729f2e2fda123495890651f234bPKS=PDd(O37703e28f73c22332ee7663af94a1dfa8415a7e5PKS=P{(00686eeff01e2c7a80722c19be086efb8d7f8451PKS=Pi(20e1f02c56a5050ae5839e033c16521518a3540fPKS=P&v(C9707a89a98008f5b859f5afbb81c4509df04d871PKS=Pz(5eb7f341fb3abb992ceb8dee7a3ddaae8068cd76PKS=PA} (df04d1fa9b0157e57304e401beff07d1eb61166aPKS=PS((<2b14ee0d695eb73de1d8bf7b784cce7d3e53be1bPKS=P)Qh (4f5309de1d1b8a36115a142cf2ed59624d460938PKS=Pt6=(f54fc96833f5c360dae8b8fcbfb2f38c9b464452PKS=Pu@1(X2642fb423e749f999ef8e053d346943fd7940bbdPKS=P<{(30348e07ce6bef89b5dd02007d7f6a4dc35918e1PKS=P#b|9 (6e8936e3e508555d14a7c77c96d439331c80f9c3PKS=Pv p (({a068dafb1d8378cf659f9e87a5b7c512446bef17PKS=PI(6cc31cdc3bf67c762a459ce4a714aacfc3a73bb6PKS=Pp(a8896183214b241249ea769f9dc931da0aae2de9PKS=P/(7ca1d9bc95acf235528f48cdd9ee56af1b2f1b46PKS=PFa,(V2b12767fb99a50587881dceeb430ec9ff864acf3PKS=P+Ћ:(831200ed0e13e8115d37cc7702b88dd5639885b6PKS=Plz(03a73421d7f8531087e2a85a5228649e4f744aca4PKS=PMUv(~d22774f0302eef5a0d0f1f87a3e6249f91a1be7bPKS=P8] (28f84821cb4860b768660b43ed328544190ededbPKS=Pq#7 (!62f4c6bef96e9339119a1f6e5403976dd20fae9cPKS=P1(p8e03e4290a2a2cb2d61d7351b56b5d8f279fde78PKS=P6(93e072b4caf74d61329f14c882d17c1325bcfd54PKS=PW (7c7db533db11c5aeec093c55585ec6b8ed3f5de7PKS=P3E (cdc80376ebf5e25c640527243db11227a2dedeb23PKS=PQu(92301961cacaa67cac7b4a618ef651e6602a53b1PKS=P2L(606724d57a63d5e7111391f38b04d4de341506f8PKS=P3Wh(K8c0d2fc47665cfdda2fb4abe59a8cf4900caa184PKS=PJ(b3829ab9dacde0296046b0bf604f009466269a10PKS=P]](773626e1ca85179d89ac591105f9201a1e1639b8PKS=Pmѳ(34158d2f013588c4150c6899d4bea14f31fc5c5caPKS=P?;B(850af390b2d785c90e5a7c4dcd02039a343ab6d2PKS=PӈV (66b398994ad30f21e32826edf5201a13e0737dadPKS=P݇ (8f43026f4951d439fe4fb47031679556ddc87ae8PKS=P(053d8d6ceeba9453c97d0ee5374db863e6f77ad4PKS=PD(4233817da87d29dfb673b35982ede8bb2034c2608PKS=P8(fc65921914641cc9adb6de25d6d28a0a682ff01fPKS=P}ZW(8d0494ae076d97ce5f741d90eefd30d0514526f8PKS=Pc(+5edf2fb80583b066abb5a40288f46560550c8363PKS=Pt (y5e7b3cf851000d7fae04cdabb97b545f67d9c462PKS=P32((37af4bc8ef725a2501b406eb556405170c068148PKS=PŃ(#3d97004d6a2ba922cf3b55d8a697be5ab17b0cccPKS=PQ/(16efa30942db36f3eb63d7e79e5b596a7de70762PKS=P| p(ld5f4d4c810444f1930505be0625aec6e09be5640PKS=P=^(aa44599244e5c0a07830c6cbdd776b63d84994bePKS=Pc~(8d22a71ce90b9d87ff272c592d327e35870a2476PKS=P\ե(T69c44f7d2b91ccbf5c78758dffa5eded3617fec5PKS=PG@13(133e5e7ff682e83923a2b8c57a3530f509ea6933PKS=PU(b7def33da1cc5b18282130844afb95571cfb0aebPKS=P7(:c394efb7380317821d9b37554d96f833c83549a2PKS=PH (16e6928606d5a9fb6cf49d71037edb9140495782PKS=PNZW(0319e6ced62df0db05c5d586d1d4d09e674f1491PKS=PJ ( 55282b477fb510a8e589b0659172c6fd3237a984PKS=PN(ta12fb33de8911424420d3f7b66040e689848d599PKS=P*Ÿ(fe1570ffaeff70ee02538baa308a251e03d8c36aPKS=Pwם(T9de6795d65edbd19d74b318b47cb4a18afa67017PKS=PE_f(138e95750d538ad932c7435a8913fe5f9228a23ePKS=P'(Gcd61cabb580dc193936d9ae0db03bbc6ba082e7cPKS=P(2f13c849e879f22c30a1de817bd683cf32e2df47PKS=Pp(2260a8338569f1c5c85f1e0a8238589341425e36PKS=Pr 3(57c1dd6cabb6a08b3d21cc7653d68fe01355fbabPKS=P%(5e13123c2053d7b585d33605e86045c0919187f6PKS=PH(875fc0ed47b21ab08259b4fc74da493732b4baffPKS=Pei (g4b21f9d4437f5cae2963b8cd5e45c2a8b84a2a97PKS=P (4606755cb0b5327a4c6cedcce9fa9251ecf5a205PKS=PgH (ha68825750e855e38ba1b977dcadc79eb892a4542PKS=PBPv(9273eac934f5cddf789d35ab05538dd3cfe2cad0PKS=PAC$ ( e2ad91a2a38cc9a2b90bdb0f011e2aacfb4a457ePKS=P(Vda4012c19f3844eb052ed10d417d0c5496d441b8PKS=Pt(8b4fd5262094a7a5c2a1edc886d75d97ea0634e1PKS=P (b33245788adce8c18a20ca9b843b416bbdf0d691PKS=PGͫE (>b041ed1ae07af0dd099d5707468a8fbabdfc6917PKS=Pj 1 (2903285b68242f88e662ddd4b6b88d09fb208481PKS=P(V(a29ec8a3fefc23fbe9529d7e4443778595e88a0fPKS=P6 (2a6e3dd5b7cc6b28c1617963f84cd55165f89421dPKS=P(a3f9dfdd79b910272c884532ea05ecb89a965f86PKS=P(22197debf0f7e4e51ba8dfe021d7c2aef1707d02PKS=Pn g ( b8aafc7166561b15d08c8747f3482c4faa604b4bPKS=PCV (tbfd7e1b477b04b6b5119ecc8a9bef64ad6c885fbPKS=P)(a9fdcfe2e5cca3338087a03dd0f71c16aa8ecc52PKS=PF ( 7b71f862af3bd01a802682ad52cb4348c59e6cc8PKS=PRJ- (p4c4162b9ec968252998abef80558c0e8a3bc187fPKS=PV(4c6b9619ded0ea1e8a802d85ded8e6a751d27a65PKS=PD!L (025624ce5a168060c3523421d83d7d1dc5ddf0eaPKS=P+3g([3a71dac94fd3669da1e7bae8b66dae1e60bf7f6bPKS=P6` (952101e344866559c0efd666951444d1e3d21a1aPKS=PvA(4d7e0f977df757b4daa96a05fec2389a03c30596PKS=PxO;(C200ae6c6babb0a6e7516bea0cb79edc78f498122PKS=P s' (eb06c4d999e8eb5231cbc9dc015f2b0b5194f742PKS=PJn(3cd8fa0016fd9d2cbf53f8f539f12c270f633c05PKS=PK (0c4e45aa0cf119db87603c19ffb33c186f3540ed4PKS=P{!(11ac6908c6dc24ee109274cdf5de25af065c8fe3PKS=Pz1k(12009d635c9bc49b5c4f90eb3e91dc66bf152567PKS=P\ (, 9854bb876a155196d7bee11e19874609300d1baaPKS=Po (y 41d8be7967f770cd52cb22807ff2a0e6a8337df9PKS=P'( 7193efcf138f4b5237be789dad15c97d5a239f32PKS=P h(44aade98c1e56fdfd9a57ef0b46d38ea70294a29PKS=P#< (18ab8bcbc858eab206a1905e53e7f165b308798cPKS=P9jz(Uf09c1b78677b447eed1bc8a0eb75bbdd673195fdPKS=P1|(8373088a16bb3d77afd4bd3ffce3d1d7e5540fe3PKS=P1k3Ʉ(c8a7e23cc9e46a3e6b61332dde919ee9666e23e0PKS=P' (3522bb534b5bba89fa6e5477d93693c4c4c5b993PKS=PŊQ (9ee3585e96948f757281e780829cc0aab755bac3PKS=PĨfK('83030117c50153f9437af40a6889bb98b73da7d7PKS=P `Rkj(c377cf3b3f7b6d45c868376289f7b7bce7ef5216PKS=PB(43dd3342868f71648b80bcfff527c06bbfacd1b77PKS=Pl~ 9(cf43e10971a3599cb7905d78e3eddebb029ce35ePKS=P@(4a4ef54c4703c2ec1bf45e258e95102a21c22a5cPKS=P (+9cc9711465f4b5a85f9a645571aa31a0e6067c19PKS=P\ (w2befaddd1e7522074876a516ec2b4c05f58e7f87PKS=Pd (8a53370599c62224ee9528cd8b66ae4fb0ebded3PKS=P (a954b4016f4743444d6319da86d394e933460f08PKS=PoF(fc86b65ad6eed68f85297e6f91ecb981569ea7291PKS=P(bc88afa2e3b4b18a8fdd4fe22387edabc48c7778PKS=P0( eb72d97cc242c3ee2319baabb62f9c8e5e3b8342PKS=Pb* (V04734c1ab04167f68bf63860cc68841b3a2f9e1fPKS=P( (346b82b3748f30d750ed3db7ede4539aebae189fPKS=Pz(ceb3b4e852684dca73ccbe71b37793495541da5bPKS=PƓ (=3dae51d482544901b4c0396c125b99d56611c4f1PKS=P尵3(44502b41c464bd988cf80d5a8da9c6c92084f678PKS=PY|(e1495382935d49a2d34842d6c136b705c461cecbPKS=P(50cff9670d5c4b6519147edc6c4761f9ce5fe7689PKS=Pm (2c5a722a249fc994945d82c68281609fde3126e0PKS=PsZ (d628c9e7265d93f331fc957a1808623b85131000PKS=PiH+($ f05a164dc4aa46924abd731cf1cd2d729f622458PKS=PlR ( 3ef3a73ebf9ecefa051eb78ebf77458c1686117dPKS=P-_( 5679b0329383742d45c502e3bf3a8c18e0f83132PKS=Pȓ" (2!9bf146caaadab72665bc065a04a47f8bac2c54b5PKS=P~z(!f8f6179dc33d2e6d13f572c70c7edba78fcd43f7PKS=P(!b6dd0eb4b1dc68eba7ab501022aa90d3cfa65c56PKS=P; p("e472b7537a3a446817f4d2da9c2c4de3b0ae26f0PKS=Pv$E(d"96b341576ff6a8c7966e559a2792093607ac8474PKS=Pg("8d883f1577ca8c334b7c6d75ccb71209d71ced13PKS=P\= #("d16944b81cf411f41e2273d81eeb88ca27858e60PKS=PsI(N#546d1f3f064f0cd869051f53cec49736cd0c4edfPKS=P_m(#6caee882815368be62a7e885e76c5f6a46a5e981PKS=P"c(#43577997bb0758cf5fa52eeac622fae8c4489559PKS=P}(C$7d04dbda98df4c31f615b60aba7171b320b7350ePKS=P? ($7da3aeca68e188f2d8af797282d5fb979ad6c8c9PKS=P۸ٜ ($5a5f8b956eb057c47088c39eee9a8f126bfc015cPKS=PHe!-I(2%2bfc1ace91058e4398720e9aadf5be4ca04433f1PKS=Phw(%29f4be27bd36b2f84756d61cf27d2b508837c060PKS=P* (%0a915257e0826e7df8154269aa446bb42b438c3ePKS=PE9 (B&3be921feedfc1ecf0d58b325a083d446f9277ee3PKS=P8~(`>(&a327b35aa200bf534a2fee0b60f2c89439fc3862PKS=Pr(8,085f81e3e683235ca258ddbf0d15853f1484965ePKS=P0(,b68542373c05c0ed25231d09955b2c699d37c45bPKS=P/@)(,88d44708fb11ff802d0f0e3916fa70a577a990f2PKS=PԑsZ(!-3827752efb81c3f06e4aaf79e2ced6ec68e9d664PKS=Px0(l-d5d070960f210500c2e1fcba4106a3f1b25e63abPKS=Pq(-f370e58a3deb15f429a722d57b560435133d9bacPKS=PS (.95db098dec3868070f0e4cb69fe90f5d50cfc155PKS=P^S(S.4436f2c32398e27e82fbbf5f11c639387e5566abPKS=P;4 (.ac339ea5a36fc0703c03019c9acf3ff021b04876PKS=P-(/a53cac395a63c059771a96a495d38c8a7bef234bPKS=P+a5(`/c2a80624664597ff97e7dac8636e23555d6648ecPKS=PO(9040d68c19b58eb814291385f9314a6e56ee3a0aefPKS=P (0c4dd8f4bfa9f77c6be9bc693363c319500ae3434PKS=POr(0789e09f7b449d04c886713f54d36646aea6e63daPKS=P51((1b94903940e7e5d187d4f2087a0850c1490c76d20PKS=P 6u(t1bc8cff29c3f73080a29e70c27d22e262cebe5d7ePKS=P0(181b97851a2592b7f365618e395ea136369fa1d5fPKS=P0 (217c360097c2eab24f8eac7155013c981ff1d9fc7PKS=P# (d2e1cc1d6d72d368909f0c3a8b15b115429f712c9dPKS=PsO(224699318bbd5188f792a574110d2974db1871863PKS=P*t(236fbe5edbcbdc95cd78c0f92d0f21755ce3cf5d3PKS=P(K3979f5e9265bda8af70bb0c3e611798154fd3ffb0PKS=PRdB (36d16e9038b3d4f59a14b7b8920e36adc1c900a96PKS=P6& L(3d7bd1860e7aa1d3e618ea3017591c611530965b1PKS=PǏ(94cecd66910eee3bd1955756fc4826283495031ed7PKS=P(46fbdf66609ec39be88340cb3c8a0ec34750d1f54PKS=P '.(43612dbd8cffb60a210b5c9a6e345fa2be750c955PKS=P@t(5abfe39a5f80a03e358d3d338aa18babc93bacb45PKS=Pf (i53edb294ed16098565235b8237a95a051f5ff2122PKS=PU2(5d64a17fc1548aba4354f9da6d53aff652e534e30PKS=PAL(6a2af9717566b7d9f7ccb15d37c849dcd5c4026e8PKS=Py+(S6d05948ba57fdd1703955a45393ca7a1cc2c31dfePKS=Pr(6511f3254c8e47112886a3b458d6326d6ec915f0fPKS=P5 (695ee1f34fc2074ca5f96b65ba69dd2ffda938d35PKS=P&pQ(<74733656896059f75e80997cf8564e175590b827fPKS=P킅m (7bd7511a9460d6157c3d7b0f6f07814d019736717PKS=Pn>`(76096edc948bdd849e5ae990e56b460a1e260a202PKS=P:()8a8c2d4fd87913a888006920752aa265f3e9e5461PKS=Pa@s(v8d8cb42032bb4391c44986edf7487a5ee50946006PKS=P#PB(85b73b91496f8aef4c24cb39a570b043a949f7ca4PKS=P%l(99699f9c846f1f483e2c34152b6b110cf2c9a7291PKS=PE E(h9f019d822f4c4a5b624e9626723aa3c6bcc0b94e0PKS=PP(9bed4eb698c6eeea7f1ddf5397d480d3f2c0fb938PKS=PE=/(933a5c24dad25172ba610f3dfdbb96e460580e734PKS=P]_P(I:01ead626805a3cb150ca8fe330c6d22d618f5244PKS=Pop(:f7965ea06921ecdcc8a8c2e76fa64a29be371e25PKS=Pw (:f94c074f984dec9c628afa84b3e58f134dbc0616PKS=P"T E(=;c133241556aa7c33e803c1754d27f3c97f6761ddPKS=PR5(;c4d10f21212f7904b7c9a990e2850aca7a1285cePKS=PщT(<ae38075f977523bbd0bc19324d329fb6145de993PKS=P$3(<03b707e28a08072e770c654e7bc26ba735bd3897PK nR-=nanopb-0.4.1/tests/fuzztest/flakystream.c000066400000000000000000000016121361552131000205140ustar00rootroot00000000000000#include "flakystream.h" #include bool flakystream_callback(pb_istream_t *stream, pb_byte_t *buf, size_t count) { flakystream_t *state = stream->state; if (state->position + count > state->msglen) { stream->bytes_left = 0; return false; } else if (state->position + count > state->fail_after) { PB_RETURN_ERROR(stream, "flaky error"); } memcpy(buf, state->buffer + state->position, count); state->position += count; return true; } void flakystream_init(flakystream_t *stream, const uint8_t *buffer, size_t msglen, size_t fail_after) { memset(stream, 0, sizeof(*stream)); stream->stream.callback = flakystream_callback; stream->stream.bytes_left = SIZE_MAX; stream->stream.state = stream; stream->buffer = buffer; stream->position = 0; stream->msglen = msglen; stream->fail_after = fail_after; } nanopb-0.4.1/tests/fuzztest/flakystream.h000066400000000000000000000006651361552131000205300ustar00rootroot00000000000000/* This module implements a custom input stream that can be set to give IO error * at specific point. */ #ifndef FLAKYSTREAM_H #define FLAKYSTREAM_H #include typedef struct { pb_istream_t stream; const uint8_t *buffer; size_t position; size_t msglen; size_t fail_after; } flakystream_t; void flakystream_init(flakystream_t *stream, const uint8_t *buffer, size_t msglen, size_t fail_after); #endif nanopb-0.4.1/tests/fuzztest/fuzztest.c000066400000000000000000000361101361552131000200710ustar00rootroot00000000000000/* Fuzz testing for the nanopb core. * Attempts to verify all the properties defined in the security model document. * * This program can run in three configurations: * - Standalone fuzzer, generating its own inputs and testing against them. * - Fuzzing target, reading input on stdin. * - LLVM libFuzzer target, taking input as a function argument. */ #include #include #include #include #include #include #include #include "random_data.h" #include "validation.h" #include "flakystream.h" #include "test_helpers.h" #include "alltypes_static.pb.h" #include "alltypes_pointer.pb.h" #include "alltypes_callback.pb.h" #include "alltypes_proto3_static.pb.h" #include "alltypes_proto3_pointer.pb.h" /* Longer buffer size allows hitting more branches, but lowers performance. */ #ifndef FUZZTEST_BUFSIZE #define FUZZTEST_BUFSIZE 256*1024 #endif #ifndef FUZZTEST_MAX_STANDALONE_BUFSIZE #define FUZZTEST_MAX_STANDALONE_BUFSIZE 16384 #endif static size_t g_bufsize = FUZZTEST_BUFSIZE; static uint32_t xor32_checksum(const void *data, size_t len) { const uint8_t *buf = (const uint8_t*)data; uint32_t checksum = 1234; while (len--) { checksum ^= checksum << 13; checksum ^= checksum >> 17; checksum ^= checksum << 5; checksum += *buf++; } return checksum; } static bool do_decode(const uint8_t *buffer, size_t msglen, size_t structsize, const pb_msgdesc_t *msgtype, unsigned flags, bool assert_success) { bool status; pb_istream_t stream; size_t initial_alloc_count = get_alloc_count(); uint8_t *buf2 = malloc_with_check(g_bufsize); /* This is just to match the amount of memory allocations in do_roundtrips(). */ void *msg = malloc_with_check(structsize); alltypes_static_TestExtension extmsg = alltypes_static_TestExtension_init_zero; pb_extension_t ext = pb_extension_init_zero; memset(msg, 0, structsize); ext.type = &alltypes_static_TestExtension_testextension; ext.dest = &extmsg; ext.next = NULL; if (msgtype == alltypes_static_AllTypes_fields) { ((alltypes_static_AllTypes*)msg)->extensions = &ext; } else if (msgtype == alltypes_pointer_AllTypes_fields) { ((alltypes_pointer_AllTypes*)msg)->extensions = &ext; } stream = pb_istream_from_buffer(buffer, msglen); status = pb_decode_ex(&stream, msgtype, msg, flags); if (status) { validate_message(msg, structsize, msgtype); } if (assert_success) { if (!status) fprintf(stderr, "pb_decode: %s\n", PB_GET_ERROR(&stream)); assert(status); } pb_release(msgtype, msg); free_with_check(msg); free_with_check(buf2); assert(get_alloc_count() == initial_alloc_count); return status; } static bool do_stream_decode(const uint8_t *buffer, size_t msglen, size_t fail_after, size_t structsize, const pb_msgdesc_t *msgtype, bool assert_success) { bool status; flakystream_t stream; size_t initial_alloc_count = get_alloc_count(); void *msg = malloc_with_check(structsize); memset(msg, 0, structsize); flakystream_init(&stream, buffer, msglen, fail_after); status = pb_decode(&stream.stream, msgtype, msg); if (status) { validate_message(msg, structsize, msgtype); } if (assert_success) { if (!status) fprintf(stderr, "pb_decode: %s\n", PB_GET_ERROR(&stream.stream)); assert(status); } pb_release(msgtype, msg); free_with_check(msg); assert(get_alloc_count() == initial_alloc_count); return status; } static int g_sentinel; static bool field_callback(pb_istream_t *stream, const pb_field_t *field, void **arg) { assert(*arg == &g_sentinel); return pb_read(stream, NULL, stream->bytes_left); } static bool submsg_callback(pb_istream_t *stream, const pb_field_t *field, void **arg) { assert(*arg == &g_sentinel); return true; } static bool do_callback_decode(const uint8_t *buffer, size_t msglen, bool assert_success) { bool status; pb_istream_t stream; size_t initial_alloc_count = get_alloc_count(); alltypes_callback_AllTypes *msg = malloc_with_check(sizeof(alltypes_callback_AllTypes)); memset(msg, 0, sizeof(alltypes_callback_AllTypes)); stream = pb_istream_from_buffer(buffer, msglen); msg->rep_int32.funcs.decode = &field_callback; msg->rep_int32.arg = &g_sentinel; msg->rep_string.funcs.decode = &field_callback; msg->rep_string.arg = &g_sentinel; msg->rep_farray.funcs.decode = &field_callback; msg->rep_farray.arg = &g_sentinel; msg->req_limits.int64_min.funcs.decode = &field_callback; msg->req_limits.int64_min.arg = &g_sentinel; msg->cb_oneof.funcs.decode = &submsg_callback; msg->cb_oneof.arg = &g_sentinel; status = pb_decode(&stream, alltypes_callback_AllTypes_fields, msg); if (assert_success) { if (!status) fprintf(stderr, "pb_decode: %s\n", PB_GET_ERROR(&stream)); assert(status); } pb_release(alltypes_callback_AllTypes_fields, msg); free_with_check(msg); assert(get_alloc_count() == initial_alloc_count); return status; } /* Do a decode -> encode -> decode -> encode roundtrip */ static void do_roundtrip(const uint8_t *buffer, size_t msglen, size_t structsize, const pb_msgdesc_t *msgtype) { bool status; uint32_t checksum2, checksum3; size_t msglen2, msglen3; uint8_t *buf2 = malloc_with_check(g_bufsize); void *msg = malloc_with_check(structsize); /* For proto2 types, we also test extension fields */ alltypes_static_TestExtension extmsg = alltypes_static_TestExtension_init_zero; pb_extension_t ext = pb_extension_init_zero; pb_extension_t **ext_field = NULL; ext.type = &alltypes_static_TestExtension_testextension; ext.dest = &extmsg; ext.next = NULL; if (msgtype == alltypes_static_AllTypes_fields) { ext_field = &((alltypes_static_AllTypes*)msg)->extensions; } else if (msgtype == alltypes_pointer_AllTypes_fields) { ext_field = &((alltypes_pointer_AllTypes*)msg)->extensions; } /* Decode and encode the input data. * This will bring it into canonical format. */ { pb_istream_t stream = pb_istream_from_buffer(buffer, msglen); memset(msg, 0, structsize); if (ext_field) *ext_field = &ext; status = pb_decode(&stream, msgtype, msg); if (!status) fprintf(stderr, "pb_decode: %s\n", PB_GET_ERROR(&stream)); assert(status); validate_message(msg, structsize, msgtype); } { pb_ostream_t stream = pb_ostream_from_buffer(buf2, g_bufsize); status = pb_encode(&stream, msgtype, msg); if (!status) fprintf(stderr, "pb_encode: %s\n", PB_GET_ERROR(&stream)); assert(status); msglen2 = stream.bytes_written; checksum2 = xor32_checksum(buf2, msglen2); } pb_release(msgtype, msg); /* Then decode from canonical format and re-encode. Result should remain the same. */ { pb_istream_t stream = pb_istream_from_buffer(buf2, msglen2); memset(msg, 0, structsize); if (ext_field) *ext_field = &ext; status = pb_decode(&stream, msgtype, msg); if (!status) fprintf(stderr, "pb_decode: %s\n", PB_GET_ERROR(&stream)); assert(status); validate_message(msg, structsize, msgtype); } { pb_ostream_t stream = pb_ostream_from_buffer(buf2, g_bufsize); status = pb_encode(&stream, msgtype, msg); if (!status) fprintf(stderr, "pb_encode: %s\n", PB_GET_ERROR(&stream)); assert(status); msglen3 = stream.bytes_written; checksum3 = xor32_checksum(buf2, msglen3); } assert(msglen2 == msglen3); assert(checksum2 == checksum3); pb_release(msgtype, msg); free_with_check(msg); free_with_check(buf2); } void do_roundtrips(const uint8_t *data, size_t size, bool expect_valid) { size_t initial_alloc_count = get_alloc_count(); size_t orig_max_alloc_bytes = get_max_alloc_bytes(); /* Check decoding as static fields */ if (do_decode(data, size, sizeof(alltypes_static_AllTypes), alltypes_static_AllTypes_fields, 0, expect_valid)) { /* Any message that is decodeable as proto2 should be decodeable as proto3 */ do_roundtrip(data, size, sizeof(alltypes_static_AllTypes), alltypes_static_AllTypes_fields); do_roundtrip(data, size, sizeof(alltypes_proto3_static_AllTypes), alltypes_proto3_static_AllTypes_fields); /* Test successful decoding also when using a stream */ do_stream_decode(data, size, SIZE_MAX, sizeof(alltypes_static_AllTypes), alltypes_static_AllTypes_fields, true); do_stream_decode(data, size, SIZE_MAX, sizeof(alltypes_proto3_static_AllTypes), alltypes_proto3_static_AllTypes_fields, true); /* Test callbacks */ do_callback_decode(data, size, true); } else if (do_decode(data, size, sizeof(alltypes_proto3_static_AllTypes), alltypes_proto3_static_AllTypes_fields, 0, expect_valid)) { do_roundtrip(data, size, sizeof(alltypes_proto3_static_AllTypes), alltypes_proto3_static_AllTypes_fields); } /* Check decoding as pointer fields */ if (do_decode(data, size, sizeof(alltypes_pointer_AllTypes), alltypes_pointer_AllTypes_fields, 0, expect_valid)) { do_roundtrip(data, size, sizeof(alltypes_pointer_AllTypes), alltypes_pointer_AllTypes_fields); do_roundtrip(data, size, sizeof(alltypes_proto3_pointer_AllTypes), alltypes_proto3_pointer_AllTypes_fields); /* Test successful decoding also when using a stream */ do_stream_decode(data, size, SIZE_MAX, sizeof(alltypes_pointer_AllTypes), alltypes_pointer_AllTypes_fields, true); do_stream_decode(data, size, SIZE_MAX, sizeof(alltypes_proto3_pointer_AllTypes), alltypes_proto3_pointer_AllTypes_fields, true); } else if (do_decode(data, size, sizeof(alltypes_proto3_pointer_AllTypes), alltypes_proto3_pointer_AllTypes_fields, 0, expect_valid)) { do_roundtrip(data, size, sizeof(alltypes_proto3_pointer_AllTypes), alltypes_proto3_pointer_AllTypes_fields); } /* Test decoding when memory size is limited */ set_max_alloc_bytes(get_alloc_bytes() + 1024); do_decode(data, size, sizeof(alltypes_pointer_AllTypes), alltypes_pointer_AllTypes_fields, 0, false); do_decode(data, size, sizeof(alltypes_proto3_pointer_AllTypes), alltypes_proto3_pointer_AllTypes_fields, 0, false); set_max_alloc_bytes(orig_max_alloc_bytes); /* Test decoding on a failing stream */ do_stream_decode(data, size, size - 16, sizeof(alltypes_static_AllTypes), alltypes_static_AllTypes_fields, false); do_stream_decode(data, size, size - 16, sizeof(alltypes_proto3_static_AllTypes), alltypes_proto3_static_AllTypes_fields, false); do_stream_decode(data, size, size - 16, sizeof(alltypes_pointer_AllTypes), alltypes_pointer_AllTypes_fields, false); do_stream_decode(data, size, size - 16, sizeof(alltypes_proto3_pointer_AllTypes), alltypes_proto3_pointer_AllTypes_fields, false); /* Test pb_decode_ex() modes */ do_decode(data, size, sizeof(alltypes_static_AllTypes), alltypes_static_AllTypes_fields, PB_DECODE_NOINIT, false); do_decode(data, size, sizeof(alltypes_static_AllTypes), alltypes_static_AllTypes_fields, PB_DECODE_DELIMITED, false); do_decode(data, size, sizeof(alltypes_static_AllTypes), alltypes_static_AllTypes_fields, PB_DECODE_NULLTERMINATED, false); /* Test callbacks also when message is not valid */ do_callback_decode(data, size, false); assert(get_alloc_count() == initial_alloc_count); } /* Fuzzer stub for Google OSSFuzz integration */ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { /* In some cases, when we re-encode input it can expand close to 2x. * This is because 0xFFFFFFFF in int32 is decoded as -1, but the * canonical encoding for it is 0xFFFFFFFFFFFFFFFF. * Thus we reserve double the space for intermediate buffers. */ if (size > g_bufsize / 2) return 0; do_roundtrips(data, size, false); return 0; } #ifndef LLVMFUZZER static bool generate_base_message(uint8_t *buffer, size_t *msglen) { pb_ostream_t stream; bool status; static const alltypes_static_AllTypes initval = alltypes_static_AllTypes_init_default; /* Allocate a message and fill it with defaults */ alltypes_static_AllTypes *msg = malloc_with_check(sizeof(alltypes_static_AllTypes)); memcpy(msg, &initval, sizeof(initval)); /* Apply randomness to the data before encoding */ while (rand_int(0, 7)) rand_mess((uint8_t*)msg, sizeof(alltypes_static_AllTypes)); msg->extensions = NULL; stream = pb_ostream_from_buffer(buffer, g_bufsize); status = pb_encode(&stream, alltypes_static_AllTypes_fields, msg); assert(stream.bytes_written <= g_bufsize); assert(stream.bytes_written <= alltypes_static_AllTypes_size); *msglen = stream.bytes_written; pb_release(alltypes_static_AllTypes_fields, msg); free_with_check(msg); return status; } /* Stand-alone fuzzer iteration, generates random data itself */ static void run_iteration() { uint8_t *buffer = malloc_with_check(g_bufsize); size_t msglen; /* Fill the whole buffer with noise, to prepare for length modifications */ rand_fill(buffer, g_bufsize); if (generate_base_message(buffer, &msglen)) { rand_protobuf_noise(buffer, g_bufsize, &msglen); /* At this point the message should always be valid */ do_roundtrips(buffer, msglen, true); /* Apply randomness to the encoded data */ while (rand_bool()) rand_mess(buffer, g_bufsize); /* Apply randomness to encoded data length */ if (rand_bool()) msglen = rand_int(0, g_bufsize); /* In this step the message may be valid or invalid */ do_roundtrips(buffer, msglen, false); } free_with_check(buffer); assert(get_alloc_count() == 0); } int main(int argc, char **argv) { int i; int iterations; if (argc >= 2) { /* Run in stand-alone mode */ if (g_bufsize > FUZZTEST_MAX_STANDALONE_BUFSIZE) g_bufsize = FUZZTEST_MAX_STANDALONE_BUFSIZE; random_set_seed(strtoul(argv[1], NULL, 0)); iterations = (argc >= 3) ? atol(argv[2]) : 10000; for (i = 0; i < iterations; i++) { printf("Iteration %d/%d, seed %lu\n", i, iterations, (unsigned long)random_get_seed()); run_iteration(); } } else { /* Run as a stub for afl-fuzz and similar */ uint8_t *buffer; size_t msglen; buffer = malloc_with_check(g_bufsize); SET_BINARY_MODE(stdin); msglen = fread(buffer, 1, g_bufsize/2, stdin); LLVMFuzzerTestOneInput(buffer, msglen); if (!feof(stdin)) { /* Read any leftover input data if our buffer is smaller than * message size. */ fprintf(stderr, "Warning: input message too long\n"); while (fread(buffer, 1, g_bufsize, stdin) == g_bufsize); } free_with_check(buffer); } return 0; } #endif nanopb-0.4.1/tests/fuzztest/generate_message.c000066400000000000000000000044151361552131000214740ustar00rootroot00000000000000/* Generates a random, valid protobuf message. Useful to seed * external fuzzers such as afl-fuzz. */ #include #include #include #include #include #include #include "alltypes_static.pb.h" #include "random_data.h" /* Check that size/count fields do not exceed their max size. * Otherwise we would have to loop pretty long in generate_message(). * Note that there may still be a few encoding errors from submessages. */ static void limit_sizes(alltypes_static_AllTypes *msg) { pb_field_iter_t iter; pb_field_iter_begin(&iter, alltypes_static_AllTypes_fields, msg); while (pb_field_iter_next(&iter)) { if (PB_LTYPE(iter.type) == PB_LTYPE_BYTES) { ((pb_bytes_array_t*)iter.pData)->size %= iter.data_size - PB_BYTES_ARRAY_T_ALLOCSIZE(0); } if (PB_HTYPE(iter.type) == PB_HTYPE_REPEATED) { *((pb_size_t*)iter.pSize) %= iter.array_size; } if (PB_HTYPE(iter.type) == PB_HTYPE_ONEOF) { /* Set the oneof to this message type with 50% chance. */ if (rand_word() & 1) { *((pb_size_t*)iter.pSize) = iter.tag; } } } } static void generate_message() { alltypes_static_AllTypes msg; alltypes_static_TestExtension extmsg = alltypes_static_TestExtension_init_zero; pb_extension_t ext = pb_extension_init_zero; uint8_t buf[4096]; pb_ostream_t stream = {0}; do { rand_fill((void*)&msg, sizeof(msg)); limit_sizes(&msg); rand_fill((void*)&extmsg, sizeof(extmsg)); ext.type = &alltypes_static_TestExtension_testextension; ext.dest = &extmsg; ext.next = NULL; msg.extensions = &ext; stream = pb_ostream_from_buffer(buf, sizeof(buf)); } while (!pb_encode(&stream, alltypes_static_AllTypes_fields, &msg)); fwrite(buf, 1, stream.bytes_written, stdout); } int main(int argc, char **argv) { if (argc < 2) { fprintf(stderr, "Usage: generate_message \n"); return 1; } random_set_seed(atol(argv[1])); fprintf(stderr, "Random seed: %u\n", (unsigned)random_get_seed()); generate_message(); return 0; } nanopb-0.4.1/tests/fuzztest/random_data.c000066400000000000000000000112411361552131000204420ustar00rootroot00000000000000#include "random_data.h" #include #include #include #ifndef LLVMFUZZER static uint32_t g_random_seed = 1234; void random_set_seed(uint32_t seed) { g_random_seed = seed; } uint32_t random_get_seed() { return g_random_seed; } /* Uses xorshift64 here instead of rand() for both speed and * reproducibility across platforms. */ uint32_t rand_word() { g_random_seed ^= g_random_seed << 13; g_random_seed ^= g_random_seed >> 17; g_random_seed ^= g_random_seed << 5; return g_random_seed; } /* Get a random integer in range, with approximately flat distribution. */ int rand_int(int min, int max) { return rand_word() % (max + 1 - min) + min; } bool rand_bool() { return rand_word() & 1; } /* Get a random byte, with skewed distribution. * Important corner cases like 0xFF, 0x00 and 0xFE occur more * often than other values. */ uint8_t rand_byte() { uint32_t w = rand_word(); uint8_t b = w & 0xFF; if (w & 0x100000) b >>= (w >> 8) & 7; if (w & 0x200000) b <<= (w >> 12) & 7; if (w & 0x400000) b ^= 0xFF; return b; } /* Get a random length, with skewed distribution. * Favors the shorter lengths, but always atleast 1. */ size_t rand_len(size_t max) { uint32_t w = rand_word(); size_t s; if (w & 0x800000) w &= 3; else if (w & 0x400000) w &= 15; else if (w & 0x200000) w &= 255; s = (w % max); if (s == 0) s = 1; return s; } /* Fills a buffer with random data with skewed distribution. */ void rand_fill(uint8_t *buf, size_t count) { while (count--) *buf++ = rand_byte(); } /* Fill with random protobuf-like data */ size_t rand_fill_protobuf(uint8_t *buf, size_t min_bytes, size_t max_bytes, int min_tag) { pb_ostream_t stream = pb_ostream_from_buffer(buf, max_bytes); while(stream.bytes_written < min_bytes) { pb_wire_type_t wt = rand_int(0, 3); if (wt == 3) wt = 5; /* Gap in values */ if (!pb_encode_tag(&stream, wt, rand_int(min_tag, min_tag + 512))) break; if (wt == PB_WT_VARINT) { uint64_t value; rand_fill((uint8_t*)&value, sizeof(value)); pb_encode_varint(&stream, value); } else if (wt == PB_WT_64BIT) { uint64_t value; rand_fill((uint8_t*)&value, sizeof(value)); pb_encode_fixed64(&stream, &value); } else if (wt == PB_WT_32BIT) { uint32_t value; rand_fill((uint8_t*)&value, sizeof(value)); pb_encode_fixed32(&stream, &value); } else if (wt == PB_WT_STRING) { size_t len; uint8_t *buf; if (min_bytes > stream.bytes_written) len = rand_len(min_bytes - stream.bytes_written); else len = 0; buf = malloc(len); pb_encode_varint(&stream, len); rand_fill(buf, len); pb_write(&stream, buf, len); free(buf); } } return stream.bytes_written; } /* Given a buffer of data, mess it up a bit */ void rand_mess(uint8_t *buf, size_t count) { int m = rand_int(0, 3); if (m == 0) { /* Replace random substring */ int s = rand_int(0, count - 1); int l = rand_len(count - s); rand_fill(buf + s, l); } else if (m == 1) { /* Swap random bytes */ int a = rand_int(0, count - 1); int b = rand_int(0, count - 1); int x = buf[a]; buf[a] = buf[b]; buf[b] = x; } else if (m == 2) { /* Duplicate substring */ int s = rand_int(0, count - 2); int l = rand_len((count - s) / 2); memcpy(buf + s + l, buf + s, l); } else if (m == 3) { /* Add random protobuf noise */ int s = rand_int(0, count - 1); int l = rand_len(count - s); rand_fill_protobuf(buf + s, l, count - s, 1); } } /* Append or prepend protobuf noise */ void rand_protobuf_noise(uint8_t *buffer, size_t bufsize, size_t *msglen) { int m = rand_int(0, 2); size_t max_size = bufsize - 32 - *msglen; if (m == 1) { /* Prepend */ uint8_t *tmp = malloc_with_check(bufsize); size_t s = rand_fill_protobuf(tmp, rand_len(max_size), bufsize - *msglen, 1000); memmove(buffer + s, buffer, *msglen); memcpy(buffer, tmp, s); free_with_check(tmp); *msglen += s; } else if (m == 2) { /* Append */ size_t s = rand_fill_protobuf(buffer + *msglen, rand_len(max_size), bufsize - *msglen, 1000); *msglen += s; } } #endif nanopb-0.4.1/tests/fuzztest/random_data.h000066400000000000000000000023341361552131000204520ustar00rootroot00000000000000/* This module handles generating & modifying messages randomly for the fuzz test. */ #ifndef RANDOM_DATA_H #define RANDOM_DATA_H #include void random_set_seed(uint32_t seed); uint32_t random_get_seed(); /* Random 32-bit integer */ uint32_t rand_word(); /* Get a random integer in range, with approximately flat distribution. */ int rand_int(int min, int max); /* Random boolean, equal probability */ bool rand_bool(); /* Get a random byte, with skewed distribution. * Important corner cases like 0xFF, 0x00 and 0xFE occur more * often than other values. */ uint8_t rand_byte(); /* Get a random length, with skewed distribution. * Favors the shorter lengths, but always atleast 1. */ size_t rand_len(size_t max); /* Fills a buffer with random bytes with skewed distribution. */ void rand_fill(uint8_t *buf, size_t count); /* Fill with random protobuf-like data */ size_t rand_fill_protobuf(uint8_t *buf, size_t min_bytes, size_t max_bytes, int min_tag); /* Given a buffer of data, mess it up a bit by copying / swapping bytes */ void rand_mess(uint8_t *buf, size_t count); /* Append or prepend protobuf noise, with tag values > 1000 */ void rand_protobuf_noise(uint8_t *buffer, size_t bufsize, size_t *msglen); #endif nanopb-0.4.1/tests/fuzztest/sample_data/000077500000000000000000000000001361552131000203005ustar00rootroot00000000000000nanopb-0.4.1/tests/fuzztest/sample_data/sample1.pb000066400000000000000000000010751361552131000221700ustar00rootroot00000000000000 (08EMU|DYa i@r1014z1015 1016*'@D(($(t@20142015     2016*L (08@HPnanopb-0.4.1/tests/fuzztest/sample_data/sample2.pb000066400000000000000000000007221361552131000221670ustar00rootroot00000000000000 (08EMU|DYa i@r1014z1015 1016* '@D(($(t@20142015     2016*nanopb-0.4.1/tests/fuzztest/validation.c000066400000000000000000000117431361552131000203320ustar00rootroot00000000000000#include "validation.h" #include "malloc_wrappers.h" #include #include void validate_static(pb_field_iter_t *iter) { pb_size_t count = 1; pb_size_t i; bool truebool = true; bool falsebool = false; if (PB_HTYPE(iter->type) == PB_HTYPE_REPEATED && iter->pSize) { /* Array count must be between 0 and statically allocated size */ count = *(pb_size_t*)iter->pSize; assert(count <= iter->array_size); } else if (PB_HTYPE(iter->type) == PB_HTYPE_OPTIONAL && iter->pSize) { /* Boolean has_ field must have a valid value */ assert(memcmp(iter->pSize, &truebool, sizeof(bool)) == 0 || memcmp(iter->pSize, &falsebool, sizeof(bool)) == 0); } else if (PB_HTYPE(iter->type) == PB_HTYPE_ONEOF) { if (*(pb_size_t*)iter->pSize != iter->tag) { /* Some different field in oneof */ return; } } for (i = 0; i < count; i++) { void *pData = (char*)iter->pData + iter->data_size * i; if (PB_LTYPE(iter->type) == PB_LTYPE_STRING) { /* String length must be at most statically allocated size */ assert(strlen(pData) + 1 <= iter->data_size); } else if (PB_LTYPE(iter->type) == PB_LTYPE_BYTES) { /* Bytes length must be at most statically allocated size */ pb_bytes_array_t *bytes = pData; assert(PB_BYTES_ARRAY_T_ALLOCSIZE(bytes->size) <= iter->data_size); } else if (PB_LTYPE(iter->type) == PB_LTYPE_BOOL) { /* Bool fields must have valid value */ assert(memcmp(pData, &truebool, sizeof(bool)) == 0 || memcmp(pData, &falsebool, sizeof(bool)) == 0); } else if (PB_LTYPE_IS_SUBMSG(iter->type)) { validate_message(pData, 0, iter->submsg_desc); } } } void validate_pointer(pb_field_iter_t *iter) { pb_size_t count = 1; pb_size_t i; bool truebool = true; bool falsebool = false; if (PB_HTYPE(iter->type) == PB_HTYPE_ONEOF) { if (*(pb_size_t*)iter->pSize != iter->tag) { /* Some different field in oneof */ return; } } else if (!iter->pData) { /* Nothing allocated */ if (PB_HTYPE(iter->type) == PB_HTYPE_REPEATED && iter->pSize != &iter->array_size) { assert(*(pb_size_t*)iter->pSize == 0); } return; } if (PB_HTYPE(iter->type) == PB_HTYPE_REPEATED) { /* Check that enough memory has been allocated for array */ size_t allocated_size = get_allocation_size(iter->pData); count = *(pb_size_t*)iter->pSize; assert(allocated_size >= count * iter->data_size); } else if (PB_LTYPE(iter->type) != PB_LTYPE_STRING && PB_LTYPE(iter->type) != PB_LTYPE_BYTES) { size_t allocated_size = get_allocation_size(iter->pData); assert(allocated_size >= iter->data_size); } for (i = 0; i < count; i++) { void *pData = (char*)iter->pData + iter->data_size * i; if (PB_LTYPE(iter->type) == PB_LTYPE_STRING) { /* Check that enough memory is allocated for string and that the string is properly terminated. */ const char *str = pData; if (PB_HTYPE(iter->type) == PB_HTYPE_REPEATED) { /* String arrays are stored as array of pointers */ str = ((const char**)iter->pData)[i]; } assert(strlen(str) + 1 <= get_allocation_size(str)); } else if (PB_LTYPE(iter->type) == PB_LTYPE_BYTES) { /* Bytes length must be at most statically allocated size */ const pb_bytes_array_t *bytes = pData; if (PB_HTYPE(iter->type) == PB_HTYPE_REPEATED) { /* Bytes arrays are stored as array of pointers */ bytes = ((const pb_bytes_array_t**)iter->pData)[i]; } assert(PB_BYTES_ARRAY_T_ALLOCSIZE(bytes->size) <= get_allocation_size(bytes)); } else if (PB_LTYPE(iter->type) == PB_LTYPE_BOOL) { /* Bool fields must have valid value */ assert(memcmp(pData, &truebool, sizeof(bool)) == 0 || memcmp(pData, &falsebool, sizeof(bool)) == 0); } else if (PB_LTYPE_IS_SUBMSG(iter->type)) { validate_message(pData, 0, iter->submsg_desc); } } } void validate_message(const void *msg, size_t structsize, const pb_msgdesc_t *msgtype) { pb_field_iter_t iter; if (pb_field_iter_begin_const(&iter, msgtype, msg)) { do { if (PB_ATYPE(iter.type) == PB_ATYPE_STATIC) { validate_static(&iter); } else if (PB_ATYPE(iter.type) == PB_ATYPE_POINTER) { validate_pointer(&iter); } } while (pb_field_iter_next(&iter)); } } nanopb-0.4.1/tests/fuzztest/validation.h000066400000000000000000000004141361552131000203300ustar00rootroot00000000000000/* This module validates that the message structures are in valid state * after decoding the input data. */ #ifndef VALIDATION_H #define VALIDATION_H #include void validate_message(const void *msg, size_t structsize, const pb_msgdesc_t *msgtype); #endif nanopb-0.4.1/tests/inline/000077500000000000000000000000001361552131000154065ustar00rootroot00000000000000nanopb-0.4.1/tests/inline/SConscript000066400000000000000000000005531361552131000174230ustar00rootroot00000000000000# Test that inlined bytes fields work. Import("env") env.NanopbProto("inline") env.Object("inline.pb.c") env.Match(["inline.pb.h", "inline.expected"]) p = env.Program(["inline_unittests.c", "inline.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/inline/inline.expected000066400000000000000000000000731361552131000204070ustar00rootroot00000000000000pb_byte_t data\[32\]; bool has_data; pb_byte_t data\[64\]; nanopb-0.4.1/tests/inline/inline.proto000066400000000000000000000005511361552131000177520ustar00rootroot00000000000000/* Test nanopb option parsing. * options.expected lists the patterns that are searched for in the output. */ syntax = "proto2"; import "nanopb.proto"; message Message1 { required bytes data = 1 [(nanopb).type = FT_INLINE, (nanopb).max_size = 32]; } message Message2 { optional bytes data = 1 [(nanopb).type = FT_INLINE, (nanopb).max_size = 64]; } nanopb-0.4.1/tests/inline/inline_unittests.c000066400000000000000000000043261361552131000211570ustar00rootroot00000000000000#include #include #include #include #include "unittests.h" #include "inline.pb.h" int main() { int status = 0; int i = 0; COMMENT("Test inline byte fields"); { Message1 msg1 = Message1_init_zero; TEST(sizeof(msg1.data) == 32); } { Message1 msg1 = Message1_init_zero; pb_byte_t msg1_buffer[Message1_size]; pb_ostream_t ostream = pb_ostream_from_buffer(msg1_buffer, Message1_size); Message1 msg1_deserialized = Message1_init_zero; pb_istream_t istream = pb_istream_from_buffer(msg1_buffer, Message1_size); for (i = 0; i < 32; i++) { msg1.data[i] = i; } TEST(pb_encode(&ostream, Message1_fields, &msg1)); TEST(ostream.bytes_written == Message1_size); TEST(pb_decode(&istream, Message1_fields, &msg1_deserialized)); TEST(istream.bytes_left == 0); TEST(memcmp(&msg1_deserialized, &msg1, sizeof(msg1)) == 0); } { Message2 msg2 = {true, {0}}; Message2 msg2_no_data = {false, {1}}; pb_byte_t msg2_buffer[Message2_size]; pb_ostream_t ostream = pb_ostream_from_buffer(msg2_buffer, Message2_size); Message2 msg2_deserialized = Message2_init_zero; pb_istream_t istream = pb_istream_from_buffer(msg2_buffer, Message2_size); for (i = 0; i < 64; i++) { msg2.data[i] = i; } TEST(pb_encode(&ostream, Message2_fields, &msg2)); TEST(ostream.bytes_written == Message2_size); TEST(pb_decode(&istream, Message2_fields, &msg2_deserialized)); TEST(istream.bytes_left == 0); TEST(memcmp(&msg2_deserialized, &msg2, sizeof(msg2)) == 0); TEST(msg2_deserialized.has_data); memset(msg2_buffer, 0, sizeof(msg2_buffer)); ostream = pb_ostream_from_buffer(msg2_buffer, Message2_size); TEST(pb_encode(&ostream, Message2_fields, &msg2_no_data)); istream = pb_istream_from_buffer(msg2_buffer, ostream.bytes_written); TEST(pb_decode(&istream, Message2_fields, &msg2_deserialized)); TEST(!msg2_deserialized.has_data); TEST(memcmp(&msg2_deserialized, &msg2, sizeof(msg2)) != 0); } if (status != 0) fprintf(stdout, "\n\nSome tests FAILED!\n"); return status; } nanopb-0.4.1/tests/intsizes/000077500000000000000000000000001361552131000160005ustar00rootroot00000000000000nanopb-0.4.1/tests/intsizes/SConscript000066400000000000000000000004611361552131000200130ustar00rootroot00000000000000# Test that the int_size option in .proto works. Import('env') env.NanopbProto('intsizes') p = env.Program(["intsizes_unittests.c", "intsizes.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/intsizes/intsizes.proto000066400000000000000000000031061361552131000207350ustar00rootroot00000000000000/* Test the integer size overriding in nanopb options. * This allows to use 8- and 16-bit integer variables, which are not supported * directly by Google Protobuf. * * The int_size setting will override the number of bits, but keep the type * otherwise. E.g. uint32 + IS_8 => uint8_t */ syntax = "proto2"; import 'nanopb.proto'; message IntSizes { required int32 req_int8 = 1 [(nanopb).int_size = IS_8]; required uint32 req_uint8 = 2 [(nanopb).int_size = IS_8]; required sint32 req_sint8 = 3 [(nanopb).int_size = IS_8]; required int32 req_int16 = 4 [(nanopb).int_size = IS_16]; required uint32 req_uint16 = 5 [(nanopb).int_size = IS_16]; required sint32 req_sint16 = 6 [(nanopb).int_size = IS_16]; required int32 req_int32 = 7 [(nanopb).int_size = IS_32]; required uint32 req_uint32 = 8 [(nanopb).int_size = IS_32]; required sint32 req_sint32 = 9 [(nanopb).int_size = IS_32]; required int32 req_int64 = 10 [(nanopb).int_size = IS_64]; required uint32 req_uint64 = 11 [(nanopb).int_size = IS_64]; required sint32 req_sint64 = 12 [(nanopb).int_size = IS_64]; } message DefaultSizes { required int32 req_int8 = 1 ; required uint32 req_uint8 = 2 ; required sint32 req_sint8 = 3 ; required int32 req_int16 = 4 ; required uint32 req_uint16 = 5 ; required sint32 req_sint16 = 6 ; required int32 req_int32 = 7 ; required uint32 req_uint32 = 8 ; required sint32 req_sint32 = 9 ; required int64 req_int64 = 10; required uint64 req_uint64 = 11; required sint64 req_sint64 = 12; } nanopb-0.4.1/tests/intsizes/intsizes_unittests.c000066400000000000000000000156551361552131000221520ustar00rootroot00000000000000#include #include #include #include #include "unittests.h" #include "intsizes.pb.h" #define S(x) pb_istream_from_buffer((uint8_t*)x, sizeof(x) - 1) /* This is a macro instead of function in order to get the actual values * into the TEST() lines in output */ #define TEST_ROUNDTRIP(int8, uint8, sint8, \ int16, uint16, sint16, \ int32, uint32, sint32, \ int64, uint64, sint64, expected_result) \ { \ uint8_t buffer1[128], buffer2[128]; \ size_t msgsize; \ DefaultSizes msg1 = DefaultSizes_init_zero; \ IntSizes msg2 = IntSizes_init_zero; \ \ msg1.req_int8 = int8; \ msg1.req_uint8 = uint8; \ msg1.req_sint8 = sint8; \ msg1.req_int16 = int16; \ msg1.req_uint16 = uint16; \ msg1.req_sint16 = sint16; \ msg1.req_int32 = int32; \ msg1.req_uint32 = uint32; \ msg1.req_sint32 = sint32; \ msg1.req_int64 = int64; \ msg1.req_uint64 = uint64; \ msg1.req_sint64 = sint64; \ \ { \ pb_ostream_t s = pb_ostream_from_buffer(buffer1, sizeof(buffer1)); \ TEST(pb_encode(&s, DefaultSizes_fields, &msg1)); \ msgsize = s.bytes_written; \ } \ \ { \ pb_istream_t s = pb_istream_from_buffer(buffer1, msgsize); \ TEST(pb_decode(&s, IntSizes_fields, &msg2) == expected_result); \ if (expected_result) \ { \ TEST( (int64_t)msg2.req_int8 == int8); \ TEST((uint64_t)msg2.req_uint8 == uint8); \ TEST( (int64_t)msg2.req_sint8 == sint8); \ TEST( (int64_t)msg2.req_int16 == int16); \ TEST((uint64_t)msg2.req_uint16 == uint16); \ TEST( (int64_t)msg2.req_sint16 == sint16); \ TEST( (int64_t)msg2.req_int32 == int32); \ TEST((uint64_t)msg2.req_uint32 == uint32); \ TEST( (int64_t)msg2.req_sint32 == sint32); \ TEST( (int64_t)msg2.req_int64 == int64); \ TEST((uint64_t)msg2.req_uint64 == uint64); \ TEST( (int64_t)msg2.req_sint64 == sint64); \ } \ } \ \ if (expected_result) \ { \ pb_ostream_t s = pb_ostream_from_buffer(buffer2, sizeof(buffer2)); \ TEST(pb_encode(&s, IntSizes_fields, &msg2)); \ TEST(s.bytes_written == msgsize); \ TEST(memcmp(buffer1, buffer2, msgsize) == 0); \ } \ } int main() { int status = 0; { IntSizes msg = IntSizes_init_zero; COMMENT("Test field sizes"); TEST(sizeof(msg.req_int8) == 1); TEST(sizeof(msg.req_uint8) == 1); TEST(sizeof(msg.req_sint8) == 1); TEST(sizeof(msg.req_int16) == 2); TEST(sizeof(msg.req_uint16) == 2); TEST(sizeof(msg.req_sint16) == 2); TEST(sizeof(msg.req_int32) == 4); TEST(sizeof(msg.req_uint32) == 4); TEST(sizeof(msg.req_sint32) == 4); TEST(sizeof(msg.req_int64) == 8); TEST(sizeof(msg.req_uint64) == 8); TEST(sizeof(msg.req_sint64) == 8); } COMMENT("Test roundtrip at maximum value"); TEST_ROUNDTRIP(127, 255, 127, 32767, 65535, 32767, INT32_MAX, UINT32_MAX, INT32_MAX, INT64_MAX, UINT64_MAX, INT64_MAX, true); COMMENT("Test roundtrip at minimum value"); TEST_ROUNDTRIP(-128, 0, -128, -32768, 0, -32768, INT32_MIN, 0, INT32_MIN, INT64_MIN, 0, INT64_MIN, true); COMMENT("Test overflow detection"); TEST_ROUNDTRIP(-129, 0, -128, -32768, 0, -32768, INT32_MIN, 0, INT32_MIN, INT64_MIN, 0, INT64_MIN, false); TEST_ROUNDTRIP(127, 256, 127, 32767, 65535, 32767, INT32_MAX, UINT32_MAX, INT32_MAX, INT64_MAX, UINT64_MAX, INT64_MAX, false); TEST_ROUNDTRIP(-128, 0, -128, -32768, 0, -32769, INT32_MIN, 0, INT32_MIN, INT64_MIN, 0, INT64_MIN, false); { uint8_t buffer[128]; IntSizes msg = IntSizes_init_zero; pb_ostream_t s = pb_ostream_from_buffer(buffer, sizeof(buffer)); COMMENT("Test message maximum size"); msg.req_int8 = -128; msg.req_uint8 = 255; msg.req_sint8 = -128; msg.req_int16 = -32768; msg.req_uint16 = 65535; msg.req_sint16 = -32768; msg.req_int32 = INT32_MIN; msg.req_uint32 = UINT32_MAX; msg.req_sint32 = INT32_MIN; msg.req_int64 = INT64_MIN; msg.req_uint64 = UINT64_MAX; msg.req_sint64 = INT64_MIN; TEST(pb_encode(&s, IntSizes_fields, &msg)); TEST(s.bytes_written == IntSizes_size); } if (status != 0) fprintf(stdout, "\n\nSome tests FAILED!\n"); return status; } nanopb-0.4.1/tests/io_errors/000077500000000000000000000000001361552131000161335ustar00rootroot00000000000000nanopb-0.4.1/tests/io_errors/SConscript000066400000000000000000000006661361552131000201550ustar00rootroot00000000000000# Simulate io errors when encoding and decoding Import("env") c = Copy("$TARGET", "$SOURCE") env.Command("alltypes.proto", "#alltypes/alltypes.proto", c) env.NanopbProto(["alltypes", "alltypes.options"]) ioerr = env.Program(["io_errors.c", "alltypes.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest("io_errors.output", [ioerr, "$BUILD/alltypes/encode_alltypes.output"]) nanopb-0.4.1/tests/io_errors/alltypes.options000066400000000000000000000002161361552131000214040ustar00rootroot00000000000000* max_size:16 * max_count:5 *.*fbytes fixed_length:true max_size:4 *.*farray fixed_count:true max_count:5 DescriptorSize8 descriptorsize:DS_8 nanopb-0.4.1/tests/io_errors/io_errors.c000066400000000000000000000067341361552131000203140ustar00rootroot00000000000000/* Simulate IO errors after each byte in a stream. * Verifies proper error propagation. */ #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" typedef struct { uint8_t *buffer; size_t fail_after; } faulty_stream_t; bool read_callback(pb_istream_t *stream, uint8_t *buf, size_t count) { faulty_stream_t *state = stream->state; while (count--) { if (state->fail_after == 0) PB_RETURN_ERROR(stream, "simulated"); state->fail_after--; *buf++ = *state->buffer++; } return true; } bool write_callback(pb_ostream_t *stream, const uint8_t *buf, size_t count) { faulty_stream_t *state = stream->state; while (count--) { if (state->fail_after == 0) PB_RETURN_ERROR(stream, "simulated"); state->fail_after--; *state->buffer++ = *buf++; } return true; } int main() { uint8_t buffer[2048]; size_t msglen; AllTypes msg = AllTypes_init_zero; /* Get some base data to run the tests with */ SET_BINARY_MODE(stdin); msglen = fread(buffer, 1, sizeof(buffer), stdin); /* Test IO errors on decoding */ { bool status; pb_istream_t stream = {&read_callback, NULL, SIZE_MAX}; faulty_stream_t fs; size_t i; for (i = 0; i < msglen; i++) { stream.bytes_left = msglen; stream.state = &fs; fs.buffer = buffer; fs.fail_after = i; status = pb_decode(&stream, AllTypes_fields, &msg); if (status != false) { fprintf(stderr, "Unexpected success in decode\n"); return 2; } else if (strcmp(stream.errmsg, "simulated") != 0) { fprintf(stderr, "Wrong error in decode: %s\n", stream.errmsg); return 3; } } stream.bytes_left = msglen; stream.state = &fs; fs.buffer = buffer; fs.fail_after = msglen; status = pb_decode(&stream, AllTypes_fields, &msg); if (!status) { fprintf(stderr, "Decoding failed: %s\n", stream.errmsg); return 4; } } /* Test IO errors on encoding */ { bool status; pb_ostream_t stream = {&write_callback, NULL, SIZE_MAX, 0}; faulty_stream_t fs; size_t i; for (i = 0; i < msglen; i++) { stream.max_size = msglen; stream.bytes_written = 0; stream.state = &fs; fs.buffer = buffer; fs.fail_after = i; status = pb_encode(&stream, AllTypes_fields, &msg); if (status != false) { fprintf(stderr, "Unexpected success in encode\n"); return 5; } else if (strcmp(stream.errmsg, "simulated") != 0) { fprintf(stderr, "Wrong error in encode: %s\n", stream.errmsg); return 6; } } stream.max_size = msglen; stream.bytes_written = 0; stream.state = &fs; fs.buffer = buffer; fs.fail_after = msglen; status = pb_encode(&stream, AllTypes_fields, &msg); if (!status) { fprintf(stderr, "Encoding failed: %s\n", stream.errmsg); return 7; } } return 0; } nanopb-0.4.1/tests/io_errors_pointers/000077500000000000000000000000001361552131000200565ustar00rootroot00000000000000nanopb-0.4.1/tests/io_errors_pointers/SConscript000066400000000000000000000015001361552131000220640ustar00rootroot00000000000000# Simulate io errors when encoding and decoding Import("env", "malloc_env") c = Copy("$TARGET", "$SOURCE") env.Command("alltypes.proto", "#alltypes/alltypes.proto", c) env.Command("io_errors.c", "#io_errors/io_errors.c", c) env.NanopbProto(["alltypes", "alltypes.options"]) ioerr = env.Program(["io_errors.c", "alltypes.pb.c", "$COMMON/pb_encode_with_malloc.o", "$COMMON/pb_decode_with_malloc.o", "$COMMON/pb_common_with_malloc.o", "$COMMON/malloc_wrappers.o"]) # Run tests under valgrind if available kwargs = {} if env.get("VALGRIND"): kwargs['COMMAND'] = env['VALGRIND'] kwargs['ARGS'] = ["-q", "--error-exitcode=99", ioerr[0].abspath] env.RunTest("io_errors.output", [ioerr, "$BUILD/alltypes/encode_alltypes.output"], **kwargs) nanopb-0.4.1/tests/io_errors_pointers/alltypes.options000066400000000000000000000002471361552131000233330ustar00rootroot00000000000000# Generate all fields as pointers. * type:FT_POINTER *.*fbytes fixed_length:true max_size:4 *.*farray fixed_count:true max_count:5 DescriptorSize8 descriptorsize:DS_8 nanopb-0.4.1/tests/map/000077500000000000000000000000001361552131000147055ustar00rootroot00000000000000nanopb-0.4.1/tests/map/SConscript000066400000000000000000000011211361552131000167120ustar00rootroot00000000000000# Example / test for handling 'map' type using the backwards compatibility # in protobuf specification: # https://developers.google.com/protocol-buffers/docs/proto3#maps Import('env') env.NanopbProto(['map', 'map.options']) enc = env.Program(['encode_map.c', 'map.pb.c', '$COMMON/pb_encode.o', '$COMMON/pb_common.o']) dec = env.Program(['decode_map.c', 'map.pb.c', '$COMMON/pb_decode.o', '$COMMON/pb_common.o']) env.RunTest("message.pb", enc) env.RunTest("message.txt", [dec, 'message.pb']) nanopb-0.4.1/tests/map/decode_map.c000066400000000000000000000027401361552131000171340ustar00rootroot00000000000000/* Decode a message using map field */ #include #include #include #include #include "map.pb.h" #include "test_helpers.h" #include "unittests.h" /* Helper function to find an entry in the list. Not as efficient as a real * hashmap or similar would be, but suitable for small arrays. */ MyMessage_NumbersEntry *find_entry(MyMessage *msg, const char *key) { int i; for (i = 0; i < msg->numbers_count; i++) { if (strcmp(msg->numbers[i].key, key) == 0) { return &msg->numbers[i]; } } return NULL; } int main(int argc, char **argv) { uint8_t buffer[MyMessage_size]; size_t count; SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); if (!feof(stdin)) { printf("Message does not fit in buffer\n"); return 1; } { int status = 0; MyMessage msg = MyMessage_init_zero; MyMessage_NumbersEntry *e; pb_istream_t stream = pb_istream_from_buffer(buffer, count); if (!pb_decode(&stream, MyMessage_fields, &msg)) { fprintf(stderr, "Decoding failed\n"); return 2; } TEST((e = find_entry(&msg, "one")) && e->value == 1); TEST((e = find_entry(&msg, "two")) && e->value == 2); TEST((e = find_entry(&msg, "seven")) && e->value == 7); TEST(!find_entry(&msg, "zero")); return status; } } nanopb-0.4.1/tests/map/encode_map.c000066400000000000000000000017441361552131000171510ustar00rootroot00000000000000/* Encode a message using map field */ #include #include #include #include "map.pb.h" #include "test_helpers.h" int main(int argc, char **argv) { uint8_t buffer[MyMessage_size]; MyMessage msg = MyMessage_init_zero; pb_ostream_t stream; /* Fill in the map entries */ msg.numbers_count = 3; strncpy(msg.numbers[0].key, "one", sizeof(msg.numbers[0].key)); strncpy(msg.numbers[1].key, "two", sizeof(msg.numbers[1].key)); strncpy(msg.numbers[2].key, "seven", sizeof(msg.numbers[2].key)); msg.numbers[0].value = 1; msg.numbers[1].value = 2; msg.numbers[2].value = 7; stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); if (pb_encode(&stream, MyMessage_fields, &msg)) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; } } nanopb-0.4.1/tests/map/map.options000066400000000000000000000001161361552131000170750ustar00rootroot00000000000000MyMessage.numbers max_count:10 MyMessage.NumbersEntry.key max_size:16 nanopb-0.4.1/tests/map/map.proto000066400000000000000000000001171361552131000165460ustar00rootroot00000000000000syntax = "proto3"; message MyMessage { map numbers = 1; } nanopb-0.4.1/tests/mem_release/000077500000000000000000000000001361552131000164065ustar00rootroot00000000000000nanopb-0.4.1/tests/mem_release/SConscript000066400000000000000000000006021361552131000204160ustar00rootroot00000000000000Import("env", "malloc_env") env.NanopbProto("mem_release.proto") test = malloc_env.Program(["mem_release.c", "mem_release.pb.c", "$COMMON/pb_encode_with_malloc.o", "$COMMON/pb_decode_with_malloc.o", "$COMMON/pb_common_with_malloc.o", "$COMMON/malloc_wrappers.o"]) env.RunTest(test) nanopb-0.4.1/tests/mem_release/mem_release.c000066400000000000000000000146431361552131000210400ustar00rootroot00000000000000/* Make sure that all fields are freed in various scenarios. */ #include #include #include #include #include #include "mem_release.pb.h" #define TEST(x) if (!(x)) { \ fprintf(stderr, "Test %s on line %d failed.\n", #x, __LINE__); \ return false; \ } static char *test_str_arr[] = {"1", "2", ""}; static SubMessage test_msg_arr[] = {SubMessage_init_zero, SubMessage_init_zero}; static pb_extension_t ext1, ext2; static void fill_TestMessage(TestMessage *msg) { msg->static_req_submsg.dynamic_str = "12345"; msg->static_req_submsg.dynamic_str_arr_count = 3; msg->static_req_submsg.dynamic_str_arr = test_str_arr; msg->static_req_submsg.dynamic_submsg_count = 2; msg->static_req_submsg.dynamic_submsg = test_msg_arr; msg->static_req_submsg.dynamic_submsg[1].dynamic_str = "abc"; msg->static_opt_submsg.dynamic_str = "abc"; msg->static_rep_submsg_count = 2; msg->static_rep_submsg[1].dynamic_str = "abc"; msg->has_static_opt_submsg = true; msg->dynamic_submsg = &msg->static_req_submsg; msg->extensions = &ext1; ext1.type = &dynamic_ext; ext1.dest = &msg->static_req_submsg; ext1.next = &ext2; ext2.type = &static_ext; ext2.dest = &msg->static_req_submsg; ext2.next = NULL; } /* Basic fields, nested submessages, extensions */ static bool test_TestMessage() { uint8_t buffer[256]; size_t msgsize; /* Construct a message with various fields filled in */ { TestMessage msg = TestMessage_init_zero; pb_ostream_t stream; fill_TestMessage(&msg); stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); if (!pb_encode(&stream, TestMessage_fields, &msg)) { fprintf(stderr, "Encode failed: %s\n", PB_GET_ERROR(&stream)); return false; } msgsize = stream.bytes_written; } /* Output encoded message for debug */ SET_BINARY_MODE(stdout); fwrite(buffer, 1, msgsize, stdout); /* Decode memory using dynamic allocation */ { TestMessage msg = TestMessage_init_zero; pb_istream_t stream; SubMessage ext2_dest; msg.extensions = &ext1; ext1.type = &dynamic_ext; ext1.dest = NULL; ext1.next = &ext2; ext2.type = &static_ext; ext2.dest = &ext2_dest; ext2.next = NULL; stream = pb_istream_from_buffer(buffer, msgsize); if (!pb_decode(&stream, TestMessage_fields, &msg)) { fprintf(stderr, "Decode failed: %s\n", PB_GET_ERROR(&stream)); return false; } /* Make sure it encodes back to same data */ { uint8_t buffer2[256]; pb_ostream_t ostream = pb_ostream_from_buffer(buffer2, sizeof(buffer2)); TEST(pb_encode(&ostream, TestMessage_fields, &msg)); TEST(ostream.bytes_written == msgsize); TEST(memcmp(buffer, buffer2, msgsize) == 0); } /* Make sure that malloc counters work */ TEST(get_alloc_count() > 0); /* Make sure that pb_release releases everything */ pb_release(TestMessage_fields, &msg); TEST(get_alloc_count() == 0); /* Check that double-free is a no-op */ pb_release(TestMessage_fields, &msg); TEST(get_alloc_count() == 0); } return true; } /* Oneofs */ static bool test_OneofMessage() { uint8_t buffer[256]; size_t msgsize; { pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Encode first with TestMessage */ { OneofMessage msg = OneofMessage_init_zero; msg.which_msgs = OneofMessage_msg1_tag; fill_TestMessage(&msg.msgs.msg1); if (!pb_encode(&stream, OneofMessage_fields, &msg)) { fprintf(stderr, "Encode failed: %s\n", PB_GET_ERROR(&stream)); return false; } } /* Encode second with SubMessage, invoking 'merge' behaviour */ { OneofMessage msg = OneofMessage_init_zero; msg.which_msgs = OneofMessage_msg2_tag; msg.first = 999; msg.msgs.msg2.dynamic_str = "ABCD"; msg.last = 888; if (!pb_encode(&stream, OneofMessage_fields, &msg)) { fprintf(stderr, "Encode failed: %s\n", PB_GET_ERROR(&stream)); return false; } } msgsize = stream.bytes_written; } { OneofMessage msg = OneofMessage_init_zero; pb_istream_t stream = pb_istream_from_buffer(buffer, msgsize); if (!pb_decode(&stream, OneofMessage_fields, &msg)) { fprintf(stderr, "Decode failed: %s\n", PB_GET_ERROR(&stream)); return false; } TEST(msg.first == 999); TEST(msg.which_msgs == OneofMessage_msg2_tag); TEST(msg.msgs.msg2.dynamic_str); TEST(strcmp(msg.msgs.msg2.dynamic_str, "ABCD") == 0); TEST(msg.msgs.msg2.dynamic_str_arr == NULL); TEST(msg.msgs.msg2.dynamic_submsg == NULL); TEST(msg.last == 888); pb_release(OneofMessage_fields, &msg); TEST(get_alloc_count() == 0); pb_release(OneofMessage_fields, &msg); TEST(get_alloc_count() == 0); } return true; } static bool dummy_decode_cb(pb_istream_t *stream, const pb_field_t *field, void **arg) { return false; } /* Garbage input */ static bool test_Garbage() { const uint8_t buffer[] = "I'm only happy when it rains"; const size_t msgsize = sizeof(buffer); { OneofMessage msg = OneofMessage_init_zero; pb_istream_t stream = pb_istream_from_buffer(buffer, msgsize); TEST(!pb_decode(&stream, OneofMessage_fields, &msg)); } { TestMessage msg = TestMessage_init_zero; pb_istream_t stream = pb_istream_from_buffer(buffer, msgsize); TEST(!pb_decode(&stream, TestMessage_fields, &msg)); } { RepeatedMessage msg = RepeatedMessage_init_zero; pb_istream_t stream = pb_istream_from_buffer(buffer, msgsize); msg.subs.arg = NULL; msg.subs.funcs.decode = dummy_decode_cb; TEST(!pb_decode(&stream, RepeatedMessage_fields, &msg)); } return true; } int main() { if (test_TestMessage() && test_OneofMessage() && test_Garbage()) return 0; else return 1; } nanopb-0.4.1/tests/mem_release/mem_release.proto000066400000000000000000000020651361552131000217540ustar00rootroot00000000000000syntax = "proto2"; import "nanopb.proto"; message SubMessage { optional string dynamic_str = 1 [(nanopb).type = FT_POINTER]; repeated string dynamic_str_arr = 2 [(nanopb).type = FT_POINTER]; repeated SubMessage dynamic_submsg = 3 [(nanopb).type = FT_POINTER]; } message TestMessage { required SubMessage static_req_submsg = 1 [(nanopb).type = FT_STATIC]; optional SubMessage dynamic_submsg = 2 [(nanopb).type = FT_POINTER]; optional SubMessage static_opt_submsg = 3 [(nanopb).type = FT_STATIC]; repeated SubMessage static_rep_submsg = 4 [(nanopb).type = FT_STATIC, (nanopb).max_count=2]; extensions 100 to 200; } extend TestMessage { optional SubMessage dynamic_ext = 100 [(nanopb).type = FT_POINTER]; optional SubMessage static_ext = 101 [(nanopb).type = FT_STATIC]; } message OneofMessage { required int32 first = 1; oneof msgs { TestMessage msg1 = 2; SubMessage msg2 = 3; } required int32 last = 4; } message RepeatedMessage { required int32 first = 1; repeated SubMessage subs = 2; } nanopb-0.4.1/tests/message_sizes/000077500000000000000000000000001361552131000167715ustar00rootroot00000000000000nanopb-0.4.1/tests/message_sizes/SConscript000066400000000000000000000004371361552131000210070ustar00rootroot00000000000000# Test the generation of message size #defines Import('env') incpath = env.Clone() incpath.Append(PROTOCPATH = '#message_sizes') incpath.NanopbProto("messages1") incpath.NanopbProto("messages2") incpath.Program(['dummy.c', 'messages1.pb.c', 'messages2.pb.c', '$COMMON/pb_common.o']) nanopb-0.4.1/tests/message_sizes/dummy.c000066400000000000000000000001761361552131000202740ustar00rootroot00000000000000/* Just test that the file can be compiled successfully. */ #include "messages2.pb.h" int main() { return xmit_size; } nanopb-0.4.1/tests/message_sizes/messages1.proto000066400000000000000000000010441361552131000217450ustar00rootroot00000000000000syntax = "proto2"; enum MessageStatus { FAIL = 0; OK = 1; }; message MessageInfo { required fixed32 msg_id = 1; optional fixed32 interface_id = 2; } message MessageResponseInfo { required fixed64 interface_id = 1; required fixed32 seq = 2; required fixed32 msg_id = 3; } message MessageHeader { required MessageInfo info = 1; optional MessageResponseInfo response_info = 2; optional MessageResponse response = 3; } message MessageResponse { required MessageStatus status = 1; required fixed32 seq = 2; } nanopb-0.4.1/tests/message_sizes/messages2.proto000066400000000000000000000002641361552131000217510ustar00rootroot00000000000000syntax = "proto2"; import 'nanopb.proto'; import 'messages1.proto'; message xmit { required MessageHeader header = 1; required bytes data = 2 [(nanopb).max_size = 128]; } nanopb-0.4.1/tests/missing_fields/000077500000000000000000000000001361552131000171275ustar00rootroot00000000000000nanopb-0.4.1/tests/missing_fields/SConscript000066400000000000000000000004261361552131000211430ustar00rootroot00000000000000# Check that the decoder properly detects when required fields are missing. Import("env") env.NanopbProto("missing_fields") test = env.Program(["missing_fields.c", "missing_fields.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(test) nanopb-0.4.1/tests/missing_fields/missing_fields.c000066400000000000000000000024671361552131000223030ustar00rootroot00000000000000/* Checks that missing required fields are detected properly */ #include #include #include #include "missing_fields.pb.h" int main() { uint8_t buffer[512]; size_t size; /* Create a message with one missing field */ { MissingField msg = {0}; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); if (!pb_encode(&stream, MissingField_fields, &msg)) { printf("Encode failed.\n"); return 1; } size = stream.bytes_written; } /* Test that it decodes properly if we don't require that field */ { MissingField msg = {0}; pb_istream_t stream = pb_istream_from_buffer(buffer, size); if (!pb_decode(&stream, MissingField_fields, &msg)) { printf("Decode failed: %s\n", PB_GET_ERROR(&stream)); return 2; } } /* Test that it does *not* decode properly if we require the field */ { AllFields msg = {0}; pb_istream_t stream = pb_istream_from_buffer(buffer, size); if (pb_decode(&stream, AllFields_fields, &msg)) { printf("Decode didn't detect missing field.\n"); return 3; } } return 0; /* All ok */ } nanopb-0.4.1/tests/missing_fields/missing_fields.proto000066400000000000000000000103231361552131000232120ustar00rootroot00000000000000/* Test for one missing field among many */ syntax = "proto2"; message AllFields { required int32 field1 = 1; required int32 field2 = 2; required int32 field3 = 3; required int32 field4 = 4; required int32 field5 = 5; required int32 field6 = 6; required int32 field7 = 7; required int32 field8 = 8; required int32 field9 = 9; required int32 field10 = 10; required int32 field11 = 11; required int32 field12 = 12; required int32 field13 = 13; required int32 field14 = 14; required int32 field15 = 15; required int32 field16 = 16; required int32 field17 = 17; required int32 field18 = 18; required int32 field19 = 19; required int32 field20 = 20; required int32 field21 = 21; required int32 field22 = 22; required int32 field23 = 23; required int32 field24 = 24; required int32 field25 = 25; required int32 field26 = 26; required int32 field27 = 27; required int32 field28 = 28; required int32 field29 = 29; required int32 field30 = 30; required int32 field31 = 31; required int32 field32 = 32; required int32 field33 = 33; required int32 field34 = 34; required int32 field35 = 35; required int32 field36 = 36; required int32 field37 = 37; required int32 field38 = 38; required int32 field39 = 39; required int32 field40 = 40; required int32 field41 = 41; required int32 field42 = 42; required int32 field43 = 43; required int32 field44 = 44; required int32 field45 = 45; required int32 field46 = 46; required int32 field47 = 47; required int32 field48 = 48; required int32 field49 = 49; required int32 field50 = 50; required int32 field51 = 51; required int32 field52 = 52; required int32 field53 = 53; required int32 field54 = 54; required int32 field55 = 55; required int32 field56 = 56; required int32 field57 = 57; required int32 field58 = 58; required int32 field59 = 59; required int32 field60 = 60; required int32 field61 = 61; required int32 field62 = 62; required int32 field63 = 63; required int32 field64 = 64; } message MissingField { required int32 field1 = 1; required int32 field2 = 2; required int32 field3 = 3; required int32 field4 = 4; required int32 field5 = 5; required int32 field6 = 6; required int32 field7 = 7; required int32 field8 = 8; required int32 field9 = 9; required int32 field10 = 10; required int32 field11 = 11; required int32 field12 = 12; required int32 field13 = 13; required int32 field14 = 14; required int32 field15 = 15; required int32 field16 = 16; required int32 field17 = 17; required int32 field18 = 18; required int32 field19 = 19; required int32 field20 = 20; required int32 field21 = 21; required int32 field22 = 22; required int32 field23 = 23; required int32 field24 = 24; required int32 field25 = 25; required int32 field26 = 26; required int32 field27 = 27; required int32 field28 = 28; required int32 field29 = 29; required int32 field30 = 30; required int32 field31 = 31; required int32 field32 = 32; required int32 field33 = 33; required int32 field34 = 34; required int32 field35 = 35; required int32 field36 = 36; required int32 field37 = 37; required int32 field38 = 38; required int32 field39 = 39; required int32 field40 = 40; required int32 field41 = 41; required int32 field42 = 42; required int32 field43 = 43; required int32 field44 = 44; required int32 field45 = 45; required int32 field46 = 46; required int32 field47 = 47; required int32 field48 = 48; required int32 field49 = 49; required int32 field50 = 50; required int32 field51 = 51; required int32 field52 = 52; required int32 field53 = 53; required int32 field54 = 54; required int32 field55 = 55; required int32 field56 = 56; required int32 field57 = 57; required int32 field58 = 58; required int32 field59 = 59; required int32 field60 = 60; required int32 field61 = 61; required int32 field62 = 62; /* required int32 field63 = 63; */ required int32 field64 = 64; } nanopb-0.4.1/tests/msgid/000077500000000000000000000000001361552131000152335ustar00rootroot00000000000000nanopb-0.4.1/tests/msgid/SConscript000066400000000000000000000013041361552131000172430ustar00rootroot00000000000000# Test the 'msgid' feature for identifying encoded messages Import('env') env.NanopbProto('msgid_example') enc = env.Program(['encode_msgid.c', 'msgid_example.pb.c', '$COMMON/pb_encode.o', '$COMMON/pb_common.o']) dec = env.Program(['decode_msgid.c', 'msgid_example.pb.c', '$COMMON/pb_decode.o', '$COMMON/pb_common.o']) env.RunTest("message1.pb", enc, ARGS = ['1']) env.RunTest("message1.txt", [dec, 'message1.pb']) env.RunTest("message2.pb", enc, ARGS = ['2']) env.RunTest("message2.txt", [dec, 'message2.pb']) env.RunTest("message3.pb", enc, ARGS = ['3']) env.RunTest("message3.txt", [dec, 'message3.pb']) nanopb-0.4.1/tests/msgid/decode_msgid.c000066400000000000000000000047211361552131000200110ustar00rootroot00000000000000/* Decode a message using msgid prefix to identify message type */ #include #include #include #include "msgid_example.pb.h" #include "test_helpers.h" /* This function reads the prefix written by sending side. */ bool read_prefix(pb_istream_t *stream, int *msgid) { uint8_t prefix = 0; if (!pb_read(stream, &prefix, 1)) return false; *msgid = prefix; return true; } /* Main function will call one of these functions based on the prefix */ bool handle_MyMessage1(pb_istream_t *stream) { MyMessage1 msg = MyMessage1_init_default; if (!pb_decode(stream, MyMessage1_fields, &msg)) return false; printf("Got MyMessage1: intvalue = %d\n", (int)msg.intvalue); return true; } bool handle_MyMessage2(pb_istream_t *stream) { MyMessage2 msg = MyMessage2_init_default; if (!pb_decode(stream, MyMessage2_fields, &msg)) return false; printf("Got MyMessage2: intvalue = %d, strvalue = %s\n", (int)msg.intvalue, msg.strvalue); return true; } bool handle_MyMessage3(pb_istream_t *stream) { MyMessage3 msg = MyMessage3_init_default; if (!pb_decode(stream, MyMessage3_fields, &msg)) return false; printf("Got MyMessage3: boolvalue = %d\n", (int)msg.boolvalue); return true; } int main(int argc, char **argv) { uint8_t buffer[128]; pb_istream_t stream; size_t count; bool status = false; int prefix; /* Read the data into buffer */ SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); if (!feof(stdin)) { printf("Message does not fit in buffer\n"); return 1; } stream = pb_istream_from_buffer(buffer, count); if (!read_prefix(&stream, &prefix)) { printf("Failed to read prefix: %s\n", PB_GET_ERROR(&stream)); return 1; } /* Call message handler based on prefix. * We could write the switch cases manually, comparing against * the MyMessageX_msgid defines. However, this uses the automatically * generated X-macro construct to make the switch case. */ switch (prefix) { #define PB_MSG(id,len,name) case id: status = handle_ ## name(&stream); break; MSGID_EXAMPLE_MESSAGES #undef PB_MSG default: printf("Unknown prefix: %d\n", prefix); return 1; } if (!status) { printf("Parsing failed: %s\n", PB_GET_ERROR(&stream)); return 1; } else { return 0; } } nanopb-0.4.1/tests/msgid/encode_msgid.c000066400000000000000000000043721361552131000200250ustar00rootroot00000000000000/* Encode a message using msgid field as prefix */ #include #include #include #include #include "msgid_example.pb.h" #include "test_helpers.h" /* This function writes the message id as a prefix to the message, allowing * the receiving side to identify message type. Here we use uint8_t to store * it, but e.g. varint or some custom header struct would work just as well. */ bool write_prefix(pb_ostream_t *stream, int msgid) { uint8_t prefix = msgid; return pb_write(stream, &prefix, 1); } /* The main logic will call one of these functions. * Normally which function you call would be selected based on what message * you want to send, here it is decided based on command line parameter. */ bool encode_MyMessage1(pb_ostream_t *stream) { MyMessage1 msg = MyMessage1_init_default; msg.intvalue = 1234; return write_prefix(stream, MyMessage1_msgid) && pb_encode(stream, MyMessage1_fields, &msg); } bool encode_MyMessage2(pb_ostream_t *stream) { MyMessage2 msg = MyMessage2_init_default; msg.intvalue = 9999; strcpy(msg.strvalue, "Msg2"); return write_prefix(stream, MyMessage2_msgid) && pb_encode(stream, MyMessage2_fields, &msg); } bool encode_MyMessage3(pb_ostream_t *stream) { MyMessage3 msg = MyMessage3_init_default; msg.boolvalue = true; return write_prefix(stream, MyMessage3_msgid) && pb_encode(stream, MyMessage3_fields, &msg); } int main(int argc, char **argv) { uint8_t buffer[128]; pb_ostream_t stream; bool status = false; int option; if (argc != 2) { fprintf(stderr, "Usage: encode_msgid [number]\n"); return 1; } option = atoi(argv[1]); stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); if (option == 1) { status = encode_MyMessage1(&stream); } else if (option == 2) { status = encode_MyMessage2(&stream); } else if (option == 3) { status = encode_MyMessage3(&stream); } if (status) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; } } nanopb-0.4.1/tests/msgid/msgid_example.proto000066400000000000000000000005421361552131000211370ustar00rootroot00000000000000syntax = "proto3"; import "nanopb.proto"; message MyMessage1 { option (nanopb_msgopt).msgid = 1; int32 intvalue = 1; } message MyMessage2 { option (nanopb_msgopt).msgid = 2; int32 intvalue = 1; string strvalue = 2 [(nanopb).max_size = 16]; } message MyMessage3 { option (nanopb_msgopt).msgid = 3; bool boolvalue = 1; } nanopb-0.4.1/tests/multiple_files/000077500000000000000000000000001361552131000171455ustar00rootroot00000000000000nanopb-0.4.1/tests/multiple_files/SConscript000066400000000000000000000010311361552131000211520ustar00rootroot00000000000000# Test that multiple .proto files don't cause name collisions. Import("env") incpath = env.Clone() incpath.Append(PROTOCPATH = '#multiple_files') incpath.Append(CPPPATH = '$BUILD/multiple_files') incpath.NanopbProto(["multifile1", "multifile1.options"]) incpath.NanopbProto("multifile2") incpath.NanopbProto("subdir/multifile2") test = incpath.Program(["test_multiple_files.c", "multifile1.pb.c", "multifile2.pb.c", "subdir/multifile2.pb.c", "$COMMON/pb_common.o"]) env.RunTest(test) nanopb-0.4.1/tests/multiple_files/multifile1.options000066400000000000000000000000431361552131000226320ustar00rootroot00000000000000StaticMessage.repint32 max_count:5 nanopb-0.4.1/tests/multiple_files/multifile1.proto000066400000000000000000000011601361552131000223030ustar00rootroot00000000000000syntax = "proto2"; message SubMessage { optional string stringvalue = 1; repeated int32 int32value = 2; repeated fixed32 fixed32value = 3; repeated fixed64 fixed64value = 4; } message TestMessage { optional string stringvalue = 1; repeated int32 int32value = 2; repeated fixed32 fixed32value = 3; repeated fixed64 fixed64value = 4; optional SubMessage submsg = 5; repeated string repeatedstring = 6; } message StaticMessage { repeated fixed32 repint32 = 1; } enum SignedEnum { SE_MIN = -128; SE_MAX = 127; } enum UnsignedEnum { UE_MIN = 0; UE_MAX = 255; } nanopb-0.4.1/tests/multiple_files/multifile2.proto000066400000000000000000000007221361552131000223070ustar00rootroot00000000000000// Test if including generated header file for this file + implicit include of // multifile2.pb.h still compiles. Used with test_compiles.c. syntax = "proto2"; import "multifile1.proto"; message Callback2Message { required TestMessage tstmsg = 1; required SubMessage submsg = 2; } message OneofMessage { oneof msgs { StaticMessage tstmsg = 1; } } message Enums { required SignedEnum senum = 1; required UnsignedEnum uenum = 2; } nanopb-0.4.1/tests/multiple_files/subdir/000077500000000000000000000000001361552131000204355ustar00rootroot00000000000000nanopb-0.4.1/tests/multiple_files/subdir/multifile2.proto000066400000000000000000000007611361552131000236020ustar00rootroot00000000000000syntax = "proto2"; package subdir; import "multifile1.proto"; message Callback2Message { required TestMessage tstmsg = 1; required SubMessage submsg = 2; } message SmallMessage { required bool dummy = 1; } message OneofMessage { oneof msgs { StaticMessage tstmsg = 1; SmallMessage msg2 = 2; } } message Enums { required SignedEnum senum = 1; required UnsignedEnum uenum = 2; } message SubdirMessage { required int32 foo = 1 [default = 15]; } nanopb-0.4.1/tests/multiple_files/test_multiple_files.c000066400000000000000000000020021361552131000233570ustar00rootroot00000000000000/* * Tests if this still compiles when multiple .proto files are involved. */ #include #include #include #include "unittests.h" #include "multifile2.pb.h" #include "subdir/multifile2.pb.h" int main() { int status = 0; /* Test that included file options are properly loaded */ TEST(OneofMessage_size == 27); /* Check that enum signedness is detected properly */ { pb_field_iter_t iter; Enums msg; TEST(pb_field_iter_begin(&iter, Enums_fields, &msg)); TEST(PB_LTYPE(iter.type) == PB_LTYPE_VARINT); TEST(pb_field_iter_next(&iter)); TEST(PB_LTYPE(iter.type) == PB_LTYPE_UVARINT); } /* Test that subdir file is correctly included */ { subdir_SubdirMessage foo = subdir_SubdirMessage_init_default; TEST(foo.foo == 15); TEST(subdir_OneofMessage_size >= 27); /* Note: not perfectly accurate due to issue 172 */ TEST(subdir_OneofMessage_size <= 30); } return status; } nanopb-0.4.1/tests/no_errmsg/000077500000000000000000000000001361552131000161235ustar00rootroot00000000000000nanopb-0.4.1/tests/no_errmsg/SConscript000066400000000000000000000021161361552131000201350ustar00rootroot00000000000000# Run the alltypes test case, but compile with PB_NO_ERRMSG=1 Import("env") # Take copy of the files for custom build. c = Copy("$TARGET", "$SOURCE") env.Command("alltypes.pb.h", "$BUILD/alltypes/alltypes.pb.h", c) env.Command("alltypes.pb.c", "$BUILD/alltypes/alltypes.pb.c", c) env.Command("encode_alltypes.c", "$BUILD/alltypes/encode_alltypes.c", c) env.Command("decode_alltypes.c", "$BUILD/alltypes/decode_alltypes.c", c) # Define the compilation options opts = env.Clone() opts.Append(CPPDEFINES = {'PB_NO_ERRMSG': 1}) # Build new version of core strict = opts.Clone() strict.Append(CFLAGS = strict['CORECFLAGS']) strict.Object("pb_decode_noerr.o", "$NANOPB/pb_decode.c") strict.Object("pb_encode_noerr.o", "$NANOPB/pb_encode.c") strict.Object("pb_common_noerr.o", "$NANOPB/pb_common.c") # Now build and run the test normally. enc = opts.Program(["encode_alltypes.c", "alltypes.pb.c", "pb_encode_noerr.o", "pb_common_noerr.o"]) dec = opts.Program(["decode_alltypes.c", "alltypes.pb.c", "pb_decode_noerr.o", "pb_common_noerr.o"]) env.RunTest(enc) env.RunTest([dec, "encode_alltypes.output"]) nanopb-0.4.1/tests/no_messages/000077500000000000000000000000001361552131000164335ustar00rootroot00000000000000nanopb-0.4.1/tests/no_messages/SConscript000066400000000000000000000002151361552131000204430ustar00rootroot00000000000000# Test that a .proto file without any messages compiles fine. Import("env") env.NanopbProto("no_messages") env.Object('no_messages.pb.c') nanopb-0.4.1/tests/no_messages/no_messages.proto000066400000000000000000000001471361552131000220250ustar00rootroot00000000000000/* Test that a file without any messages works. */ syntax = "proto2"; enum Test { First = 1; } nanopb-0.4.1/tests/oneof/000077500000000000000000000000001361552131000152365ustar00rootroot00000000000000nanopb-0.4.1/tests/oneof/SConscript000066400000000000000000000013161361552131000172510ustar00rootroot00000000000000# Test the 'oneof' feature for generating C unions. Import('env') env.NanopbProto('oneof') enc = env.Program(['encode_oneof.c', 'oneof.pb.c', '$COMMON/pb_encode.o', '$COMMON/pb_common.o']) dec = env.Program(['decode_oneof.c', 'oneof.pb.c', '$COMMON/pb_decode.o', '$COMMON/pb_common.o']) env.RunTest("message1.pb", enc, ARGS = ['1']) env.RunTest("message1.txt", [dec, 'message1.pb'], ARGS = ['1']) env.RunTest("message2.pb", enc, ARGS = ['2']) env.RunTest("message2.txt", [dec, 'message2.pb'], ARGS = ['2']) env.RunTest("message3.pb", enc, ARGS = ['3']) env.RunTest("message3.txt", [dec, 'message3.pb'], ARGS = ['3']) nanopb-0.4.1/tests/oneof/decode_oneof.c000066400000000000000000000062241361552131000200170ustar00rootroot00000000000000/* Decode a message using oneof fields */ #include #include #include #include #include "oneof.pb.h" #include "test_helpers.h" #include "unittests.h" /* Test the 'OneOfMessage' */ int test_oneof_1(pb_istream_t *stream, int option) { OneOfMessage msg; int status = 0; /* To better catch initialization errors */ memset(&msg, 0xAA, sizeof(msg)); if (!pb_decode(stream, OneOfMessage_fields, &msg)) { printf("Decoding failed: %s\n", PB_GET_ERROR(stream)); return 1; } /* Check that the basic fields work normally */ TEST(msg.prefix == 123); TEST(msg.suffix == 321); /* Check that we got the right oneof according to command line */ if (option == 1) { TEST(msg.which_values == OneOfMessage_first_tag); TEST(msg.values.first == 999); } else if (option == 2) { TEST(msg.which_values == OneOfMessage_second_tag); TEST(strcmp(msg.values.second, "abcd") == 0); } else if (option == 3) { TEST(msg.which_values == OneOfMessage_third_tag); TEST(msg.values.third.array[0] == 1); TEST(msg.values.third.array[1] == 2); TEST(msg.values.third.array[2] == 3); TEST(msg.values.third.array[3] == 4); TEST(msg.values.third.array[4] == 5); } return status; } /* Test the 'PlainOneOfMessage' */ int test_oneof_2(pb_istream_t *stream, int option) { PlainOneOfMessage msg = PlainOneOfMessage_init_zero; int status = 0; if (!pb_decode(stream, PlainOneOfMessage_fields, &msg)) { printf("Decoding failed: %s\n", PB_GET_ERROR(stream)); return 1; } /* Check that we got the right oneof according to command line */ if (option == 1) { TEST(msg.which_values == OneOfMessage_first_tag); TEST(msg.values.first == 999); } else if (option == 2) { TEST(msg.which_values == OneOfMessage_second_tag); TEST(strcmp(msg.values.second, "abcd") == 0); } else if (option == 3) { TEST(msg.which_values == OneOfMessage_third_tag); TEST(msg.values.third.array[0] == 1); TEST(msg.values.third.array[1] == 2); TEST(msg.values.third.array[2] == 3); TEST(msg.values.third.array[3] == 4); TEST(msg.values.third.array[4] == 5); } return status; } int main(int argc, char **argv) { uint8_t buffer[OneOfMessage_size]; size_t count; int option; if (argc != 2) { fprintf(stderr, "Usage: decode_oneof [number]\n"); return 1; } option = atoi(argv[1]); SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); if (!feof(stdin)) { printf("Message does not fit in buffer\n"); return 1; } { int status = 0; pb_istream_t stream; stream = pb_istream_from_buffer(buffer, count); status = test_oneof_1(&stream, option); if (status != 0) return status; stream = pb_istream_from_buffer(buffer, count); status = test_oneof_2(&stream, option); if (status != 0) return status; } return 0; } nanopb-0.4.1/tests/oneof/encode_oneof.c000066400000000000000000000031261361552131000200270ustar00rootroot00000000000000/* Encode a message using oneof fields */ #include #include #include #include "oneof.pb.h" #include "test_helpers.h" int main(int argc, char **argv) { uint8_t buffer[OneOfMessage_size]; OneOfMessage msg = OneOfMessage_init_zero; pb_ostream_t stream; int option; if (argc != 2) { fprintf(stderr, "Usage: encode_oneof [number]\n"); return 1; } option = atoi(argv[1]); /* Prefix and suffix are used to test that the union does not disturb * other fields in the same message. */ msg.prefix = 123; /* We encode one of the 'values' fields based on command line argument */ if (option == 1) { msg.which_values = OneOfMessage_first_tag; msg.values.first = 999; } else if (option == 2) { msg.which_values = OneOfMessage_second_tag; strcpy(msg.values.second, "abcd"); } else if (option == 3) { msg.which_values = OneOfMessage_third_tag; msg.values.third.array_count = 5; msg.values.third.array[0] = 1; msg.values.third.array[1] = 2; msg.values.third.array[2] = 3; msg.values.third.array[3] = 4; msg.values.third.array[4] = 5; } msg.suffix = 321; stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); if (pb_encode(&stream, OneOfMessage_fields, &msg)) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; } } nanopb-0.4.1/tests/oneof/oneof.proto000066400000000000000000000011151361552131000174270ustar00rootroot00000000000000syntax = "proto2"; import 'nanopb.proto'; message SubMessage { repeated int32 array = 1 [(nanopb).max_count = 8]; } /* Oneof in a message with other fields */ message OneOfMessage { required int32 prefix = 1; oneof values { int32 first = 5; string second = 6 [(nanopb).max_size = 8]; SubMessage third = 7; } required int32 suffix = 99; } /* Oneof in a message by itself */ message PlainOneOfMessage { oneof values { int32 first = 5; string second = 6 [(nanopb).max_size = 8]; SubMessage third = 7; } }nanopb-0.4.1/tests/oneof_callback/000077500000000000000000000000001361552131000170525ustar00rootroot00000000000000nanopb-0.4.1/tests/oneof_callback/SConscript000066400000000000000000000012561361552131000210700ustar00rootroot00000000000000# Test decoder callback support inside oneofs. Import('env') env.NanopbProto('oneof') enc = env.Program(['encode_oneof.c', 'oneof.pb.c', '$COMMON/pb_encode.o', '$COMMON/pb_common.o']) dec = env.Program(['decode_oneof.c', 'oneof.pb.c', '$COMMON/pb_decode.o', '$COMMON/pb_common.o']) for i in range(1,7): # Encode message, then decode with protoc and test program and compare. e = env.RunTest("message%d.pb" % i, enc, ARGS = [str(i)]) d1 = env.Decode([e, "oneof.proto"], MESSAGE = "OneOfMessage") d2 = env.RunTest("message%d.txt" % i, [dec, e]) env.Compare([d1, d2]) nanopb-0.4.1/tests/oneof_callback/decode_oneof.c000066400000000000000000000122461361552131000216340ustar00rootroot00000000000000/* Decode a message using callbacks inside oneof fields */ #include #include #include #include #include #include "oneof.pb.h" #include "test_helpers.h" #include "unittests.h" /* This is a nanopb-0.4 style global callback, that is referred by function name * and does not have to be bound separately to the message. It also allows defining * a custom data type for the field in the structure. */ bool SubMsg3_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_t *field) { if (istream && field->tag == SubMsg3_strvalue_tag) { /* We could e.g. malloc some memory and assign it to our custom datatype * in the message structure here, accessible by field->pData. But in * this example we just print the string directly. */ uint8_t buffer[64]; int strlen = istream->bytes_left; if (strlen > sizeof(buffer) - 1) return false; buffer[strlen] = '\0'; if (!pb_read(istream, buffer, strlen)) return false; printf(" strvalue: \"%s\"\n", buffer); } return true; } /* The two callbacks below are traditional callbacks that use function pointers * defined in pb_callback_t. */ bool print_int32(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint64_t value; if (!pb_decode_varint(stream, &value)) return false; printf((char*)*arg, (int)value); return true; } bool print_string(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint8_t buffer[64]; int strlen = stream->bytes_left; if (strlen > sizeof(buffer) - 1) return false; buffer[strlen] = '\0'; if (!pb_read(stream, buffer, strlen)) return false; /* Print the string, in format comparable with protoc --decode. * Format comes from the arg defined in main(). */ printf((char*)*arg, buffer); return true; } /* The callback below is a message-level callback which is called before each * submessage is encoded. It is used to set the pb_callback_t callbacks inside * the submessage. The reason we need this is that different submessages share * storage inside oneof union, and before we know the message type we can't set * the callbacks without overwriting each other. */ bool msg_callback(pb_istream_t *stream, const pb_field_t *field, void **arg) { /* Print the prefix field before the submessages. * This also demonstrates how to access the top level message fields * from callbacks. */ OneOfMessage *topmsg = field->message; printf("prefix: %d\n", (int)topmsg->prefix); if (field->tag == OneOfMessage_submsg1_tag) { SubMsg1 *msg = field->pData; printf("submsg1 {\n"); msg->array.funcs.decode = print_int32; msg->array.arg = " array: %d\n"; } else if (field->tag == OneOfMessage_submsg2_tag) { SubMsg2 *msg = field->pData; printf("submsg2 {\n"); msg->strvalue.funcs.decode = print_string; msg->strvalue.arg = " strvalue: \"%s\"\n"; } else if (field->tag == OneOfMessage_submsg3_tag) { /* Because SubMsg3 callback is bound by function name, we do not * need to initialize anything here. But we just print a string * to get protoc-equivalent formatted output from the testcase. */ printf("submsg3 {\n"); } /* Once we return true, pb_dec_submessage() will go on to decode the * submessage contents. But if we want, we can also decode it ourselves * above and leave stream->bytes_left at 0 value, inhibiting automatic * decoding. */ return true; } int main(int argc, char **argv) { uint8_t buffer[256]; OneOfMessage msg = OneOfMessage_init_zero; pb_istream_t stream; size_t count; SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); if (!feof(stdin)) { fprintf(stderr, "Message does not fit in buffer\n"); return 1; } /* Set up the cb_values callback, which will in turn set up the callbacks * for each oneof field once the field tag is known. */ msg.cb_values.funcs.decode = msg_callback; stream = pb_istream_from_buffer(buffer, count); if (!pb_decode(&stream, OneOfMessage_fields, &msg)) { fprintf(stderr, "Decoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; } /* This is just printing for the test case logic */ if (msg.which_values == OneOfMessage_intvalue_tag) { printf("prefix: %d\n", (int)msg.prefix); printf("intvalue: %d\n", (int)msg.values.intvalue); } else if (msg.which_values == OneOfMessage_strvalue_tag) { printf("prefix: %d\n", (int)msg.prefix); printf("strvalue: \"%s\"\n", msg.values.strvalue); } else if (msg.which_values == OneOfMessage_submsg3_tag && msg.values.submsg3.which_values == SubMsg3_intvalue_tag) { printf(" intvalue: %d\n", (int)msg.values.submsg3.values.intvalue); printf("}\n"); } else { printf("}\n"); } printf("suffix: %d\n", (int)msg.suffix); assert(msg.prefix == 123); assert(msg.suffix == 321); return 0; } nanopb-0.4.1/tests/oneof_callback/encode_oneof.c000066400000000000000000000066611361552131000216520ustar00rootroot00000000000000/* Encode a message using callbacks inside oneof fields. * For encoding, callbacks inside oneofs require nothing special * so this is just normal callback usage. */ #include #include #include #include "oneof.pb.h" #include "test_helpers.h" /* This is a nanopb-0.4 style global callback, that is referred by function name * and does not have to be bound separately to the message. It also allows defining * a custom data type for the field in the structure. */ bool SubMsg3_callback(pb_istream_t *istream, pb_ostream_t *ostream, const pb_field_t *field) { if (ostream && field->tag == SubMsg3_strvalue_tag) { /* Our custom data type is char* */ const char *str = *(const char**)field->pData; if (!pb_encode_tag_for_field(ostream, field)) return false; return pb_encode_string(ostream, (const uint8_t*)str, strlen(str)); } return true; } /* The two callbacks below are traditional callbacks that use function pointers * defined in pb_callback_t. */ bool encode_int32_array(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { int i; for (i = 0; i < 15; i++) { if (!pb_encode_tag_for_field(stream, field)) return false; if (!pb_encode_varint(stream, i)) return false; } return true; } bool encode_string(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { const char *str = "mystring"; if (!pb_encode_tag_for_field(stream, field)) return false; return pb_encode_string(stream, (const uint8_t*)str, strlen(str)); } int main(int argc, char **argv) { uint8_t buffer[256]; OneOfMessage msg = OneOfMessage_init_zero; pb_ostream_t stream; int option; if (argc != 2) { fprintf(stderr, "Usage: encode_oneof [number]\n"); return 1; } option = atoi(argv[1]); /* Prefix and suffix are used to test that the union does not disturb * other fields in the same message. */ msg.prefix = 123; /* We encode one of the 'values' fields based on command line argument */ if (option == 1) { msg.which_values = OneOfMessage_intvalue_tag; msg.values.intvalue = 999; } else if (option == 2) { msg.which_values = OneOfMessage_strvalue_tag; strcpy(msg.values.strvalue, "abcd"); } else if (option == 3) { msg.which_values = OneOfMessage_submsg1_tag; msg.values.submsg1.array.funcs.encode = encode_int32_array; } else if (option == 4) { msg.which_values = OneOfMessage_submsg2_tag; msg.values.submsg2.strvalue.funcs.encode = encode_string; } else if (option == 5) { msg.which_values = OneOfMessage_submsg3_tag; msg.values.submsg3.which_values = SubMsg3_intvalue_tag; msg.values.submsg3.values.intvalue = 1234; } else if (option == 6) { msg.which_values = OneOfMessage_submsg3_tag; msg.values.submsg3.which_values = SubMsg3_strvalue_tag; msg.values.submsg3.values.strvalue = "efgh"; } msg.suffix = 321; stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); if (pb_encode(&stream, OneOfMessage_fields, &msg)) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; } } nanopb-0.4.1/tests/oneof_callback/oneof.proto000066400000000000000000000013631361552131000212500ustar00rootroot00000000000000syntax = "proto3"; import 'nanopb.proto'; // Repeated callback inside submessage inside oneof message SubMsg1 { repeated int32 array = 1; } // String callback inside submessage inside oneof message SubMsg2 { string strvalue = 1; } // String callback directly inside oneof message SubMsg3 { oneof values { int32 intvalue = 1; string strvalue = 2 [(nanopb).callback_datatype = "const char*"]; } } message OneOfMessage { option (nanopb_msgopt).submsg_callback = true; int32 prefix = 1; oneof values { int32 intvalue = 5; string strvalue = 6 [(nanopb).max_size = 8]; SubMsg1 submsg1 = 7; SubMsg2 submsg2 = 8; SubMsg3 submsg3 = 9; } int32 suffix = 99; } nanopb-0.4.1/tests/options/000077500000000000000000000000001361552131000156235ustar00rootroot00000000000000nanopb-0.4.1/tests/options/SConscript000066400000000000000000000010171361552131000176340ustar00rootroot00000000000000# Test that the generator options work as expected. Import("env") env.NanopbProto("options") env.Object('options.pb.c') env.Match('options_h.matched', ['options.pb.h', 'options_h.expected']) env.Match('options_c.matched', ['options.pb.c', 'options_c.expected']) env.NanopbProto("proto3_options") env.Object('proto3_options.pb.c') env.Match(['proto3_options.pb.h', 'proto3_options.expected']) p = env.Program(["options.c", "options.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/options/options.c000066400000000000000000000012561361552131000174660ustar00rootroot00000000000000#include #include #include "options.pb.h" #include "unittests.h" int main() { int status = 0; { HasFieldMessage msg1 = HasFieldMessage_init_default; HasFieldMessage msg2 = HasFieldMessage_init_zero; COMMENT("Test default_has option"); /* Default initializer should obey has_default setting */ TEST(msg1.has_present == true); TEST(msg1.has_missing == false); TEST(msg1.has_normal == false); /* Zero initializer should always have false */ TEST(msg2.has_present == false); TEST(msg2.has_missing == false); TEST(msg2.has_normal == false); } return status; } nanopb-0.4.1/tests/options/options.proto000066400000000000000000000042151361552131000204050ustar00rootroot00000000000000/* Test nanopb option parsing. * options.expected lists the patterns that are searched for in the output. */ syntax = "proto2"; import "nanopb.proto"; // File level options option (nanopb_fileopt).max_size = 20; message Message1 { required string filesize = 1; } // Message level options message Message2 { option (nanopb_msgopt).max_size = 30; required string msgsize = 1; } // Field level options message Message3 { option (nanopb_msgopt).msgid = 103; required string fieldsize = 1 [(nanopb).max_size = 40]; required string fieldlen = 2 [(nanopb).max_length = 40]; } // Forced callback field message Message4 { option (nanopb_msgopt).msgid = 104; required int32 int32_callback = 1 [(nanopb).type = FT_CALLBACK]; } // Short enum names enum Enum1 { option (nanopb_enumopt).long_names = false; EnumValue1 = 1; EnumValue2 = 2; } message EnumTest { required Enum1 field = 1 [default = EnumValue2]; } // Short enum names inside message message Message5 { option (nanopb_msgopt).msgid = 105; enum Enum2 { option (nanopb_enumopt).long_names = false; EnumValue1 = 1; } required Enum2 field = 1 [default = EnumValue1]; } // Packed structure message my_packed_struct { option (nanopb_msgopt).packed_struct = true; optional int32 myfield = 1; } // Message with ignored field message Message6 { required int32 field1 = 1; optional int32 skipped_field = 2 [(nanopb).type = FT_IGNORE]; } // Message that is skipped message SkippedMessage { option (nanopb_msgopt).skip_message = true; required int32 foo = 1; } // Message with oneof field message OneofMessage { oneof foo { int32 bar = 1; } } // Proto3-style optional field in proto2 file message Proto3Field { optional int32 proto3field = 1 [(nanopb).proto3 = true]; } // Wide descriptors message WideMessage { option (nanopb_msgopt).descriptorsize = DS_4; required int32 foo = 1; } // Default value for has_ field message HasFieldMessage { optional int32 present = 1 [(nanopb).default_has = true]; optional int32 missing = 2 [(nanopb).default_has = false]; optional int32 normal = 3; } nanopb-0.4.1/tests/options/options_c.expected000066400000000000000000000001131361552131000213360ustar00rootroot00000000000000PB_BIND\(Message1, Message1, AUTO\) PB_BIND\(WideMessage, WideMessage, 4\) nanopb-0.4.1/tests/options/options_h.expected000066400000000000000000000007341361552131000213540ustar00rootroot00000000000000char filesize\[20\]; char msgsize\[30\]; char fieldsize\[40\]; char fieldlen\[41\]; pb_callback_t int32_callback; \sEnumValue1 = 1 Message5_EnumValue1 } pb_packed my_packed_struct; ! skipped_field ! SkippedMessage #define PB_MSG_103 Message3 #define PB_MSG_104 Message4 #define PB_MSG_105 Message5 #define OPTIONS_MESSAGES \\ \s+PB_MSG\(103,[0-9]*,Message3\) \\ \s+PB_MSG\(104,-1,Message4\) \\ \s+PB_MSG\(105,[0-9]*,Message5\) \\ #define Message5_msgid 105 ! has_proto3field nanopb-0.4.1/tests/options/proto3_options.expected000066400000000000000000000001601361552131000223440ustar00rootroot00000000000000! bool has_proto3_default bool has_proto3_off ! bool has_proto3_on bool has_normal_submsg ! bool has_sng_submsg nanopb-0.4.1/tests/options/proto3_options.proto000066400000000000000000000005171361552131000217140ustar00rootroot00000000000000syntax = "proto3"; import "nanopb.proto"; message SubMsg { int32 field = 1; } message Message1 { int32 proto3_default = 1; int32 proto3_off = 2 [(nanopb).proto3 = false]; int32 proto3_on = 3 [(nanopb).proto3 = true]; SubMsg normal_submsg = 4; SubMsg sng_submsg = 5 [(nanopb).proto3_singular_msgs = true]; } nanopb-0.4.1/tests/package_name/000077500000000000000000000000001361552131000165235ustar00rootroot00000000000000nanopb-0.4.1/tests/package_name/SConscript000066400000000000000000000026421361552131000205410ustar00rootroot00000000000000# Check that alltypes test case works also when the .proto file defines # a package name. Import("env") def set_pkgname(src, dst, pkgname): data = open(str(src)).read() placeholder = '// package name placeholder' assert placeholder in data data = data.replace(placeholder, 'package %s;' % pkgname) open(str(dst), 'w').write(data) # Build a modified alltypes.proto env.Command("alltypes.proto", "#alltypes/alltypes.proto", lambda target, source, env: set_pkgname(source[0], target[0], 'test.package')) env.Command("alltypes.options", "#alltypes/alltypes.options", Copy("$TARGET", "$SOURCE")) env.NanopbProto(["alltypes", "alltypes.options"]) # Build a modified encode_alltypes.c def modify_c(target, source, env): '''Add package name to type names in .c file.''' data = open(str(source[0]), 'r').read() type_names = ['AllTypes', 'MyEnum', 'HugeEnum'] for name in type_names: data = data.replace(name, 'test_package_' + name) open(str(target[0]), 'w').write(data) return 0 env.Command("encode_alltypes.c", "#alltypes/encode_alltypes.c", modify_c) # Encode and compare results to original alltypes testcase enc = env.Program(["encode_alltypes.c", "alltypes.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) refdec = "$BUILD/alltypes/decode_alltypes$PROGSUFFIX" env.RunTest(enc) env.Compare(["encode_alltypes.output", "$BUILD/alltypes/encode_alltypes.output"]) nanopb-0.4.1/tests/package_name_nanopb/000077500000000000000000000000001361552131000200605ustar00rootroot00000000000000nanopb-0.4.1/tests/package_name_nanopb/SConscript000066400000000000000000000031431361552131000220730ustar00rootroot00000000000000# Check that alltypes test case works also when the .proto file defines # a package name using the (nanopb_fileopt).package option. Import("env") def set_pkgname(src, dst, pkgname): data = open(str(src)).read() placeholder = '// package name placeholder' assert placeholder in data data = data.replace(placeholder, 'package foopkg;\n' + 'import "nanopb.proto";\n' + 'option (nanopb_fileopt).package="%s";' % pkgname) open(str(dst), 'w').write(data) # Build a modified alltypes.proto env.Command("alltypes.proto", "#alltypes/alltypes.proto", lambda target, source, env: set_pkgname(source[0], target[0], 'test.package')) env.Command("alltypes.options", "#alltypes/alltypes.options", Copy("$TARGET", "$SOURCE")) env.NanopbProto(["alltypes", "alltypes.options"]) # Build a modified encode_alltypes.c def modify_c(target, source, env): '''Add package name to type names in .c file.''' data = open(str(source[0]), 'r').read() type_names = ['AllTypes', 'MyEnum', 'HugeEnum'] for name in type_names: data = data.replace(name, 'test_package_' + name) open(str(target[0]), 'w').write(data) return 0 env.Command("encode_alltypes.c", "#alltypes/encode_alltypes.c", modify_c) # Encode and compare results to original alltypes testcase enc = env.Program(["encode_alltypes.c", "alltypes.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) refdec = "$BUILD/alltypes/decode_alltypes$PROGSUFFIX" env.RunTest(enc) env.Compare(["encode_alltypes.output", "$BUILD/alltypes/encode_alltypes.output"]) nanopb-0.4.1/tests/regression/000077500000000000000000000000001361552131000163105ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/GHSA-gcx3-7m76-287p/000077500000000000000000000000001361552131000210705ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/GHSA-gcx3-7m76-287p/SConscript000066400000000000000000000007461361552131000231110ustar00rootroot00000000000000# Regression test for security issue GHSA-gcx3-7m76-287p # "Out-of-memory condition on repeated field can result in invalid free()" Import("malloc_env") malloc_env.NanopbProto("test") test = malloc_env.Program(["test.c", "test.pb.c", "$COMMON/pb_decode_with_malloc.o", "$COMMON/pb_common_with_malloc.o", "$COMMON/malloc_wrappers.o"]) malloc_env.RunTest([test, 'test_input.pb']) nanopb-0.4.1/tests/regression/GHSA-gcx3-7m76-287p/test.c000066400000000000000000000014401361552131000222120ustar00rootroot00000000000000#include #include #include #include #include "test_helpers.h" #include "test.pb.h" bool stream_callback(pb_istream_t *stream, uint8_t *buf, size_t count) { FILE *file = (FILE*)stream->state; size_t len = fread(buf, 1, count, file); if (len == count) { return true; } else { stream->bytes_left = 0; return false; } } int main() { pb_istream_t stream = {&stream_callback, NULL, SIZE_MAX}; MyMessage msg = MyMessage_init_default; bool status; stream.state = stdin; SET_BINARY_MODE(stdin); set_max_alloc_bytes(512); status = pb_decode(&stream, MyMessage_fields, &msg); assert(!status); assert(strcmp(stream.errmsg, "realloc failed") == 0); return 0; } nanopb-0.4.1/tests/regression/GHSA-gcx3-7m76-287p/test.proto000066400000000000000000000001771361552131000231410ustar00rootroot00000000000000syntax = "proto2"; import "nanopb.proto"; message MyMessage { repeated string values = 1 [(nanopb).type = FT_POINTER]; } nanopb-0.4.1/tests/regression/GHSA-gcx3-7m76-287p/test_input.pb000066400000000000000000000040001361552131000236030ustar00rootroot00000000000000 nanopb-0.4.1/tests/regression/issue_118/000077500000000000000000000000001361552131000200315ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_118/SConscript000066400000000000000000000004571361552131000220510ustar00rootroot00000000000000# Regression test for Issue 118: Short enum names in imported proto files are not honoured Import("env") env = env.Clone() env.Append(PROTOCPATH = "#regression/issue_118") env.NanopbProto("enumdef") env.Object('enumdef.pb.c') env.NanopbProto(["enumuse", "enumdef.proto"]) env.Object('enumuse.pb.c') nanopb-0.4.1/tests/regression/issue_118/enumdef.proto000066400000000000000000000001661361552131000225440ustar00rootroot00000000000000syntax = "proto2"; import 'nanopb.proto'; enum MyEnum { option (nanopb_enumopt).long_names = false; FOOBAR = 1; } nanopb-0.4.1/tests/regression/issue_118/enumuse.proto000066400000000000000000000001631361552131000225770ustar00rootroot00000000000000syntax = "proto2"; import 'enumdef.proto'; message MyMessage { required MyEnum myenum = 1 [default = FOOBAR]; } nanopb-0.4.1/tests/regression/issue_125/000077500000000000000000000000001361552131000200275ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_125/SConscript000066400000000000000000000003621361552131000220420ustar00rootroot00000000000000# Regression test for Issue 125: Wrong identifier name for extension fields Import("env") env.NanopbProto(["extensionbug", "extensionbug.options"]) env.Object('extensionbug.pb.c') env.Match(['extensionbug.pb.h', 'extensionbug.expected']) nanopb-0.4.1/tests/regression/issue_125/extensionbug.expected000066400000000000000000000000651361552131000242650ustar00rootroot00000000000000pb_extension_type_t Message2_extras uint32_t field2 nanopb-0.4.1/tests/regression/issue_125/extensionbug.options000066400000000000000000000001201361552131000241470ustar00rootroot00000000000000* type:FT_IGNORE Message2.extras type:FT_STATIC Message2.field2 type:FT_STATIC nanopb-0.4.1/tests/regression/issue_125/extensionbug.proto000066400000000000000000000003471361552131000236320ustar00rootroot00000000000000syntax = "proto2"; message Message1 { optional uint32 fieldA = 1; extensions 30 to max; } message Message2 { extend Message1 { optional Message2 extras = 30; } optional uint32 field1 = 1; optional uint32 field2 = 2; } nanopb-0.4.1/tests/regression/issue_141/000077500000000000000000000000001361552131000200255ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_141/SConscript000066400000000000000000000003161361552131000220370ustar00rootroot00000000000000# Regression test for issue 141: wrong encoded size #define for oneof messages Import("env") env.NanopbProto("testproto") env.Object('testproto.pb.c') env.Match(['testproto.pb.h', 'testproto.expected']) nanopb-0.4.1/tests/regression/issue_141/testproto.expected000066400000000000000000000003231361552131000236110ustar00rootroot00000000000000define SubMessage_size \s* 88 define OneOfMessage_size \s* 113 define topMessage_size \s* 70 define MyMessage1_size \s* 46 define MyMessage2_size \s* 8 define MyMessage3_size \s* 5 define MyMessage4_size \s* 18 nanopb-0.4.1/tests/regression/issue_141/testproto.proto000066400000000000000000000016501361552131000231570ustar00rootroot00000000000000syntax = "proto2"; import 'nanopb.proto'; message SubMessage { repeated int32 array = 1 [(nanopb).max_count = 8]; } message OneOfMessage { required int32 prefix = 1; oneof values { int32 first = 5; string second = 6 [(nanopb).max_length = 8]; SubMessage third = 7; } required int32 suffix = 99; } message topMessage { required int32 start = 1; oneof msg { MyMessage1 msg1 = 2; MyMessage2 msg2 = 3; } required int32 end = 4; } message MyMessage1 { required uint32 n1 = 1; required uint32 n2 = 2; required string s = 3 [(nanopb).max_length = 32]; } message MyMessage2 { required uint32 num = 1; required bool b = 2; } message MyMessage3 { required bool bbb = 1; required string ss = 2 [(nanopb).max_length = 1]; } message MyMessage4 { required bool bbbb = 1; required string sss = 2 [(nanopb).max_length = 2]; required uint32 num = 3; required uint32 num2 = 4; } nanopb-0.4.1/tests/regression/issue_145/000077500000000000000000000000001361552131000200315ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_145/SConscript000066400000000000000000000003411361552131000220410ustar00rootroot00000000000000# Regression test for Issue 145: Allow /* */ and // comments in .options files Import("env") env.NanopbProto(["comments", "comments.options"]) env.Object('comments.pb.c') env.Match(['comments.pb.h', 'comments.expected']) nanopb-0.4.1/tests/regression/issue_145/comments.expected000066400000000000000000000000401361552131000233730ustar00rootroot00000000000000char foo\[5\]; char bar\[16\]; nanopb-0.4.1/tests/regression/issue_145/comments.options000066400000000000000000000002241361552131000232710ustar00rootroot00000000000000/* Block comment */ # Line comment // Line comment DummyMessage.foo /* Block comment */ max_size:5 DummyMessage.bar max_size:16 # Line comment ### nanopb-0.4.1/tests/regression/issue_145/comments.proto000066400000000000000000000001501361552131000227370ustar00rootroot00000000000000syntax = "proto2"; message DummyMessage { required string foo = 1; required string bar = 2; } nanopb-0.4.1/tests/regression/issue_166/000077500000000000000000000000001361552131000200345ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_166/SConscript000066400000000000000000000004351361552131000220500ustar00rootroot00000000000000# Verify that the maximum encoded size is calculated properly # for enums. Import('env') env.NanopbProto('enums') p = env.Program(["enum_encoded_size.c", "enums.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/regression/issue_166/enum_encoded_size.c000066400000000000000000000023061361552131000236600ustar00rootroot00000000000000#include #include #include #include "unittests.h" #include "enums.pb.h" int main() { int status = 0; uint8_t buf[256]; SignedMsg msg1; UnsignedMsg msg2; pb_ostream_t s; { COMMENT("Test negative value of signed enum"); /* Negative value should take up the maximum size */ msg1.value = SignedEnum_SE_MIN; s = pb_ostream_from_buffer(buf, sizeof(buf)); TEST(pb_encode(&s, SignedMsg_fields, &msg1)); TEST(s.bytes_written == SignedMsg_size); COMMENT("Test positive value of signed enum"); /* Positive value should be smaller */ msg1.value = SignedEnum_SE_MAX; s = pb_ostream_from_buffer(buf, sizeof(buf)); TEST(pb_encode(&s, SignedMsg_fields, &msg1)); TEST(s.bytes_written < SignedMsg_size); } { COMMENT("Test positive value of unsigned enum"); /* This should take up the maximum size */ msg2.value = UnsignedEnum_UE_MAX; s = pb_ostream_from_buffer(buf, sizeof(buf)); TEST(pb_encode(&s, UnsignedMsg_fields, &msg2)); TEST(s.bytes_written == UnsignedMsg_size); } return status; } nanopb-0.4.1/tests/regression/issue_166/enums.proto000066400000000000000000000003561361552131000222540ustar00rootroot00000000000000syntax = "proto2"; enum SignedEnum { SE_MIN = -1; SE_MAX = 255; } enum UnsignedEnum { UE_MAX = 65536; } message SignedMsg { required SignedEnum value = 1; } message UnsignedMsg { required UnsignedEnum value = 1; } nanopb-0.4.1/tests/regression/issue_172/000077500000000000000000000000001361552131000200315ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_172/SConscript000066400000000000000000000011221361552131000220370ustar00rootroot00000000000000# Verify that _size define is generated for messages that have # includes from another directory. Import('env') incpath = env.Clone() incpath.Append(PROTOCPATH="#regression/issue_172/submessage") incpath.Append(CPPPATH="$BUILD/regression/issue_172/submessage") incpath.Append(CPPPATH="$BUILD/regression/issue_172/") incpath.NanopbProto('test') incpath.NanopbProto(['submessage/submessage', 'submessage/submessage.options']) p = incpath.Program(["msg_size.c", "test.pb.c", "submessage/submessage.pb.c", '$COMMON/pb_common.o']) nanopb-0.4.1/tests/regression/issue_172/msg_size.c000066400000000000000000000002011361552131000220060ustar00rootroot00000000000000#include "test.pb.h" PB_STATIC_ASSERT(testmessage_size >= 1+1+1+1+16, TESTMESSAGE_SIZE_IS_WRONG) int main() { return 0; } nanopb-0.4.1/tests/regression/issue_172/submessage/000077500000000000000000000000001361552131000221675ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_172/submessage/submessage.options000066400000000000000000000000351361552131000257400ustar00rootroot00000000000000submessage.data max_size: 16 nanopb-0.4.1/tests/regression/issue_172/submessage/submessage.proto000066400000000000000000000001071361552131000254100ustar00rootroot00000000000000syntax = "proto2"; message submessage { required bytes data = 1; } nanopb-0.4.1/tests/regression/issue_172/test.proto000066400000000000000000000001451361552131000220750ustar00rootroot00000000000000syntax = "proto2"; import "submessage.proto"; message testmessage { optional submessage sub = 1; } nanopb-0.4.1/tests/regression/issue_188/000077500000000000000000000000001361552131000200405ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_188/SConscript000066400000000000000000000001371361552131000220530ustar00rootroot00000000000000# Regression test for issue with Enums inside OneOf. Import('env') env.NanopbProto('oneof') nanopb-0.4.1/tests/regression/issue_188/oneof.proto000066400000000000000000000007201361552131000222320ustar00rootroot00000000000000syntax = "proto2"; message MessageOne { required uint32 one = 1; required uint32 two = 2; required uint32 three = 3; required int32 four = 4; } enum EnumTwo { SOME_ENUM_1 = 1; SOME_ENUM_2 = 5; SOME_ENUM_3 = 6; SOME_ENUM_4 = 9; SOME_ENUM_5 = 10; SOME_ENUM_6 = 12; SOME_ENUM_7 = 39; SOME_ENUM_8 = 401; } message OneofMessage { oneof payload { MessageOne message = 1; EnumTwo enum = 2; } } nanopb-0.4.1/tests/regression/issue_195/000077500000000000000000000000001361552131000200365ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_195/SConscript000066400000000000000000000003771361552131000220570ustar00rootroot00000000000000# Regression test for Issue 195: Message size not calculated if a submessage includes # bytes. Basically a non-working #define being generated. Import("env") env.NanopbProto(["test"]) env.Object('test.pb.c') env.Match(['test.pb.h', 'test.expected']) nanopb-0.4.1/tests/regression/issue_195/test.expected000066400000000000000000000000351361552131000225360ustar00rootroot00000000000000/\* TestMessage_size depends nanopb-0.4.1/tests/regression/issue_195/test.proto000066400000000000000000000002631361552131000221030ustar00rootroot00000000000000message TestMessage { required uint32 id = 1; required bytes payload = 2; } message EncapsulatedMessage { required uint32 id = 1; required TestMessage test = 2; } nanopb-0.4.1/tests/regression/issue_203/000077500000000000000000000000001361552131000200245ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_203/SConscript000066400000000000000000000005131361552131000220350ustar00rootroot00000000000000# Regression test for issue with multiple files generated at once Import('env') env = env.Clone() env.Replace(NANOPBFLAGS = "--strip-path") env.Command(['file1.pb.c', 'file1.pb.h', 'file2.pb.c', 'file2.pb.h'], ['file1.proto', 'file2.proto'], env['NANOPB_PROTO_CMD']) env.Object('file1.pb.c') env.Object('file2.pb.c') nanopb-0.4.1/tests/regression/issue_203/file1.proto000066400000000000000000000001731361552131000221120ustar00rootroot00000000000000syntax = "proto2"; message SubMessage1 { required int32 foo = 1; } message Message1 { required SubMessage1 bar = 1; } nanopb-0.4.1/tests/regression/issue_203/file2.proto000066400000000000000000000001731361552131000221130ustar00rootroot00000000000000syntax = "proto2"; message SubMessage2 { required int32 foo = 1; } message Message2 { required SubMessage2 bar = 1; } nanopb-0.4.1/tests/regression/issue_205/000077500000000000000000000000001361552131000200265ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_205/SConscript000066400000000000000000000006651361552131000220470ustar00rootroot00000000000000# Check that pb_release() correctly handles corrupted size fields of # static arrays. Import('env', 'malloc_env') env.NanopbProto('size_corruption') p = malloc_env.Program(["size_corruption.c", "size_corruption.pb.c", "$COMMON/pb_decode_with_malloc.o", "$COMMON/pb_common_with_malloc.o", "$COMMON/malloc_wrappers.o"]) env.RunTest(p) nanopb-0.4.1/tests/regression/issue_205/size_corruption.c000066400000000000000000000003251361552131000234300ustar00rootroot00000000000000#include "size_corruption.pb.h" #include int main() { MainMessage msg = MainMessage_init_zero; msg.bar_count = (pb_size_t)-1; pb_release(MainMessage_fields, &msg); return 0; } nanopb-0.4.1/tests/regression/issue_205/size_corruption.proto000066400000000000000000000003171361552131000243520ustar00rootroot00000000000000syntax = "proto2"; import 'nanopb.proto'; message SubMessage { repeated int32 foo = 1 [(nanopb).type = FT_POINTER]; } message MainMessage { repeated SubMessage bar = 1 [(nanopb).max_count = 5]; } nanopb-0.4.1/tests/regression/issue_227/000077500000000000000000000000001361552131000200325ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_227/SConscript000066400000000000000000000006631361552131000220510ustar00rootroot00000000000000# Regression test for Issue 227:Using proto3 type fields can cause unaligned access # NOTE: This test will only detect problems when run with clang sanitizer (which # is done regularly by a jenkins run). Import('env') env.NanopbProto('unaligned_uint64') p = env.Program(["unaligned_uint64.c", "unaligned_uint64.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/regression/issue_227/unaligned_uint64.c000066400000000000000000000004531361552131000233570ustar00rootroot00000000000000#include "unaligned_uint64.pb.h" #include int main() { uint8_t buf[128]; pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); MainMessage msg = MainMessage_init_zero; msg.bar[0] = 'A'; pb_encode(&stream, MainMessage_fields, &msg); return 0; } nanopb-0.4.1/tests/regression/issue_227/unaligned_uint64.proto000066400000000000000000000002341361552131000242750ustar00rootroot00000000000000syntax = "proto3"; import 'nanopb.proto'; message MainMessage { string foo = 1 [(nanopb).max_size = 3]; string bar = 2 [(nanopb).max_size = 8]; } nanopb-0.4.1/tests/regression/issue_229/000077500000000000000000000000001361552131000200345ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_229/SConscript000066400000000000000000000005431361552131000220500ustar00rootroot00000000000000# Regression test for Issue 229: problem encoding message that has # multiple oneof fields Import('env') env.NanopbProto('multiple_oneof') p = env.Program(["multiple_oneof.c", "multiple_oneof.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/regression/issue_229/multiple_oneof.c000066400000000000000000000020341361552131000232200ustar00rootroot00000000000000#include "multiple_oneof.pb.h" #include #include #include int main() { int status = 0; uint8_t buf[128]; size_t msglen; { pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); MainMessage msg = MainMessage_init_zero; msg.which_oneof1 = MainMessage_oneof1_uint32_tag; msg.oneof1.oneof1_uint32 = 1234; msg.which_oneof2 = MainMessage_oneof2_uint32_tag; msg.oneof2.oneof2_uint32 = 5678; TEST(pb_encode(&stream, MainMessage_fields, &msg)); msglen = stream.bytes_written; } { pb_istream_t stream = pb_istream_from_buffer(buf, msglen); MainMessage msg = MainMessage_init_zero; TEST(pb_decode(&stream, MainMessage_fields, &msg)); TEST(msg.which_oneof1 == MainMessage_oneof1_uint32_tag); TEST(msg.oneof1.oneof1_uint32 == 1234); TEST(msg.which_oneof2 == MainMessage_oneof2_uint32_tag); TEST(msg.oneof2.oneof2_uint32 == 5678); } return status; } nanopb-0.4.1/tests/regression/issue_229/multiple_oneof.proto000066400000000000000000000002431361552131000241410ustar00rootroot00000000000000syntax = "proto2"; message MainMessage { oneof oneof1 { uint32 oneof1_uint32 = 1; } oneof oneof2 { uint32 oneof2_uint32 = 2; } } nanopb-0.4.1/tests/regression/issue_242/000077500000000000000000000000001361552131000200275ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_242/SConscript000066400000000000000000000005441361552131000220440ustar00rootroot00000000000000# Regression test for Issue 242: pb_encode does not encode tag for # extension fields that is all zeros Import('env') env.NanopbProto('zero_value') p = env.Program(["zero_value.c", "zero_value.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/regression/issue_242/zero_value.c000066400000000000000000000025221361552131000223470ustar00rootroot00000000000000#include #include #include #include #include "zero_value.pb.h" int main() { int status = 0; COMMENT("Test extension fields with zero values"); { uint8_t buffer[256] = {0}; pb_ostream_t ostream; int32_t value = 0; Extendable source = {0}; pb_extension_t source_ext = {0}; source_ext.type = &opt_int32; source_ext.dest = &value; source.extensions = &source_ext; ostream = pb_ostream_from_buffer(buffer, sizeof(buffer)); TEST(pb_encode(&ostream, Extendable_fields, &source)); TEST(ostream.bytes_written == 2); TEST(memcmp(buffer, "\x58\x00", 2) == 0); } /* Note: There never was a bug here, but this check is included * in the regression test because the logic is closely related. */ COMMENT("Test pointer fields with zero values"); { uint8_t buffer[256] = {0}; pb_ostream_t ostream; int32_t value = 0; PointerMessage source = {0}; source.opt_int32 = &value; ostream = pb_ostream_from_buffer(buffer, sizeof(buffer)); TEST(pb_encode(&ostream, PointerMessage_fields, &source)); TEST(ostream.bytes_written == 2); TEST(memcmp(buffer, "\x58\x00", 2) == 0); } return status; } nanopb-0.4.1/tests/regression/issue_242/zero_value.proto000066400000000000000000000003631361552131000232710ustar00rootroot00000000000000syntax = "proto2"; import "nanopb.proto"; message Extendable { extensions 10 to 100; } extend Extendable { optional int32 opt_int32 = 11; } message PointerMessage { optional int32 opt_int32 = 11 [(nanopb).type = FT_POINTER]; } nanopb-0.4.1/tests/regression/issue_247/000077500000000000000000000000001361552131000200345ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_247/SConscript000066400000000000000000000004631361552131000220510ustar00rootroot00000000000000# Test that pb_check_proto3_default_value() correctly skips padding # bytes in submessage structures. Import("env") env.NanopbProto("padding") p = env.Program(["padding.c", "padding.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/regression/issue_247/padding.c000066400000000000000000000013331361552131000216060ustar00rootroot00000000000000#include #include #include #include "padding.pb.h" int main() { int status = 0; TestMessage msg; /* Set padding bytes to garbage */ memset(&msg, 0xAA, sizeof(msg)); /* Set all meaningful fields to 0 */ msg.submsg.boolfield = false; msg.submsg.intfield = 0; /* Test encoding */ { pb_byte_t buf[128] = {0}; pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); TEST(pb_encode(&stream, TestMessage_fields, &msg)); /* Because all fields have zero values, proto3 encoder * shouldn't write out anything. */ TEST(stream.bytes_written == 0); } return status; } nanopb-0.4.1/tests/regression/issue_247/padding.proto000066400000000000000000000003161361552131000225270ustar00rootroot00000000000000syntax = "proto3"; import "nanopb.proto"; message SubMessage { bool boolfield = 1; int64 intfield = 2; } message TestMessage { SubMessage submsg = 1 [(nanopb).proto3_singular_msgs = true]; } nanopb-0.4.1/tests/regression/issue_249/000077500000000000000000000000001361552131000200365ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_249/SConscript000066400000000000000000000004741361552131000220550ustar00rootroot00000000000000# Regression test for Issue 249: proto3 mode pb_decode() corrupts callback fields Import('env') env.NanopbProto('test') p = env.Program(["test.c", "test.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/regression/issue_249/test.c000066400000000000000000000025731361552131000211700ustar00rootroot00000000000000#include "test.pb.h" #include #include #include static bool write_array(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { int i; for (i = 0; i < 5; i++) { if (!pb_encode_tag_for_field(stream, field)) return false; if (!pb_encode_varint(stream, 1000 + i)) return false; } return true; } static bool read_array(pb_istream_t *stream, const pb_field_t *field, void **arg) { uint32_t i; int *sum = *arg; if (!pb_decode_varint32(stream, &i)) return false; *sum += i; return true; } int main() { int status = 0; pb_byte_t buf[128] = {0}; pb_size_t msglen; { MainMessage msg = MainMessage_init_zero; pb_ostream_t stream = pb_ostream_from_buffer(buf, sizeof(buf)); msg.submsg.foo.funcs.encode = &write_array; TEST(pb_encode(&stream, MainMessage_fields, &msg)); msglen = stream.bytes_written; } { MainMessage msg = MainMessage_init_zero; pb_istream_t stream = pb_istream_from_buffer(buf, msglen); int sum = 0; msg.submsg.foo.funcs.decode = &read_array; msg.submsg.foo.arg = ∑ TEST(pb_decode(&stream, MainMessage_fields, &msg)); TEST(sum == 1000 + 1001 + 1002 + 1003 + 1004); } return status; } nanopb-0.4.1/tests/regression/issue_249/test.proto000066400000000000000000000002721361552131000221030ustar00rootroot00000000000000syntax = "proto3"; import "nanopb.proto"; message SubMessage { repeated int32 foo = 1; } message MainMessage { SubMessage submsg = 1 [(nanopb).proto3_singular_msgs = true]; } nanopb-0.4.1/tests/regression/issue_253/000077500000000000000000000000001361552131000200315ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_253/SConscript000066400000000000000000000005121361552131000220410ustar00rootroot00000000000000# Regression test for Issue 253: Wrong calculated message maximum size Import('env') env.NanopbProto('short_array') p = env.Program(['short_array.c', 'short_array.pb.c', "$COMMON/pb_decode.o", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/regression/issue_253/short_array.c000066400000000000000000000011461361552131000225340ustar00rootroot00000000000000#include #include #include "short_array.pb.h" int main() { int status = 0; COMMENT("Test message length calculation for short arrays"); { uint8_t buffer[TestMessage_size] = {0}; pb_ostream_t ostream = pb_ostream_from_buffer(buffer, TestMessage_size); TestMessage msg = TestMessage_init_zero; msg.rep_uint32_count = 1; msg.rep_uint32[0] = ((uint32_t)1 << 31); TEST(pb_encode(&ostream, TestMessage_fields, &msg)); TEST(ostream.bytes_written == TestMessage_size); } return status; } nanopb-0.4.1/tests/regression/issue_253/short_array.proto000066400000000000000000000002011361552131000234440ustar00rootroot00000000000000syntax = "proto2"; import "nanopb.proto"; message TestMessage { repeated uint32 rep_uint32 = 1 [(nanopb).max_count = 1]; } nanopb-0.4.1/tests/regression/issue_256/000077500000000000000000000000001361552131000200345ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_256/SConscript000066400000000000000000000005701361552131000220500ustar00rootroot00000000000000# Regression test for Issue 256: Proto3 mode skips submessages even when # later array fields have non-zero value Import('env') env.NanopbProto('submsg_array') p = env.Program(['submsg_array.c', 'submsg_array.pb.c', "$COMMON/pb_decode.o", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/regression/issue_256/submsg_array.c000066400000000000000000000021501361552131000226740ustar00rootroot00000000000000#include #include #include #include "submsg_array.pb.h" int main() { int status = 0; COMMENT("Test encoding for submessage with array"); { uint8_t buffer[TestMessage_size] = {0}; pb_ostream_t ostream = pb_ostream_from_buffer(buffer, TestMessage_size); TestMessage msg = TestMessage_init_zero; msg.submsg.rep_uint32_count = 3; msg.submsg.rep_uint32[0] = 0; msg.submsg.rep_uint32[1] = 1; msg.submsg.rep_uint32[2] = 2; TEST(pb_encode(&ostream, TestMessage_fields, &msg)); TEST(ostream.bytes_written > 0); { pb_istream_t istream = pb_istream_from_buffer(buffer, ostream.bytes_written); TestMessage msg2 = TestMessage_init_zero; TEST(pb_decode(&istream, TestMessage_fields, &msg2)); TEST(msg2.submsg.rep_uint32_count == 3); TEST(msg2.submsg.rep_uint32[0] == 0); TEST(msg2.submsg.rep_uint32[1] == 1); TEST(msg2.submsg.rep_uint32[2] == 2); } } return status; } nanopb-0.4.1/tests/regression/issue_256/submsg_array.proto000066400000000000000000000003331361552131000236160ustar00rootroot00000000000000syntax = "proto3"; import "nanopb.proto"; message SubMessage { repeated uint32 rep_uint32 = 1 [(nanopb).max_count = 3]; } message TestMessage { SubMessage submsg = 1 [(nanopb).proto3_singular_msgs = true]; } nanopb-0.4.1/tests/regression/issue_259/000077500000000000000000000000001361552131000200375ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_259/SConscript000066400000000000000000000011671361552131000220560ustar00rootroot00000000000000# Check that callback fields inside malloc()ed messages # are correctly initialized. Import('env', 'malloc_env') env.NanopbProto('callback_pointer') p = malloc_env.Program(["callback_pointer.c", "callback_pointer.pb.c", "$COMMON/pb_decode_with_malloc.o", "$COMMON/pb_common_with_malloc.o", "$COMMON/malloc_wrappers.o"]) # Run test under valgrind if available kwargs = {} if env.get("VALGRIND"): kwargs['COMMAND'] = env['VALGRIND'] kwargs['ARGS'] = ["-q", "--error-exitcode=99", p[0].abspath] env.RunTest(p, **kwargs) nanopb-0.4.1/tests/regression/issue_259/callback_pointer.c000066400000000000000000000014021361552131000234740ustar00rootroot00000000000000#include "callback_pointer.pb.h" #include #include int main() { int status = 0; const uint8_t msgdata[] = {0x0A, 0x02, 0x08, 0x7F}; MainMessage msg = MainMessage_init_zero; { pb_istream_t stream = pb_istream_from_buffer(msgdata, sizeof(msgdata)); COMMENT("Running first decode"); TEST(pb_decode(&stream, MainMessage_fields, &msg)); pb_release(MainMessage_fields, &msg); } { pb_istream_t stream = pb_istream_from_buffer(msgdata, sizeof(msgdata)); COMMENT("Running second decode"); TEST(pb_decode(&stream, MainMessage_fields, &msg)); pb_release(MainMessage_fields, &msg); } TEST(get_alloc_count() == 0); return status; } nanopb-0.4.1/tests/regression/issue_259/callback_pointer.proto000066400000000000000000000003241361552131000244170ustar00rootroot00000000000000syntax = "proto2"; import 'nanopb.proto'; message SubMessage { optional int32 foo = 1 [(nanopb).type = FT_CALLBACK]; } message MainMessage { optional SubMessage bar = 1 [(nanopb).type = FT_POINTER]; } nanopb-0.4.1/tests/regression/issue_306/000077500000000000000000000000001361552131000200305ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_306/SConscript000066400000000000000000000002771361552131000220500ustar00rootroot00000000000000# Check that generator gives a warning about large extension field number. Import('env') env.NanopbProto('large_extension') env.Match(['large_extension.pb.c', 'large_extension.expected']) nanopb-0.4.1/tests/regression/issue_306/large_extension.expected000066400000000000000000000000551361552131000247410ustar00rootroot00000000000000PB_BIND\(foo_ext_extmsg, foo_ext_extmsg, 4\) nanopb-0.4.1/tests/regression/issue_306/large_extension.proto000066400000000000000000000001561361552131000243050ustar00rootroot00000000000000syntax = "proto2"; message Foo { extensions 1 to max; } extend Foo { optional int32 foo_ext = 99999; } nanopb-0.4.1/tests/regression/issue_322/000077500000000000000000000000001361552131000200265ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_322/SConscript000066400000000000000000000004351361552131000220420ustar00rootroot00000000000000# Check that default values with special characters are # correctly handled. Import('env') env.NanopbProto('defaults') p = env.Program(["defaults.c", "defaults.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(p) nanopb-0.4.1/tests/regression/issue_322/defaults.c000066400000000000000000000024271361552131000220060ustar00rootroot00000000000000#include "defaults.pb.h" #include #include int check_defaults(const DefaultsMsg *msg) { int status = 0; TEST(msg->b1[0] == 0xDE && msg->b1[1] == 0xAD && msg->b1[2] == 0x00 && msg->b1[3] == 0xBE && msg->b1[4] == 0xEF); TEST(msg->b2.bytes[0] == 0xDE && msg->b2.bytes[1] == 0xAD && msg->b2.bytes[2] == 0x00 && msg->b2.bytes[3] == 0xBE && msg->b2.bytes[4] == 0xEF && msg->b2.size == 5); TEST(msg->b3.bytes[0] == 0xDE && msg->b3.bytes[1] == 0xAD && msg->b3.bytes[2] == 0x00 && msg->b3.bytes[3] == 0xBE && msg->b3.bytes[4] == 0xEF && msg->b2.size == 5); TEST(msg->s1[0] == (char)0xC3 && msg->s1[1] == (char)0xA4 && msg->s1[2] == (char)0xC3 && msg->s1[3] == (char)0xB6 && msg->s1[4] == '\0'); return status; } int main() { int status = 0; { DefaultsMsg msg = DefaultsMsg_init_default; COMMENT("Checking defaults from static initializer"); status += check_defaults(&msg); } { DefaultsMsg msg = DefaultsMsg_init_zero; pb_istream_t empty = {0,0,0}; pb_decode(&empty, DefaultsMsg_fields, &msg); COMMENT("Checking defaults set at runtime"); status += check_defaults(&msg); } return status; } nanopb-0.4.1/tests/regression/issue_322/defaults.proto000066400000000000000000000006471361552131000227310ustar00rootroot00000000000000syntax = "proto2"; import 'nanopb.proto'; message DefaultsMsg { optional bytes b1 = 1 [default = "\xDE\xAD\x00\xBE\xEF", (nanopb).max_size = 5, (nanopb).fixed_length=true]; optional bytes b2 = 2 [default = "\xDE\xAD\x00\xBE\xEF", (nanopb).max_size = 5]; optional bytes b3 = 3 [default = "\xDE\xAD\000\xBE\xEF", (nanopb).max_size = 15]; optional string s1 = 4 [default = "äö", (nanopb).max_size = 8]; } nanopb-0.4.1/tests/regression/issue_338/000077500000000000000000000000001361552131000200355ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_338/SConscript000066400000000000000000000001421361552131000220440ustar00rootroot00000000000000# Check that generator doesn't exceed memory limits Import('env') env.NanopbProto('bigvalue') nanopb-0.4.1/tests/regression/issue_338/bigvalue.proto000066400000000000000000000057461361552131000227340ustar00rootroot00000000000000syntax = "proto3"; package enterprise; message BigData { repeated BigEvent events = 1; } message BigEvent { oneof event { BigValue1 data1 = 1; BigValue2 data2 = 2; BigValue3 data3 = 3; BigValue4 data4 = 4; BigValue5 data5 = 5; BigValue6 data6 = 6; BigValue7 data7 = 7; BigValue8 data8 = 8; BigValue9 data9 = 9; BigValue10 data10 = 10; BigValue11 data11 = 11; BigValue12 data12 = 12; BigValue13 data13 = 13; BigValue14 data14 = 14; BigValue15 data15 = 15; BigValue16 data16 = 16; BigValue17 data17 = 17; BigValue18 data18 = 18; BigValue19 data19 = 19; BigValue20 data20 = 20; BigValue21 data21 = 21; BigValue22 data22 = 22; BigValue23 data23 = 23; BigValue24 data24 = 24; BigValue25 data25 = 25; BigValue26 data26 = 26; BigValue27 data27 = 27; BigValue28 data28 = 28; BigValue29 data29 = 29; BigValue30 data30 = 30; BigValue31 data31 = 31; BigValue32 data32 = 32; } } message BigValue1 { int32 key = 1; bytes value = 2; } message BigValue2 { int32 key = 1; bytes value = 2; } message BigValue3 { int32 key = 1; bytes value = 2; } message BigValue4 { int32 key = 1; bytes value = 2; } message BigValue5 { int32 key = 1; bytes value = 2; } message BigValue6 { int32 key = 1; bytes value = 2; } message BigValue7 { int32 key = 1; bytes value = 2; } message BigValue8 { int32 key = 1; bytes value = 2; } message BigValue9 { int32 key = 1; bytes value = 2; } message BigValue10 { int32 key = 1; bytes value = 2; } message BigValue11 { int32 key = 1; bytes value = 2; } message BigValue12 { int32 key = 1; bytes value = 2; } message BigValue13 { int32 key = 1; bytes value = 2; } message BigValue14 { int32 key = 1; bytes value = 2; } message BigValue15 { int32 key = 1; bytes value = 2; } message BigValue16 { int32 key = 1; bytes value = 2; } message BigValue17 { int32 key = 1; bytes value = 2; } message BigValue18 { int32 key = 1; bytes value = 2; } message BigValue19 { int32 key = 1; bytes value = 2; } message BigValue20 { int32 key = 1; bytes value = 2; } message BigValue21 { int32 key = 1; bytes value = 2; } message BigValue22 { int32 key = 1; bytes value = 2; } message BigValue23 { int32 key = 1; bytes value = 2; } message BigValue24 { int32 key = 1; bytes value = 2; } message BigValue25 { int32 key = 1; bytes value = 2; } message BigValue26 { int32 key = 1; bytes value = 2; } message BigValue27 { int32 key = 1; bytes value = 2; } message BigValue28 { int32 key = 1; bytes value = 2; } message BigValue29 { int32 key = 1; bytes value = 2; } message BigValue30 { int32 key = 1; bytes value = 2; } message BigValue31 { int32 key = 1; bytes value = 2; } message BigValue32 { int32 key = 1; bytes value = 2; } nanopb-0.4.1/tests/regression/issue_342/000077500000000000000000000000001361552131000200305ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_342/SConscript000066400000000000000000000004531361552131000220440ustar00rootroot00000000000000# Regression test for #342: # Possible null-pointer dereference in pb_decode.c Import("env") env.NanopbProto("extensions") testprog = env.Program(["test_extensions.c", "extensions.pb.c", '$COMMON/pb_decode.o', '$COMMON/pb_encode.o', '$COMMON/pb_common.o']) env.RunTest(testprog) nanopb-0.4.1/tests/regression/issue_342/extensions.proto000066400000000000000000000002151361552131000233120ustar00rootroot00000000000000syntax = "proto2"; message BaseMessage { extensions 100 to 200; } extend BaseMessage { optional string string_extension = 100; } nanopb-0.4.1/tests/regression/issue_342/test_extensions.c000066400000000000000000000025131361552131000234330ustar00rootroot00000000000000#include #include #include #include #include #include "extensions.pb.h" #include "unittests.h" static bool write_string(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { return pb_encode_tag_for_field(stream, field) && pb_encode_string(stream, (const void*)"abc", 3); } int main(int argc, char **argv) { int status = 0; uint8_t buffer[64]; pb_size_t msglen = 0; { pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); pb_callback_t callback_def = {{0}}; pb_extension_t ext = {0}; BaseMessage msg = {0}; callback_def.funcs.encode = &write_string; ext.type = &string_extension; ext.dest = &callback_def; msg.extensions = &ext; TEST(pb_encode(&stream, BaseMessage_fields, &msg)); msglen = stream.bytes_written; TEST(msglen > 3); } { pb_istream_t stream = pb_istream_from_buffer(buffer, msglen); pb_extension_t ext = {0}; BaseMessage msg = {0}; ext.type = &string_extension; /* Note: ext.dest remains null to trigger bug #342 */ msg.extensions = &ext; TEST(pb_decode(&stream, BaseMessage_fields, &msg)); } return status; } nanopb-0.4.1/tests/regression/issue_363/000077500000000000000000000000001361552131000200335ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_363/SConscript000066400000000000000000000005401361552131000220440ustar00rootroot00000000000000# Regression test for #363: # Incorrect PB_STATIC_ASSERT for bytes inside oneof Import("env") env.NanopbProto("oneofmsg.proto") testprog = env.Program(["test_oneofmsg.c", "oneofmsg.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(testprog) nanopb-0.4.1/tests/regression/issue_363/oneofmsg.proto000066400000000000000000000003441361552131000227360ustar00rootroot00000000000000syntax = "proto2"; import "nanopb.proto"; message BodyMessage { oneof body_type { bytes device_data_crypted = 1 [(nanopb).max_size = 252]; bytes device_config_crypted = 2 [(nanopb).max_size = 252]; } } nanopb-0.4.1/tests/regression/issue_363/test_oneofmsg.c000066400000000000000000000022361361552131000230560ustar00rootroot00000000000000#include #include #include #include #include #include "oneofmsg.pb.h" #include "unittests.h" int main(int argc, char **argv) { int status = 0; uint8_t buffer[512]; pb_size_t msglen = 0; { pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); BodyMessage msg = BodyMessage_init_zero; msg.which_body_type = BodyMessage_device_data_crypted_tag; msg.body_type.device_data_crypted.size = 252; memset(msg.body_type.device_data_crypted.bytes, 0xAA, 252); TEST(pb_encode(&stream, BodyMessage_fields, &msg)); msglen = stream.bytes_written; TEST(msglen > 252); } { pb_istream_t stream = pb_istream_from_buffer(buffer, msglen); BodyMessage msg = BodyMessage_init_zero; TEST(pb_decode(&stream, BodyMessage_fields, &msg)); TEST(msg.which_body_type == BodyMessage_device_data_crypted_tag); TEST(msg.body_type.device_data_crypted.size == 252); TEST(msg.body_type.device_data_crypted.bytes[251] == 0xAA); } return status; } nanopb-0.4.1/tests/regression/issue_376/000077500000000000000000000000001361552131000200375ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_376/SConscript000066400000000000000000000005771361552131000220620ustar00rootroot00000000000000# Regression test for #376: # Problem with fixed array inside proto3 submessage Import("env") env.NanopbProto(["fixed_array.proto", "fixed_array.options"]) testprog = env.Program(["test_fixarray.c", "fixed_array.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(testprog) nanopb-0.4.1/tests/regression/issue_376/fixed_array.options000066400000000000000000000001321361552131000237450ustar00rootroot00000000000000SubMessage.data fixed_count:true,max_count:8 MainMessage.submsg proto3_singular_msgs:true nanopb-0.4.1/tests/regression/issue_376/fixed_array.proto000066400000000000000000000001761361552131000234250ustar00rootroot00000000000000syntax = "proto3"; message MainMessage { SubMessage submsg = 1; } message SubMessage { repeated int32 data = 1; } nanopb-0.4.1/tests/regression/issue_376/test_fixarray.c000066400000000000000000000016441361552131000230740ustar00rootroot00000000000000#include #include #include #include #include #include "fixed_array.pb.h" #include "unittests.h" int main(int argc, char **argv) { int status = 0; uint8_t buffer[64]; pb_size_t msglen = 0; { pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); MainMessage msg = MainMessage_init_zero; msg.submsg.data[0] = 0; msg.submsg.data[4] = 5; TEST(pb_encode(&stream, MainMessage_fields, &msg)); msglen = stream.bytes_written; TEST(msglen > 5); } { pb_istream_t stream = pb_istream_from_buffer(buffer, msglen); MainMessage msg = MainMessage_init_zero; TEST(pb_decode(&stream, MainMessage_fields, &msg)); TEST(msg.submsg.data[0] == 0); TEST(msg.submsg.data[4] == 5); } return status; } nanopb-0.4.1/tests/regression/issue_380/000077500000000000000000000000001361552131000200325ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_380/SConscript000066400000000000000000000003741361552131000220500ustar00rootroot00000000000000# Regression test for #380: # mangle_names:M_STRIP_PACKAGE is broken when message name (partially) # matches package name Import("env") env.NanopbProto(["manglenames.proto", "manglenames.options"]) env.Object("manglenames.pb.o", "manglenames.pb.c") nanopb-0.4.1/tests/regression/issue_380/manglenames.options000066400000000000000000000000371361552131000237360ustar00rootroot00000000000000* mangle_names:M_STRIP_PACKAGE nanopb-0.4.1/tests/regression/issue_380/manglenames.proto000066400000000000000000000003271361552131000234100ustar00rootroot00000000000000syntax = "proto2"; package A; message A { message B { optional uint32 val = 1; } optional B b = 1; } message AP { message B { optional uint32 val = 1; } optional B m = 1; } nanopb-0.4.1/tests/regression/issue_395/000077500000000000000000000000001361552131000200405ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_395/SConscript000066400000000000000000000005321361552131000220520ustar00rootroot00000000000000# Regression test for #395: # Unexpected empty submessage in proto3 mode Import("env") env.NanopbProto(["test.proto", "test.options"]) testprog = env.Program(["test.c", "test.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(testprog) nanopb-0.4.1/tests/regression/issue_395/test.c000066400000000000000000000016171361552131000211700ustar00rootroot00000000000000#include #include #include #include #include #include "test.pb.h" #include "unittests.h" int main(int argc, char **argv) { int status = 0; uint8_t buffer[512] = {0}; int i; pb_ostream_t ostream; Reply reply = Reply_init_zero; Reply_Result request_result = Reply_Result_OK; ostream = pb_ostream_from_buffer(buffer, sizeof(buffer)); reply.result = request_result; if (!pb_encode(&ostream, Reply_fields, &reply)) { fprintf(stderr, "Encode failed: %s\n", PB_GET_ERROR(&ostream)); return 1; } printf("response payload (%d):", (int)ostream.bytes_written); for (i = 0; i < ostream.bytes_written; i++) { printf("%02X", buffer[i]); } printf("\n"); TEST(ostream.bytes_written == 2); TEST(buffer[0] == 0x08); TEST(buffer[1] == 0x01); return status; } nanopb-0.4.1/tests/regression/issue_395/test.options000066400000000000000000000001501361552131000224300ustar00rootroot00000000000000* proto3_singular_msgs:true SubSubAMessage.somestring max_size:64 SubSubBMessage.somestring max_size:64 nanopb-0.4.1/tests/regression/issue_395/test.proto000066400000000000000000000007411361552131000221060ustar00rootroot00000000000000syntax = "proto3"; message Error { int32 code = 1; string message = 2; } message SubSubAMessage { string somestring = 1; } message SubSubBMessage { string somestring = 1; } message SubMessage { SubSubAMessage subsubmessageA = 1; repeated SubSubBMessage subsubmessageB = 2; } message Reply { enum Result { ERROR = 0; OK = 1; SOME_A = 2; } Result result = 1; Error error = 2; SubMessage submessage = 3; } nanopb-0.4.1/tests/regression/issue_407/000077500000000000000000000000001361552131000200325ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_407/SConscript000066400000000000000000000004211361552131000220410ustar00rootroot00000000000000# Regression test for issue #407: Extension fields > 255 not parsed correctly Import("env") env.NanopbProto("extensions") test = env.Program(["test_extensions.c", "extensions.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(test) nanopb-0.4.1/tests/regression/issue_407/extensions.proto000066400000000000000000000003601361552131000233150ustar00rootroot00000000000000syntax = "proto2"; message SimpleMessage { optional uint32 number = 1; extensions 100 to max; } message ExtMessage { extend SimpleMessage { optional ExtMessage ext_message_ext = 1100; } optional uint32 second_number = 1; } nanopb-0.4.1/tests/regression/issue_407/test_extensions.c000066400000000000000000000040751361552131000234420ustar00rootroot00000000000000#include #include #include "extensions.pb.h" #include "unittests.h" int main() { uint8_t buffer[256]; int status = 0; size_t msglen; { pb_ostream_t stream; SimpleMessage msg = SimpleMessage_init_zero; ExtMessage extmsg = ExtMessage_init_zero; pb_extension_t ext = pb_extension_init_zero; COMMENT("Encoding message"); msg.has_number = true; msg.number = 1234; extmsg.has_second_number = true; extmsg.second_number = 5678; msg.extensions = &ext; ext.type = &ExtMessage_ext_message_ext; ext.dest = &extmsg; ext.next = NULL; stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); TEST(pb_encode(&stream, SimpleMessage_fields, &msg)); msglen = stream.bytes_written; TEST(msglen == 9); /* 3 for number, 3 for submsg tag+len, 3 for second_number */ TEST(buffer[0] == 0x08); /* varint 1 */ TEST(buffer[1] == 0xD2); /* number = 1234 */ TEST(buffer[2] == 0x09); TEST(buffer[3] == 0xE2); /* submsg 1100 */ TEST(buffer[4] == 0x44); TEST(buffer[5] == 0x03); /* length 3 */ TEST(buffer[6] == 0x08); /* varint 1 */ TEST(buffer[7] == 0xae); /* second_number = 5678 */ TEST(buffer[8] == 0x2c); } { pb_istream_t stream; SimpleMessage msg = SimpleMessage_init_zero; ExtMessage extmsg = ExtMessage_init_zero; pb_extension_t ext = pb_extension_init_zero; COMMENT("Decoding message"); msg.extensions = &ext; ext.type = &ExtMessage_ext_message_ext; ext.dest = &extmsg; ext.next = NULL; ext.found = false; stream = pb_istream_from_buffer(buffer, msglen); TEST(pb_decode(&stream, SimpleMessage_fields, &msg)); TEST(msg.has_number); TEST(msg.number == 1234); TEST(ext.found); TEST(extmsg.has_second_number); TEST(extmsg.second_number == 5678); } return status; } nanopb-0.4.1/tests/regression/issue_453/000077500000000000000000000000001361552131000200335ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_453/SConscript000066400000000000000000000004201361552131000220410ustar00rootroot00000000000000# Regression test for #453: # Warning for float conversion with default values. Import("env") env2 = env.Clone() if 'gcc' in env['CC']: env2.Append(CFLAGS = '-Wconversion') env2.NanopbProto("test.proto") testprog = env2.Program(["test.c"]) env2.RunTest(testprog) nanopb-0.4.1/tests/regression/issue_453/test.c000066400000000000000000000003251361552131000211560ustar00rootroot00000000000000#include "test.pb.h" #include "unittests.h" int main() { int status = 0; MyMessage msg = MyMessage_init_default; TEST(msg.myfield >= 1.23399f); TEST(msg.myfield <= 1.23401f); return status; } nanopb-0.4.1/tests/regression/issue_453/test.proto000066400000000000000000000001351361552131000220760ustar00rootroot00000000000000syntax = 'proto2'; message MyMessage { optional float myfield = 1 [default = 1.234]; } nanopb-0.4.1/tests/regression/issue_472/000077500000000000000000000000001361552131000200345ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_472/SConscript000066400000000000000000000002241361552131000220440ustar00rootroot00000000000000# Regression test for issue #472: submsg_callback fails to compile in Atmel Studio Import("env") env.NanopbProto("test") env.Object("test.pb.c") nanopb-0.4.1/tests/regression/issue_472/test.proto000066400000000000000000000004201361552131000220740ustar00rootroot00000000000000syntax = "proto3"; import "nanopb.proto"; message FirmwareUpdateCommand { string version = 1; uint32 size = 2; } message CommandWrapperMessage { option (nanopb_msgopt).submsg_callback = true; oneof payload { FirmwareUpdateCommand firmware_update = 1; } } nanopb-0.4.1/tests/regression/issue_485/000077500000000000000000000000001361552131000200405ustar00rootroot00000000000000nanopb-0.4.1/tests/regression/issue_485/SConscript000066400000000000000000000011411361552131000220470ustar00rootroot00000000000000# Check that the int8_t and uint8_t types are not used in the nanopb core. Import("env") env.Match('pb_decode_c.matched', ["$NANOPB/pb_decode.c", 'uint8.expected']) env.Match('pb_decode_h.matched', ["$NANOPB/pb_decode.h", 'uint8.expected']) env.Match('pb_encode_c.matched', ["$NANOPB/pb_encode.c", 'uint8.expected']) env.Match('pb_encode_h.matched', ["$NANOPB/pb_encode.h", 'uint8.expected']) env.Match('pb_common_c.matched', ["$NANOPB/pb_common.c", 'uint8.expected']) env.Match('pb_common_h.matched', ["$NANOPB/pb_common.h", 'uint8.expected']) env.Match('pb_h.matched', ["$NANOPB/pb.h", 'uint8.expected']) nanopb-0.4.1/tests/regression/issue_485/uint8.expected000066400000000000000000000000541361552131000226310ustar00rootroot00000000000000! ^\s*[^/* ].*uint8_t ! ^\s*[^/* ].*int8_t nanopb-0.4.1/tests/site_scons/000077500000000000000000000000001361552131000163015ustar00rootroot00000000000000nanopb-0.4.1/tests/site_scons/platforms/000077500000000000000000000000001361552131000203105ustar00rootroot00000000000000nanopb-0.4.1/tests/site_scons/platforms/__init__.py000066400000000000000000000000001361552131000224070ustar00rootroot00000000000000nanopb-0.4.1/tests/site_scons/platforms/avr/000077500000000000000000000000001361552131000211005ustar00rootroot00000000000000nanopb-0.4.1/tests/site_scons/platforms/avr/__init__.py000066400000000000000000000000001361552131000231770ustar00rootroot00000000000000nanopb-0.4.1/tests/site_scons/platforms/avr/avr.py000066400000000000000000000022371361552131000222460ustar00rootroot00000000000000# Compiler settings for running the tests on a simulated atmega1284. def set_avr_platform(env): native = env.Clone() native.Append(LIBS = ["simavr", "libelf"], CFLAGS = "-Wall -Werror -g") runner = native.Program("build/run_test", "site_scons/platforms/avr/run_test.c") env.Replace(EMBEDDED = "AVR") env.Replace(CC = "avr-gcc", CXX = "avr-g++") env.Replace(TEST_RUNNER = "build/run_test") env.Append(CFLAGS = "-mmcu=atmega1284 -Dmain=app_main -Os") env.Append(CXXFLAGS = "-mmcu=atmega1284 -Dmain=app_main -Os -Wno-type-limits") env.Append(CPPDEFINES = {'PB_CONVERT_DOUBLE_FLOAT': 1, 'UNITTESTS_SHORT_MSGS': 1, '__ASSERT_USE_STDERR': 1, 'MAX_ALLOC_BYTES': 32768, 'FUZZTEST_BUFSIZE': 2048}) env.Append(LINKFLAGS = "-mmcu=atmega1284") env.Append(LINKFLAGS = "-Wl,-Map,build/avr.map") # Build library for communicating with test runner avr_io = env.Library("build/avr_io.o", "site_scons/platforms/avr/avr_io.c") env.Append(LIBS = avr_io) # This fake define just ensures that the test runner gets build also env.Depends(avr_io, runner) nanopb-0.4.1/tests/site_scons/platforms/avr/avr_io.c000066400000000000000000000036341361552131000225310ustar00rootroot00000000000000/* This wrapper file initializes stdio to UART connection and * receives the list of command line arguments. */ #include #include #include #include #include #include #undef main extern int app_main(int argc, const char **argv); struct { uint8_t argc; char args[3][16]; } g_args; int uart_putchar(char c, FILE *stream) { loop_until_bit_is_set(UCSR0A, UDRE0); UDR0 = c; return 0; } int uart_getchar(FILE *stream) { while (bit_is_clear(UCSR0A, RXC0) && bit_is_clear(UCSR0A, FE0)); if (UCSR0A & _BV(FE0)) return _FDEV_EOF; /* Break = EOF */ return UDR0; } FILE uart_str = FDEV_SETUP_STREAM(uart_putchar, uart_getchar, _FDEV_SETUP_RW); static char g_malloc_heap[8192]; extern uint32_t __bss_end; void abort(void) { if (__bss_end != 0xDEADBEEF) { fprintf(stderr, "possible stack overflow\n"); } fprintf(stderr, "abort() called\n"); DDRB = 3; PORTB = 1; cli(); while (1) sleep_mode(); } int main(void) { const char *argv[4] = {"main", g_args.args[0], g_args.args[1], g_args.args[2]}; int status; UBRR0 = (8000000 / (16UL * 9600)) - 1; /* 9600 bps with default 8 MHz clock */ UCSR0B = _BV(TXEN0) | _BV(RXEN0); __malloc_heap_start = g_malloc_heap; __malloc_heap_end = g_malloc_heap + sizeof(g_malloc_heap); __bss_end = 0xDEADBEEF; stdout = stdin = stderr = &uart_str; fread((char*)&g_args, 1, sizeof(g_args), stdin); status = app_main(g_args.argc + 1, argv); if (__bss_end != 0xDEADBEEF) { status = 255; fprintf(stderr, "possible stack overflow\n"); } DDRB = 3; if (status) { fprintf(stderr, "Error exit: %d\n", status); PORTB = 1; // PB0 indicates error } else { PORTB = 2; // PB1 indicates success } cli(); sleep_mode(); return status; } nanopb-0.4.1/tests/site_scons/platforms/avr/run_test.c000066400000000000000000000110471361552131000231120ustar00rootroot00000000000000#include #include #include #include #include #include #include #include #include #include #include #include #include static avr_t *g_avr; static avr_irq_t *g_uart_irq; static struct { uint8_t argc; char args[3][16]; } g_args; static int g_args_idx; static bool g_uart_xon; static bool g_status_ok; static void uart_tx_hook(struct avr_irq_t * irq, uint32_t value, void * param) { fputc(value, stdout); fflush(stdout); } static bool stdin_can_read() { struct timeval tv; fd_set fds; tv.tv_sec = 0; tv.tv_usec = 0; FD_ZERO(&fds); FD_SET(STDIN_FILENO, &fds); select(STDIN_FILENO+1, &fds, NULL, NULL, &tv); return (FD_ISSET(0, &fds)); } static void avr_logger(avr_t * avr, const int level, const char * format, va_list ap) { if ((!avr && level <= LOG_WARNING) || (avr && avr->log >= level)) { vfprintf(stderr , format, ap); } } static void uart_xon_hook(struct avr_irq_t * irq, uint32_t value, void * param) { g_uart_xon = true; int v; if (feof(stdin)) { avr_raise_irq(&g_uart_irq[1], UART_INPUT_FE); return; } while (g_uart_xon) { if (g_args_idx < sizeof(g_args)) { v = ((char*)&g_args)[g_args_idx++]; } else if (stdin_can_read()) { v = fgetc(stdin); } else { break; } if (v != EOF) { avr_raise_irq(&g_uart_irq[1], v); } else { avr_raise_irq(&g_uart_irq[1], UART_INPUT_FE); break; } } } static void uart_xoff_hook(struct avr_irq_t * irq, uint32_t value, void * param) { g_uart_xon = false; } void init_uart() { const char *irq_names[2] = {"8uart_out"}; g_uart_irq = avr_alloc_irq(&g_avr->irq_pool, 0, 2, irq_names); avr_irq_register_notify(&g_uart_irq[0], &uart_tx_hook, NULL); uint32_t flags = 0; avr_ioctl(g_avr, AVR_IOCTL_UART_GET_FLAGS('0'), &flags); flags &= ~AVR_UART_FLAG_STDIO; flags &= ~AVR_UART_FLAG_POLL_SLEEP; avr_ioctl(g_avr, AVR_IOCTL_UART_SET_FLAGS('0'), &flags); avr_irq_t *src = avr_io_getirq(g_avr, AVR_IOCTL_UART_GETIRQ('0'), UART_IRQ_OUTPUT); avr_irq_t *dst = avr_io_getirq(g_avr, AVR_IOCTL_UART_GETIRQ('0'), UART_IRQ_INPUT); avr_connect_irq(src, &g_uart_irq[0]); avr_connect_irq(&g_uart_irq[1], dst); avr_irq_t *xon = avr_io_getirq(g_avr, AVR_IOCTL_UART_GETIRQ('0'), UART_IRQ_OUT_XON); avr_irq_t *xoff = avr_io_getirq(g_avr, AVR_IOCTL_UART_GETIRQ('0'), UART_IRQ_OUT_XOFF); avr_irq_register_notify(xon, uart_xon_hook, NULL); avr_irq_register_notify(xoff, uart_xoff_hook, NULL); } static void status_ok_hook(struct avr_irq_t * irq, uint32_t value, void * param) { g_status_ok = value; } int main(int argc, char *argv[]) { avr_global_logger_set(&avr_logger); g_avr = avr_make_mcu_by_name("atmega1284"); if (!g_avr) { fprintf(stderr, "avr_make_mcu_by_name failed\n"); return 1; } if (argc < 2) { fprintf(stderr, "Usage: %s [-g] binary [args ...]\n", argv[0]); return 2; } const char *filename = argv[1]; bool enable_gdb = false; int argc_offset = 2; if (strcmp(filename, "-g") == 0) { enable_gdb = true; argc_offset = 3; filename = argv[2]; } elf_firmware_t firmware; elf_read_firmware(filename, &firmware); avr_init(g_avr); avr_load_firmware(g_avr, &firmware); g_avr->frequency = 8000000; if (enable_gdb) { g_avr->state = cpu_Stopped; g_avr->gdb_port = 1234; avr_gdb_init(g_avr); } init_uart(); avr_irq_register_notify(avr_io_getirq(g_avr, AVR_IOCTL_IOPORT_GETIRQ('B'), 1), status_ok_hook, NULL); // Pass the rest of arguments to application inside simulator g_args.argc = argc - argc_offset; if (g_args.argc > 3) g_args.argc = 3; for (int i = 0; i < g_args.argc; i++) { strncpy(g_args.args[i], argv[i + argc_offset], 15); } while (1) { int state = avr_run(g_avr); if (state == cpu_Done) break; if (state == cpu_Crashed) { fprintf(stderr, "CPU Crashed\n"); return 3; } } if (g_status_ok) { return 0; } else { fprintf(stderr, "Received error status from simulation\n"); return 5; } } nanopb-0.4.1/tests/site_scons/platforms/stm32/000077500000000000000000000000001361552131000212605ustar00rootroot00000000000000nanopb-0.4.1/tests/site_scons/platforms/stm32/__init__.py000066400000000000000000000000001361552131000233570ustar00rootroot00000000000000nanopb-0.4.1/tests/site_scons/platforms/stm32/run_test.sh000077500000000000000000000010501361552131000234560ustar00rootroot00000000000000#!/bin/bash BINARY=$1 BASENAME=$(basename $1) shift ARGS=$* test X$OPENOCD_BOARD == X && export OPENOCD_BOARD=board/stm32f7discovery.cfg timeout 1200s openocd -f $OPENOCD_BOARD \ -c "reset_config srst_only srst_nogate connect_assert_srst" \ -c "init" -c "arm semihosting enable" \ -c "arm semihosting_cmdline $BASENAME $ARGS" \ -c "reset halt" \ -c "load_image $BINARY 0" \ -c "reset halt" -c "resume 0x20000040" 2>openocd.log RESULT=$? if [ "$RESULT" -ne "0" ] then cat openocd.log >&2 echo >&2 fi exit $RESULT nanopb-0.4.1/tests/site_scons/platforms/stm32/stm32.py000066400000000000000000000015721361552131000226070ustar00rootroot00000000000000# Compiler settings for running the tests on a STM32 discovery board # Tested on the STM32F7 Discovery, but should work on pretty much # any STM32 with >= 128kB of RAM. To avoid wearing out the flash, # code is run from RAM also. def set_stm32_platform(env): env.Replace(EMBEDDED = "STM32") env.Replace(CC = "arm-none-eabi-gcc", CXX = "arm-none-eabi-g++") env.Replace(TEST_RUNNER = "site_scons/platforms/stm32/run_test.sh") env.Append(CPPDEFINES = {'FUZZTEST_BUFSIZE': 4096}) env.Append(CFLAGS = "-mcpu=cortex-m3 -mthumb -Os") env.Append(CXXFLAGS = "-mcpu=cortex-m3 -mthumb -Os") env.Append(LINKFLAGS = "-mcpu=cortex-m3 -mthumb") env.Append(LINKFLAGS = "site_scons/platforms/stm32/vectors.c") env.Append(LINKFLAGS = "--specs=rdimon.specs --specs=nano.specs") env.Append(LINKFLAGS = "-Tsite_scons/platforms/stm32/stm32_ram.ld") nanopb-0.4.1/tests/site_scons/platforms/stm32/stm32_ram.ld000066400000000000000000000101051361552131000234050ustar00rootroot00000000000000/* Linker script to configure memory regions. * Need modifying for a specific board. * FLASH.ORIGIN: starting address of flash * FLASH.LENGTH: length of flash * RAM.ORIGIN: starting address of RAM bank 0 * RAM.LENGTH: length of RAM bank 0 */ MEMORY { RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128k } /* Linker script to place sections and symbol values. Should be used together * with other linker script that defines memory regions FLASH and RAM. * It references following symbols, which must be defined in code: * Reset_Handler : Entry of reset handler * * It defines following symbols, which code can use without definition: * __exidx_start * __exidx_end * __copy_table_start__ * __copy_table_end__ * __zero_table_start__ * __zero_table_end__ * __etext * __data_start__ * __preinit_array_start * __preinit_array_end * __init_array_start * __init_array_end * __fini_array_start * __fini_array_end * __data_end__ * __bss_start__ * __bss_end__ * __end__ * end * __HeapLimit * __StackLimit * __StackTop * __stack */ ENTRY(_start) SECTIONS { .text : { KEEP(*(.isr_vector)) KEEP(*(.ramboot)) *(.text*) KEEP(*(.init)) KEEP(*(.fini)) /* .ctors */ *crtbegin.o(.ctors) *crtbegin?.o(.ctors) *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) *(SORT(.ctors.*)) *(.ctors) /* .dtors */ *crtbegin.o(.dtors) *crtbegin?.o(.dtors) *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) *(SORT(.dtors.*)) *(.dtors) *(.rodata*) KEEP(*(.eh_frame*)) } > RAM .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } > RAM __exidx_start = .; .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } > RAM __exidx_end = .; /* To copy multiple ROM to RAM sections, * uncomment .copy.table section and, * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ /* .copy.table : { . = ALIGN(4); __copy_table_start__ = .; LONG (__etext) LONG (__data_start__) LONG (__data_end__ - __data_start__) LONG (__etext2) LONG (__data2_start__) LONG (__data2_end__ - __data2_start__) __copy_table_end__ = .; } > FLASH */ /* To clear multiple BSS sections, * uncomment .zero.table section and, * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ /* .zero.table : { . = ALIGN(4); __zero_table_start__ = .; LONG (__bss_start__) LONG (__bss_end__ - __bss_start__) LONG (__bss2_start__) LONG (__bss2_end__ - __bss2_start__) __zero_table_end__ = .; } > FLASH */ /* Location counter can end up 2byte aligned with narrow Thumb code but __etext is assumed by startup code to be the LMA of a section in RAM which must be 4byte aligned */ __etext = ALIGN (4); .data : { __data_start__ = .; *(vtable) *(.data*) . = ALIGN(4); /* preinit data */ PROVIDE_HIDDEN (__preinit_array_start = .); KEEP(*(.preinit_array)) PROVIDE_HIDDEN (__preinit_array_end = .); . = ALIGN(4); /* init data */ PROVIDE_HIDDEN (__init_array_start = .); KEEP(*(SORT(.init_array.*))) KEEP(*(.init_array)) PROVIDE_HIDDEN (__init_array_end = .); . = ALIGN(4); /* finit data */ PROVIDE_HIDDEN (__fini_array_start = .); KEEP(*(SORT(.fini_array.*))) KEEP(*(.fini_array)) PROVIDE_HIDDEN (__fini_array_end = .); KEEP(*(.jcr*)) . = ALIGN(4); /* All data end */ __data_end__ = .; } > RAM .bss : { . = ALIGN(4); __bss_start__ = .; *(.bss*) *(COMMON) . = ALIGN(4); __bss_end__ = .; } > RAM .heap (COPY): { __end__ = .; PROVIDE(end = .); *(.heap*) __HeapLimit = .; } > RAM /* .stack_dummy section doesn't contains any symbols. It is only * used for linker to calculate size of stack sections, and assign * values to stack symbols later */ .stack_dummy (COPY): { *(.stack*) } > RAM /* Set stack top to end of RAM, and stack limit move down by * size of stack_dummy section */ __StackTop = ORIGIN(RAM) + LENGTH(RAM); __StackLimit = __StackTop - SIZEOF(.stack_dummy); PROVIDE(__stack = __StackTop); /* Check if data + heap + stack exceeds RAM limit */ ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") } nanopb-0.4.1/tests/site_scons/platforms/stm32/vectors.c000066400000000000000000000020101361552131000231020ustar00rootroot00000000000000#include #ifdef __cplusplus extern "C" { #endif extern void _start(); extern void* __StackTop; static void HardFaultHandler() { uint32_t args[3]; args[0] = 2; args[1] = (uint32_t)"HARDFAULT"; args[2] = 9; asm("mov r0, #5\n" "mov r1, %0\n" "bkpt 0x00ab" : : "r"(args) : "r0", "r1", "memory"); asm("mov r12, %0\n" "mov r0, #24\n" "bkpt 0x00ab" : : "r"(0xDEADBEEF) : "r0"); while(1); } void* const g_vector_table[16] __attribute__((section(".isr_vector"))) = { (void*)&__StackTop, (void*)&_start, (void*)&HardFaultHandler, (void*)&HardFaultHandler, (void*)&HardFaultHandler, (void*)&HardFaultHandler, (void*)&HardFaultHandler, }; void ramboot() __attribute__((noreturn, naked, section(".ramboot"))); void ramboot() { *(const void**)0xE000ED08 = g_vector_table; // SCB->VTOR __asm__( "msr msp, %0\n\t" "bx %1" : : "r" (g_vector_table[0]), "r" (g_vector_table[1]) : "memory"); } #ifdef __cplusplus } #endif nanopb-0.4.1/tests/site_scons/site_init.py000066400000000000000000000105711361552131000206460ustar00rootroot00000000000000import subprocess import sys import re from platforms.stm32.stm32 import set_stm32_platform from platforms.avr.avr import set_avr_platform try: # Make terminal colors work on windows import colorama colorama.init() except ImportError: pass def add_nanopb_builders(env): '''Add the necessary builder commands for nanopb tests.''' # Build command that runs a test program and saves the output def run_test(target, source, env): if len(source) > 1: infile = open(str(source[1])) else: infile = None if env.has_key("COMMAND"): args = [env["COMMAND"]] else: args = [str(source[0])] if env.has_key('ARGS'): args.extend(env['ARGS']) if env.has_key("TEST_RUNNER"): args = [env["TEST_RUNNER"]] + args print('Command line: ' + str(args)) pipe = subprocess.Popen(args, stdin = infile, stdout = open(str(target[0]), 'w'), stderr = sys.stderr) result = pipe.wait() if result == 0: print('\033[32m[ OK ]\033[0m Ran ' + args[0]) else: print('\033[31m[FAIL]\033[0m Program ' + args[0] + ' returned ' + str(result)) return result run_test_builder = Builder(action = run_test, suffix = '.output') env.Append(BUILDERS = {'RunTest': run_test_builder}) # Build command that decodes a message using protoc def decode_actions(source, target, env, for_signature): esc = env['ESCAPE'] dirs = ' '.join(['-I' + esc(env.GetBuildPath(d)) for d in env['PROTOCPATH']]) return '$PROTOC $PROTOCFLAGS %s --decode=%s %s <%s >%s' % ( dirs, env['MESSAGE'], esc(str(source[1])), esc(str(source[0])), esc(str(target[0]))) decode_builder = Builder(generator = decode_actions, suffix = '.decoded') env.Append(BUILDERS = {'Decode': decode_builder}) # Build command that encodes a message using protoc def encode_actions(source, target, env, for_signature): esc = env['ESCAPE'] dirs = ' '.join(['-I' + esc(env.GetBuildPath(d)) for d in env['PROTOCPATH']]) return '$PROTOC $PROTOCFLAGS %s --encode=%s %s <%s >%s' % ( dirs, env['MESSAGE'], esc(str(source[1])), esc(str(source[0])), esc(str(target[0]))) encode_builder = Builder(generator = encode_actions, suffix = '.encoded') env.Append(BUILDERS = {'Encode': encode_builder}) # Build command that asserts that two files be equal def compare_files(target, source, env): data1 = open(str(source[0]), 'rb').read() data2 = open(str(source[1]), 'rb').read() if data1 == data2: print('\033[32m[ OK ]\033[0m Files equal: ' + str(source[0]) + ' and ' + str(source[1])) return 0 else: print('\033[31m[FAIL]\033[0m Files differ: ' + str(source[0]) + ' and ' + str(source[1])) return 1 compare_builder = Builder(action = compare_files, suffix = '.equal') env.Append(BUILDERS = {'Compare': compare_builder}) # Build command that checks that each pattern in source2 is found in source1. def match_files(target, source, env): data = open(str(source[0]), 'rU').read() patterns = open(str(source[1])) for pattern in patterns: if pattern.strip(): invert = False if pattern.startswith('! '): invert = True pattern = pattern[2:] status = re.search(pattern.strip(), data, re.MULTILINE) if not status and not invert: print('\033[31m[FAIL]\033[0m Pattern not found in ' + str(source[0]) + ': ' + pattern) return 1 elif status and invert: print('\033[31m[FAIL]\033[0m Pattern should not exist, but does in ' + str(source[0]) + ': ' + pattern) return 1 else: print('\033[32m[ OK ]\033[0m All patterns found in ' + str(source[0])) return 0 match_builder = Builder(action = match_files, suffix = '.matched') env.Append(BUILDERS = {'Match': match_builder}) nanopb-0.4.1/tests/site_scons/site_tools/000077500000000000000000000000001361552131000204655ustar00rootroot00000000000000nanopb-0.4.1/tests/site_scons/site_tools/nanopb.py000066400000000000000000000121611361552131000223150ustar00rootroot00000000000000''' Scons Builder for nanopb .proto definitions. This tool will locate the nanopb generator and use it to generate .pb.c and .pb.h files from the .proto files. Basic example ------------- # Build myproto.pb.c and myproto.pb.h from myproto.proto myproto = env.NanopbProto("myproto") # Link nanopb core to the program env.Append(CPPPATH = "$NANOB") myprog = env.Program(["myprog.c", myproto, "$NANOPB/pb_encode.c", "$NANOPB/pb_decode.c"]) Configuration options --------------------- Normally, this script is used in the test environment of nanopb and it locates the nanopb generator by a relative path. If this script is used in another application, the path to nanopb root directory has to be defined: env.SetDefault(NANOPB = "path/to/nanopb") Additionally, the path to protoc and the options to give to protoc can be defined manually: env.SetDefault(PROTOC = "path/to/protoc") env.SetDefault(PROTOCFLAGS = "--plugin=protoc-gen-nanopb=path/to/protoc-gen-nanopb") ''' import SCons.Action import SCons.Builder import SCons.Util from SCons.Script import Dir, File import os.path import platform class NanopbWarning(SCons.Warnings.Warning): pass SCons.Warnings.enableWarningClass(NanopbWarning) def _detect_nanopb(env): '''Find the path to nanopb root directory.''' if env.has_key('NANOPB'): # Use nanopb dir given by user return env['NANOPB'] p = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..')) if os.path.isdir(p) and os.path.isfile(os.path.join(p, 'pb.h')): # Assume we are running under tests/site_scons/site_tools return p raise SCons.Errors.StopError(NanopbWarning, "Could not find the nanopb root directory") def _detect_protoc(env): '''Find the path to the protoc compiler.''' if env.has_key('PROTOC'): # Use protoc defined by user return env['PROTOC'] n = _detect_nanopb(env) p1 = os.path.join(n, 'generator-bin', 'protoc' + env['PROGSUFFIX']) if os.path.exists(p1): # Use protoc bundled with binary package return env['ESCAPE'](p1) p = os.path.join(n, 'generator', 'protoc') if os.path.exists(p): # Use the grcpio-tools protoc wrapper if env['PLATFORM'] == 'win32': return env['ESCAPE'](p + '.bat') else: return env['ESCAPE'](p) p = env.WhereIs('protoc') if p: # Use protoc from path return env['ESCAPE'](p) raise SCons.Errors.StopError(NanopbWarning, "Could not find the protoc compiler") def _detect_protocflags(env): '''Find the options to use for protoc.''' if env.has_key('PROTOCFLAGS'): return env['PROTOCFLAGS'] p = _detect_protoc(env) n = _detect_nanopb(env) p1 = os.path.join(n, 'generator-bin', 'protoc' + env['PROGSUFFIX']) if p == env['ESCAPE'](p1): # Using the bundled protoc, no options needed return '' e = env['ESCAPE'] if env['PLATFORM'] == 'win32': return e('--plugin=protoc-gen-nanopb=' + os.path.join(n, 'generator', 'protoc-gen-nanopb.bat')) else: return e('--plugin=protoc-gen-nanopb=' + os.path.join(n, 'generator', 'protoc-gen-nanopb')) def _nanopb_proto_actions(source, target, env, for_signature): esc = env['ESCAPE'] # Make protoc build inside the SConscript directory prefix = os.path.dirname(str(source[-1])) srcfile = esc(os.path.relpath(str(source[0]), prefix)) include_dirs = '-I.' for d in env['PROTOCPATH']: d = env.GetBuildPath(d) if not os.path.isabs(d): d = os.path.relpath(d, prefix) include_dirs += ' -I' + esc(d) nanopb_flags = env['NANOPBFLAGS'] if nanopb_flags: nanopb_flags = '%s:.' % nanopb_flags else: nanopb_flags = '.' return SCons.Action.CommandAction('$PROTOC $PROTOCFLAGS %s --nanopb_out=%s %s' % (include_dirs, nanopb_flags, srcfile), chdir = prefix) def _nanopb_proto_emitter(target, source, env): basename = os.path.splitext(str(source[0]))[0] target.append(basename + '.pb.h') # This is a bit of a hack. protoc include paths work the sanest # when the working directory is the same as the source root directory. # To get that directory in _nanopb_proto_actions, we add SConscript to # the list of source files. source.append(File("SConscript")) if os.path.exists(basename + '.options'): source.append(basename + '.options') return target, source _nanopb_proto_builder = SCons.Builder.Builder( generator = _nanopb_proto_actions, suffix = '.pb.c', src_suffix = '.proto', emitter = _nanopb_proto_emitter) def generate(env): '''Add Builder for nanopb protos.''' env['NANOPB'] = _detect_nanopb(env) env['PROTOC'] = _detect_protoc(env) env['PROTOCFLAGS'] = _detect_protocflags(env) env.SetDefault(NANOPBFLAGS = '') env.SetDefault(PROTOCPATH = [".", os.path.join(env['NANOPB'], 'generator', 'proto')]) env.SetDefault(NANOPB_PROTO_CMD = '$PROTOC $PROTOCFLAGS --nanopb_out=$NANOPBFLAGS:. $SOURCES') env['BUILDERS']['NanopbProto'] = _nanopb_proto_builder def exists(env): return _detect_protoc(env) and _detect_protoc_opts(env) nanopb-0.4.1/tests/special_characters/000077500000000000000000000000001361552131000177475ustar00rootroot00000000000000nanopb-0.4.1/tests/special_characters/SConscript000066400000000000000000000002651361552131000217640ustar00rootroot00000000000000# Test that special characters in .proto filenames work. Import('env') env.NanopbProto("funny-proto+name has.characters.proto") env.Object("funny-proto+name has.characters.pb.c") nanopb-0.4.1/tests/special_characters/funny-proto+name has.characters.proto000066400000000000000000000000211361552131000271130ustar00rootroot00000000000000syntax="proto2"; nanopb-0.4.1/tests/splint/000077500000000000000000000000001361552131000154415ustar00rootroot00000000000000nanopb-0.4.1/tests/splint/SConscript000066400000000000000000000006651361552131000174620ustar00rootroot00000000000000# Check the nanopb core using splint Import('env') p = env.WhereIs('splint') if p: env.Command('pb_decode.splint', '$NANOPB/pb_decode.c', 'splint -f splint/splint.rc $SOURCE 2> $TARGET') env.Command('pb_encode.splint', '$NANOPB/pb_encode.c', 'splint -f splint/splint.rc $SOURCE 2> $TARGET') env.Command('pb_common.splint', '$NANOPB/pb_common.c', 'splint -f splint/splint.rc $SOURCE 2> $TARGET') nanopb-0.4.1/tests/splint/splint.rc000066400000000000000000000010321361552131000172740ustar00rootroot00000000000000+checks +partial +matchanyintegral +strictlib -nullassign -predboolint -predboolptr +ptrnegate -switchloopbreak +ignoresigns -infloopsuncon -type # splint's memory checks don't quite work without annotations -mustfreeonly -compmempass -nullret -observertrans -statictrans -compdestroy -nullpass -nullstate -compdef -usereleased -temptrans -dependenttrans -kepttrans -branchstate -immediatetrans -mustfreefresh -allimponly # These tests give false positives, compiler typically has # better warnings for these. -noret -noeffect -usedef nanopb-0.4.1/tests/stackusage/000077500000000000000000000000001361552131000162625ustar00rootroot00000000000000nanopb-0.4.1/tests/stackusage/SConscript000066400000000000000000000003501361552131000202720ustar00rootroot00000000000000# Test stack usage Import("env") env.NanopbProto(["stackusage", "stackusage.options"]) test = env.Program(["stackusage.c", "stackusage.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) env.RunTest(test) nanopb-0.4.1/tests/stackusage/stackusage.c000066400000000000000000000046721361552131000205710ustar00rootroot00000000000000#include #include #include #include #include #include "stackusage.pb.h" static uint8_t g_msgbuf[256]; static size_t g_msglen; /* This is a hacky way to measure actual stack usage of functions. * It works by copying the stack to a global variable, and then * finding the lowest location that has been modified. * Currently this assumes that the platform uses a descending stack. */ #define MAX_STACK_ENTRIES 1024 static uint32_t g_stackbuf[MAX_STACK_ENTRIES]; static uint32_t *g_stackptr; void start_stack_measuring() { uint32_t i = 0; g_stackptr = &i - MAX_STACK_ENTRIES; for (i = 0; i < MAX_STACK_ENTRIES; i++) { g_stackbuf[i] = g_stackptr[i]; } } int end_stack_measuring() { uint32_t i = 0; for (i = 0; i < MAX_STACK_ENTRIES; i++) { if (g_stackbuf[i] != g_stackptr[i]) { return (MAX_STACK_ENTRIES - i) * sizeof(uint32_t); } } assert(false); return 0; } void do_encode() { pb_ostream_t stream = pb_ostream_from_buffer(g_msgbuf, sizeof(g_msgbuf)); SettingsGroup msg = SettingsGroup_init_zero; bool status; msg.has_settings = true; msg.settings.id = 1; strcpy(msg.settings.name, "abcd"); msg.settings.en = true; msg.settings.has_begin = true; msg.settings.begin.label = 1234; msg.settings.begin.properties_count = 1; msg.settings.begin.properties[0].which_field = Property_DeviceA_Mode_tag; msg.settings.begin.properties[0].field.DeviceA_Mode = 2; status = pb_encode(&stream, SettingsGroup_fields, &msg); g_msglen = stream.bytes_written; assert(status); assert(g_msglen > 10); } void do_decode() { pb_istream_t stream = pb_istream_from_buffer(g_msgbuf, g_msglen); SettingsGroup msg = SettingsGroup_init_zero; bool status; status = pb_decode(&stream, SettingsGroup_fields, &msg); assert(status); assert(msg.settings.begin.properties[0].field.DeviceA_Mode == 2); } int main() { int stack_encode, stack_decode; start_stack_measuring(); do_encode(); stack_encode = end_stack_measuring(); start_stack_measuring(); do_decode(); stack_decode = end_stack_measuring(); /* Print machine-readable to stdout and user-readable to stderr */ printf("%d %d\n", stack_encode, stack_decode); fprintf(stderr, "Stack usage: encode %d bytes, decode %d bytes\n", stack_encode, stack_decode); return 0; } nanopb-0.4.1/tests/stackusage/stackusage.options000066400000000000000000000002141361552131000220260ustar00rootroot00000000000000* long_names : false SettingsGroup.Settings.name max_length : 32 SettingsGroup.Settings.Command.properties max_count : 6 nanopb-0.4.1/tests/stackusage/stackusage.proto000066400000000000000000000015071361552131000215040ustar00rootroot00000000000000syntax = "proto3"; message Property { enum Mode { INVALID = 0; A = 1; B = 2; C = 3; } oneof field { Mode DeviceA_Mode = 1; uint32 DeviceA_Size = 2; uint32 DeviceA_Length = 3; Mode DeviceB_Mode = 4; uint32 DeviceB_Size = 5; uint32 DeviceB_Length = 6; } } message SettingsGroup { message Settings { message Command { uint32 label = 1; repeated Property properties = 2; } uint32 id = 1; string name = 2; uint32 flags = 3; bool en = 5; Command begin = 6; Command end = 7; } Settings settings = 1; uint32 version = 2; } nanopb-0.4.1/tests/typename_mangling/000077500000000000000000000000001361552131000176265ustar00rootroot00000000000000nanopb-0.4.1/tests/typename_mangling/SConscript000066400000000000000000000023301361552131000216360ustar00rootroot00000000000000# Test mangle_names option Import('env') def set_mangling(type): def command(target, source, env): with open(str(source[0])) as src, open(str(target[0]), "w") as dst: dst.write("* mangle_names:{}\n".format(type)) dst.write(src.read()) return command env.Command("strip_package.options", "with_package.options", set_mangling("M_STRIP_PACKAGE")) env.Command("strip_package.proto", "with_package.proto", Copy("$TARGET", "$SOURCE")) env.NanopbProto(["strip_package", "strip_package.options"]) env.Program(["test_strip_package.c", "strip_package.pb.c", '$COMMON/pb_common.o']) env.Command("flatten.options", "with_package.options", set_mangling("M_FLATTEN")) env.Command("flatten.proto", "with_package.proto", Copy("$TARGET", "$SOURCE")) env.NanopbProto(["flatten", "flatten.options"]) env.Program(["test_flatten.c", "flatten.pb.c", '$COMMON/pb_common.o']) env.Command("package_initials.options", "with_package.options", set_mangling("M_PACKAGE_INITIALS")) env.Command("package_initials.proto", "with_package.proto", Copy("$TARGET", "$SOURCE")) env.NanopbProto(["package_initials", "package_initials.options"]) env.Program(["test_package_initials.c", "package_initials.pb.c", '$COMMON/pb_common.o']) nanopb-0.4.1/tests/typename_mangling/test_flatten.c000066400000000000000000000010541361552131000224660ustar00rootroot00000000000000/* * Tests if expected names are generated when M_FLATTEN is used. */ #include #include "unittests.h" #include "flatten.pb.h" int main() { TopLevelMessage msg = {0}; NestedMessage nmsg = msg.nested; NestedLevel2 nmsg2 = nmsg.nested; NestedLevel3 nmsg3 = nmsg2.nested; nmsg3.nothing = 42; msg.short_if_none = ShortIfNone_IfNone_A; msg.short_if_strip_package = ShortIfStripPackage_IfPackage_A; msg.short_if_flatten = IfFlatten_A; return nmsg3.nothing; /* this sets `nmsg3` as used, to prevent warning */ } nanopb-0.4.1/tests/typename_mangling/test_package_initials.c000066400000000000000000000011051361552131000243150ustar00rootroot00000000000000/* * Tests if expected names are generated when M_STRIP_PACKAGE is used. */ #include #include "unittests.h" #include "package_initials.pb.h" int main() { cen_TopLevelMessage msg = {0}; cen_TopLevelMessage_NestedMessage_NestedLevel2_NestedLevel3 nmsg = msg.nested.nested.nested; msg.short_if_none = cen_TopLevelMessage_ShortIfNone_IfNone_A; msg.short_if_strip_package = cen_TopLevelMessage_ShortIfStripPackage_IfPackage_A; msg.short_if_flatten = cen_TopLevelMessage_ShortIfFlatten_IfFlatten_A; return nmsg.nothing; /* marks nmsg as used */ } nanopb-0.4.1/tests/typename_mangling/test_strip_package.c000066400000000000000000000010321361552131000236410ustar00rootroot00000000000000/* * Tests if expected names are generated when M_STRIP_PACKAGE is used. */ #include #include "unittests.h" #include "strip_package.pb.h" int main() { TopLevelMessage msg = {0}; TopLevelMessage_NestedMessage_NestedLevel2_NestedLevel3 nmsg = msg.nested.nested.nested; msg.short_if_none = TopLevelMessage_ShortIfNone_IfNone_A; msg.short_if_strip_package = TopLevelMessage_IfPackage_A; msg.short_if_flatten = TopLevelMessage_ShortIfFlatten_IfFlatten_A; return nmsg.nothing; /* marks nmsg as used */ } nanopb-0.4.1/tests/typename_mangling/with_package.options000066400000000000000000000002511361552131000236670ustar00rootroot00000000000000* long_names:true com.example.nanopb.TopLevelMessage.ShortIfNone long_names:false TopLevelMessage.ShortIfStripPackage long_names:false ShortIfFlatten long_names: false nanopb-0.4.1/tests/typename_mangling/with_package.proto000066400000000000000000000014541361552131000233450ustar00rootroot00000000000000syntax = "proto2"; package com.example.nanopb; message TopLevelMessage { required uint32 base_field = 1; required NestedMessage nested = 2; optional ShortIfNone short_if_none = 3; optional ShortIfStripPackage short_if_strip_package = 4; optional ShortIfFlatten short_if_flatten = 5; message NestedMessage { required NestedLevel2 nested = 1; message NestedLevel2 { required NestedLevel3 nested = 1; message NestedLevel3 { required uint32 nothing = 1; } } } enum ShortIfNone { IfNone_A = 1; IfNone_B = 2; } enum ShortIfStripPackage { IfPackage_A = 1; IfPackage_B = 2; } enum ShortIfFlatten { IfFlatten_A = 1; IfFlatten_B = 2; } } nanopb-0.4.1/tests/validate_utf8/000077500000000000000000000000001361552131000166675ustar00rootroot00000000000000nanopb-0.4.1/tests/validate_utf8/SConscript000066400000000000000000000022071361552131000207020ustar00rootroot00000000000000# Run the alltypes test case, but compile with PB_VALIDATE_UTF8=1 Import("env") # Take copy of the files for custom build. c = Copy("$TARGET", "$SOURCE") env.Command("alltypes.pb.h", "$BUILD/alltypes/alltypes.pb.h", c) env.Command("alltypes.pb.c", "$BUILD/alltypes/alltypes.pb.c", c) env.Command("encode_alltypes.c", "$BUILD/alltypes/encode_alltypes.c", c) env.Command("decode_alltypes.c", "$BUILD/alltypes/decode_alltypes.c", c) # Define the compilation options opts = env.Clone() opts.Append(CPPDEFINES = {'PB_VALIDATE_UTF8': 1}) # Build new version of core strict = opts.Clone() strict.Append(CFLAGS = strict['CORECFLAGS']) strict.Object("pb_decode_validateutf8.o", "$NANOPB/pb_decode.c") strict.Object("pb_encode_validateutf8.o", "$NANOPB/pb_encode.c") strict.Object("pb_common_validateutf8.o", "$NANOPB/pb_common.c") # Now build and run the test normally. enc = opts.Program(["encode_alltypes.c", "alltypes.pb.c", "pb_encode_validateutf8.o", "pb_common_validateutf8.o"]) dec = opts.Program(["decode_alltypes.c", "alltypes.pb.c", "pb_decode_validateutf8.o", "pb_common_validateutf8.o"]) env.RunTest(enc) env.RunTest([dec, "encode_alltypes.output"]) nanopb-0.4.1/tests/without_64bit/000077500000000000000000000000001361552131000166435ustar00rootroot00000000000000nanopb-0.4.1/tests/without_64bit/SConscript000066400000000000000000000036701361552131000206630ustar00rootroot00000000000000# Run the alltypes test case, but compile with PB_WITHOUT_64BIT. Import("env") env.NanopbProto(["alltypes", "alltypes.options"]) # Define the compilation options opts = env.Clone() opts.Append(CPPDEFINES = {'PB_WITHOUT_64BIT': 1, 'HAVE_STDINT_H': 0, 'PB_SYSTEM_HEADER': '\\"no_64bit_syshdr.h\\"'}) opts.Append(CPPPATH = "#without_64bit") if 'SYSHDR' in opts: opts.Append(CPPDEFINES = {'PB_OLD_SYSHDR': opts['SYSHDR']}) # Build new version of core strict = opts.Clone() strict.Append(CFLAGS = strict['CORECFLAGS']) strict.Object("pb_decode_no64bit.o", "$NANOPB/pb_decode.c") strict.Object("pb_encode_no64bit.o", "$NANOPB/pb_encode.c") strict.Object("pb_common_no64bit.o", "$NANOPB/pb_common.c") # Now build and run the test normally. enc = opts.Program(["encode_alltypes.c", "alltypes.pb.c", "pb_encode_no64bit.o", "pb_common_no64bit.o"]) dec = opts.Program(["decode_alltypes.c", "alltypes.pb.c", "pb_decode_no64bit.o", "pb_common_no64bit.o"]) env.RunTest(enc) env.RunTest([dec, "encode_alltypes.output"]) # Re-encode the data using protoc, and check that the results from nanopb # match byte-per-byte to the protoc output. env.Decode("encode_alltypes.output.decoded", ["encode_alltypes.output", "alltypes.proto"], MESSAGE='AllTypes') env.Encode("encode_alltypes.output.recoded", ["encode_alltypes.output.decoded", "alltypes.proto"], MESSAGE='AllTypes') env.Compare(["encode_alltypes.output", "encode_alltypes.output.recoded"]) # Do the same checks with the optional fields present. env.RunTest("optionals.output", enc, ARGS = ['1']) env.RunTest("optionals.decout", [dec, "optionals.output"], ARGS = ['1']) env.Decode("optionals.output.decoded", ["optionals.output", "alltypes.proto"], MESSAGE='AllTypes') env.Encode("optionals.output.recoded", ["optionals.output.decoded", "alltypes.proto"], MESSAGE='AllTypes') env.Compare(["optionals.output", "optionals.output.recoded"]) nanopb-0.4.1/tests/without_64bit/alltypes.options000066400000000000000000000002161361552131000221140ustar00rootroot00000000000000* max_size:16 * max_count:5 *.*fbytes fixed_length:true max_size:4 *.*farray fixed_count:true max_count:5 DescriptorSize8 descriptorsize:DS_8 nanopb-0.4.1/tests/without_64bit/alltypes.proto000066400000000000000000000063311361552131000215700ustar00rootroot00000000000000syntax = "proto2"; // package name placeholder message SubMessage { required string substuff1 = 1 [default = "1"]; required int32 substuff2 = 2 [default = 2]; optional fixed32 substuff3 = 3 [default = 3]; } message EmptyMessage { } enum HugeEnum { Negative = -2147483647; /* protoc doesn't accept -2147483648 here */ Positive = 2147483647; } message Limits { required int32 int32_min = 1 [default = 2147483647]; required int32 int32_max = 2 [default = -2147483647]; required uint32 uint32_min = 3 [default = 4294967295]; required uint32 uint32_max = 4 [default = 0]; required HugeEnum enum_min = 9 [default = Positive]; required HugeEnum enum_max = 10 [default = Negative]; } enum MyEnum { Zero = 0; First = 1; Second = 2; Truth = 42; } message AllTypes { required int32 req_int32 = 1; required uint32 req_uint32 = 3; required sint32 req_sint32 = 5; required bool req_bool = 7; required fixed32 req_fixed32 = 8; required sfixed32 req_sfixed32= 9; required float req_float = 10; required string req_string = 14; required bytes req_bytes = 15; required SubMessage req_submsg = 16; required MyEnum req_enum = 17; required EmptyMessage req_emptymsg = 18; required bytes req_fbytes = 19; repeated int32 rep_int32 = 21 [packed = true]; repeated uint32 rep_uint32 = 23 [packed = true]; repeated sint32 rep_sint32 = 25 [packed = true]; repeated bool rep_bool = 27 [packed = true]; repeated fixed32 rep_fixed32 = 28 [packed = true]; repeated sfixed32 rep_sfixed32= 29 [packed = true]; repeated float rep_float = 30 [packed = true]; repeated string rep_string = 34; repeated bytes rep_bytes = 35; repeated SubMessage rep_submsg = 36; repeated MyEnum rep_enum = 37 [packed = true]; repeated EmptyMessage rep_emptymsg = 38; repeated bytes rep_fbytes = 39; optional int32 opt_int32 = 41 [default = 4041]; optional uint32 opt_uint32 = 43 [default = 4043]; optional sint32 opt_sint32 = 45 [default = 4045]; optional bool opt_bool = 47 [default = false]; optional fixed32 opt_fixed32 = 48 [default = 4048]; optional sfixed32 opt_sfixed32= 49 [default = 4049]; optional float opt_float = 50 [default = 4050]; optional string opt_string = 54 [default = "4054"]; optional bytes opt_bytes = 55 [default = "4055"]; optional SubMessage opt_submsg = 56; optional MyEnum opt_enum = 57 [default = Second]; optional EmptyMessage opt_emptymsg = 58; optional bytes opt_fbytes = 59 [default = "4059"]; oneof oneof { SubMessage oneof_msg1 = 60; EmptyMessage oneof_msg2 = 61; } // Check that extreme integer values are handled correctly required Limits req_limits = 98; // Just to make sure that the size of the fields has been calculated // properly, i.e. otherwise a bug in last field might not be detected. required int32 end = 99; extensions 200 to 255; } nanopb-0.4.1/tests/without_64bit/decode_alltypes.c000066400000000000000000000170131361552131000221510ustar00rootroot00000000000000/* Tests the decoding of all types. * This is the counterpart of test_encode3. * Run e.g. ./test_encode3 | ./test_decode3 */ #include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" #include "unittests.h" /* This function is called once from main(), it handles the decoding and checks the fields. */ bool check_alltypes(pb_istream_t *stream, int mode) { /* Uses _init_default to just make sure that it works. */ AllTypes alltypes = AllTypes_init_default; int status = 0; /* Fill with garbage to better detect initialization errors */ memset(&alltypes, 0xAA, sizeof(alltypes)); alltypes.extensions = 0; if (!pb_decode(stream, AllTypes_fields, &alltypes)) return false; TEST(alltypes.req_int32 == -1001); TEST(alltypes.req_uint32 == 1003); TEST(alltypes.req_sint32 == -1005); TEST(alltypes.req_bool == true); TEST(alltypes.req_fixed32 == 1008); TEST(alltypes.req_sfixed32 == -1009); TEST(alltypes.req_float == 1010.0f); TEST(strcmp(alltypes.req_string, "1014") == 0); TEST(alltypes.req_bytes.size == 4); TEST(memcmp(alltypes.req_bytes.bytes, "1015", 4) == 0); TEST(strcmp(alltypes.req_submsg.substuff1, "1016") == 0); TEST(alltypes.req_submsg.substuff2 == 1016); TEST(alltypes.req_submsg.substuff3 == 3); TEST(alltypes.req_enum == MyEnum_Truth); TEST(memcmp(alltypes.req_fbytes, "1019", 4) == 0); TEST(alltypes.rep_int32_count == 5 && alltypes.rep_int32[4] == -2001 && alltypes.rep_int32[0] == 0); TEST(alltypes.rep_uint32_count == 5 && alltypes.rep_uint32[4] == 2003 && alltypes.rep_uint32[0] == 0); TEST(alltypes.rep_sint32_count == 5 && alltypes.rep_sint32[4] == -2005 && alltypes.rep_sint32[0] == 0); TEST(alltypes.rep_bool_count == 5 && alltypes.rep_bool[4] == true && alltypes.rep_bool[0] == false); TEST(alltypes.rep_fixed32_count == 5 && alltypes.rep_fixed32[4] == 2008 && alltypes.rep_fixed32[0] == 0); TEST(alltypes.rep_sfixed32_count == 5 && alltypes.rep_sfixed32[4] == -2009 && alltypes.rep_sfixed32[0] == 0); TEST(alltypes.rep_float_count == 5 && alltypes.rep_float[4] == 2010.0f && alltypes.rep_float[0] == 0.0f); TEST(alltypes.rep_string_count == 5 && strcmp(alltypes.rep_string[4], "2014") == 0 && alltypes.rep_string[0][0] == '\0'); TEST(alltypes.rep_bytes_count == 5 && alltypes.rep_bytes[4].size == 4 && alltypes.rep_bytes[0].size == 0); TEST(memcmp(alltypes.rep_bytes[4].bytes, "2015", 4) == 0); TEST(alltypes.rep_submsg_count == 5); TEST(strcmp(alltypes.rep_submsg[4].substuff1, "2016") == 0 && alltypes.rep_submsg[0].substuff1[0] == '\0'); TEST(alltypes.rep_submsg[4].substuff2 == 2016 && alltypes.rep_submsg[0].substuff2 == 0); TEST(alltypes.rep_submsg[4].substuff3 == 2016 && alltypes.rep_submsg[0].substuff3 == 3); TEST(alltypes.rep_enum_count == 5 && alltypes.rep_enum[4] == MyEnum_Truth && alltypes.rep_enum[0] == MyEnum_Zero); TEST(alltypes.rep_emptymsg_count == 5); TEST(alltypes.rep_fbytes_count == 5); TEST(alltypes.rep_fbytes[0][0] == 0 && alltypes.rep_fbytes[0][3] == 0); TEST(memcmp(alltypes.rep_fbytes[4], "2019", 4) == 0); if (mode == 0) { /* Expect default values */ TEST(alltypes.has_opt_int32 == false); TEST(alltypes.opt_int32 == 4041); TEST(alltypes.has_opt_uint32 == false); TEST(alltypes.opt_uint32 == 4043); TEST(alltypes.has_opt_sint32 == false); TEST(alltypes.opt_sint32 == 4045); TEST(alltypes.has_opt_bool == false); TEST(alltypes.opt_bool == false); TEST(alltypes.has_opt_fixed32 == false); TEST(alltypes.opt_fixed32 == 4048); TEST(alltypes.has_opt_sfixed32 == false); TEST(alltypes.opt_sfixed32 == 4049); TEST(alltypes.has_opt_float == false); TEST(alltypes.opt_float == 4050.0f); TEST(alltypes.has_opt_string == false); TEST(strcmp(alltypes.opt_string, "4054") == 0); TEST(alltypes.has_opt_bytes == false); TEST(alltypes.opt_bytes.size == 4); TEST(memcmp(alltypes.opt_bytes.bytes, "4055", 4) == 0); TEST(alltypes.has_opt_submsg == false); TEST(strcmp(alltypes.opt_submsg.substuff1, "1") == 0); TEST(alltypes.opt_submsg.substuff2 == 2); TEST(alltypes.opt_submsg.substuff3 == 3); TEST(alltypes.has_opt_enum == false); TEST(alltypes.opt_enum == MyEnum_Second); TEST(alltypes.has_opt_emptymsg == false); TEST(alltypes.has_opt_fbytes == false); TEST(memcmp(alltypes.opt_fbytes, "4059", 4) == 0); TEST(alltypes.which_oneof == 0); } else { /* Expect filled-in values */ TEST(alltypes.has_opt_int32 == true); TEST(alltypes.opt_int32 == 3041); TEST(alltypes.has_opt_uint32 == true); TEST(alltypes.opt_uint32 == 3043); TEST(alltypes.has_opt_sint32 == true); TEST(alltypes.opt_sint32 == 3045); TEST(alltypes.has_opt_bool == true); TEST(alltypes.opt_bool == true); TEST(alltypes.has_opt_fixed32 == true); TEST(alltypes.opt_fixed32 == 3048); TEST(alltypes.has_opt_sfixed32 == true); TEST(alltypes.opt_sfixed32 == 3049); TEST(alltypes.has_opt_float == true); TEST(alltypes.opt_float == 3050.0f); TEST(alltypes.has_opt_string == true); TEST(strcmp(alltypes.opt_string, "3054") == 0); TEST(alltypes.has_opt_bytes == true); TEST(alltypes.opt_bytes.size == 4); TEST(memcmp(alltypes.opt_bytes.bytes, "3055", 4) == 0); TEST(alltypes.has_opt_submsg == true); TEST(strcmp(alltypes.opt_submsg.substuff1, "3056") == 0); TEST(alltypes.opt_submsg.substuff2 == 3056); TEST(alltypes.opt_submsg.substuff3 == 3); TEST(alltypes.has_opt_enum == true); TEST(alltypes.opt_enum == MyEnum_Truth); TEST(alltypes.has_opt_emptymsg == true); TEST(alltypes.has_opt_fbytes == true); TEST(memcmp(alltypes.opt_fbytes, "3059", 4) == 0); TEST(alltypes.which_oneof == AllTypes_oneof_msg1_tag); TEST(strcmp(alltypes.oneof.oneof_msg1.substuff1, "4059") == 0); TEST(alltypes.oneof.oneof_msg1.substuff2 == 4059); } TEST(alltypes.req_limits.int32_min == INT32_MIN); TEST(alltypes.req_limits.int32_max == INT32_MAX); TEST(alltypes.req_limits.uint32_min == 0); TEST(alltypes.req_limits.uint32_max == UINT32_MAX); TEST(alltypes.req_limits.enum_min == HugeEnum_Negative); TEST(alltypes.req_limits.enum_max == HugeEnum_Positive); TEST(alltypes.end == 1099); return status == 0; } int main(int argc, char **argv) { uint8_t buffer[1024]; size_t count; pb_istream_t stream; /* Whether to expect the optional values or the default values. */ int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Read the data into buffer */ SET_BINARY_MODE(stdin); count = fread(buffer, 1, sizeof(buffer), stdin); /* Construct a pb_istream_t for reading from the buffer */ stream = pb_istream_from_buffer(buffer, count); /* Decode and print out the stuff */ if (!check_alltypes(&stream, mode)) { printf("Parsing failed: %s\n", PB_GET_ERROR(&stream)); return 1; } else { return 0; } } nanopb-0.4.1/tests/without_64bit/encode_alltypes.c000066400000000000000000000104431361552131000221630ustar00rootroot00000000000000/* Attempts to test all the datatypes supported by ProtoBuf. */ #include #include #include #include #include "alltypes.pb.h" #include "test_helpers.h" int main(int argc, char **argv) { int mode = (argc > 1) ? atoi(argv[1]) : 0; /* Initialize the structure with constants */ AllTypes alltypes = AllTypes_init_zero; alltypes.req_int32 = -1001; alltypes.req_uint32 = 1003; alltypes.req_sint32 = -1005; alltypes.req_bool = true; alltypes.req_fixed32 = 1008; alltypes.req_sfixed32 = -1009; alltypes.req_float = 1010.0f; strcpy(alltypes.req_string, "1014"); alltypes.req_bytes.size = 4; memcpy(alltypes.req_bytes.bytes, "1015", 4); strcpy(alltypes.req_submsg.substuff1, "1016"); alltypes.req_submsg.substuff2 = 1016; alltypes.req_enum = MyEnum_Truth; memcpy(alltypes.req_fbytes, "1019", 4); alltypes.rep_int32_count = 5; alltypes.rep_int32[4] = -2001; alltypes.rep_uint32_count = 5; alltypes.rep_uint32[4] = 2003; alltypes.rep_sint32_count = 5; alltypes.rep_sint32[4] = -2005; alltypes.rep_bool_count = 5; alltypes.rep_bool[4] = true; alltypes.rep_fixed32_count = 5; alltypes.rep_fixed32[4] = 2008; alltypes.rep_sfixed32_count = 5; alltypes.rep_sfixed32[4] = -2009; alltypes.rep_float_count = 5; alltypes.rep_float[4] = 2010.0f; alltypes.rep_string_count = 5; strcpy(alltypes.rep_string[4], "2014"); alltypes.rep_bytes_count = 5; alltypes.rep_bytes[4].size = 4; memcpy(alltypes.rep_bytes[4].bytes, "2015", 4); alltypes.rep_submsg_count = 5; strcpy(alltypes.rep_submsg[4].substuff1, "2016"); alltypes.rep_submsg[4].substuff2 = 2016; alltypes.rep_submsg[4].has_substuff3 = true; alltypes.rep_submsg[4].substuff3 = 2016; alltypes.rep_enum_count = 5; alltypes.rep_enum[4] = MyEnum_Truth; alltypes.rep_emptymsg_count = 5; alltypes.rep_fbytes_count = 5; memcpy(alltypes.rep_fbytes[4], "2019", 4); alltypes.req_limits.int32_min = INT32_MIN; alltypes.req_limits.int32_max = INT32_MAX; alltypes.req_limits.uint32_min = 0; alltypes.req_limits.uint32_max = UINT32_MAX; alltypes.req_limits.enum_min = HugeEnum_Negative; alltypes.req_limits.enum_max = HugeEnum_Positive; if (mode != 0) { /* Fill in values for optional fields */ alltypes.has_opt_int32 = true; alltypes.opt_int32 = 3041; alltypes.has_opt_uint32 = true; alltypes.opt_uint32 = 3043; alltypes.has_opt_sint32 = true; alltypes.opt_sint32 = 3045; alltypes.has_opt_bool = true; alltypes.opt_bool = true; alltypes.has_opt_fixed32 = true; alltypes.opt_fixed32 = 3048; alltypes.has_opt_sfixed32 = true; alltypes.opt_sfixed32 = 3049; alltypes.has_opt_float = true; alltypes.opt_float = 3050.0f; alltypes.has_opt_string = true; strcpy(alltypes.opt_string, "3054"); alltypes.has_opt_bytes = true; alltypes.opt_bytes.size = 4; memcpy(alltypes.opt_bytes.bytes, "3055", 4); alltypes.has_opt_submsg = true; strcpy(alltypes.opt_submsg.substuff1, "3056"); alltypes.opt_submsg.substuff2 = 3056; alltypes.has_opt_enum = true; alltypes.opt_enum = MyEnum_Truth; alltypes.has_opt_emptymsg = true; alltypes.has_opt_fbytes = true; memcpy(alltypes.opt_fbytes, "3059", 4); alltypes.which_oneof = AllTypes_oneof_msg1_tag; strcpy(alltypes.oneof.oneof_msg1.substuff1, "4059"); alltypes.oneof.oneof_msg1.substuff2 = 4059; } alltypes.end = 1099; { uint8_t buffer[AllTypes_size]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); /* Now encode it and check if we succeeded. */ if (pb_encode(&stream, AllTypes_fields, &alltypes)) { SET_BINARY_MODE(stdout); fwrite(buffer, 1, stream.bytes_written, stdout); return 0; /* Success */ } else { fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); return 1; /* Failure */ } } } nanopb-0.4.1/tests/without_64bit/no_64bit_syshdr.h000066400000000000000000000003711361552131000220350ustar00rootroot00000000000000/* This wrapper undefines (u)int64_t */ #ifdef PB_OLD_SYSHDR #include PB_OLD_SYSHDR #else #include #include #include #include #endif #define uint64_t disabled_uint64_t #define int64_t disabled_int64_t nanopb-0.4.1/tools/000077500000000000000000000000001361552131000141265ustar00rootroot00000000000000nanopb-0.4.1/tools/make_linux_package.sh000077500000000000000000000026371361552131000203040ustar00rootroot00000000000000#!/bin/bash # Run this script in the top nanopb directory to create a binary package # for Linux users. # Requires: protobuf, python-protobuf, pyinstaller set -e set -x VERSION=`git describe --always`-linux-x86 DEST=dist/$VERSION rm -rf $DEST mkdir -p $DEST # Export the files from newest commit git archive HEAD | tar x -C $DEST # Rebuild the Python .proto files make -BC $DEST/generator/proto # Package the Python libraries ( cd $DEST/generator; pyinstaller nanopb_generator.py ) mv $DEST/generator/dist/nanopb_generator $DEST/generator-bin # Remove temp files rm -rf $DEST/generator/dist $DEST/generator/build $DEST/generator/nanopb_generator.spec # Make the nanopb generator available as a protoc plugin cp $DEST/generator-bin/nanopb_generator $DEST/generator-bin/protoc-gen-nanopb # Package the protoc compiler cp `which protoc` $DEST/generator-bin/protoc.bin LIBPROTOC=$(ldd `which protoc` | grep -o '/.*libprotoc[^ ]*') LIBPROTOBUF=$(ldd `which protoc` | grep -o '/.*libprotobuf[^ ]*') cp $LIBPROTOC $LIBPROTOBUF $DEST/generator-bin/ cat > $DEST/generator-bin/protoc << EOF #!/bin/bash SCRIPTDIR=\$(dirname "\$0") export LD_LIBRARY_PATH=\$SCRIPTDIR export PATH=\$SCRIPTDIR:\$PATH exec "\$SCRIPTDIR/protoc.bin" "\$@" EOF chmod +x $DEST/generator-bin/protoc # Remove debugging symbols to reduce size of package ( cd $DEST/generator-bin; strip *.so *.so.* ) # Tar it all up ( cd dist; tar -czf $VERSION.tar.gz $VERSION ) nanopb-0.4.1/tools/make_mac_package.sh000077500000000000000000000025131361552131000176760ustar00rootroot00000000000000#!/bin/bash # Run this script in the top nanopb directory to create a binary package # for Mac OS X users. # Requires: protobuf, python-protobuf, pyinstaller set -e set -x VERSION=`git describe --always`-macosx-x86 DEST=dist/$VERSION rm -rf $DEST mkdir -p $DEST # Export the files from newest commit git archive HEAD | tar x -C $DEST # Rebuild the Python .proto files make -BC $DEST/generator/proto # Package the Python libraries ( cd $DEST/generator; pyinstaller nanopb_generator.py ) mv $DEST/generator/dist/nanopb_generator $DEST/generator-bin # Remove temp files rm -rf $DEST/generator/dist $DEST/generator/build $DEST/generator/nanopb_generator.spec # Make the nanopb generator available as a protoc plugin cp $DEST/generator-bin/nanopb_generator $DEST/generator-bin/protoc-gen-nanopb # Package the protoc compiler cp `which protoc` $DEST/generator-bin/protoc.bin LIBPROTOC=$(otool -L `which protoc` | grep -o '/.*libprotoc[^ ]*') LIBPROTOBUF=$(otool -L `which protoc` | grep -o '/.*libprotobuf[^ ]*') cp $LIBPROTOC $LIBPROTOBUF $DEST/generator-bin/ cat > $DEST/generator-bin/protoc << EOF #!/bin/bash SCRIPTDIR=\$(dirname "\$0") export DYLD_LIBRARY_PATH=\$SCRIPTDIR export PATH=\$SCRIPTDIR:\$PATH exec "\$SCRIPTDIR/protoc.bin" "\$@" EOF chmod +x $DEST/generator-bin/protoc # Tar it all up ( cd dist; tar -czf $VERSION.tar.gz $VERSION ) nanopb-0.4.1/tools/make_windows_package.sh000077500000000000000000000064411361552131000206340ustar00rootroot00000000000000#!/bin/bash # Run this script in the top nanopb directory to create a binary package # for Windows users. This script is designed to run under MingW/MSYS bash # and requires the following tools: git, make, zip, unix2dos set -e set -x VERSION=`git describe --always`-windows-x86 DEST=dist/$VERSION rm -rf $DEST mkdir -p $DEST # Export the files from newest commit git archive HEAD | tar x -C $DEST # Rebuild the Python .proto files make -BC $DEST/generator/proto # Make the nanopb generator available as a protoc plugin cp $DEST/generator/nanopb_generator.py $DEST/generator/protoc-gen-nanopb.py # Package the Python libraries ( cd $DEST/generator; bbfreeze nanopb_generator.py protoc-gen-nanopb.py ) mv $DEST/generator/dist $DEST/generator-bin # Remove temp file rm $DEST/generator/protoc-gen-nanopb.py # The python interpreter requires MSVCR90.dll. # FIXME: Find a way around hardcoding this path cp /c/windows/winsxs/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759cb/MSVCR90.DLL $DEST/generator-bin/ cat > $DEST/generator-bin/Microsoft.VC90.CRT.manifest < KSaO8M0iCtPF6YEr79P1dZsnomY= ojDmTgpYMFRKJYkPcM6ckpYkWUU= tVogb8kezDre2mXShlIqpp8ErIg= EOF # Package the protoc compiler cp `which protoc.exe` $DEST/generator-bin/ cp `which MSVCR100.DLL` $DEST/generator-bin/ cp `which MSVCP100.DLL` $DEST/generator-bin/ # Convert line breaks for convenience find $DEST -name '*.c' -o -name '*.h' -o -name '*.txt' \ -o -name '*.proto' -o -name '*.py' -o -name '*.options' \ -exec unix2dos '{}' \; # Zip it all up ( cd dist; zip -r $VERSION.zip $VERSION ) nanopb-0.4.1/tools/set_version.sh000077500000000000000000000014221361552131000170240ustar00rootroot00000000000000#!/bin/bash # Run this from the top directory of nanopb tree. # e.g. user@localhost:~/nanopb$ tools/set_version.sh nanopb-0.1.9-dev # It sets the version number in pb.h and generator/nanopb_generator.py. sed -i -e 's/nanopb_version\s*=\s*"[^"]*"/nanopb_version = "'$1'"/' generator/nanopb_generator.py sed -i -e 's/#define\s*NANOPB_VERSION\s*.*/#define NANOPB_VERSION '$1'/' pb.h sed -i -e 's/set(\s*nanopb_VERSION_STRING\s*[^)]*)/set(nanopb_VERSION_STRING '$1')/' CMakeLists.txt VERSION_ONLY=$(echo $1 | sed 's/nanopb-//') if [[ $1 != *dev ]] then sed -i -e 's/"version":\s*"[^"]*"/"version": "'$VERSION_ONLY'"/' library.json fi sed -i -e 's/version =.*/version = "'$VERSION_ONLY'"/' conanfile.py sed -i -e 's/^version =.*/version = "'$VERSION_ONLY'"/' extra/poetry/pyproject.toml