Hinawa.FwNode

g GObject.Object GObject.Object Hinawa.FwNode Hinawa.FwNode GObject.Object->Hinawa.FwNode

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

create_source ()

get_config_rom ()

open (path, open_flag)

read_cycle_time (clock_id, cycle_time)

Virtual Methods

Inherited:

GObject.Object (7)

do_bus_update ()

do_disconnected ()

Properties

Name

Type

Flags

Short Description

bus-manager-node-id

int

r

Node ID of node which plays role of bus manager at current generation of bus topology.

card-id

int

r

The numeric index for 1394 OHCI hardware used for the communication with the node

generation

int

r

Current generation of bus topology

ir-manager-node-id

int

r

Node ID of node which plays role of isochronous resource manager at current generation of bus topology.

local-node-id

int

r

Node ID of node which application uses to communicate to node associated to instance of object at current generation of bus topology. In general, it is for 1394 OHCI hardware.

node-id

int

r

Node ID of node associated to instance of object at current generation of bus topology. This parameter is effective after the association.

root-node-id

int

r

Node ID of root node in bus topology at current generation of the bus topology.

Signals

Inherited:

GObject.Object (1)

Name

Short Description

bus-update

Emitted when IEEE 1394 bus is updated.

disconnected

Emitted when the node is not available anymore in Linux system.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Hinawa.FwNode(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Hinawa.FwNodeClass

An event listener for node in IEEE 1394 bus. [class`FwNode`] listens to any events for an associated node in IEEE 1394 bus. Additionally, it provides some methods to retrieve fundamental information about the bus.

New in version 1.4.

classmethod new()
Returns:

an instance of [class`FwNode`].

Return type:

Hinawa.FwNode

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

New in version 1.4.

create_source()
Raises:

GLib.Error

Returns:

True if the overall operation finishes successfully, otherwise False.

gsrc:

A [struct`GLib`.Source].

Return type:

(bool, gsrc: GLib.Source)

Create [struct`GLib`.Source] for [struct`GLib`.MainContext] to dispatch events for the node on IEEE 1394 bus.

New in version 4.0.

get_config_rom()
Raises:

GLib.Error

Returns:

True if the overall operation finishes successfully, otherwise False.

image:

The content of configuration ROM.

Return type:

(bool, image: bytes)

Get cached content of configuration ROM aligned to big-endian.

New in version 4.0.

open(path, open_flag)
Parameters:
  • path (str) – A path to Linux FireWire character device

  • open_flag (int) – The flag of open(2) system call. O_RDONLY is fulfilled internally.

Raises:

GLib.Error

Returns:

True if the overall operation finishes successfully, otherwise False.

Return type:

bool

Open Linux FireWire character device to operate node in IEEE 1394 bus.

New in version 4.0.

read_cycle_time(clock_id, cycle_time)
Parameters:
  • clock_id (int) – The numeric ID of clock source for the reference timestamp. One of CLOCK_REALTIME(0), CLOCK_MONOTONIC(1), and CLOCK_MONOTONIC_RAW(4) is available in UAPI of Linux kernel.

  • cycle_time (Hinawa.CycleTime) – A [struct`CycleTime`].

Raises:

GLib.Error

Returns:

True if the overall operation finishes successfully, otherwise False.

cycle_time:

A [struct`CycleTime`].

Return type:

(bool, cycle_time: Hinawa.CycleTime)

Read current value of CYCLE_TIME register in 1394 OHCI hardware dedicated to communicate with the associated node in IEEE 1394 bus.

New in version 4.0.

do_bus_update() virtual

Class closure for the [signal`FwNode`:py:func:::bus-update<Hinawa.FwNode.signals.bus_update>].

New in version 1.4.

do_disconnected() virtual

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

New in version 1.4.

Signal Details

Hinawa.FwNode.signals.bus_update(fw_node)
Signal Name:

bus-update

Flags:

RUN_LAST

Parameters:

fw_node (Hinawa.FwNode) – The object which received the signal

Emitted when IEEE 1394 bus is updated. Handlers can read current generation in the bus via [property`FwNode`:py:data::generation<Hinawa.FwNode.props.generation>] property.

New in version 1.4.

Hinawa.FwNode.signals.disconnected(fw_node)
Signal Name:

disconnected

Flags:

RUN_LAST

Parameters:

fw_node (Hinawa.FwNode) – The object which received the signal

Emitted when the node is not available anymore in Linux system. It’s preferable to call [method`GObject`.Object.unref] immediately to release file descriptor.

New in version 1.4.

Property Details

Hinawa.FwNode.props.bus_manager_node_id
Name:

bus-manager-node-id

Type:

int

Default Value:

0

Flags:

READABLE

Node ID of node which plays role of bus manager at current generation of bus topology.

New in version 1.4.

Hinawa.FwNode.props.card_id
Name:

card-id

Type:

int

Default Value:

0

Flags:

READABLE

The numeric index for 1394 OHCI hardware used for the communication with the node. The value is stable against bus generation.

New in version 4.0.

Hinawa.FwNode.props.generation
Name:

generation

Type:

int

Default Value:

0

Flags:

READABLE

Current generation of bus topology.

New in version 1.4.

Hinawa.FwNode.props.ir_manager_node_id
Name:

ir-manager-node-id

Type:

int

Default Value:

0

Flags:

READABLE

Node ID of node which plays role of isochronous resource manager at current generation of bus topology.

New in version 1.4.

Hinawa.FwNode.props.local_node_id
Name:

local-node-id

Type:

int

Default Value:

0

Flags:

READABLE

Node ID of node which application uses to communicate to node associated to instance of object at current generation of bus topology. In general, it is for 1394 OHCI hardware.

New in version 1.4.

Hinawa.FwNode.props.node_id
Name:

node-id

Type:

int

Default Value:

0

Flags:

READABLE

Node ID of node associated to instance of object at current generation of bus topology. This parameter is effective after the association.

New in version 1.4.

Hinawa.FwNode.props.root_node_id
Name:

root-node-id

Type:

int

Default Value:

0

Flags:

READABLE

Node ID of root node in bus topology at current generation of bus topology.

New in version 1.4.