Module l2dbus

The low-level L2DBUS core module.

This module provides access to the low-level functions/methods that implement the binding to the D-Bus reference library. Loading this core library introduces the following namespaces into the l2dbus module. Since these are namespaces they are implicitly defined when the l2dbus is required.

The following namespaces are created when the l2dbus module is loaded:

  • l2dbus.Connection
  • l2dbus.Dbus
  • l2dbus.DbusTypes
  • l2dbus.Dispatcher
  • l2dbus.Int64
  • l2dbus.Interface
  • l2dbus.Introspection
  • l2dbus.Match
  • l2dbus.Message
  • l2dbus.PendingCall
  • l2dbus.ServiceObject
  • l2dbus.Timeout
  • l2dbus.Trace
  • l2dbus.Uint64
  • l2dbus.Watch

Functions

shutdown ()
isMain ()
getVersion ()
machineId ()

Tables

versionInfo Version table.


Functions

shutdown ()

Shuts down the L2DBUS module.

Typically this function should be called prior to an L2DBUS application terminating. Once called it is no longer safe to call any other L2DBUS functions/methods. Strictly speaking, it's not necessary to call this function when terminating since the Lua VM and OS will implicitly free any underlying resources.

isMain ()

Determines if the Lua file is loaded as a module or run as a "main" program.

This function attempts to detect whether the file in which it's called is being loaded by another Lua file (as a module) or if it's being executed directly as the "main" program. This is analogous to the Python construct:

 if __name__ == "__main__":
     run_as_program()
 else:
     loaded_as_module()

Returns:

    boolean Returns true if the Lua file is being run as a "main" program or false if it is being loaded as a module.
getVersion ()

Returns version information about the L2DBUS module.

This function returns a table containing useful version information related to the module itself and underlying libraries.

Returns:

    table versionInfo
machineId ()

Returns the D-Bus local machine identifier.

Obtains the machine UUID of the machine this process is running on.

For more details see: dbus_get_local_machine_id(void)

Returns:

    string The local D-Bus machine identifier.

Tables

versionInfo
Version table.

A table containing version information of the L2DBUS module and underlying dependencies.

Fields:

  • dbusMajor The D-Bus major version as a number.
  • dbusMinor The D-Bus minor version as a number.
  • dbusRelese The D-Bus release version as a number.
  • l2dbusMajor The L2DBUS major version as a number.
  • l2dbusMinor The L2DBUS minor version as a number.
  • l2dbusRelese The L2DBUS release version as a number.
  • l2dbusVerNum The L2DBUS version as a number.
  • l2dbusVerStr The L2DBUS version as a string.
  • cdbusMajor The CDBUS major version as a number.
  • cdbusMinor The CDBUS minor version as a number.
  • cdbusRelease The CDBUS release version as a number.
  • cdbusVerStr The CDBUS version as a string.
  • copyright The L2DBUS copyright information.
  • author The L2DBUS author information.
generated by LDoc 1.3