[Nanopb] String/Bytes type proto

Posted by [하늘이]
2020. 1. 30. 13:58 IT/C, C++
반응형

[Nanopb for Google protobuf] String/Bytes type proto


※ 관련글

  • Google Protobuf
  1. [Google Protobuf] For Java in Android Studio - 설치 및 proto 파일 컴파일
  2. [Google Protobuf] For Java in Android Studio - Gen Java 파일 Android Studio 적용
  3. [Google Protobuf] For Java in Android Studio - Basic example code 기본 소스 코드 사용 샘플
  4. [Google Protobuf] For C++ in Linux - Settings C++ 빌드 환경 만들기
  5. [Google Protobuf] For C++ in Linux - Basic example code 기본 소스 코드 사용 샘플
  • Nanopb Basic type value example
  1. [Nanopb for Google protobuf] Basic type proto sample
  2. [Nanopb for Google protobuf] Basic type proto sample - Sample proto file
  3. [Nanopb for Google protobuf] Basic type proto sample - Encode sample code
  4. [Nanopb for Google protobuf] Basic type proto sample - Decode sample code
  • Nanopb String / bytes value example
  1. [Nanopb for Google protobuf] String/Bytes type proto
  2. [Nanopb for Google protobuf] String/Bytes type proto - Sample proto file 
  3. [Nanopb for Google protobuf] String/Bytes type proto - Encode example code 1
  4. [Nanopb for Google protobuf] String/Bytes type proto - Encode example code 2
  5. [Nanopb for Google protobuf] String/Bytes type proto - Decode example code
  • Nanopb basic submsg example
  1. [Nanopb for Google protobuf] Sub message - Example proto file
  2. [Nanopb for Google protobuf] Sub message - Encode example code
  3. [Nanopb for Google protobuf] Sub message - Decode example code
  • Nanopb array submsg value example

  1. [Nanopb for Google protobuf] Array Sub message - Example proto file
  2. [Nanopb for Google protobuf] Array Sub message - Encode example code
  3. [Nanopb for Google protobuf] Array Sub message - Decode example code


# 기본적인 데이터 타입의 decode / encode 사용 방법이다.

string / bytes

 



* Sample code resut

encode_string start @@@

encode_string start @@@

TestStrBytesTypes encode OK size:22

Str Bytes types : 8 65 12 C 48 65 6C 6C 6F 20 77 6F 72 6C 64 21 1A 4 10 20 30 40 

decode_string start @@@

decode_byteArr start @@@

TestStrBytesTypes Decoding OK 

 testInt32:101

 string:Hello world!

 ByteArr: 10 20 30 40 



반응형