Commit 1ebfaf5d authored by Andrea Zoli's avatar Andrea Zoli
Browse files

Extends API with SDFRBBlock hasFixedPart(), hasVariablePart(),

getNumberOfTypes and SDFRBlock::getBBlock().

This commit allows the application
to easily traverse the layout 4 format.
parent fae9d7c6
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -196,6 +196,22 @@ public:
    /// Prints the structure of this part of packet
    virtual string* printStructure();

    virtual bool hasFixedPart()
    {
        return type->fixedPresent;
    }

    virtual bool hasVariablePart()
    {
        return type->variablePresent;
    }

	/// Return 'the number of rblock types' defined for this rblock. The value is loaded from the config files.
    virtual word getNumberOfTypes()
	{
		return type->numberOfRBlocks;
	}

    PartOfPacket fixed;

protected:
+6 −0
Original line number Diff line number Diff line
@@ -95,6 +95,12 @@ public:
    /// Prints the structure of this part of packet
    virtual string* printStructure();

    /// return the related RBBlock structure.
    SDFRBBlock* getBBlock()
    {
        return block;
    }

protected:

    SDFRBBlock* block;