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

changes on comments

parent e7b49bd1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
	<key>IDESourceControlProjectFavoriteDictionaryKey</key>
	<false/>
	<key>IDESourceControlProjectIdentifier</key>
	<string>C0D7884D-D58B-4D06-B8C5-B1FECC0AA1D1</string>
	<string>E78724CD-2D6E-4FB5-8CA7-AC2C1C56AE1B</string>
	<key>IDESourceControlProjectName</key>
	<string>PacketLib</string>
	<key>IDESourceControlProjectOriginsDictionary</key>
+698 B (40.4 KiB)

File changed.

No diff preview for this file type.

+1 −2
Original line number Diff line number Diff line
@@ -42,8 +42,7 @@ public:

    /// This method read a telemetry packet
    /// \pre The setInput method must be invocated
    /// \param bDecode if true decode the method will decode the data fields.
    /// \return A pointer telemetry packet. Make attention: the object returned is one of the TM packet object of the array of this object. Don't delete it!
    /// \return A pointer of the packet. Make attention: the object returned is one of the TM packet object of the array of this object. Don't delete it!
    Packet* readPacket() throw(PacketExceptionIO*);


+13 −8
Original line number Diff line number Diff line
@@ -56,26 +56,27 @@ public:

    virtual bool createPacketType(char* fileName, bool prefix, word dimprefix) throw (PacketException*);
	
	/// Sets the ByteStream.
	/// Decode the packet
    /// \param stream A pointer to the stream of byte, with prefix and packet
	/// \param checkPacketLenght if true check the packet lenght and set the packet stream, if false do not check the packet lenght
    virtual bool decode(ByteStreamPtr stream, bool checkPacketLenght = false);
	
	/// Sets the ByteStream.
	/// Decode the packet
    /// \param prefix A pointer to the stream of byte, with the prefix
	/// \param packet A pointer to the stream of byte, with the packet
	/// \param checkPacketLenght if true check the packet lenght and set the packet stream, if false do not check the packet lenght
    virtual bool decode(ByteStreamPtr prefix, ByteStreamPtr packet, bool checkPacketLenght = false);
	
	/// Sets the ByteStream.
	/// Decode the packet
    /// \param prefix A pointer to the stream of byte, with the prefix
	/// \param packetHeader A pointer to the stream of byte, with the packet header
	/// \param packetHeader A pointer to the stream of byte, with the packet data field
	/// \param checkPacketLenght if true check the packet lenght and set the packet stream, if false do not check the packet lenght
    virtual bool decode(ByteStreamPtr prefix, ByteStreamPtr packetHeader, ByteStreamPtr packetDataField, bool checkPacketLenght = false);
	
	/// Verify the content of the packet (after the decode)
	///\return true is the packet contained into the stream is recognized using identifiers.
	///\pre the ByteStream is set with one of set(ByteStream) methods
	///\pre the ByteStream is set with one of decode(ByteStream) methods
	virtual bool verify();
	
	///\return compress the data section and change the packet (the variable part of the "source data field")
@@ -85,10 +86,13 @@ public:
	///\return decompress the data section without changing the packet  (the variable part of the "source data field")
	virtual ByteStreamPtr decompressData();
	
	///Get the compression algorithm used for this packet
	virtual enum CompressionAlgorithms getCompressionAlgorithm();
	
	///Get the compression level used for this packet
	virtual word getCompressionLevel();
	
	///\return true if the packet is compressed
	bool isCompressed() {
		if(compressible && getCompressionAlgorithm() != NONE)
			return true;
@@ -96,6 +100,7 @@ public:
			return false;
	}
	
	///\return true is the packet is compressible, i.e. there are the useful fields that can store the information of the compression
	bool isCompressible() {
		return compressible;
	}
@@ -127,16 +132,16 @@ public:
	///Get the tail as a ByteStream
	ByteStreamPtr getBSTail();
	
	///
	///Get the header
	PacketHeader* getPacketHeader();
	
	///
	///Get the data field header
	DataFieldHeader* getPacketDataFieldHeader();
	
	///
	///Get the source data field
	SourceDataField* getPacketSourceDataField();
	
	///
	///Get the tail
	PartOfPacket* getPacketTail();
	
	/// Gets the dimension in byte of the current packet (header + datafield (data field header + sdf + tail)
+8 −7
Original line number Diff line number Diff line
@@ -37,27 +37,28 @@ public:

    ~PacketStream();
	
	/// get a Packet* from a ByteStream
	/// \pre the prefix has been removed
	/// \param packet the stream that contains the source packet without the prefix
	/// \param decodeType (0) do not decode anything (1) decode only sections (prefix, header, data field header, source data field fixed part, source data field variable part) (2) decode blocks (all sections + all blocks of the ‘source data field variable part’)
	/// Get a Packet* from a ByteStream
	/// \param stream the stream that contains the source packet with the prefix
    Packet* getPacket(ByteStreamPtr stream) throw(PacketException*);
	
	/// Decode a packet and return its pointer
	/// \return The index of packet type if it's recognized. 0 if packet isn't recognized.
    /// \param prefix A ByteStream that contains the prefix of packet (if present).
    /// \param packetHeader A ByteStream that contains the packet header.
    /// \param packetDataField A ByteStream that contains the packet data field.
    int detPacketType(ByteStreamPtr prefix, ByteStreamPtr packetHeader, ByteStreamPtr packetDataField);
	
	/// Decode a packet and return its pointer
    /// \return The index of packet type if it's recognized. 0 if packet isn't recognized.
    /// \param prefix A ByteStream that contains the prefix of packet (if present).
    /// \param packet A ByteStream that contains the packet.
    int detPacketType(ByteStreamPtr prefix, ByteStreamPtr packet);
	
	/// Decode a packet and return its pointer
    /// It returns the index of the packet type contained in the stream. The stream* contains also the prefix (if present)
    /// \return The index of packet type if it's recognized. 0 if packet isn't recognized.
    /// \param packet A ByteStream pointer that contains the packet.
    int detPacketType(ByteStreamPtr packet);
    /// \param stream A ByteStream pointer that contains the packet + prefix.
    int detPacketType(ByteStreamPtr stream);
	
	///It returns the total dimension of the packet contained in the stream (without prefix). The stream* contains also the prefix (if present)
	///\param The stream with the prefix (if present)
Loading