#include <l1394_qarray.h>
Public Member Functions | |
Constructors | |
These are the different constructors to create a QArray. | |
QArray (int size) | |
Create a Qarray with a certain size. | |
QArray (const QArray &qarray) | |
Copy constructor. | |
~QArray () | |
Destructor. | |
Manipulate a QArray | |
These functions manipulate the values stored in a QArray. | |
void | append (const QArray &qarray) |
This method appends an QArray to the end of a QArray. | |
void | insert (const Quadlet value, const unsigned int position) |
This method inserts a quadlet at a specific position in the array and overwrites the old value. | |
void | insert (const u_int32_t value, const unsigned int position) |
This method inserts am u_int32_t value at a specific position in the array and overwrites the old value. | |
Quadlet | getQuadlet (const unsigned int i) const |
This method returns the i'th Quadlet in an array. | |
int | getByte (const unsigned int i) const |
This method returns the i'th byte of the array. | |
void | setByte (const unsigned int i, const unsigned int value) |
This method sets byte i of the QArray to a specific value. | |
Convert a QArray | |
These functions convert a QArray to another basic type. | |
void | toIntArray (u_int32_t *) const |
This method converts a QArray to an integer array (for compatibility use only). | |
void | toCharArray (u_char *) const |
This method converts the value of a QArray to an u_char array. | |
int | getSize () const |
This method returns the size of a QArray. | |
Some operators | |
QArray & | operator= (const QArray &) |
This method sets the value of this QArray to the value of qarray. | |
bool | operator== (const QArray &) |
This method compare two QArrays. | |
Friends | |
ostream & | operator<< (ostream &output, const QArray &array) |
This method prints the QArray to ostream. |
Like Quadlets, QArrays are one of the basic data types in this library to communicate with FireWire nodes. If you send more than 4 bytes to a FireWire node you should use an QArray.
The QArray stores also information about the size of the array. It provides most of the functionality like a Quadlet (without the compute operators).
This class also provides functions to convert a QArray to an integer array or a char array.
Definition at line 41 of file l1394_qarray.h.
|
Create a Qarray with a certain size.
Definition at line 21 of file l1394_qarray.cpp. |
|
Copy constructor.
Definition at line 37 of file l1394_qarray.cpp. References internal_size, qarray, and size. |
|
Destructor.
Definition at line 46 of file l1394_qarray.cpp. |
|
This method appends an QArray to the end of a QArray.
Definition at line 51 of file l1394_qarray.cpp. References getQuadlet(), and getSize(). |
|
This method returns the i'th byte of the array. The range of i depends on the size of your QArray and is between 0<= i < size*4. Byte 0 are the 8 most significant bits of the array
Definition at line 120 of file l1394_qarray.h. References getByte(). Referenced by getByte(), and L1394::AvcCameraRegister::setValue(). |
|
This method returns the i'th Quadlet in an array. Valid values are from 0 to length-1. If you try to get a Quadlet from position >= length, a Quadlet with value 0 is returned
Definition at line 110 of file l1394_qarray.h. Referenced by append(), L1394::internal::BusInfo::BusInfo(), L1394::FcpNode::decode(), L1394::Card::readAGuid(), and L1394::internal::Transaction::send(). |
|
This method returns the size of a QArray.
Definition at line 161 of file l1394_qarray.h. Referenced by append(), L1394::AvcCameraRegister::getValue(), L1394::Card::readAGuid(), L1394::internal::Transaction::send(), and L1394::AvcCameraRegister::setValue(). |
|
This method inserts am u_int32_t value at a specific position in the array and overwrites the old value. If you try to insert a value to an invalid position, the value will not be insert.
Definition at line 85 of file l1394_qarray.cpp. |
|
This method inserts a quadlet at a specific position in the array and overwrites the old value. If you try to insert a value to an invalid position, the value will not be set.
Definition at line 77 of file l1394_qarray.cpp. Referenced by L1394::FcpNode::getSubunitInfo(), L1394::FcpNode::getUnitInfo(), L1394::Card::readTopoMap(), L1394::internal::BusTopology::readTopoMap(), and L1394::AvcRegister::reset(). |
|
This method sets the value of this QArray to the value of qarray. If this QArray is bigger than qarray, the last Quadlets are unchanged. If this QArray is smaller, this QArray will be resized to the size of qarray. Definition at line 107 of file l1394_qarray.cpp. References L1394::Quadlet::fromInt(), internal_size, qarray, and size. |
|
This method compare two QArrays. Two QArrays with equal size are equal, if all their Quadlets are equal. Two QArrays with different size are equal, if all Quadlets of the smaller QArray are equal to the bigger one.
Definition at line 132 of file l1394_qarray.cpp. |
|
This method sets byte i of the QArray to a specific value. The range of i depends on the size of your QArray and is between 0<= i < size*4.
Definition at line 153 of file l1394_qarray.cpp. References L1394::Quadlet::setByte(). Referenced by L1394::AvcCameraRegister::automatic(), L1394::AvcRegister::defaultSet(), L1394::AvcCameraRegister::getValue(), L1394::AvcRegister::hasFeature(), L1394::AvcCameraRegister::hasFeature(), L1394::AvcCameraRegister::onePush(), L1394::AvcRegister::reset(), L1394::AvcRegister::setCtype(), L1394::AvcRegister::setOpcode(), L1394::AvcRegister::setSubfunction(), L1394::AvcCameraRegister::setValue(), and L1394::AvcRegister::status(). |
|
This method converts the value of a QArray to an u_char array. The size of the u_char array is size of the QArray * 4. Note, that the programmer are responsible to delete this array.
Definition at line 147 of file l1394_qarray.cpp. References L1394::Quadlet::getByte(). |
|
This method converts a QArray to an integer array (for compatibility use only). The integer array has the same size like the QArray. The programmer is responsible to delete this array.
Definition at line 101 of file l1394_qarray.cpp. References L1394::Quadlet::toInt(). Referenced by L1394::internal::Transaction::send(). |
|
This method prints the QArray to ostream.
|