Base Framework
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
IEEE1394 Class Reference

IEEE-1394 (FireWire) More...

#include <base/communication/IEEE1394.h>

Inherits CommunicationsPort, and IEEE1394Common.

Classes

struct  BusInfo
 
class  BusReset
 IEEE 1394 bus reset exception. More...
 
struct  ConfigurationIntro
 
struct  IsochronousPacketHeader
 
struct  NodeDescriptor
 

Public Types

enum  CSRRegister {
  STATE_CLEAR = 0x0000, STATE_SET = 0x0004, NODE_IDS = 0x0008, RESET_START = 0x000c,
  SPLIT_TIMEOUT_HI = 0x0018, SPLIT_TIMEOUT_LO = 0x001c, ARGUMENT_HI = 0x0020, ARGUMENT_LO = 0x0024,
  TEST_START = 0x0028, TEST_STATUS = 0x002c, BUS_DEPENDENT = 0x0200, CYCLE_TIME = 0x0200,
  BUS_TIME = 0x0204, POWER_FAIL_IMMINENT = 0x0208, POWER_SOURCE = 0x020c, BUSY_TIMEOUT = 0x0210,
  BUS_MANAGER_ID = 0x021c, BANDWIDTH_AVAILABLE = 0x0220, CHANNELS_AVAILABLE_HI = 0x0224, CHANNELS_AVAILABLE_LO = 0x0228,
  BROADCAST_CHANNEL = 0x0234, CONFIGURATION_ROM = 0x0400, BUS_INFO_BLOCK = CONFIGURATION_ROM + 0x04, BUS_INFO_NAME = BUS_INFO_BLOCK,
  BUS_INFO_FLAGS = BUS_INFO_BLOCK + 0x04, BUS_INFO_GUID = BUS_INFO_BLOCK + 0x08, FCP_COMMAND_FRAME = 0x0b00, FCP_COMMAND_FRAME_END = 0x0d00,
  FCP_RESPONSE_FRAME = 0x0d00, FCP_RESPONSE_FRAME_END = 0x0f00, TOPOLOGY_MAP = 0x1000, TOPOLOGY_MAP_END = 0x1400,
  SPEED_MAP = 0x2000, SPEED_MAP_END = 0x3000
}
 
enum  CSRKeyType { KEY_TYPE_IMMEDIATE = 0x00, KEY_TYPE_OFFSET = 0x01, KEY_TYPE_LEAF = 0x02, KEY_TYPE_DIRECTORY = 0x03 }
 
enum  CSRKeyValue {
  KEY_00 = 0x00, KEY_TEXTUAL = 0x01, KEY_BUS_DEPENDENT_INFORMATION = 0x02, KEY_MODULE_VENDOR_ID = 0x03,
  KEY_MODULE_HARDWARE_VERSION = 0x04, KEY_SPECIFICATION_ID = 0x05, KEY_MODULE_SOFTWARE_VERSION = 0x06, KEY_MODULE_DEPENDENT_INFORMATION = 0x07,
  KEY_NODE_VENDOR_ID = 0x08, KEY_NODE_HARDWARE_VERSION = 0x09, KEY_NODE_SPECIFICATION_ID = 0x0a, KEY_NODE_SOFTWARE_VERSION = 0x0b,
  KEY_NODE_CAPABILITIES = 0x0c, KEY_NODE_UNIQUE_ID = 0x0d, KEY_NODE_UNITS_EXTENT = 0x0e, KEY_NODE_MEMORY_EXTENT = 0x0f,
  KEY_NODE_DEPENDENT_INFORMATION = 0x10, KEY_UNIT_DIRECTORY = 0x11, KEY_UNIT_SPECIFICATION_ID = 0x12, KEY_UNIT_SOFTWARE_VERSION = 0x13,
  KEY_UNIT_DEPENDENT_INFORMATION = 0x14, KEY_MODEL = 0x17, KEY_INSTANCE = 0x18, KEY_KEYWORD = 0x19,
  KEY_FEATURE = 0x1a, KEY_3f = 0x3f
}
 
enum  PowerClass {
  POWER_NO_REPEAT, POWER_PROVIDES_15W, POWER_PROVIDES_30W, POWER_PROVIDES_45W,
  POWER_CONSUMES_1W, POWER_CONSUMES_3W, POWER_CONSUMES_6W, POWER_CONSUMES_10W
}
 
enum  Role { BUS_MANAGER, ISOCHRONOUS_RESOURCE_MANAGER, CYCLE_MASTER, ROOT }
 
enum  ExceptionCause {
  NODE_NOT_PRESENT, NO_GENERAL_CONFIGURATION_ROM, INVALID_BUS_INFORMATION_BLOCK, INVALID_ROOT_DIRECTORY_BLOCK,
  INVALID_DEVICE_INDEPENDENT_BLOCK, INVALID_DEVICE_DEPENDENT_BLOCK, UNABLE_TO_OPEN_CHANNEL, INVALID_REQUEST,
  REQUEST_NOT_READY, REQUEST_NOT_PENDING, UNABLE_TO_READ, UNABLE_TO_WRITE,
  LAST_CAUSE
}
 
enum  Capability {
  ISOCHRONOUS_RESOURCE_MANAGER_CAPABLE = 1 << 0, CYCLE_MASTER_CAPABLE = 1 << 1, ISOCHRONOUS_TRANSACTION_CAPABLE = 1 << 2, BUS_MASTER_CAPABLE = 1 << 3,
  POWER_MANAGER_CAPABLE = 1 << 4
}
 
enum  PortState { PORT_NOT_CONNECTED, PORT_CONNECTED_TO_OHTER_LAYER, PORT_CONNECTED_TO_PARENT, PORT_CONNECTED_TO_CHILD }
 
- Public Types inherited from IEEE1394Common
enum  Standard { STANDARD_UNSPECIFIED, STANDARD_IEEE_1394, STANDARD_IEEE_1394A, STANDARD_IEEE_1394B }
 
enum  IsochronousRequestType {
  NOT_A_REQUEST, READ_PACKETS_REQUEST, READ_FIXED_PACKETS_REQUEST, READ_FIXED_DATA_REQUEST,
  WRITE_PACKETS_REQUEST, WRITE_FIXED_PACKETS_REQUEST, WRITE_DATA_REQUEST
}
 
enum  IsochronousRequestStatus {
  READY, PENDING, ERROR, TIMEDOUT,
  COMPLETED
}
 
enum  Status {
  STATUS_OK, STATUS_INCOMPATIBLE, STATUS_INTERNAL, STATUS_CONFLICT,
  STATUS_BUSY, STATUS_ABORTED, STATUS_TIMEOUT, STATUS_ERROR
}
 
enum  Speed {
  S100, S200, S400, S800,
  S1600, S3200
}
 
enum  AcknowledgeCode {
  ACK_RESERVED_0, ACK_COMPLETE, ACK_PENDING, ACK_RESERVED_3,
  ACK_BUSY_X, ACK_BUSY_A, ACK_BUSY_B, ACK_RESERVED_7,
  ACK_RESERVED_8, ACK_RESERVED_9, ACK_RESERVED_10, ACK_RESERVED_11,
  ACK_RESERVED_12, ACK_DATA_ERROR, ACK_TYPE_ERROR, ACK_RESERVED_15
}
 
enum  ResponseCode {
  RCODE_COMPLETE, RCODE_RESERVED_1, RCODE_RESERVED_2, RCODE_RESERVED_3,
  RCODE_CONFLICT_ERROR, RCODE_DATA_ERROR, RCODE_TYPE_ERROR, RCODE_ADDRESS_ERROR,
  RCODE_RESERVED_8, RCODE_RESERVED_9, RCODE_RESERVED_10, RCODE_RESERVED_11,
  RCODE_RESERVED_12, RCODE_RESERVED_13, RCODE_RESERVED_14, RCODE_RESERVED_15
}
 
enum  TransactionCode {
  TCODE_WRITE_REQUEST_FOR_DATA_QUADLET, TCODE_WRITE_REQUEST_FOR_DATA_BLOCK, TCODE_WRITE_RESPONSE, TCODE_RESERVED_3,
  TCODE_READ_REQUEST_FOR_DATA_QUADLET, TCODE_READ_REQUEST_FOR_DATA_BLOCK, TCODE_READ_RESPONSE_FOR_DATA_QUADLET, TOCDE_READ_RESPONSE_FOR_DATA_BLOCK,
  TCODE_CYCLE_START, TCODE_LOCK_REQUEST, TCODE_ISOCHRONOUS_DATA_BLOCK, TCODE_LOCK_RESPONSE,
  TCODE_RESERVED_12, TCODE_RESERVED_13, TCODE_RESERVED_14, TCODE_RESERVED_15
}
 
enum  LockInstruction {
  MASK_SWAP, COMPARE_SWAP, FETCH_ADD, LITTLE_FETCH_ADD,
  BOUNDED_ADD, WRAP_ADD
}
 
enum  IsochronousRequestOption { SWAP_BYTE_ORDER = 1 }
 
typedef BigEndian< uint32 > Quadlet
 

Public Member Functions

void checkResetGeneration ()
 
unsigned short findRole (Role role, unsigned int busId=LOCAL_BUS)
 
unsigned int getNumberOfNodes () const noexcept
 
unsigned int getLocalId () const noexcept
 
unsigned int getRootNode () const noexcept
 
unsigned int getCycleMaster () const noexcept
 
unsigned int getBusManager () const noexcept
 
unsigned int getIsochronousResourceManager () const noexcept
 
unsigned int getCycleTime (unsigned short node)
 
unsigned int getBusTime (unsigned short node)
 
unsigned int getAvailableBandwidth ()
 
uint64 getAvailableIsochronousChannels ()
 
Speed getMaximumSpeed (unsigned int physicalId) const
 
Speed getMaximumLinkSpeed (unsigned int physicalId) const
 
Speed getMaximumSpeedBetweenNodes (unsigned int a, unsigned int b) const
 
Speed getMaximumSpeedToNode (unsigned int physicalId) const
 
Speed getBroadcastSpeed () const
 
Speed getMaximumSpeed (uint64 nodes) const noexcept
 
 IEEE1394 ()
 
bool hasBeenReset () const noexcept
 
void acknowledgeReset () noexcept
 
void resetBus ()
 
Array< EUI64getAdapters ()
 
void open ()
 
void open (const EUI64 &adapter)
 
void close ()
 
Array< EUI64getNodes () noexcept
 
EUI64 getLocalIdentifier (unsigned int physicalId) const
 
Standard getCompliance (unsigned short node)
 
EUI64 getIdentifier (unsigned short node)
 
unsigned int getMaximumPayload (unsigned short node)
 
unsigned int getCapabilities (unsigned short node)
 
unsigned int getVendorId (unsigned short node)
 
int getPhysicalId (const EUI64 &guid) noexcept
 
String getDescription (unsigned short node)
 
String getKeywords (unsigned short node)
 
unsigned int getStatus () const
 
unsigned int getFIFOSize () const
 
bool isPresent (unsigned int physicalId) const noexcept
 
uint64 getLinkActiveNodes () const noexcept
 
bool isLinkLayerActive (unsigned int physicalId) const
 
uint64 getContenders () const noexcept
 
bool isContender (unsigned int physicalId) const
 
bool isTransactionCapable (unsigned int physicalId) const
 
unsigned int getGapCount (unsigned int physicalId) const
 
unsigned int getNumberOfPorts (unsigned int physicalId) const
 
PortState getPortState (unsigned int physicalId, unsigned int port) const
 
unsigned int getLocalMaximumPayload (unsigned int physicalId) const
 
PowerClass getPowerClass (unsigned int physicalId) const
 
uint32 getQuadlet (unsigned short node, uint32 offset)
 
void read (unsigned short node, uint64 address, uint8 *buffer, unsigned int size)
 
void write (unsigned short node, uint64 address, const uint8 *buffer, unsigned int size)
 
unsigned int read (unsigned short node, uint64 address, uint32 *buffer, unsigned int size, uint32 value)
 
IsochronousReadChannel getReadChannel (unsigned int maximumPacketsPerRequest, uint64 subchannels)
 
IsochronousWriteChannel getWriteChannel (unsigned int maximumPacketsPerRequest, uint64 subchannels)
 
bool wait (unsigned int milliseconds)
 
void dequeue ()
 
void registerFCPListener (FunctionControlProtocolListener *listener)
 
void unregisterFCPListener ()
 
void readIsochronous (unsigned int channel, IsochronousChannelListener *listener)
 

Static Public Member Functions

static uint8 makeCSRkey (CSRKeyType type, CSRKeyValue value) noexcept
 
static CSRKeyType getCSRKeyType (uint32 quadlet) noexcept
 
static CSRKeyValue getCSRKeyValue (uint32 quadlet) noexcept
 
static unsigned int getMaximumAsyncPayloadForSpeed (Speed speed) noexcept
 
static unsigned int getMaximumIsoPayloadForSpeed (Speed speed) noexcept
 
static String getAsString (unsigned short nodeId) noexcept
 
template<class IMPL >
static IEEE1394 make () noexcept
 
- Static Public Member Functions inherited from IEEE1394Common
static unsigned short makeNodeId (unsigned int physicalId, unsigned int busId=0x3ff) noexcept
 
static unsigned int getBusId (unsigned short node) noexcept
 
static bool isLocalBus (unsigned short node) noexcept
 
static unsigned int getPhysicalId (unsigned short node) noexcept
 
static bool isBroadcast (unsigned short node) noexcept
 

Static Public Attributes

static const uint64 CSR_BASE_ADDRESS = 0xfffff0000000ULL
 
- Static Public Attributes inherited from IEEE1394Common
static const unsigned int BROADCAST = 63
 
static const unsigned int LOCAL_BUS = 1023
 
static const unsigned int ISOCHRONOUS_CHANNELS = 64
 
static const unsigned int MAXIMUM_ATTEMPTS = 5
 

Protected Member Functions

unsigned int getBits (unsigned int value, unsigned int offset, unsigned int size) noexcept
 
EUI64 getEUI64 (unsigned short node)
 
void loadTopologyMap ()
 
void loadSpeedMap ()
 
void reload ()
 

Protected Attributes

uint32 resetGeneration = 0
 
unsigned int numberOfNodes = 0
 
NodeDescriptor nodes [63]
 
unsigned int localId = 0
 
unsigned int busManagerId = 0
 
unsigned int isochronousResourceManagerId = 0
 
unsigned int cycleMasterId = 0
 
Speed speedMap [63][64]
 
uint64 linkActiveNodes = 0
 
uint64 contenderNodes = 0
 

Additional Inherited Members

- Static Protected Member Functions inherited from IEEE1394Common
static Reference< IsochronousReadPacketsRequestImplgetContext (IsochronousReadPacketsRequest &request) noexcept
 
static Reference< IsochronousReadFixedPacketsRequestImplgetContext (IsochronousReadFixedPacketsRequest &request) noexcept
 
static Reference< IsochronousReadFixedDataRequestImplgetContext (IsochronousReadFixedDataRequest &request) noexcept
 
static Reference< IsochronousReadRequestImplgetContext (IsochronousReadRequest &request) noexcept
 
static Reference< IsochronousWritePacketsRequestImplgetContext (IsochronousWritePacketsRequest &request) noexcept
 
static Reference< IsochronousWriteFixedPacketsRequestImplgetContext (IsochronousWriteFixedPacketsRequest &request) noexcept
 
static Reference< IsochronousWriteDataRequestImplgetContext (IsochronousWriteDataRequest &request) noexcept
 
static Reference< IsochronousWriteRequestImplgetContext (IsochronousWriteRequest &request) noexcept
 

Detailed Description

IEEE-1394 (FireWire)

IEEE-1394 (also known as FireWire (Apple Computer) and i.LINK (Sony Corp.)) support. See 1394 Trade Association (http://www.1394ta.org).

Version
1.1
Examples
testsuite/IEEE1394.cpp.

Member Enumeration Documentation

◆ Capability

Capability flags of nodes.

◆ CSRKeyType

Control and status key type (see CSR Architecture).

◆ CSRKeyValue

Control and status key value (see CSR Architecture).

◆ CSRRegister

Control and status register (CSR).

◆ ExceptionCause

Exception causes.

◆ PortState

Port state.

◆ PowerClass

Power class.

Enumerator
POWER_NO_REPEAT 

The node does not need power from the bus and does not repeat power.

POWER_PROVIDES_15W 

The node is self-powered and provides a minimum of 15W on the bus.

POWER_PROVIDES_30W 

The node is self-powered and provides a minimum of 30W on the bus.

POWER_PROVIDES_45W 

The node is self-powered and provides a minimum of 45W on the bus.

POWER_CONSUMES_1W 

The node may be powered from the bus and uses up to 1W.

POWER_CONSUMES_3W 

The node may be powered from the bus and uses up to 1W plus an additional 2W to enable higher layers.

POWER_CONSUMES_6W 

The node may be powered from the bus and uses up to 1W plus an additional 5W to enable higher layers.

POWER_CONSUMES_10W 

The node may be powered from the bus and uses up to 1W plus an additional 9W to enable higher layers.

◆ Role

The role of a node.

Enumerator
BUS_MANAGER 

Bus manager.

ISOCHRONOUS_RESOURCE_MANAGER 

Isochronous resource manager.

CYCLE_MASTER 

Cycle master.

ROOT 

The root of the bus.

Constructor & Destructor Documentation

◆ IEEE1394()

IEEE1394::IEEE1394 ( )

Initializes IEEE 1394 with the default implementation.

Member Function Documentation

◆ acknowledgeReset()

void IEEE1394::acknowledgeReset ( )
inlinenoexcept

Acknowledges the bus reset.

◆ checkResetGeneration()

void IEEE1394::checkResetGeneration ( )

Check if the bus has been reset.

Examples
testsuite/IEEE1394.cpp.

◆ close()

void IEEE1394::close ( )
inline

Closes the handle to the adapter. The adapter is destroyed when all handles have been closed.

◆ findRole()

unsigned short IEEE1394::findRole ( Role  role,
unsigned int  busId = LOCAL_BUS 
)

Returns the node id of the node with the desired role.

Parameters
roleThe role of the desired node.
busIdThe bus id of the bus ([0; 1023]). The default is the local bus.
Returns
Returns the broadcast id for the specified bus if no node is found.

◆ getAdapters()

Array<EUI64> IEEE1394::getAdapters ( )
inline

Returns the adapters available.

Examples
testsuite/IEEE1394.cpp.

◆ getAsString()

static String IEEE1394::getAsString ( unsigned short  nodeId)
staticnoexcept

Returns a convenient string representation of the node id (e.g. "local:0" or "123:broadcast").

Parameters
nodeIdThe node id.
Examples
testsuite/IEEE1394.cpp.

◆ getAvailableBandwidth()

unsigned int IEEE1394::getAvailableBandwidth ( )

Returns the available bandwidth from the current isochronous resource manager.

Examples
testsuite/IEEE1394.cpp.

◆ getAvailableIsochronousChannels()

uint64 IEEE1394::getAvailableIsochronousChannels ( )

Returns the available isochronous channels from the current isochronous reource manager.

Examples
testsuite/IEEE1394.cpp.

◆ getBroadcastSpeed()

Speed IEEE1394::getBroadcastSpeed ( ) const

Returns the maximum broadcast speed.

Examples
testsuite/IEEE1394.cpp.

◆ getBusManager()

unsigned int IEEE1394::getBusManager ( ) const
inlinenoexcept

Returns the physical id of the bus manager.

Examples
testsuite/IEEE1394.cpp.

◆ getBusTime()

unsigned int IEEE1394::getBusTime ( unsigned short  node)

Returns the bus time in seconds of the specified node. The node should be cycle master capable.

Parameters
nodeThe node id.
Examples
testsuite/IEEE1394.cpp.

◆ getCapabilities()

unsigned int IEEE1394::getCapabilities ( unsigned short  node)

Returns the capabilities of the specified node.

Parameters
nodeThe node id.
Examples
testsuite/IEEE1394.cpp.

◆ getCompliance()

Standard IEEE1394::getCompliance ( unsigned short  node)

Returns the IEEE 1394 standard of the specified node.

Parameters
nodeThe node id.
Examples
testsuite/IEEE1394.cpp.

◆ getContenders()

uint64 IEEE1394::getContenders ( ) const
inlinenoexcept

Returns the contender nodes as a bit mask.

◆ getCSRKeyType()

static CSRKeyType IEEE1394::getCSRKeyType ( uint32  quadlet)
inlinestaticnoexcept

Returns the CSR key type of the specified quadlet (native byte order).

◆ getCSRKeyValue()

static CSRKeyValue IEEE1394::getCSRKeyValue ( uint32  quadlet)
inlinestaticnoexcept

Returns the CSR key value of the specified quadlet (native byte order).

◆ getCycleMaster()

unsigned int IEEE1394::getCycleMaster ( ) const
inlinenoexcept

Returns the physical id of the cycle master.

Examples
testsuite/IEEE1394.cpp.

◆ getCycleTime()

unsigned int IEEE1394::getCycleTime ( unsigned short  node)

Returns the cycle time (in units of 125 micro seconds) of the specified node. The node should be isochronous capable.

Parameters
nodeThe node id.
Examples
testsuite/IEEE1394.cpp.

◆ getDescription()

String IEEE1394::getDescription ( unsigned short  node)

Returns a description of the specified node if available in the configuration ROM.

Parameters
nodeThe node id.
Examples
testsuite/IEEE1394.cpp.

◆ getEUI64()

EUI64 IEEE1394::getEUI64 ( unsigned short  node)
inlineprotected

Returns the guid of the specified node.

◆ getFIFOSize()

unsigned int IEEE1394::getFIFOSize ( ) const
inline

Returns the size of the FIFO.

◆ getGapCount()

unsigned int IEEE1394::getGapCount ( unsigned int  physicalId) const
inline

Returns the maximum payload of the specified local node.

Parameters
physicalIdThe physical id the node.

◆ getIdentifier()

EUI64 IEEE1394::getIdentifier ( unsigned short  node)

Returns the unique identifier of the specified node. Raises IEEE1394Exception if the node has not general configuration ROM.

Parameters
nodeThe node id.

◆ getIsochronousResourceManager()

unsigned int IEEE1394::getIsochronousResourceManager ( ) const
inlinenoexcept

Returns the physical id of the isochronous resource manager.

Examples
testsuite/IEEE1394.cpp.

◆ getKeywords()

String IEEE1394::getKeywords ( unsigned short  node)

Returns the keywords (separated by space) of the specified node if available in the configuration ROM.

Parameters
nodeThe node id.
Examples
testsuite/IEEE1394.cpp.

◆ getLinkActiveNodes()

uint64 IEEE1394::getLinkActiveNodes ( ) const
inlinenoexcept

Returns the nodes which have the link layer activated as a bit mask.

◆ getLocalId()

unsigned int IEEE1394::getLocalId ( ) const
inlinenoexcept

Returns the physical id of the local node (i.e. the adapter).

Examples
testsuite/IEEE1394.cpp.

◆ getLocalIdentifier()

EUI64 IEEE1394::getLocalIdentifier ( unsigned int  physicalId) const

Returns the unique identifier of the specified local node. The returned guid is invalid if the node does not have a general configuration ROM.

Parameters
physicalIdThe physical id of the local node.
Examples
testsuite/IEEE1394.cpp.

◆ getLocalMaximumPayload()

unsigned int IEEE1394::getLocalMaximumPayload ( unsigned int  physicalId) const
inline

Returns the maximum payload of the specified local node.

Parameters
physicalIdThe physical id the node.

◆ getMaximumAsyncPayloadForSpeed()

static unsigned int IEEE1394::getMaximumAsyncPayloadForSpeed ( Speed  speed)
inlinestaticnoexcept

Returns the maximum payload for asynchronous packets for the specified speed.

◆ getMaximumIsoPayloadForSpeed()

static unsigned int IEEE1394::getMaximumIsoPayloadForSpeed ( Speed  speed)
inlinestaticnoexcept

Returns the maximum payload for isochronous packets for the specified speed.

◆ getMaximumLinkSpeed()

Speed IEEE1394::getMaximumLinkSpeed ( unsigned int  physicalId) const

Returns the maximum link speed of the specifed local node.

Parameters
physicalIdThe physical id of the node.
Examples
testsuite/IEEE1394.cpp.

◆ getMaximumPayload()

unsigned int IEEE1394::getMaximumPayload ( unsigned short  node)

Returns the maximum payload in bytes for asynchronous write transmissions addressed to the specified node.

Parameters
nodeThe node id.
Examples
testsuite/IEEE1394.cpp.

◆ getMaximumSpeed() [1/2]

Speed IEEE1394::getMaximumSpeed ( uint64  nodes) const
noexcept

Returns the maximum speed supported by all the specified nodes (bit mask).

◆ getMaximumSpeed() [2/2]

Speed IEEE1394::getMaximumSpeed ( unsigned int  physicalId) const

Returns the maximum physical speed of the specified node.

Parameters
physicalIdThe physical id of the node.
Examples
testsuite/IEEE1394.cpp.

◆ getMaximumSpeedBetweenNodes()

Speed IEEE1394::getMaximumSpeedBetweenNodes ( unsigned int  a,
unsigned int  b 
) const

Returns the maximum speed between the specified local nodes.

Parameters
aThe physical id of the first node.
bThe physical id of the second node.

◆ getMaximumSpeedToNode()

Speed IEEE1394::getMaximumSpeedToNode ( unsigned int  physicalId) const
inline

Returns the maximum speed to the specified node.

Parameters
physicalIdThe physical id of the node.

◆ getNodes()

Array<EUI64> IEEE1394::getNodes ( )
noexcept

Returns the guid's of the available nodes on the bus. The cached guid are used.

◆ getNumberOfNodes()

unsigned int IEEE1394::getNumberOfNodes ( ) const
inlinenoexcept

Returns the number of nodes of the local bus.

Examples
testsuite/IEEE1394.cpp.

◆ getNumberOfPorts()

unsigned int IEEE1394::getNumberOfPorts ( unsigned int  physicalId) const
inline

Returns the maximum payload of the specified local node.

Parameters
physicalIdThe physical id the node.

◆ getPhysicalId()

int IEEE1394::getPhysicalId ( const EUI64 guid)
noexcept

Returns the physical id ([0; 63[) of the node with the specified guid. The guid is allowed to be the invalid guid.

Parameters
guidThe unique id of the node.
Returns
-1 is not found on the local bus.

◆ getPortState()

PortState IEEE1394::getPortState ( unsigned int  physicalId,
unsigned int  port 
) const
inline

Returns the state of the port of the local node.

Parameters
physicalIdThe physical id of the node.
portThe port of the node.

◆ getPowerClass()

PowerClass IEEE1394::getPowerClass ( unsigned int  physicalId) const
inline

Returns the power class of the specified local node.

Parameters
physicalIdThe physical id the node.

◆ getQuadlet()

uint32 IEEE1394::getQuadlet ( unsigned short  node,
uint32  offset 
)
inline

Read quadlet from node.

Parameters
nodeThe node id of source node.
offsetThe offset of the quadlet from the CSR base address.
Returns
The quadlet in native byte order.

◆ getReadChannel()

IsochronousReadChannel IEEE1394::getReadChannel ( unsigned int  maximumPacketsPerRequest,
uint64  subchannels 
)
inline

Returns an isochronous read channel.

Parameters
maximumPacketsPerRequestThe maximum number of packets per request.
subchannelMask specifying the subchannel to reserve for this channel.

◆ getRootNode()

unsigned int IEEE1394::getRootNode ( ) const
inlinenoexcept

Returns the physical id of the root node.

Examples
testsuite/IEEE1394.cpp.

◆ getStatus()

unsigned int IEEE1394::getStatus ( ) const
inline

Returns the current error status.

◆ getVendorId()

unsigned int IEEE1394::getVendorId ( unsigned short  node)

Returns the 24 bit module vendor id of the specified node. Please note that this vendor id does not have to be identical to the vendor id of the EUI-64 identifier.

Parameters
nodeThe node id.
Examples
testsuite/IEEE1394.cpp.

◆ getWriteChannel()

IsochronousWriteChannel IEEE1394::getWriteChannel ( unsigned int  maximumPacketsPerRequest,
uint64  subchannels 
)
inline

Returns an isochronous write channel.

Parameters
maximumPacketsPerRequestThe maximum number of packets per request.
subchannelMask specifying the subchannel to reserve for this channel.

◆ hasBeenReset()

bool IEEE1394::hasBeenReset ( ) const
inlinenoexcept

Returns true if the bus has been reset.

◆ isContender()

bool IEEE1394::isContender ( unsigned int  physicalId) const
inline

Returns true if the specified node is a contended.

Parameters
physicalIdThe physical id of the node [0; 63[.
Examples
testsuite/IEEE1394.cpp.

◆ isLinkLayerActive()

bool IEEE1394::isLinkLayerActive ( unsigned int  physicalId) const
inline

Returns true if the specified node has the link layer activated.

Parameters
physicalIdThe physical id of the node [0; 63[.
Examples
testsuite/IEEE1394.cpp.

◆ isPresent()

bool IEEE1394::isPresent ( unsigned int  physicalId) const
inlinenoexcept

Returns true if the node with the specified physical id is present on the local bus.

Parameters
physicalIdThe physical id of the node [0; 63[.
Returns
As a special case this method returns false for any invalid physical id.

◆ isTransactionCapable()

bool IEEE1394::isTransactionCapable ( unsigned int  physicalId) const
inline

Returns true if the local node is transaction capable.

Parameters
physicalIdThe physical id the node.

◆ loadSpeedMap()

void IEEE1394::loadSpeedMap ( )
protected

Loads the speed map from the bus manager.

◆ loadTopologyMap()

void IEEE1394::loadTopologyMap ( )
protected

Loads the topology map from the bus manager.

◆ make()

template<class IMPL >
static IEEE1394 IEEE1394::make ( )
inlinestaticnoexcept

Creates a IEEE 1394 object with the specified implementation.

◆ makeCSRkey()

static uint8 IEEE1394::makeCSRkey ( CSRKeyType  type,
CSRKeyValue  value 
)
inlinestaticnoexcept

Returns the CSR key for the specified CSR key and value.

Parameters
typeThe type of the CSR key.
valueThe value of the CSR key.

◆ open() [1/2]

void IEEE1394::open ( )

Opens a connection to the primary adapter.

Examples
testsuite/IEEE1394.cpp.

◆ open() [2/2]

void IEEE1394::open ( const EUI64 adapter)

Opens a connection to the specified adapter.

Parameters
adapterThe id of the adapter.

◆ read() [1/2]

unsigned int IEEE1394::read ( unsigned short  node,
uint64  address,
uint32 *  buffer,
unsigned int  size,
uint32  value 
)
inline

Read data from device. This method is only used for debugging and development.

Parameters
nodeThe node id of source node.
addressThe base address of the memory region to read from (must be a quadlet boundary).
bufferThe data buffer.
sizeThe number of quadlets to read (not bytes!). // TAG: FIXME
valueThe default value to store in the buffer for unsuccessful reads.
Returns
The number of quadlets read successfully.

◆ read() [2/2]

void IEEE1394::read ( unsigned short  node,
uint64  address,
uint8 *  buffer,
unsigned int  size 
)
inline

Read data from device.

Parameters
nodeThe node id of source node.
addressThe base address of the memory region to read from.
bufferThe data buffer.
sizeThe number of bytes to read.
Examples
testsuite/IEEE1394.cpp.

◆ reload()

void IEEE1394::reload ( )
protected

Reload information from local bus.

◆ resetBus()

void IEEE1394::resetBus ( )
inline

Resets the bus.

◆ write()

void IEEE1394::write ( unsigned short  node,
uint64  address,
const uint8 *  buffer,
unsigned int  size 
)
inline

Write data to device.

Parameters
nodeThe node id of destination node.
addressThe base address of the memory region to write to.
bufferThe data buffer.
sizeThe number of bytes to write.
Examples
testsuite/IEEE1394.cpp.

Member Data Documentation

◆ busManagerId

unsigned int IEEE1394::busManagerId = 0
protected

The physical id of the current bus manager.

◆ contenderNodes

uint64 IEEE1394::contenderNodes = 0
protected

Mask specifying the contenders.

◆ CSR_BASE_ADDRESS

const uint64 IEEE1394::CSR_BASE_ADDRESS = 0xfffff0000000ULL
static

The CSR base address.

Examples
testsuite/IEEE1394.cpp.

◆ cycleMasterId

unsigned int IEEE1394::cycleMasterId = 0
protected

The physical id of the current cycle master.

◆ isochronousResourceManagerId

unsigned int IEEE1394::isochronousResourceManagerId = 0
protected

The physical id of the current isochronous resource manager.

◆ linkActiveNodes

uint64 IEEE1394::linkActiveNodes = 0
protected

Mask specifying the nodes with the link layer activated.

◆ localId

unsigned int IEEE1394::localId = 0
protected

The physical id of the adapter.

◆ nodes

NodeDescriptor IEEE1394::nodes[63]
protected

Description of the nodes of the local bus.

◆ numberOfNodes

unsigned int IEEE1394::numberOfNodes = 0
protected

The number of nodes of the local bus.

◆ resetGeneration

uint32 IEEE1394::resetGeneration = 0
protected

Holds the reset generation number.

◆ speedMap

Speed IEEE1394::speedMap[63][64]
protected

The maximum speeds of the nodes.