#include <l1394_quadlet.h>
Computing operator | |
These functions implements some computing operators for Quadlets. | |
Quadlet & | operator= (const Quadlet &) |
operator= assigns the data q to this quadlet and returns a reference to it. | |
bool | operator== (const Quadlet &) |
operator== compares two Quadlets and returns true if they are equal, false if not | |
bool | operator!= (const Quadlet &) |
operator!= compares Quadlet q with this Quadlet | |
const Quadlet | operator+ (const Quadlet &, const Quadlet &) |
operator+ adds the value of Quadlet q_1 and q_2 and returns the reference to it. | |
const Quadlet | operator+ (const u_int32_t &, const Quadlet &) |
operator+ adds the value of Quadlet q to this Quadlet and returns the reference to it. | |
const Quadlet | operator- (const u_int32_t &data, const Quadlet &) |
operator+ adds the value of Quadlet q to this Quadlet and returns the reference to it. | |
const Quadlet | operator- (const Quadlet &q, const Quadlet &) |
operator- subtract the value of data from this Quadlet and returns the reference to it. | |
Public Member Functions | |
Constructors | |
These are the different constructors to create a Quadlet. | |
Quadlet () | |
Constructs an empty quadlet. | |
Quadlet (const char *) | |
Constructs an quadlet from a char array. | |
Quadlet (const u_int32_t) | |
Constructs an quadlet from an int. | |
Quadlet (const string &) | |
Constructs an quadlet from a string. | |
Quadlet (const Quadlet &) | |
Constructs a copy of ref. | |
~Quadlet () | |
Destructs the object. | |
Manipulate the Quadlet | |
These functions manipulate the value of a certain range of the Quadlet. | |
u_int32_t | getByte (const int) const |
This method returns the i'th byte of the quadlet. (value between 0..3). | |
void | setByte (const int i, const u_int32_t value) |
This method sets the i'th byte (0..3) to value. | |
u_int32_t | getBitRange (const int start, const int end) const |
This method returns the bit range from start to end as integer. | |
void | setBitRange (const int start, const int end, const u_int32_t value) |
This method sets the bitrange from start to end to a value. | |
int | getBit (const int) const |
This method returns the i'th bit (value between 0..31). | |
void | setBit (const int i, const int value) |
Sets the i'th bit to value. | |
Convert a Quadlet | |
These functions convert a Quadlet to another basic type. | |
u_int32_t | toInt () const |
This method converts a quadlet to a 32 bit integer value. | |
void | fromInt (u_int32_t value) |
This method converts a 32 bit integer to a quadlet. | |
string | toString () const |
This method converts a Quadlet to a string. | |
char * | toCharArray (char *, int) const |
converts a Quadlet to a char* | |
Friends | |
ostream & | operator<< (ostream &, const Quadlet &) |
operator<< writes the Quadlet to a stream and returns a reference to it. | |
istream & | operator>> (istream &, Quadlet &) |
operator>> reads 4 bytes from a stream, stores the value in the Quadlet and returns a reference to the stream |
A Quadlet is one of the base data-types of this library and represents the atomic unit of information that can be read or write to a FireWire node. The Quadlet stores 4 byte and is realized as an char array.
This class provides also a lot of functions to manipulate the bits and bytes.
The location 31 is msb, location 0 is lsb.
Definition at line 44 of file l1394_quadlet.h.
|
Constructs an empty quadlet.
Definition at line 17 of file l1394_quadlet.cpp. |
|
Constructs an quadlet from a char array.
Definition at line 22 of file l1394_quadlet.cpp. |
|
Constructs an quadlet from an int.
Definition at line 27 of file l1394_quadlet.cpp. |
|
Constructs an quadlet from a string.
Definition at line 34 of file l1394_quadlet.cpp. |
|
Constructs a copy of ref.
Definition at line 39 of file l1394_quadlet.cpp. References quadlet. |
|
Destructs the object.
Definition at line 87 of file l1394_quadlet.h. |
|
This method converts a 32 bit integer to a quadlet.
Definition at line 236 of file l1394_quadlet.cpp. Referenced by L1394::DccRegister::DccRegister(), L1394::DccCamera::init(), L1394::internal::Transaction::lock(), L1394::QArray::operator=(), L1394::internal::Transaction::read(), setBitRange(), and L1394::DccCamera::setVideoMode(). |
|
This method returns the i'th bit (value between 0..31).
Definition at line 190 of file l1394_quadlet.cpp. Referenced by L1394::DccRegister::automatic(), L1394::internal::BusInfo::getBmc(), L1394::internal::BusInfo::getCmc(), L1394::internal::BusInfo::getIrmc(), L1394::internal::BusInfo::getIsc(), L1394::internal::TopoNode::getLinkActive(), L1394::DccRegister::hasAuto(), L1394::DccRegister::hasFeature(), L1394::DccCamera::hasFramerate(), L1394::DccRegister::hasManual(), L1394::DccRegister::hasOnePush(), L1394::DccRegister::hasOnOff(), L1394::DccRegister::hasReadout(), L1394::DccCamera::hasVideoFormat(), L1394::DccRegister::on(), L1394::DccRegister::onePush(), L1394::Card::releaseIsoChannel(), L1394::Card::requestIsoChannel(), L1394::DccCamera::setParameter(), L1394::DccRegister::setTriggerPolarity(), and L1394::DccCamera::shot(). |
|
This method returns the bit range from start to end as integer.
Definition at line 117 of file l1394_quadlet.cpp. References toInt(). Referenced by L1394::internal::BusInfo::getChipIdHi(), L1394::internal::BusInfo::getCykClk(), L1394::internal::TopoNode::getGapCount(), L1394::internal::BusInfo::getMaxRec(), L1394::DccRegister::getMaxValue(), L1394::DccRegister::getMinValue(), L1394::internal::BusInfo::getNodeVendorId(), L1394::internal::TopoNode::getPhyDelay(), L1394::internal::TopoNode::getPhyId(), L1394::internal::TopoNode::getPhySpeed(), L1394::internal::TopoNode::getPwrClass(), L1394::DccRegister::getValue(), L1394::Card::readTopoMap(), L1394::internal::BusTopology::readTopoMap(), L1394::DccRegister::setTriggerMode(), and L1394::DccRegister::setValue(). |
|
This method returns the i'th byte of the quadlet. (value between 0..3).
Definition at line 89 of file l1394_quadlet.cpp. Referenced by L1394::FcpNode::decode(), L1394::AvcVcr::getTimeCode(), L1394::AvcCameraRegister::getValue(), L1394::AvcRegister::hasFeature(), L1394::AvcCameraRegister::hasFeature(), L1394::AvcCameraRegister::onePush(), L1394::AvcRegister::send(), and L1394::QArray::toCharArray(). |
|
operator!= compares Quadlet q with this Quadlet
Definition at line 81 of file l1394_quadlet.cpp. |
|
operator= assigns the data q to this quadlet and returns a reference to it.
Definition at line 66 of file l1394_quadlet.cpp. References quadlet. |
|
operator== compares two Quadlets and returns true if they are equal, false if not Two Quadlets are equal, if all 4 bytes are equal.
Definition at line 76 of file l1394_quadlet.cpp. |
|
Sets the i'th bit to value.
Definition at line 204 of file l1394_quadlet.cpp. Referenced by L1394::DccRegister::automatic(), L1394::DccCamera::init(), L1394::DccCamera::multiShot(), L1394::DccRegister::on(), L1394::DccRegister::onePush(), L1394::Card::releaseIsoChannel(), L1394::Card::requestIsoChannel(), L1394::DccRegister::setTriggerPolarity(), L1394::DccCamera::shot(), L1394::DccCamera::start(), and L1394::DccCamera::stop(). |
|
This method sets the bitrange from start to end to a value. The bitrange must big enough to store the value.
Definition at line 147 of file l1394_quadlet.cpp. References fromInt(), and toInt(). Referenced by L1394::DccCamera::init(), L1394::DccCamera::multiShot(), L1394::DccCamera::setFramerate(), L1394::DccRegister::setTriggerMode(), L1394::DccRegister::setValue(), and L1394::DccCamera::setVideoMode(). |
|
This method sets the i'th byte (0..3) to value.
Definition at line 100 of file l1394_quadlet.cpp. References L1394::Singleton< T, CreationPolicy, LifetimePolicy, ThreadingModel >::getInstance(). Referenced by L1394::QArray::setByte(). |
|
converts a Quadlet to a char*
Definition at line 256 of file l1394_quadlet.cpp. Referenced by toString(). |
|
This method converts a quadlet to a 32 bit integer value.
Definition at line 225 of file l1394_quadlet.cpp. Referenced by getBitRange(), L1394::internal::BusInfo::getChipIdLow(), L1394::internal::Transaction::lock(), L1394::operator+(), L1394::operator-(), L1394::Card::readAGuid(), setBitRange(), L1394::QArray::toIntArray(), and L1394::internal::Transaction::write(). |
|
This method converts a Quadlet to a string.
Definition at line 245 of file l1394_quadlet.cpp. References toCharArray(). Referenced by L1394::operator<<(). |
|
operator+ adds the value of Quadlet q to this Quadlet and returns the reference to it.
|
|
operator+ adds the value of Quadlet q_1 and q_2 and returns the reference to it. The new value of q1+q2 must be less then 0xffffffff or the value is set to 0xffffffff. Definition at line 45 of file l1394_quadlet.cpp. |
|
operator- subtract the value of data from this Quadlet and returns the reference to it.
Definition at line 55 of file l1394_quadlet.cpp. |
|
operator+ adds the value of Quadlet q to this Quadlet and returns the reference to it.
|
|
operator<< writes the Quadlet to a stream and returns a reference to it.
Definition at line 268 of file l1394_quadlet.cpp. |
|
operator>> reads 4 bytes from a stream, stores the value in the Quadlet and returns a reference to the stream
Definition at line 275 of file l1394_quadlet.cpp. |