Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions Packetizer/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ namespace arduino {
using DecoderMap = std::map<DecodeTargetStream, DecoderRef<Encoding>>;
#endif

using namespace std;

#else // Do not have libstdc++11

#ifndef PACKETIZER_MAX_PACKET_QUEUE_SIZE
Expand All @@ -89,16 +87,16 @@ namespace arduino {
#define PACKETIZER_MAX_STREAM_MAP_SIZE 2
#endif // PACKETIZER_MAX_STREAM_MAP_SIZE

using PacketData = arx::vector<uint8_t, PACKETIZER_MAX_PACKET_BINARY_SIZE>;
using PacketData = arx::stdx::vector<uint8_t, PACKETIZER_MAX_PACKET_BINARY_SIZE>;
struct Packet {
uint8_t index;
PacketData data;
};
using PacketQueue = arx::deque<Packet, PACKETIZER_MAX_PACKET_QUEUE_SIZE>;
using PacketQueue = arx::stdx::deque<Packet, PACKETIZER_MAX_PACKET_QUEUE_SIZE>;

using CallbackType = std::function<void(const uint8_t* data, const size_t size)>;
using CallbackAlwaysType = std::function<void(const uint8_t index, const uint8_t* data, const size_t size)>;
using CallbackMap = arx::map<uint8_t, CallbackType, PACKETIZER_MAX_CALLBACK_QUEUE_SIZE>;
using CallbackMap = arx::stdx::map<uint8_t, CallbackType, PACKETIZER_MAX_CALLBACK_QUEUE_SIZE>;

template <typename Encoding>
using EncoderRef = std::shared_ptr<Encoder<Encoding>>;
Expand All @@ -107,11 +105,9 @@ namespace arduino {
#ifdef PACKETIZER_ENABLE_STREAM
struct DecodeTargetStream;
template <typename Encoding>
using DecoderMap = arx::map<DecodeTargetStream, DecoderRef<Encoding>, PACKETIZER_MAX_STREAM_MAP_SIZE>;
using DecoderMap = arx::stdx::map<DecodeTargetStream, DecoderRef<Encoding>, PACKETIZER_MAX_STREAM_MAP_SIZE>;
#endif

using namespace arx;

#endif

namespace encoding {
Expand Down
4 changes: 2 additions & 2 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"url": "https://github.com/hideakitai",
"maintainer": true
},
"version": "0.8.0",
"version": "0.8.1",
"license": "MIT",
"frameworks": "*",
"platforms": "*",
"dependencies":
{
"hideakitai/ArxContainer": "*",
"hideakitai/ArxContainer": ">=0.6.0",
"hideakitai/ArxSmartPtr": "*",
"hideakitai/ArxTypeTraits": "*",
"hideakitai/CRCx": "*"
Expand Down
4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name=Packetizer
version=0.8.0
version=0.8.1
author=hideakitai
maintainer=hideakitai
sentence=binary data packetization encoder / decoder based on COBS / SLIP encoding
paragraph=binary data packetization encoder / decoder based on COBS / SLIP encoding
category=Communication
url=https://github.com/hideakitai/Packetizer
architectures=*
depends=ArxContainer,ArxSmartPtr,ArxTypeTraits,CRCx
depends=ArxContainer(>=0.6.0),ArxSmartPtr,ArxTypeTraits,CRCx