Top | ![]() |
![]() |
![]() |
![]() |
GQuark | hinawa_fw_resp_error_quark () |
HinawaFwResp * | hinawa_fw_resp_new () |
void | hinawa_fw_resp_reserve_within_region () |
void | hinawa_fw_resp_reserve () |
void | hinawa_fw_resp_release () |
void | hinawa_fw_resp_get_req_frame () |
void | hinawa_fw_resp_set_resp_frame () |
A HinawaFwResp responds requests from any units.
This class is an application of Linux FireWire subsystem. All of operations utilize ioctl(2) with subsystem specific request commands.
GQuark
hinawa_fw_resp_error_quark ();
Return the GQuark for error domain of GError which has code in HinawaFwRespError.
Since: 2.2
HinawaFwResp *
hinawa_fw_resp_new (void
);
Instantiate HinawaFwResp object and return the instance.
Since: 1.3.
void hinawa_fw_resp_reserve_within_region (HinawaFwResp *self
,HinawaFwNode *node
,guint64 region_start
,guint64 region_end
,guint width
,GError **exception
);
Start to listen to range of address equals to width in local node (e.g. 1394 OHCI host controller), which is used to communicate to the node given as parameter. The range of address is looked up in region between region_start and region_end.
self |
A HinawaFwResp. |
|
node |
A HinawaFwNode. |
|
region_start |
Start offset of address region in which range of address is looked up. |
|
region_end |
End offset of address region in which range of address is looked up. |
|
width |
The width for range of address to be looked up. |
|
exception |
A GError. Error can be generated with two domain of |
Since: 2.3.
void hinawa_fw_resp_reserve (HinawaFwResp *self
,HinawaFwNode *node
,guint64 addr
,guint width
,GError **exception
);
Start to listen to a range of address in host controller which connects to the node. The function
is a variant of hinawa_fw_resp_reserve_within_region()
so that the exact range of address should
be reserved as given.
self |
A HinawaFwResp. |
|
node |
A HinawaFwNode. |
|
addr |
A start address to listen to in host controller. |
|
width |
The byte width of address to listen to host controller. |
|
exception |
A GError. Error can be generated with two domain of |
Since: 1.4.
void
hinawa_fw_resp_release (HinawaFwResp *self
);
stop to listen to a range of address in host controller.
Since: 1.4.
void hinawa_fw_resp_get_req_frame (HinawaFwResp *self
,const guint8 **frame
,gsize *length
);
hinawa_fw_resp_get_req_frame
has been deprecated since version 2.2 and should not be used in newly-written code.
handler for “requested2” signal can receive the frame in its argument.
Retrieve byte frame to be requested.
self |
||
frame |
a 8bit array for response frame. |
[array length=length][out][transfer none] |
length |
The length of bytes for the frame. |
[out] |
Since: 2.0
void hinawa_fw_resp_set_resp_frame (HinawaFwResp *self
,guint8 *frame
,gsize length
);
Register byte frame as response.
self |
||
frame |
a 8bit array for response frame. |
[element-type guint8][array length=length] |
length |
The length of bytes for the frame. |
Since: 2.0
“is-reserved”
property “is-reserved” gboolean
Whether a range of address is reserved or not in host controller. .
Owner: HinawaFwResp
Flags: Read
Default value: FALSE
Since: 2.0
“offset”
property “offset” guint64
The start offset of reserved address range.
Owner: HinawaFwResp
Flags: Read
Default value: 0
Since: 2.3
“requested”
signalHinawaFwRcode user_function (HinawaFwResp *self, HinawaFwTcode tcode, gpointer user_data)
When any node transfers requests to the range of address to which this object listening, the “requested” signal handler is called with HinawaFwTcode, without the case that “requested2” signal handler is already assigned.
The handler can get data frame by a call of hinawa_fw_resp_get_req_frame()
and set data
frame by a call of hinawa_fw_resp_set_resp_frame()
, then returns rcode.
HinawaFwResp::requested
has been deprecated since version 2.2 and should not be used in newly-written code.
Use “requested2”, instead.
self |
||
tcode |
One of HinawaTcode enumerators |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 0.3
“requested2”
signalHinawaFwRcode user_function (HinawaFwResp *self, HinawaFwTcode tcode, guint64 offset, guint src, guint dst, guint card, guint generation, gpointer frame, guint length, gpointer user_data)
When any node transfers request subaction to the range of address to which this object
listening, the “requested” signal handler is called with arrived frame for
the subaction. The handler is expected to call hinawa_fw_resp_set_resp_frame()
with
frame and return rcode for response subaction.
self |
||
tcode |
One of HinawaTcode enumerations |
|
offset |
The address offset at which the transaction arrives. |
|
src |
The node ID of source for the transaction. |
|
dst |
The node ID of destination for the transaction. |
|
card |
The index of card corresponding to 1394 OHCI controller. |
|
generation |
The generation of bus when the transaction is transferred. |
|
frame |
The array with elements for byte data. |
[element-type guint8][array length=length] |
length |
The length of bytes for the frame. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 2.2