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

added word SDFBlock::getMaxNumberOfBlocks(word rblockIndex = 0)

parent 01ffa83e
Branches
Tags
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<key>IDESourceControlProjectFavoriteDictionaryKey</key> <key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/> <false/>
<key>IDESourceControlProjectIdentifier</key> <key>IDESourceControlProjectIdentifier</key>
<string>E78724CD-2D6E-4FB5-8CA7-AC2C1C56AE1B</string> <string>AD920CA7-23AA-4A38-B382-B72E4C2959FA</string>
<key>IDESourceControlProjectName</key> <key>IDESourceControlProjectName</key>
<string>PacketLib</string> <string>PacketLib</string>
<key>IDESourceControlProjectOriginsDictionary</key> <key>IDESourceControlProjectOriginsDictionary</key>
......
...@@ -409,6 +409,15 @@ public: ...@@ -409,6 +409,15 @@ public:
return type->numberOfRBlocks; return type->numberOfRBlocks;
} }
/// Returns the number of blocks for each rblock (for each data type) (if numberOfBlockFixed is true) or max number of blocks (if numberOfBlockFixed is false) in the structure of source data field.
/// This value is read from .packet configuration file.
/// This variable not represent the effective number of
/// block into the stream of data.
virtual word getMaxNumberOfBlocks(word rblockIndex = 0)
{
return type->maxNumberOfBlock[rblockIndex];
}
PartOfPacket fixed; PartOfPacket fixed;
protected: protected:
......
...@@ -35,16 +35,15 @@ public: ...@@ -35,16 +35,15 @@ public:
virtual bool loadFields(InputText& fp) throw(PacketException*); virtual bool loadFields(InputText& fp) throw(PacketException*);
/// Get a block of number nblock of the group of blocks of the rblock /// Get a block of number nblock of the group of blocks of the rblock with the index rBlockIndex.
/// with the index rBlockIndex.
/// \param nblock the number of the block /// \param nblock the number of the block
/// \param rBlockIndex the number of the rblock /// \param rBlockIndex the number of the rblock
virtual SDFBlock* getBlock(word nblock, word rBlockIndex=0); virtual SDFBlock* getBlock(word nblock, word rBlockIndex=0);
///Get the fixed part of the source data field ///Get the fixed part of the source data field.
virtual ByteStreamPtr getFixedPart() { return block[0].fixed.getByteStream(); }; virtual ByteStreamPtr getFixedPart() { return block[0].fixed.getByteStream(); };
///Get the variable part of the source data field ///Get the variable part of the source data field.
//virtual ByteStreamPtr getVariablePart(); //virtual ByteStreamPtr getVariablePart();
/// Returns a pointer of a field in the fixed part of this source data field. /// Returns a pointer of a field in the fixed part of this source data field.
...@@ -58,27 +57,27 @@ public: ...@@ -58,27 +57,27 @@ public:
/// \param index Represent the index in the list. /// \param index Represent the index in the list.
virtual word getFieldValue(word index); virtual word getFieldValue(word index);
/// See PartOfPacket for documentation /// See PartOfPacket for documentation.
/// \param index Represent the index in the list. /// \param index Represent the index in the list.
virtual signed short getFieldValue_16i(word index); virtual signed short getFieldValue_16i(word index);
/// See PartOfPacket for documentation /// See PartOfPacket for documentation.
/// \param index Represent the index in the list. /// \param index Represent the index in the list.
virtual word getFieldValue_16ui(word index); virtual word getFieldValue_16ui(word index);
/// See PartOfPacket for documentation /// See PartOfPacket for documentation.
/// \param index Represent the index in the list. /// \param index Represent the index in the list.
virtual signed long getFieldValue_32i(word index); virtual signed long getFieldValue_32i(word index);
/// See PartOfPacket for documentation /// See PartOfPacket for documentation.
/// \param index Represent the index in the list. /// \param index Represent the index in the list.
unsigned long getFieldValue_32ui(word index); unsigned long getFieldValue_32ui(word index);
/// See PartOfPacket for documentation /// See PartOfPacket for documentation.
/// \param index Represent the index in the list. /// \param index Represent the index in the list.
virtual float getFieldValue_32f(word index); virtual float getFieldValue_32f(word index);
/// See PartOfPacket for documentation /// See PartOfPacket for documentation.
/// \param index Represent the index in the list. /// \param index Represent the index in the list.
virtual double getFieldValue_64f(word index); virtual double getFieldValue_64f(word index);
...@@ -164,7 +163,8 @@ public: ...@@ -164,7 +163,8 @@ public:
/// \param fieldname Represent the name of the field. /// \param fieldname Represent the name of the field.
virtual double getFieldValue_64f(string fieldname); virtual double getFieldValue_64f(string fieldname);
/// Sets the value of a field in the list of fields of this part of packet. Remember that /// 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 /// if a predefined value is specified in the .stream, this method has not effect and the
/// value contained in the .stream is used. /// value contained in the .stream is used.
/// \param fieldname Represent the name of the field. /// \param fieldname Represent the name of the field.
...@@ -195,16 +195,14 @@ public: ...@@ -195,16 +195,14 @@ public:
/// \param value The 32 bit unsigned integer value. /// \param value The 32 bit unsigned integer value.
virtual void setFieldValue_32ui(string fieldname, unsigned long value); virtual void setFieldValue_32ui(string fieldname, unsigned long value);
/// Set the value of a field. The value is interpreted as a real single /// Set the value of a field. The value is interpreted as a real single precision (IEEE 754).
/// precision (IEEE 754).
/// This corresponds with the PTC=5, PFC = 1. /// This corresponds with the PTC=5, PFC = 1.
/// See setFieldValue(word index, word value) for general considerations. /// See setFieldValue(word index, word value) for general considerations.
/// \param fieldname Represent the name of the field. /// \param fieldname Represent the name of the field.
/// \param value The real single precision value /// \param value The real single precision value
virtual void setFieldValue_32f(string fieldname, float value); virtual void setFieldValue_32f(string fieldname, float value);
/// Set the value of a field. The value is interpreted as a real double /// Set the value of a field. The value is interpreted as a real double precision (IEEE 754).
/// precision (IEEE 754).
/// This corresponds with the PTC=5, PFC = 2. /// This corresponds with the PTC=5, PFC = 2.
/// See setFieldValue(word index, word value) for general considerations. /// See setFieldValue(word index, word value) for general considerations.
/// \param fieldname Represent the name of the field. /// \param fieldname Represent the name of the field.
...@@ -215,10 +213,13 @@ public: ...@@ -215,10 +213,13 @@ public:
/// Returns the number of fields. /// Returns the number of fields.
virtual word getNumberOfFields(); virtual word getNumberOfFields();
/// The max dimension of the SDF in bytes (dependes by the logical model described in the configuration files).
virtual dword sizeMax(); virtual dword sizeMax();
/// Dimension of the SDF in bytes.
virtual dword size(); virtual dword size();
/// Dimension of the SDF fixed part in bytes.
virtual dword sizeFixedPart(); virtual dword sizeFixedPart();
using PartOfPacket::setByteStream; using PartOfPacket::setByteStream;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment