Commit aeb469d7 authored by Andrea Bulgarelli's avatar Andrea Bulgarelli
Browse files

starting works for packet compression

parent 42b981ae
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -116,6 +116,8 @@ public:
	///
	PartOfPacket* getPacketTail();
	
	void compress();


    /// Prints to stdout the value of packet data field in a formatted mode.
    virtual void printPacketValue();
+0 −5
Original line number Diff line number Diff line
@@ -162,7 +162,6 @@ public:
    /// \param fieldname Represent the name of the field.
    virtual double getFieldValue_64f(string fieldname);
	
	///Documentation
    /// 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.
@@ -181,7 +180,6 @@ public:
	virtual void setFieldValue_16ui(string fieldname, word value);
	
    /// Sets the value of a field. The value is interpreted as a 32 bit signed integer.
    ///	---------------------------------
    /// This corresponds with the PTC=4, PFC = 14.
    /// See setFieldValue(word index, word value) for general considerations.
    /// \param fieldname Represent the name of the field.
@@ -273,12 +271,9 @@ protected:

    SDFBlock* block;


    
    /// The number of rblock
    int numberOfRBlocks;

    
    /// for variable block, number of level of headers in which is present the field
    /// with the number of blocks of the variable part
    word* headerLevelOfNBlockIndex;
+4 −0
Original line number Diff line number Diff line
@@ -829,6 +829,10 @@ void Packet::copyBSSourceDataField(byte* bytestream, dword size) {
	memcpy(sdfbsp, bytestream, size*sizeof(byte));
}

void Packet::compress() {
		ByteStreamPtr sdfbs = getBSSourceDataField();
}

ByteStreamPtr Packet::getBSTail() {
	//dword dimvariablepart = packet->size() - dimPrefix - dimPacketStartingFixedPart - dimPacketTail;
	ByteStreamPtr tail = ByteStreamPtr(new ByteStream(packet->stream + packet->size() - dimPacketTail, dimPacketTail, bigendian));