Bitstream Interpretation Library (BIL)  0.1
Public Member Functions
bil::Type2Packet Class Reference

Type 2 data packet. More...

#include <bitstream/Type2Packet.hpp>

Inheritance diagram for bil::Type2Packet:
Inheritance graph
[legend]
Collaboration diagram for bil::Type2Packet:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Type2Packet ()
 Default constructor.
virtual Type2Packetclone () const
 Virtual constructor for doing polymorphic copies.
virtual void accept (PacketVisitor &visitor) const
 Accepts a visitor for dynamic type dependent stuff.
void opcode (PacketOpcode::opcode_t opcode)
 Sets packet opcode.
PacketOpcode::opcode_t opcode () const
 Gets packet opcode.
void wordCount (size_t count)
 Sets word count.
size_t wordCount () const
 Gets word count.
boost::uint32_t * dataWords ()
 Gets a pointer to payload data.
const boost::uint32_t * dataWords () const
 Gets a pointer to read only payload data.
virtual void clear ()
 Sets opcode to NO_OP, wordCount to 0, and clears data.
- Public Member Functions inherited from bil::Packet
virtual ~Packet ()
 Destructs a Packet instance.

Detailed Description

Type 2 data packet.

Type 2 packets carry data and an opcode telling configuration logic what to do (read, write, or no op). The read mode requests data from the configuration logic (this data will be outputted to the configuration interface). The write mode writes the packet data to configuration logic (this will trigger some further actions like configuration logic state changes and/or writes to configuration memory). The no op mode simply does nothing.

Definition at line 30 of file Type2Packet.hpp.


Constructor & Destructor Documentation

Type2Packet::Type2Packet ( )

Default constructor.

Definition at line 13 of file Type2Packet.cpp.


Member Function Documentation

Type2Packet * Type2Packet::clone ( ) const
virtual

Virtual constructor for doing polymorphic copies.

Returns:
Pointer to the copied instance.

Implements bil::Packet.

Reimplemented in bil::Type1Packet.

Definition at line 22 of file Type2Packet.cpp.

void Type2Packet::accept ( PacketVisitor visitor) const
virtual

Accepts a visitor for dynamic type dependent stuff.

Parameters:
visitorVisitor, which matching method will be called.

Implements bil::Packet.

Reimplemented in bil::Type1Packet.

Definition at line 28 of file Type2Packet.cpp.

void Type2Packet::opcode ( PacketOpcode::opcode_t  opcode)

Sets packet opcode.

Parameters:
opcodeNew opcode.
Exceptions:
.

Definition at line 34 of file Type2Packet.cpp.

PacketOpcode::opcode_t Type2Packet::opcode ( ) const

Gets packet opcode.

Returns:
The current opcode.

Definition at line 63 of file Type2Packet.cpp.

void Type2Packet::wordCount ( size_t  count)

Sets word count.

In read mode this sets how many words should be read from configuration logic, in write mode how many words should be written to configuration logic. In NO_OP mode the only valid word count is zero.

Parameters:
countNew word count.
Exceptions:
.

Definition at line 69 of file Type2Packet.cpp.

size_t Type2Packet::wordCount ( ) const

Gets word count.

Returns:
The current word count.

Definition at line 84 of file Type2Packet.cpp.

boost::uint32_t * Type2Packet::dataWords ( )

Gets a pointer to payload data.

If packet is not in write mode, this will return 0.

Returns:
The pointer.

Definition at line 90 of file Type2Packet.cpp.

const boost::uint32_t * Type2Packet::dataWords ( ) const

Gets a pointer to read only payload data.

If packet is not in write mode, this will return 0.

Returns:
The pointer.

Definition at line 98 of file Type2Packet.cpp.

void Type2Packet::clear ( )
virtual

Sets opcode to NO_OP, wordCount to 0, and clears data.

Reimplemented in bil::Type1Packet.

Definition at line 106 of file Type2Packet.cpp.


The documentation for this class was generated from the following files: