HinawaFwReq

HinawaFwReq — A transaction executor to a FireWire unit.

Functions

Properties

guint timeout Read / Write / Construct

Object Hierarchy

    GObject
    ╰── HinawaFwReq

Description

A HinawaFwReq supports some types of transactions in IEEE 1212. Mainly for read, write and lock operations.

This class is an application of Linux FireWire subsystem. All of operations utilize ioctl(2) with subsystem specific request commands.

Functions

hinawa_fw_req_new ()

HinawaFwReq *
hinawa_fw_req_new (void);

Instantiate HinawaFwReq object and return the instance.

Returns

an instance of HinawaFwReq.

Since: 1.3.


hinawa_fw_req_write ()

void
hinawa_fw_req_write (HinawaFwReq *self,
                     HinawaFwUnit *unit,
                     guint64 addr,
                     GByteArray *frame,
                     GError **exception);

hinawa_fw_req_write has been deprecated since version 1.4 and should not be used in newly-written code.

Use hinawa_fw_req_transaction() instead.

Execute write transactions to the given unit.

Parameters

self

A HinawaFwReq

 

unit

A HinawaFwUnit

 

addr

A destination address of target device

 

frame

a 8bit array.

[element-type guint8][array][in]

exception

A GError

 

hinawa_fw_req_read ()

void
hinawa_fw_req_read (HinawaFwReq *self,
                    HinawaFwUnit *unit,
                    guint64 addr,
                    GByteArray *frame,
                    guint length,
                    GError **exception);

hinawa_fw_req_read has been deprecated since version 1.4 and should not be used in newly-written code.

Use hinawa_fw_req_transaction() instead.

Execute read transaction to the given unit.

Parameters

self

A HinawaFwReq

 

unit

A HinawaFwUnit

 

addr

A destination address of target device

 

frame

a 8bit array.

[element-type guint8][array][out caller-allocates]

length

the number of bytes to read

 

exception

A GError

 

hinawa_fw_req_lock ()

void
hinawa_fw_req_lock (HinawaFwReq *self,
                    HinawaFwUnit *unit,
                    guint64 addr,
                    GByteArray **frame,
                    HinawaFwTcode lock_tcode,
                    GError **exception);

hinawa_fw_req_lock has been deprecated since version 1.4 and should not be used in newly-written code.

Use hinawa_fw_req_transaction() instead.

Execute lock transaction to the given unit.

Parameters

self

A HinawaFwReq

 

unit

A HinawaFwUnit

 

addr

A destination address of target device

 

frame

a 8bit array.

[element-type guint8][array][inout]

lock_tcode

One of HinawaFwTcode enumerator for lock operation.

 

exception

A GError

 

hinawa_fw_req_transaction ()

void
hinawa_fw_req_transaction (HinawaFwReq *self,
                           HinawaFwNode *node,
                           HinawaFwTcode tcode,
                           guint64 addr,
                           guint length,
                           guint8 *const *frame,
                           guint *frame_size,
                           GError **exception);

Execute transactions to the given node according to given code.

Parameters

self

A HinawaFwReq.

 

node

A HinawaFwNode.

 

tcode

A transaction code of HinawaFwTcode.

 

addr

A destination address of target device

 

length

The range of address in byte unit.

 

frame

An array with elements for byte data. Callers should give it for buffer with enough space against the request since this library performs no reallocation. Due to the reason, the value of this argument should point to the pointer to the array and immutable. The content of array is mutable for read and lock transaction.

[array length=frame_size][inout]

frame_size

The size of array in byte unit. The value of this argument should point to the numerical number and mutable for read and lock transaction.

 

exception

A GError.

 

Since: 1.4.

Types and Values

Property Details

The “timeout” property

  “timeout”                  guint

An elapse to expire waiting for response by ms unit.

Flags: Read / Write / Construct

Allowed values: >= 10

Default value: 10