Qrtr.Client

g GObject.GInterface GObject.GInterface Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable GObject.Object GObject.Object Qrtr.Client Qrtr.Client GObject.Object->Qrtr.Client Gio.Initable->Qrtr.Client

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.Initable (2)

Structs:

GObject.ObjectClass (5)

class

new (node, port, cancellable)

get_node ()

get_port ()

peek_node ()

send (message, cancellable)

Virtual Methods

Inherited:

GObject.Object (7), Gio.Initable (1)

Properties

Name

Type

Flags

Short Description

client-node

Qrtr.Node

r/w/co

The QRTR node

client-port

int

r/w/co

The QRTR node port

Signals

Inherited:

GObject.Object (1)

Name

Short Description

client-message

The ::client-message signal is emitted when a message is received from the port in the node.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Qrtr.Client(**kwargs)
Bases:

GObject.Object, Gio.Initable

Abstract:

No

Structure:

Qrtr.ClientClass

The Qrtr.Client structure contains private data and should only be accessed using the provided API.

New in version 1.0.

classmethod new(node, port, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

a newly allocated Qrtr.Client, or None if error is set.

Return type:

Qrtr.Client

Creates a new Qrtr.Client to communicate with port at Qrtr.Node.

New in version 1.0.

get_node()
Returns:

a Qrtr.Node that must be freed with GObject.Object.unref().

Return type:

Qrtr.Node

Get the Qrtr.Node that this client refers to.

New in version 1.0.

get_port()
Returns:

the node port.

Return type:

int

Gets the node port where this client communicates.

New in version 1.0.

peek_node()
Returns:

a Qrtr.Node. Do not free the returned object, it is owned by self.

Return type:

Qrtr.Node

Get the Qrtr.Node that this client refers to, without increasing the reference count on the returned object.

New in version 1.0.

send(message, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if the message is sent, or False if error is set.

Return type:

bool

Sends a message to the port at the node.

New in version 1.0.

Signal Details

Qrtr.Client.signals.client_message(client, message)
Signal Name:

client-message

Flags:

RUN_LAST

Parameters:
  • client (Qrtr.Client) – The object which received the signal

  • message (bytes) – the message data.

The ::client-message signal is emitted when a message is received from the port in the node.

There must be one single user connected to this signal, because it is not guaranteed that the contents of the message byte array aren’t modified by multiple users. In other words, the user connected to this signal may modify the contents of the message byte array if needed.

New in version 1.0.

Property Details

Qrtr.Client.props.client_node
Name:

client-node

Type:

Qrtr.Node

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The QRTR node

New in version 1.0.

Qrtr.Client.props.client_port
Name:

client-port

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The QRTR node port

New in version 1.0.