Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

L1394::internal::Transaction Class Reference

This class is a wrapper class for the libraw1394 library. More...

#include <l1394_transaction.h>

List of all members.

Public Member Functions

Transaction constructor
These functions creates a Transaction object.

 Transaction (raw1394handle_t)
 Constructor.
 ~Transaction ()
 Destructor.
Transactions
These methods are wrapper for the libraw functions.

int read (const u_int64_t address, Quadlet *q, const u_int32_t node_id) const
 This method reads 4 bytes from CsrRom of a specific node and return the value.
int write (const u_int64_t address, const Quadlet &data, const u_int32_t node_id) const
 This method writes 4 bytes to CsrRom of a specific node.
int lock (const u_int64_t address, const Quadlet &data, const unsigned int extcode, const Quadlet &argument, Quadlet *result, const u_int32_t node_id) const
 This method realizes an atomic transaction on the FireWire bus.
Quadlet send (const Quadlet &command, const u_int32_t node_id) const
 This method sends a Quadlet (4 bytes) to the node with current node_ide.
QArray send (const QArray &command, const u_int32_t node_id) const
 This method sends an QArray to a node.

Static Public Member Functions

static void setSafeMode (bool b, int d)
 This method enables/disables the safe mode for asynchrone transactions.
static void delay (int i)
 delay for msecs i


Detailed Description

This class is a wrapper class for the libraw1394 library.

It provides methods for the FireWire specific transactions (read, write and lock) and AV/C specific transactions (send).

Author:
Michael Repplinger

Definition at line 46 of file l1394_transaction.h.


Constructor & Destructor Documentation

L1394::internal::Transaction::Transaction raw1394handle_t   ) 
 

Constructor.

Definition at line 27 of file l1394_transaction.cpp.

L1394::internal::Transaction::~Transaction  ) 
 

Destructor.

Definition at line 32 of file l1394_transaction.cpp.


Member Function Documentation

void L1394::internal::Transaction::delay int  i  )  [static]
 

delay for msecs i

Definition at line 270 of file l1394_transaction.cpp.

Referenced by lock(), read(), L1394::DccCamera::shot(), and write().

L1394::internal::Transaction::lock const u_int64_t  address,
const Quadlet data,
const unsigned int  extcode,
const Quadlet argument,
Quadlet result,
const u_int32_t  node_id
const
 

This method realizes an atomic transaction on the FireWire bus.

An atomic transaction means, that no node can access the address during the lock operation.

Parameters:
address : u_int64_t value for the CSR-address
data : The data Quadlet defines the value that should be executed on the address
extcode : The extension code defines the type of lock operation.
argument : The argument value is compared with the actual address value and depending on the extension code a operation with the data value is executed.
result : If a value is returned, it is stored in result
node_id : current node-id of the node
Returns:
int: L1394_FAILED, if the transaction fails, else L1394_SUCCESS.

Definition at line 122 of file l1394_transaction.cpp.

References delay(), L1394::Quadlet::fromInt(), L1394::Singleton< T, CreationPolicy, LifetimePolicy, ThreadingModel >::getInstance(), L1394_FAILED, L1394_SUCCESS, and L1394::Quadlet::toInt().

L1394::internal::Transaction::read const u_int64_t  address,
Quadlet quadlet,
const u_int32_t  node_id
const
 

This method reads 4 bytes from CsrRom of a specific node and return the value.

Parameters:
address : u_int64_t integer value for the address of CSR
node_number : send to node with node_number
quadlet : pointer to the Quadlet to store the value.
Returns:
Quadlet : value stored in this address

Definition at line 36 of file l1394_transaction.cpp.

References delay(), L1394::Quadlet::fromInt(), L1394::Singleton< T, CreationPolicy, LifetimePolicy, ThreadingModel >::getInstance(), L1394_FAILED, and L1394_SUCCESS.

Referenced by L1394::Card::readAGuid(), and L1394::Card::readTopoMap().

L1394::internal::Transaction::send const QArray command,
const u_int32_t  node_id
const
 

This method sends an QArray to a node.

Parameters:
QArray with the extended command
node_id : current node_id of the node
Returns:
QArray with the response code.

Definition at line 202 of file l1394_transaction.cpp.

References FCP_COMMAND_ADDR, L1394::Singleton< T, CreationPolicy, LifetimePolicy, ThreadingModel >::getInstance(), L1394::QArray::getQuadlet(), L1394::QArray::getSize(), and L1394::QArray::toIntArray().

L1394::internal::Transaction::send const Quadlet command,
const u_int32_t  node_id
const
 

This method sends a Quadlet (4 bytes) to the node with current node_ide.

Parameters:
command : The Quadlet to send.
node_id : current node_id of the node
Returns:
Quadlet : The Quadlet with response code.

Definition at line 164 of file l1394_transaction.cpp.

References FCP_COMMAND_ADDR, L1394::Singleton< T, CreationPolicy, LifetimePolicy, ThreadingModel >::getInstance(), and L1394::QArray::getQuadlet().

L1394::internal::Transaction::setSafeMode bool  b,
int  delay
[inline, static]
 

This method enables/disables the safe mode for asynchrone transactions.

If you enable the safemode a delay between every transaction is enabled.

Definition at line 127 of file l1394_transaction.h.

Referenced by L1394::Session::safeMode().

L1394::internal::Transaction::write const u_int64_t  address,
const Quadlet data,
const u_int32_t  node_id
const
 

This method writes 4 bytes to CsrRom of a specific node.

Parameters:
address : u_int64_t value for the CSR-address
data : Quadlet with the data that should be written to CSR-address
node_number : write to node with this actual node_number

Definition at line 82 of file l1394_transaction.cpp.

References delay(), L1394::Singleton< T, CreationPolicy, LifetimePolicy, ThreadingModel >::getInstance(), L1394_FAILED, L1394_SUCCESS, and L1394::Quadlet::toInt().


The documentation for this class was generated from the following files:
Generated on Wed Aug 24 00:36:46 2005 for L1394 by doxygen 1.4.2
L1394 library (NMM) grahics.cs.uni-sb.de/~repplix/l1394_home/