Qrtr.Node¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
QRTR bus |
||
r/w/co |
ID of the QRTR node |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
|
The |
|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Qrtr.Node(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Qrtr.Node
structure contains private data and should only be accessed using the provided API.New in version 1.0.
- add_service_info(service, port, version, instance)¶
- get_bus()¶
- Returns:
a
Qrtr.Bus
that must be freed withGObject.Object.unref
().- Return type:
Get the
Qrtr.Bus
where this node is available.New in version 1.0.
- get_id()¶
- Returns:
the node id.
- Return type:
Gets the node ID in the QRTR bus.
New in version 1.0.
- get_service_info_list()¶
- Returns:
a
GLib.List
ofQrtr.NodeServiceInfo
elements, that must be freed with g_list_free_full() usingQrtr.NodeServiceInfo.free
() asGLib.DestroyNotify
.- Return type:
Get the list of services currently supported by the
Qrtr.Node
.New in version 1.0.
- lookup_port(service)¶
- Parameters:
service (
int
) – a service number.- Returns:
the port number of the service in the node, or -1 if not found.
- Return type:
If a server has announced itself for the given node and service number, return the port number of that service.
If multiple instances are registered, this method returns the port number for the service with the highest version number.
New in version 1.0.
- lookup_service(port)¶
- Parameters:
port (
int
) – a port number.- Returns:
the service number, or -1 if not found.
- Return type:
If a server has announced itself for the given node and port number, return the service it serves.
New in version 1.0.
- peek_bus()¶
-
Get the
Qrtr.Bus
where this node is available, without increasing the reference count on the returned object.New in version 1.0.
- peek_service_info_list()¶
- Returns:
a
GLib.List
ofQrtr.NodeServiceInfo
elements. Do not free the returned object, it is owned by self.- Return type:
Get the list of services currently supported by the
Qrtr.Node
.New in version 1.0.
- remove_service_info(service, port, version, instance)¶
- wait_for_services(services, timeout_ms, cancellable, callback, *user_data)¶
- Parameters:
services ([
int
]) – aGLib.Array
of service typestimeout_ms (
int
) – the timeout, in milliseconds, to wait for the the services to be exposed in the node.cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfied.
Asynchronously waits until all the services listed in services are present on the node.
The operation may fail if any of the requested services isn’t notified, or if the node is removed from the bus while waiting.
When the operation is finished callback will be called. You can then call
Qrtr.Node.wait_for_services_finish
() to get the result of the operation.New in version 1.0.
- wait_for_services_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
.- Raises:
- Returns:
True
if all requested services are present on this node, orFalse
if error is set.- Return type:
Finishes an operation started with
Qrtr.Node.wait_for_services
().New in version 1.0.
Signal Details¶
- Qrtr.Node.signals.node_removed(node)¶
- Signal Name:
node-removed
- Flags:
- Parameters:
node (
Qrtr.Node
) – The object which received the signal
The
::node-removed
signal is emitted when the node fully disappears from the QRTR bus.New in version 1.0.
- Qrtr.Node.signals.service_added(node, service)¶
- Signal Name:
service-added
- Flags:
- Parameters:
The
::service-added
signal is emitted when a new service registers on the QRTR node.New in version 1.0.
- Qrtr.Node.signals.service_removed(node, service)¶
- Signal Name:
service-removed
- Flags:
- Parameters:
The
::service-removed
signal is emitted when a service deregisters from the QRTR node.New in version 1.0.
Property Details¶
- Qrtr.Node.props.bus¶
- Name:
bus
- Type:
- Default Value:
- Flags:
QRTR bus
New in version 1.0.
- Qrtr.Node.props.node_id¶
- Name:
node-id
- Type:
- Default Value:
0
- Flags:
ID of the QRTR node
New in version 1.0.