Commit 6ba21fdc authored by Andrea Zoli's avatar Andrea Zoli
Browse files

Add openDevice() for Input and Output classes.

parent bb689179
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@

#include "PacketExceptionIO.h"
#include "ByteStream.h"
#include <vector>
#include <string>

namespace PacketLib
{
@@ -35,6 +37,8 @@ public:

    virtual bool open( char** parameters ) throw(PacketExceptionIO*) = 0;

    virtual void openDevice(const std::vector<std::string>& parameters) throw(PacketExceptionIO*) = 0;

    virtual ByteStreamPtr readByteStream(dword n_byte) throw(PacketExceptionIO*) = 0;

    virtual char* readString() throw(PacketExceptionIO*) = 0;
+4 −1
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ public:

    virtual bool open( char** parameters ) throw(PacketExceptionIO*);

	/// parameters[0] = filename
    virtual void openDevice(const std::vector<std::string>& parameters) throw(PacketExceptionIO*);

    virtual void close() throw(PacketExceptionIO*);

    virtual ByteStreamPtr readByteStream(dword n_byte) throw(PacketExceptionIO*);
@@ -52,7 +55,7 @@ protected:

    File* file;

    char* filename;
    std::string filename;

};
}
+3 −1
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ public:

    virtual bool open( char** parameters ) throw(PacketExceptionIO*);

    virtual void openDevice(const std::vector<std::string>& parameters) throw(PacketExceptionIO*);

    virtual void close() throw(PacketExceptionIO*);

    virtual ByteStreamPtr readByteStream(dword n_byte) throw(PacketExceptionIO*);
@@ -50,7 +52,7 @@ protected:

    Serial* serial;

    char*  device;
    std::string device;
    int  flag;

};
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ public:

    virtual bool open( char** parameters ) throw(PacketExceptionIO*);

    virtual void openDevice(const std::vector<std::string>& parameters) throw(PacketExceptionIO*);

    virtual void close() throw(PacketExceptionIO*);

    virtual ByteStreamPtr readByteStream(dword n_byte) throw(PacketExceptionIO*);
+4 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@
#include "PacketLibDefinition.h"
#include "ByteStream.h"
#include "PacketExceptionIO.h"
#include <vector>
#include <string>

namespace PacketLib
{
@@ -35,6 +37,8 @@ public:

    virtual bool open(char** parameters) throw(PacketExceptionIO*) = 0;

    virtual void openDevice(const std::vector<std::string>& parameters) throw(PacketExceptionIO*) = 0;

    virtual bool isClosed();

    virtual bool isBigendian();
Loading