#include <l1394_card.h>
Inheritance diagram for L1394::Card:
Public Member Functions | |
virtual void | makeNodeList (raw1394handle_t) |
This method creates the internal node list. | |
int | requestIsoChannel () const |
int | requestIsoChannel (const u_int32_t) const |
void | releaseIsoChannel (const u_int32_t) const |
Camera constructor | |
These functions creates the Card objects. | |
Card (const u_int32_t card_id, const u_int32_t node_id, raw1394handle_t default_handle) | |
constructor | |
virtual | ~Card () |
destroy an 1394 Card object | |
Access the connected nodes | |
These functions access the connected nodes on a FireWire card. All functions search only on this card. | |
Node * | getNode (const u_int64_t guid) const |
This method searches a Node with a certain guid. | |
list< Node * > | getAllNodes (const int node_type) const |
This method searches all nodes with a certain type and returns a STL-list. | |
Node * | findNode (const int node_type) const |
This method searches the first node with a certain node type. | |
Node ** | getNodeArray () const |
This method returns the array of all nodes on the card. | |
Node * | getExplicitNode (const int i) const |
This method returns the i'th node on the card. | |
bool | nodeExist (const u_int64_t guid) const |
This method tests if a node with a certain guid is connected to this card. | |
Node * | getBusMaster () const |
This method returns the actual Bus-Master node. The busmaster can change after bus reset. | |
Card specific information | |
These functions return some card specific information. | |
u_int32_t | getNodeCount () const |
This method returns the number of connected nodes. | |
u_int32_t | getCardID () const |
This method returns the card-id. | |
raw1394handle_t | getDefaultHandle () const |
This method returns the current default-handler (obsolete). | |
internal::BusTopology * | getBusTopology () const |
This method returns the actual BusTopology. | |
void | printNodeList () const |
prints the device list of a card to standard output | |
QArray * | getTopoMap () const |
This method returns the actual topology map. | |
int | reset () const |
resets the bus | |
Transaction object | |
These methods access the Transaction object of a card. | |
const internal::Transaction * | requestTransaction () const |
This method returns the Transaction object of a Card. | |
void | releaseTransaction () const |
This method releases the Transaction object. | |
Protected Member Functions | |
u_int64_t | readAGuid (const int node) |
This method reads the GUID of a node connected to this card direct from CSR. | |
void | readTopoMap () |
This method reads the Topologie map. |
A Card manages up to 64 (pointer of) Nodes in an array. The Nodes are stored in a global internal::NodeContainer except Nodes with a physical layer only, so called PhyNodes(because there is no way to identify them). PhyNodes are deleted after every bus reset (and recreate if they are always connected to the FireWire bus.)
To guarantee that every node connected to the bus is represented by one L1394 node the Card searches the global internal::NodeContainer for an existing object. So its possible to connect one device to multiple cards and work always with the same object.
Every card object provides a Transaction object (wrapper class for libraw1394) that can be used to send asynchone transactions.
This class provides also functions to find and get Nodes, but they search on the current card only. The Card returns objects from type L1394::Node, so you need to cast the L1394 nodes to the correct type if you need.
To find and get nodes you should use the functions from class Session.
Definition at line 60 of file l1394_card.h.
|
constructor
Definition at line 25 of file l1394_card.cpp. References L1394::_Card, L1394::internal::NodeContainer::getNodeContainer(), and L1394::internal::NodeContainer::insert(). |
|
destroy an 1394 Card object
Definition at line 66 of file l1394_card.cpp. References L1394::NODE_DESTROY, L1394::internal::NodeContainer::release(), and L1394::internal::NodeContainer::removeNode(). |
|
This method searches the first node with a certain node type. This method searches only on this card.
Definition at line 190 of file l1394_card.cpp. |
|
This method searches all nodes with a certain type and returns a STL-list. This method searches only on this card.
Definition at line 224 of file l1394_card.cpp. |
|
This method returns the actual Bus-Master node. The busmaster can change after bus reset.
Definition at line 154 of file l1394_card.h. |
|
This method returns the actual BusTopology. An object of this class stores the actual Topo Map as QArray and as tree. The bustopology changes after every bus reset.
Definition at line 188 of file l1394_card.h. |
|
This method returns the card-id.
Definition at line 172 of file l1394_card.h. Referenced by SimpleEventHandle::busreset(). |
|
This method returns the current default-handler (obsolete).
Definition at line 178 of file l1394_card.h. |
|
This method returns the i'th node on the card.
Definition at line 136 of file l1394_card.h. Referenced by L1394::Session::getAllDevices(). |
|
This method searches a Node with a certain guid. This method searches only on this card.
Definition at line 198 of file l1394_card.cpp. |
|
This method returns the array of all nodes on the card. The node_array stores all Nodes connected to this card. The array has length 64 and is filled up with NULL-pointer, if it contains less than 64 nodes. The content of this array can change after bus reset.
Definition at line 128 of file l1394_card.h. |
|
This method returns the number of connected nodes.
Definition at line 166 of file l1394_card.h. |
|
This method returns the actual topology map.
Definition at line 201 of file l1394_card.h. |
|
This method creates the internal node list.
Definition at line 101 of file l1394_card.cpp. References L1394::internal::NodeFactory::createNode(), L1394::internal::NodeContainer::getNode(), L1394::internal::NodeFactory::getNodeFactory(), L1394::internal::NodeContainer::insert(), nodeExist(), printNodeList(), readAGuid(), readTopoMap(), L1394::internal::NodeContainer::release(), releaseTransaction(), and requestTransaction(). |
|
This method tests if a node with a certain guid is connected to this card. This method searches only on this card.
Definition at line 184 of file l1394_card.cpp. References L1394::internal::NodeContainer::nodeExist(). Referenced by makeNodeList(). |
|
prints the device list of a card to standard output
Definition at line 89 of file l1394_card.cpp. Referenced by makeNodeList(). |
|
This method reads the GUID of a node connected to this card direct from CSR.
Definition at line 205 of file l1394_card.cpp. References L1394::QArray::getQuadlet(), L1394::QArray::getSize(), L1394::internal::Transaction::read(), and L1394::Quadlet::toInt(). Referenced by makeNodeList(). |
|
This method reads the Topologie map.
Definition at line 234 of file l1394_card.cpp. References L1394::Quadlet::getBitRange(), L1394::QArray::insert(), and L1394::internal::Transaction::read(). Referenced by makeNodeList(). |
|
Definition at line 301 of file l1394_card.cpp. References L1394::Quadlet::getBit(), and L1394::Quadlet::setBit(). |
|
This method releases the Transaction object.
Definition at line 262 of file l1394_card.cpp. References L1394::ThreadMutex::unlock(). Referenced by makeNodeList(). |
|
Definition at line 279 of file l1394_card.cpp. References L1394::Quadlet::getBit(), L1394_FAILED, and L1394::Quadlet::setBit(). |
|
Definition at line 267 of file l1394_card.cpp. References L1394_FAILED. |
|
This method returns the Transaction object of a Card. This method is for internal use. You should use the Node memberfunctions read, write and lock. Remark: The Transaction object must be released before any Node can request it again. So if you must use this method you MUST call the method releaseTransaction() to release the Transaction object. Definition at line 256 of file l1394_card.cpp. References L1394::ThreadMutex::lock(). Referenced by makeNodeList(). |
|
resets the bus
Definition at line 317 of file l1394_card.cpp. References L1394_FAILED, and L1394_SUCCESS. |