Top | ![]() |
![]() |
![]() |
![]() |
GQuark | hinawa_fw_req_error_quark () |
HinawaFwReq * | hinawa_fw_req_new () |
void | hinawa_fw_req_transaction_async () |
void | hinawa_fw_req_transaction_sync () |
void | hinawa_fw_req_transaction () |
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.
GQuark
hinawa_fw_req_error_quark ();
Return the GQuark for error domain of GError which has code in HinawaFwRcode.
Since: 2.1
HinawaFwReq *
hinawa_fw_req_new (void
);
Instantiate HinawaFwReq object and return the instance.
Since: 1.3.
void hinawa_fw_req_transaction_async (HinawaFwReq *self
,HinawaFwNode *node
,HinawaFwTcode tcode
,guint64 addr
,gsize length
,guint8 *const *frame
,gsize *frame_size
,GError **exception
);
Execute request subaction of transactions to the given node according to given code. When the response subaction arrives and read the contents, “responded” signal handler is called as long as event dispatcher runs.
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. Error can be generated with two domains; |
Since: 2.1.
void hinawa_fw_req_transaction_sync (HinawaFwReq *self
,HinawaFwNode *node
,HinawaFwTcode tcode
,guint64 addr
,gsize length
,guint8 *const *frame
,gsize *frame_size
,guint timeout_ms
,GError **exception
);
Execute request subaction of transaction to the given node according to given code, then wait for response subaction within the given timeout. The “timeout” property of instance is ignored.
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. |
|
timeout_ms |
The timeout to wait for response subaction of the transaction since request subaction is initiated, in milliseconds. |
|
exception |
A GError. Error can be generated with two domains; |
Since: 2.1.
void hinawa_fw_req_transaction (HinawaFwReq *self
,HinawaFwNode *node
,HinawaFwTcode tcode
,guint64 addr
,gsize length
,guint8 *const *frame
,gsize *frame_size
,GError **exception
);
hinawa_fw_req_transaction
has been deprecated since version 2.1 and should not be used in newly-written code.
Use hinawa_fw_req_transaction_sync()
, instead.
Execute request subaction of transaction to the given node according to given code, then wait for response subaction within “timeout”.
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. Error can be generated with two domains; |
Since: 1.4
“timeout”
property “timeout” guint
An elapse to expire waiting for response by ms unit.
HinawaFwReq:timeout
has been deprecated since version 2.1 and should not be used in newly-written code.
Use timeout_ms parameter of hinawa_fw_req_transaction_sync()
.
Owner: HinawaFwReq
Flags: Read / Write / Construct
Allowed values: >= 10
Default value: 200
Since: 1.4
“responded”
signalvoid user_function (HinawaFwReq *self, HinawaFwRcode rcode, gpointer frame, guint frame_size, gpointer user_data)
When the unit transfers asynchronous packet as response subaction for the transaction, and the process successfully reads the content of packet from Linux firewire subsystem, the “responded” signal handler is called.
self |
A HinawaFwReq. |
|
rcode |
One of HinawaFwRcode. |
|
frame |
The array with elements for byte data of response subaction for transaction. |
[array length=frame_size][element-type guint8] |
frame_size |
The number of elements of the array. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 2.1