Skip to content
Snippets Groups Projects
Commit 98f2ff57 authored by Andrea Bulgarelli's avatar Andrea Bulgarelli
Browse files

Utility::getByteStream()

parent 6ba21fdc
Branches
Tags
No related merge requests found
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#define _UTILITY_H #define _UTILITY_H
#include "PacketLibDefinition.h" #include "PacketLibDefinition.h"
#include "ByteStream.h"
namespace PacketLib namespace PacketLib
{ {
...@@ -78,6 +79,8 @@ public: ...@@ -78,6 +79,8 @@ public:
static int getchildpid(int startpid, char* procname, int maxsearch=1000); static int getchildpid(int startpid, char* procname, int maxsearch=1000);
static bool getchildpidlive(int pid); static bool getchildpidlive(int pid);
static ByteStreamPtr getByteStream(byte* data, dword size, bool bigendian );
}; };
} }
......
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
using namespace PacketLib; using namespace PacketLib;
ByteStreamPtr Utility::getByteStream(byte* data, dword size, bool bigendian ) {
return ByteStreamPtr(new ByteStream((byte*) data, size, bigendian));
}
int Utility::convertToInteger(string bin) int Utility::convertToInteger(string bin)
{ {
string::size_type pos; string::size_type pos;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment