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

L1394::internal::NodeFactory Class Reference

This class creates L1394 node objects. More...

#include <l1394_nodefactory.h>

List of all members.

Public Member Functions

virtual ~NodeFactory ()
 destructor
virtual NodecreateNode (Card *, const u_int32_t)
 This method creates the node-objects.
virtual CardcreateCard (const u_int32_t card_id, const u_int32_t node_id, raw1394handle_t default_handle)
 This method instantiates the Card object.
virtual DevicecreateDevice (FcpNode *, int subunit_type)
 This method instantiates the Device objects for FcpNodes.

Static Public Member Functions

static NodeFactorygetNodeFactory ()
 This static method returns the pointer to the NodeFactory.

Protected Member Functions

 NodeFactory ()
virtual NodeType scanNode (Card *c, unsigned int node_id)
 scans a specific node and returns the type (AVC, DCC, ...) as integer value (defined in class Node)


Detailed Description

This class creates L1394 node objects.

This class creates the default L1394 node objects (Crad, DccCamera, FcpCamera and PhyNode) and devices (AvcCamera, AvcVcr..). If you like to use your own L1394 Node objects inherit from this class and rewrite the createNode(), createCard() and createDevice() function.

This class is designed as singelton. So if you use your own NodeFactory you must instantiate the new factory before the Session object. The Session object calls the method getFactory() and gets the new factory.

Author:
Michael Repplinger

Definition at line 48 of file l1394_nodefactory.h.


Constructor & Destructor Documentation

L1394::internal::NodeFactory::~NodeFactory  )  [virtual]
 

destructor

Definition at line 54 of file l1394_nodefactory.cpp.

References L1394::ThreadMutex::lock(), and L1394::ThreadMutex::unlock().

L1394::internal::NodeFactory::NodeFactory  )  [protected]
 

Definition at line 44 of file l1394_nodefactory.cpp.

References L1394::internal::Message::errorStream().

Referenced by getNodeFactory().


Member Function Documentation

L1394::internal::NodeFactory::createCard const u_int32_t  card_id,
const u_int32_t  node_id,
raw1394handle_t  default_handle
[virtual]
 

This method instantiates the Card object.

Parameters:
card_id : The card-id of the card.
node_id : The node-id of the card.
default_handle : pointer to the default_handle for the new card.
Returns:
Card* : pointer to the Card object.

Definition at line 61 of file l1394_nodefactory.cpp.

References L1394::internal::Message::debugStream().

L1394::internal::NodeFactory::createDevice FcpNode parent_node,
int  subunit_value
[virtual]
 

This method instantiates the Device objects for FcpNodes.

Parameters:
parent_node : pointer to the parent_node.
subunit_value : The subunit_value defines the subunit_type and subunit_id.

Definition at line 148 of file l1394_nodefactory.cpp.

References L1394::internal::Message::debugStream(), SUBUNIT_DISC, SUBUNIT_TAPE, SUBUNIT_TUNER, SUBUNIT_VIDEO_CAMERA, SUBUNIT_VIDEO_MONITOR, and L1394::internal::Message::warningStream().

Node * L1394::internal::NodeFactory::createNode Card card,
const   u_int32_t
[virtual]
 

This method creates the node-objects.

If you like to create your own Node objects inherit from this class and rewrite this function.

Parameters:
card : pointer to the Card object.
node_id : node_id of the new node.
Returns:
Node*: pointer to the Node object.

Definition at line 68 of file l1394_nodefactory.cpp.

References L1394::_Card, L1394::_DccNode, L1394::_FcpNode, L1394::_PhyNode, L1394::_SBP2Node, L1394::_UnknownNode, and scanNode().

Referenced by L1394::Card::makeNodeList().

L1394::internal::NodeFactory::getNodeFactory  )  [static]
 

This static method returns the pointer to the NodeFactory.

Returns:
NodeFactory* : pointer to the NodeFactory.

Definition at line 35 of file l1394_nodefactory.cpp.

References L1394::ThreadMutex::lock(), NodeFactory(), and L1394::ThreadMutex::unlock().

Referenced by L1394::Card::makeNodeList().

L1394::internal::NodeFactory::scanNode Card card,
unsigned int  node_id
[protected, virtual]
 

scans a specific node and returns the type (AVC, DCC, ...) as integer value (defined in class Node)

Parameters:
Card* card: pointer to the card object.
node_id,: the actual node-id on the bus.
Returns:
int : returns the node type as integer value.

Referenced by createNode().


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