Hinawa.FwResp¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
Whether a range of address is reserved or not. |
||
r |
The start offset of reserved address range. |
||
r |
The width of reserved address range. |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when any node transfers request subaction to local nodes within the address range reserved in Linux system. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Hinawa.FwResp(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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:
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:
- Returns:
True
if the overall operation finishes successfully, otherwiseFalse
.- Return type:
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:
- Returns:
True
if the overall operation finishes successfully, otherwiseFalse
.- Return type:
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`] enumerationsoffset (
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:
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:
- Parameters:
fw_resp (
Hinawa.FwResp
) – The object which received the signaltcode (
Hinawa.FwTcode
) – One of [enum`FwTcode`] enumerationsoffset (
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:
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¶
-
Whether a range of address is reserved or not.
New in version 2.0.
- Hinawa.FwResp.props.offset¶
-
The start offset of reserved address range.
New in version 2.3.