Hinoko.FwIsoResource¶
- Implementations:
Methods¶
class |
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/en |
The numeric value of current generation for bus topology |
Signals¶
Name |
Short Description |
---|---|
Emitted when allocation of isochronous resource finishes. |
|
Emitted when deallocation of isochronous resource finishes. |
Fields¶
None
Class Details¶
- class Hinoko.FwIsoResource¶
- Bases:
- Structure:
A set of basic interfaces to listen to events about isochronous resource. [iface`FwIsoResource`] includes interfaces to listen to events about allocation and deallocation of isochronous resource.
New in version 0.7.
- classmethod calculate_bandwidth(bytes_per_payload, scode)¶
- Parameters:
bytes_per_payload (
int
) – The number of bytes in payload of isochronous packet.scode (
Hinoko.FwScode
) – The speed of transmission.
- Returns:
The amount of bandwidth expected to be consumed.
- Return type:
Calculate the amount of bandwidth expected to be consumed in allocation unit by given parameters.
- allocate(channel_candidates, bandwidth)¶
- Parameters:
- Raises:
- Returns:
True
if the overall operation finishes successfully, otherwiseFalse
.- Return type:
Initiate allocation of isochronous resource without any wait. One of the candidates is actually allocated for channel. When the allocation finishes, [signal`FwIsoResource`:py:func:::allocated<Hinoko.FwIsoResource.signals.allocated>] signal is emitted to notify the result, channel, and bandwidth.
New in version 1.0.
- allocate_wait(channel_candidates, bandwidth, timeout_ms)¶
- Parameters:
- Raises:
- Returns:
True
if the overall operation finishes successfully, otherwiseFalse
.- Return type:
Initiate allocation of isochronous resource and wait for [signal`FwIsoResource`:py:func:::allocated<Hinoko.FwIsoResource.signals.allocated>] signal. One of the candidates is actually allocated for channel.
New in version 1.0.
- create_source()¶
- Raises:
- Returns:
True
if the overall operation finished successfully, otherwiseFalse
.- source:
A [struct`GLib`.Source]
- Return type:
(
bool
, source:GLib.Source
)
Create [struct`GLib`.Source] for [struct`GLib`.MainContext] to dispatch events for isochronous resource.
New in version 0.7.
- open(path, open_flag)¶
- Parameters:
- Raises:
- Returns:
True
if the overall operation finished successfully, otherwiseFalse
.- Return type:
Open Linux FireWire character device to delegate any request for isochronous resource management to Linux FireWire subsystem.
New in version 0.7.
- do_allocate(channel_candidates, bandwidth) virtual¶
- Parameters:
- Returns:
True
if the overall operation finishes successfully, otherwiseFalse
.- Return type:
Initiate allocation of isochronous resource without any wait. One of the candidates is actually allocated for channel. When the allocation finishes, [signal`FwIsoResource`:py:func:::allocated<Hinoko.FwIsoResource.signals.allocated>] signal is emitted to notify the result, channel, and bandwidth.
New in version 1.0.
- do_allocated(channel, bandwidth, error) virtual¶
- Parameters:
channel (
int
) – The deallocated channel number.bandwidth (
int
) – The deallocated amount of bandwidth.error (
GLib.Error
orNone
) – A [struct`GLib`.Error]. Error can be generated with domain of [error`FwIsoResourceError`] and its EVENT code.
Closure for the [signal`FwIsoResource`:py:func:::allocated<Hinoko.FwIsoResource.signals.allocated>] signal.
New in version 0.7.
- do_create_source() virtual¶
- Returns:
True
if the overall operation finished successfully, otherwiseFalse
.- source:
A [struct`GLib`.Source]
- Return type:
(
bool
, source:GLib.Source
)
Create [struct`GLib`.Source] for [struct`GLib`.MainContext] to dispatch events for isochronous resource.
New in version 0.7.
- do_deallocated(channel, bandwidth, error) virtual¶
- Parameters:
channel (
int
) – The deallocated channel number.bandwidth (
int
) – The deallocated amount of bandwidth.error (
GLib.Error
orNone
) – A [struct`GLib`.Error]. Error can be generated with domain of [error`FwIsoResourceError`] and its EVENT code.
Closure for the [signal`FwIsoResource`:py:func:::deallocated<Hinoko.FwIsoResource.signals.deallocated>] signal.
New in version 0.7.
Signal Details¶
- Hinoko.FwIsoResource.signals.allocated(fw_iso_resource, channel, bandwidth, error)¶
- Signal Name:
allocated
- Flags:
- Parameters:
fw_iso_resource (
Hinoko.FwIsoResource
) – The object which received the signalchannel (
int
) – The deallocated channel number.bandwidth (
int
) – The deallocated amount of bandwidth.error (
GLib.Error
orNone
) – A [struct`GLib`.Error]. Error can be generated with domain of [error`FwIsoResourceError`] and its EVENT code.
Emitted when allocation of isochronous resource finishes.
New in version 0.7.
- Hinoko.FwIsoResource.signals.deallocated(fw_iso_resource, channel, bandwidth, error)¶
- Signal Name:
deallocated
- Flags:
- Parameters:
fw_iso_resource (
Hinoko.FwIsoResource
) – The object which received the signalchannel (
int
) – The deallocated channel number.bandwidth (
int
) – The deallocated amount of bandwidth.error (
GLib.Error
orNone
) – A [struct`GLib`.Error]. Error can be generated with domain of [error`FwIsoResourceError`] and its EVENT code.
Emitted when deallocation of isochronous resource finishes.
New in version 0.7.
Property Details¶
- Hinoko.FwIsoResource.props.generation¶
- Name:
generation
- Type:
- Default Value:
0
- Flags:
The numeric value of current generation for bus topology