Commit 0cc8d2d3 authored by Andrea Bulgarelli's avatar Andrea Bulgarelli
Browse files

removed packet type 1, 2 and 3

parent a4bf78c6
Loading
Loading
Loading
Loading

include/SDFBFBlock.h

deleted100644 → 0
+0 −34
Original line number Diff line number Diff line
/***************************************************************************
                          SDFBFBlock.h  -  description
                             -------------------
    begin                : Thu Dec 6 2001
    copyright            : (C) 2001, 2013 by Andrea Bulgarelli
    email                : bulgarelli@iasfbo.inaf.it
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software for non commercial purpose              *
 *   and for public research institutes; you can redistribute it and/or    *
 *   modify it under the terms of the GNU General Public License.          *
 *   For commercial purpose see appropriate license terms                  *
 *                                                                         *
 ***************************************************************************/
 
#ifndef _SDFBFBLOCK_H
#define _SDFBFBLOCK_H

#include "PacketLibDefinition.h"
#include "PartOfPacket.h"

namespace PacketLib
{

///	\brief Represent a single block with the number of fields fixed.
class SDFBFBlock : public PartOfPacket
{

};

}
#endif                           /* SDFBFBLOCK_H_HEADER_INCLUDED_8B2C5B89 */

include/SDFBVBlock.h

deleted100644 → 0
+0 −67
Original line number Diff line number Diff line
/***************************************************************************
                          SDFBVBlock.h  -  description
                             -------------------
    begin                : Thu Nov 29 2001
    copyright            : (C) 2001, 2013 by Andrea Bulgarelli
    email                : bulgarelli@iasfbo.inaf.it
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software for non commercial purpose              *
 *   and for public research institutes; you can redistribute it and/or    *
 *   modify it under the terms of the GNU General Public License.          *
 *   For commercial purpose see appropriate license terms                  *
 *                                                                         *
 ***************************************************************************/
 
#ifndef _SDFBVBLOCK_H
#define _SDFBVBLOCK_H

#include "PacketLibDefinition.h"
#include "SDFBVBlockFixed.h"
#include "SDFBVBlockVariable.h"

namespace PacketLib
{

///	\brief Class wich represents a single block with a fixed part and with a variable part.
class SDFBVBlock : public PartOfPacket
{
public:

    SDFBVBlockFixed fixed;

    SDFBVBlockVariable* variables;

    word getNumberOfFields();

    Field* getFields(word index);

    word getFieldValue(word index);

    void setFieldValue(word index, word value);

    dword getDimension();

     /// Total max dimension in bytes of block
    dword getMaxDimension();

    bool setOutputStream(ByteStreamPtr os, dword first);

    ByteStreamPtr generateStream(bool bigendian);

    virtual word getNumberOfRealElement();

    virtual void setNumberOfRealElement(word value);

    virtual word getMaxNumberOfElements();

    SDFBVBlockFixed* getFixedPart();

    SDFBVBlockVariable* getElement(word nelement);

};

}
#endif                           /* SDFBVBLOCK_H_INCLUDED_B71C5D6D */

include/SDFBVBlockFixed.h

deleted100644 → 0
+0 −60
Original line number Diff line number Diff line
/***************************************************************************
                          SDFBVBlockFixed.h  -  description
                             -------------------
    begin                : Thu Nov 29 2001
    copyright            : (C) 2001, 2013 by Andrea Bulgarelli
    email                : bulgarelli@iasfbo.inaf.it
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software for non commercial purpose              *
 *   and for public research institutes; you can redistribute it and/or    *
 *   modify it under the terms of the GNU General Public License.          *
 *   For commercial purpose see appropriate license terms                  *
 *                                                                         *
 ***************************************************************************/
 
#ifndef _SDFBVBLOCKFIXED_H
#define _SDFBVBLOCKFIXED_H

#include "PacketLibDefinition.h"
#include "PartOfPacket.h"

namespace PacketLib
{

///	\brief Class wich represent the part of block with the number of field fixed.
class SDFBVBlockFixed : public PartOfPacket
{
private:

    /// Represents the index of field which have the number of element in a
    /// source data field variable.
    word indexOfNElement;

    /// Number to sum for obtaining the numbers of real elements.
    unsigned addToNElement;

    /// Represents the max number of elements in a source data field variable.
    word maxNumberOfElement;

public:

    word getNumberOfRealElement() ;

    void setNumberOfRealElement(word value);

     void setIndexOfNElement(word index);

    /// Sets the number to sum for obtaining the numbers of real elements.
    void setAddToNElement(unsigned num);

    void setMaxNumberOfElement(word num);

    word getMaxNumberOfElement() const;

};

}
#endif                           /* SDFBVBLOCKFIXED_H_INCLUDED_C36FC736 */

include/SDFBVBlockVariable.h

deleted100644 → 0
+0 −35
Original line number Diff line number Diff line
/***************************************************************************
                          SDFBVBlockVariable.h  -  description
                             -------------------
    begin                : Thu Nov 29 2001
    copyright            : (C) 2001, 2013 by Andrea Bulgarelli
    email                : bulgarelli@iasfbo.inaf.it
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software for non commercial purpose              *
 *   and for public research institutes; you can redistribute it and/or    *
 *   modify it under the terms of the GNU General Public License.          *
 *   For commercial purpose see appropriate license terms                  *
 *                                                                         *
 ***************************************************************************/
 
#ifndef _SDFBVBLOCKVARIABLE_H
#define _SDFBVBLOCKVARIABLE_H

#include "PacketLibDefinition.h"
#include "PartOfPacket.h"

namespace PacketLib
{

///	\brief Class which represents the part of block repeated because the
/// number of fields are variable.
class SDFBVBlockVariable : public PartOfPacket
{

};

}
#endif                           /* SDFBVBLOCKVARIABLE_H_INCLUDED_8E35B8DF */

include/SDFBlockFixed.h

deleted100644 → 0
+0 −106
Original line number Diff line number Diff line
/***************************************************************************
                          SDFBlockFixed.h  -  description
                             -------------------
    begin                : Thu Nov 29 2001
    copyright            : (C) 2001, 2013 by Andrea Bulgarelli
    email                : bulgarelli@iasfbo.inaf.it
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software for non commercial purpose              *
 *   and for public research institutes; you can redistribute it and/or    *
 *   modify it under the terms of the GNU General Public License.          *
 *   For commercial purpose see appropriate license terms                  *
 *                                                                         *
 ***************************************************************************/
 
#ifndef _SDFBLOCKFIXED_H 
#define _SDFBLOCKFIXED_H

#include "PacketLibDefinition.h"
#include "SourceDataField.h"
#include "SDFBFBlock.h"
#include "ConfigurationFile.h"
#include "Field.h"
#include "ByteStream.h"
#include "PacketException.h"
#include "PacketExceptionFileFormat.h"

namespace PacketLib
{

///	\brief Represents a source data field structured with blocks but the number of
/// fields for each block are fixed. Layout 2 (see the Interface Control Document).
class SDFBlockFixed : public SourceDataField
{
public:
    virtual bool loadFields(InputText& fp) throw(PacketException*);

    SDFBlockFixed();

    virtual ~SDFBlockFixed();

    virtual Field* getFields(word index);

    virtual word getNumberOfFields();

    virtual bool setByteStream(ByteStreamPtr s);

    /// Prints the value of each field of this part of packet.
    virtual char** printValue(char* addString = "");

    /// Get the number of bytes of this part of packet.
    virtual dword getDimension();
	
	virtual dword getDimensionFixedPart() { return 0; };

    /// Get the number of bytes of a block.
    virtual dword getDimension(word block);

    virtual dword getMaxDimension();

    virtual dword getMaxDimension(word nblock);

     /// Prints the structure of this part of packet.
    virtual string* printStructure();

    virtual Field* getFields(word block, word index);

    virtual word getFieldValue(word index);

    virtual word getFieldValue(word block, word index);

    /// Get a block
    /// \param nblock The index of the block
    virtual SDFBFBlock * getBlock(word nblock);

    /// Sets the value of a field in the list of fields of this part of packet. Remember that
    /// if a predefined value is specified in the .stream, this method has not effect and the
    /// value contained in the .stream is used.
    /// \param index Represent the index in the list.
    /// \param value The value must be set.
    virtual void setFieldValue(word index, word value);

    /// Sets the value of a field in the list of fields of this part of packet. Remember that
    /// if a predefined value is specified in the .stream, this method has not effect and the
    /// value contained in the .stream is used.
    /// \param index Represent the index in the list.
    /// \param value The value must be set.
    virtual void setFieldValue(word block, word index, word value);

    virtual bool setOutputStream(ByteStreamPtr os, dword first);

    virtual ByteStreamPtr generateStream(bool bigendian);

    /// Returns the number of fields for each block.
    virtual word getNumberOfFields(word block);

private:
    SDFBFBlock *block;

    ByteStreamPtr tempBlock;
};

}
#endif                           /* SDFBLOCKFIXED_H_INCLUDED_B199A478 */
Loading