Method

HinawaFwReqtransaction_with_tstamp

since: 2.6

Declaration [src]

gboolean
hinawa_fw_req_transaction_with_tstamp (
  HinawaFwReq* self,
  HinawaFwNode* node,
  HinawaFwTcode tcode,
  guint64 addr,
  gsize length,
  guint8** frame,
  gsize* frame_size,
  guint* tstamp,
  guint timeout_ms,
  GError** error
)

Description [src]

Execute request subaction of transaction to the given node according to given code, then wait for response subaction within the given timeout.

Each value of tstamp is unsigned 16 bit integer including higher 3 bits for three low order bits of second field and the rest 13 bits for cycle field in the format of IEEE 1394 CYCLE_TIMER register.

If the version of kernel ABI for Linux FireWire subsystem is less than 6, each element of tstamp has invalid value (=G_MAXUINT).

Available since: 2.6

Parameters

node

Type: HinawaFwNode

A HinawaFwNode.

The data is owned by the caller of the function.
tcode

Type: HinawaFwTcode

A transaction code of HinawaFwTcode.

addr

Type: guint64

A destination address of target device.

length

Type: gsize

The range of address in byte unit.

frame

Type: An array of guint8*

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.

The argument will be modified by the function.
The length of the array is specified in the frame_size argument.
The instance takes ownership of the data, and is responsible for freeing it.
frame_size

Type: gsize*

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

The argument will be modified by the function.
tstamp

Type: An array of guint

The array with two elements for time stamps. The first element is for the isochronous cycle at which the request subaction was sent. The second element is for the isochronous cycle at which the response subaction arrived.

The argument will be set by the function.
The array must have 2 elements.
The data is owned by the caller of the function.
timeout_ms

Type: guint

The timeout to wait for the response subaction of transaction since the request subaction is initiated, in milliseconds.

error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

TRUE if the overall operation finishes successfully, otherwise FALSE.