Hinawa.FwResp

g GObject.Object GObject.Object Hinawa.FwResp Hinawa.FwResp GObject.Object->Hinawa.FwResp

Subclasses:

Hinawa.FwFcp

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

release ()

reserve (node, addr, width)

reserve_within_region (node, region_start, region_end, width)

set_resp_frame (frame)

Virtual Methods

Inherited:

GObject.Object (7)

do_requested (tcode, offset, src_node_id, dst_node_id, card_id, generation, tstamp, frame)

Properties

Name

Type

Flags

Short Description

is-reserved

bool

r

Whether a range of address is reserved or not.

offset

int

r

The start offset of reserved address range.

width

int

r

The width of reserved address range.

Signals

Inherited:

GObject.Object (1)

Name

Short Description

requested

Emitted when any node transfers request subaction to local nodes within the address range reserved in Linux system.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Hinawa.FwResp(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Hinawa.FwRespClass

A transaction responder for request subaction initiated by node in IEEE 1394 bus. [class`FwResp`] responds to request subaction initiated by node in IEEE 1394 bus.

classmethod new()
Returns:

a new instance of [class`FwResp`].

Return type:

Hinawa.FwResp

Instantiate [class`FwResp`] object and return the instance.

New in version 1.3.

release()

Stop listening to the address range in Linux system for local nodes.

New in version 1.4.

reserve(node, addr, width)
Parameters:
  • node (Hinawa.FwNode) – A [class`FwNode`].

  • addr (int) – A start address to listen to in 1394 OHCI hardware.

  • width (int) – The byte width of address to listen to 1394 OHCI hardware.

Raises:

GLib.Error

Returns:

True if the overall operation finishes successfully, otherwise False.

Return type:

bool

Allocate an address range within Linux system for local nodes, each of which expresses 1394 OHCI hardware. Once successful, [signal`FwResp`:py:func:::requested<Hinawa.FwResp.signals.requested>] signal will be emitted whenever any request subactions arrive at the 1394 OHCI hardware within the dedicated range.

The range is precisely reserved at the address specified by addr with the size indicated by width. In essence, this function is a variant of [method`FwResp`.reserve_within_region] in which the specified address range is reserved as provided.

New in version 4.0.

reserve_within_region(node, region_start, region_end, width)
Parameters:
  • node (Hinawa.FwNode) – A [class`FwNode`].

  • region_start (int) – Start offset of address region in which range of address is looked up.

  • region_end (int) – End offset of address region in which range of address is looked up.

  • width (int) – The width for range of address to be looked up.

Raises:

GLib.Error

Returns:

True if the overall operation finishes successfully, otherwise False.

Return type:

bool

Allocate an address range within Linux system for local nodes, each of which expresses 1394 OHCI hardware. Once successful, [signal`FwResp`:py:func:::requested<Hinawa.FwResp.signals.requested>] signal will be emitted whenever any request subactions arrive at the 1394 OHCI hardware within the dedicated range.

The range is reserved between the values specified by region_start and region_end with the size indicated by width. The starting offset may vary every time.

New in version 4.0.

set_resp_frame(frame)
Parameters:

frame (bytes) – a 8 bit array for response frame.

Register byte frame for the response subaction of transaction.

New in version 2.0.

do_requested(tcode, offset, src_node_id, dst_node_id, card_id, generation, tstamp, frame) virtual
Parameters:
  • tcode (Hinawa.FwTcode) – One of [enum`FwTcode`] enumerations

  • offset (int) – The address offset at which the transaction arrives.

  • src_node_id (int) – The node ID of source for the transaction.

  • dst_node_id (int) – The node ID of destination for the transaction.

  • card_id (int) – The index of card specific to 1394 OHCI hardware at which the request subaction arrived.

  • generation (int) – The generation of bus when the transaction is transferred.

  • tstamp (int) – The time stamp at which the request arrived.

  • frame (bytes) – The array with elements for byte data.

Returns:

One of [enum`FwRcode` enumerations corresponding to rcodes defined in IEEE 1394 specification.

Return type:

Hinawa.FwRcode

Class closure for the [signal`FwResp`:py:func:::requested<Hinawa.FwResp.signals.requested>] signal.

New in version 4.0.

Signal Details

Hinawa.FwResp.signals.requested(fw_resp, tcode, offset, src_node_id, dst_node_id, card_id, generation, tstamp, frame)
Signal Name:

requested

Flags:

RUN_LAST

Parameters:
  • fw_resp (Hinawa.FwResp) – The object which received the signal

  • tcode (Hinawa.FwTcode) – One of [enum`FwTcode`] enumerations

  • offset (int) – The address offset at which the transaction arrives.

  • src_node_id (int) – The node ID of source for the transaction.

  • dst_node_id (int) – The node ID of destination for the transaction.

  • card_id (int) – The index of card specific to the 1394 OHCI hardware at which the request subaction arrived.

  • generation (int) – The generation of bus when the transaction is transferred.

  • tstamp (int) – The isochronous cycle at which the request arrived.

  • frame (bytes) – The array with elements for byte data.

Returns:

One of [enum`FwRcode`] enumerations corresponding to rcodes defined in IEEE 1394 specification.

Return type:

Hinawa.FwRcode

Emitted when any node transfers request subaction to local nodes within the address range reserved in Linux system.

The handler is expected to call [method`FwResp`.set_resp_frame] with frame and return [enum`FwRcode`] for response subaction.

The value of tstamp is unsigned 16 bit integer including higher 3 bits for three low order bits of second field and the rest 13 bits for cycle field in the format of IEEE 1394 CYCLE_TIMER register.

If the version of kernel ABI for Linux FireWire subsystem is less than 6, the value of tstamp argument has invalid value (=:obj:GObject.G_MAXUINT). Furthermore, if the version is less than 4, the src, dst, card, generation arguments have invalid value (=:obj:GObject.G_MAXUINT).

New in version 4.0.

Property Details

Hinawa.FwResp.props.is_reserved
Name:

is-reserved

Type:

bool

Default Value:

False

Flags:

READABLE

Whether a range of address is reserved or not.

New in version 2.0.

Hinawa.FwResp.props.offset
Name:

offset

Type:

int

Default Value:

0

Flags:

READABLE

The start offset of reserved address range.

New in version 2.3.

Hinawa.FwResp.props.width
Name:

width

Type:

int

Default Value:

0

Flags:

READABLE

The width of reserved address range.

New in version 2.3.