GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SloCompTech/ByteConvert_cpp: Library for C++ to convert variables to bytes and back

BranchesTags
Open more actions menu

Latest commit

 

History

30 Commits
30 Commits

Folders and files

NameName
Last commit message
Last commit date
ByteConvert
ByteConvert
 
 
examples
examples
 
 
extras/graphics
extras/graphics
 
 
test
test
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
CHANGELOG
CHANGELOG
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
meson.build
meson.build
 
 

Repository files navigation

Byteconvert

ByteConvert

Build Status Packagist

What's about ?

Have you ever wanted to transmit int,short,long or any other numeric type over I2C,SPI,serial or other protocol or bus, but you converted variable to string to be able to transmit it char by char. This library enables you to convert any numeric value to bytes or other way around and you can also print array of bytes.

What you need to consider, when you are using this library

When you are using this library, you need to consider variable byte size, because if you are using different platforms, then there may be some errors, because int on platform 1 has 4 bytes and int on platform 2 may has 2 bytes.

What you need to install this project ?

You need python3, ninja and meson.

sudo apt-get install python3 python3-pip ninja-build
sudo pip3 install meson

Installing

meson build
ninja -C build
ninja -C build test
ninja -C build install

# Or simply
make
sudo make install

If you have problems, that library can't be found run sudo ldconfig /usr/local/lib/x86_64-linux-gnu/ if you haven't changed prefix, else modify path.

How to include library to your c or c++ project ?

It's simple. At the top of your source file include library:

#include <ByteConvert/ByteConvert.hpp>

And when you compile add flag -lbyteconvert, example g++ -std=c++11 MyProject.cpp -lbyteconvert -o MyProject.

Examples

See examples folder

About

Library for C++ to convert variables to bytes and back

Topics

bytescconversionconvertcppi2cliblibrarymesonninjaspitransmissionuart

Resources

Readme
MIT license
Activity

Stars

11 stars

Watchers

1 watching

Forks

5 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.