Đây là lệnh mdbus2 có thể chạy trong nhà cung cấp dịch vụ lưu trữ miễn phí OnWorks bằng cách sử dụng một trong nhiều máy trạm trực tuyến miễn phí của chúng tôi như Ubuntu Online, Fedora Online, trình giả lập trực tuyến Windows hoặc trình mô phỏng trực tuyến MAC OS
CHƯƠNG TRÌNH:
TÊN
mdbus2 - Xem xét nội quan, tương tác và giám sát của DBus tương tác
SYNOPSIS
mdbus2 [TÙY CHỌN...] [ phục vụ tôi [ đường dẫn đối tượng [ phương pháp [ params ... ]]]]
mdbus2 -Đúng
mdbus2 -sl
MÔ TẢ
Sản phẩm mdbus2 lệnh được sử dụng để khám phá và tương tác với các dịch vụ DBus trên hệ thống xe buýt
và Phiên xe buýt. Bus thông báo toàn hệ thống chỉ tồn tại một lần và được cài đặt trên nhiều
hệ thống như dịch vụ "xe buýt tin nhắn". Xe buýt thông báo phiên là cho mỗi người dùng đăng nhập (đã bắt đầu
mỗi khi người dùng đăng nhập) và thường gắn với phiên X11 của bạn.
Ở dạng đơn giản nhất, mdbus2 hiển thị các dịch vụ có sẵn trên xe buýt đã chọn. Đưa ra
dịch vụ tên, nó sẽ hiển thị đối tượng xuất bởi dịch vụ. Đưa ra một dịch vụ
tên và một vật con đường, nó sẽ hiển thị phương pháp, tín hiệuvà tài sản về điều đó
vật.
Cung cấp một phương pháp tên (Và thông số), bạn có thể gọi các phương thức trên đối tượng và lấy
trở lại giá trị(S).
Trong tạp chí nghe chế độ, bạn có thể quan sát các tín hiệu được gửi trên xe buýt đã chọn.
Cũng bao gồm một tương tác shell với lịch sử hoàn thành tab và lệnh.
LỰA CHỌN
- ẩn danh, -a
Cũng hiển thị độc đáo (ẩn danh) dịch vụ trên xe buýt.
--hệ thống, -s
Sử dụng xe buýt hệ thống thay vì xe buýt phiên (mặc định).
-show-pids, -p
Hiển thị ID quy trình UNIX.
--nghe, -l
Khởi động chế độ nghe, trong đó bạn có thể quan sát các tín hiệu trên xe buýt.
- tương tác, -i
Bắt đầu một trình bao tương tác.
--annotate-type, -t
Chú thích các loại DBus.
SỬ DỤNG
Để gọi một phương thức trên một đối tượng được thực thi bởi một dịch vụ, bạn cần chỉ định
các giá trị sau:
1 dịch vụ tên, ví dụ org.freesmartphone.ogsmd - Tên dịch vụ xác định
quá trình phục vụ một số đối tượng. Mọi quy trình gắn liền với
bus được gán ít nhất một tên dịch vụ không duy nhất (ẩn danh), chẳng hạn như
: 1.0. Tên riêng, chẳng hạn như org.freesmartphone.ogsmd, thường được đưa vào
ký hiệu tên miền đảo ngược toàn bộ chữ thường.
2 vật con đường, ví dụ / org / freesmartphone / GSM / Thiết bị - Đường dẫn đối tượng
xác định một đối tượng cụ thể được phục vụ bởi quá trình. Đường dẫn đối tượng thường
trông giống như đường dẫn hệ thống tệp.
3 phương pháp, ví dụ org.freesmartphone.GSM.Call.Initiate - Tên phương thức
xác định một thao tác là một phần của giao diện (phương pháp và tín hiệu)
của một đối tượng. Tên phương pháp đang sử dụng Trường hợp lạc đà với ký hiệu dấu chấm.
4 thông số, ví dụ +49123456 giọng nói`. (Đến be mô tả hơn nữa).
VÍ DỤ
Tìm hiểu những tên xe buýt hiện đang được đăng ký trên xe buýt hệ thống:
root @ om-gta02: ~ # mdbus -s
: 1.0
: 1.1
: 1.2
: 1.42
: 1.47
: 1.60
: 1.61
org.bluez
org.freedesktop.Avahi
org.freedesktop.DBus
org.freesmartphone.frameworkd
org.freesmartphone.ogsmd
org.pyneo.muxer
Tìm hiểu những đối tượng nào được phục vụ bởi một dịch vụ nhất định:
root @ om-gta02: ~ # mdbus -s org.freesmartphone.frameworkd
/
/ org
/ org / freesmartphone
/ org / freesmartphone / Framework
/ org / freesmartphone / GSM
/ org / freesmartphone / GSM / Thiết bị
/ org / freesmartphone / GSM / Server
Tìm hiểu giao diện của một đối tượng nào đó:
root @ om-gta02: ~ # mdbus -s org.freesmartphone.ogsmd / org / freesmartphone / GSM / Thiết bị
[METHOD] org.freesmartphone.GSM.Call.Activate (i: index)
[METHOD] org.freesmartphone.GSM.Call.ActivateConference (i: index)
[METHOD] org.freesmartphone.GSM.Call.HoldActive ()
[METHOD] org.freesmartphone.GSM.Call.Initiate (s: number, s: type_)
[METHOD] org.freesmartphone.GSM.Call.Release (i: index)
[METHOD] org.freesmartphone.GSM.Call.ReleaseAll ()
[METHOD] org.freesmartphone.GSM.Call.ReleaseHeld ()
[SIGNAL] org.freesmartphone.GSM.Call.CallStatus (i: index, s: status, a {sv}: properties)
[METHOD] org.freedesktop.DBus.Introspectable.Introspect ()
[METHOD] org.freesmartphone.GSM.Device.CancelCommand ()
[METHOD] org.freesmartphone.GSM.Device.GetAntennaPower ()
[METHOD] org.freesmartphone.GSM.Device.GetFeatures ()
[METHOD] org.freesmartphone.GSM.Device.GetInfo ()
[METHOD] org.freesmartphone.GSM.Device.PrepareForSuspend ()
[METHOD] org.freesmartphone.GSM.Device.RecoverFromSuspend ()
[METHOD] org.freesmartphone.GSM.Device.SetAntennaPower (b: power)
[METHOD] org.freesmartphone.GSM.SIM.ChangeAuthCode (s: old_pin, s: new_pin)
[METHOD] org.freesmartphone.GSM.SIM.DeleteEntry (i: index)
[METHOD] org.freesmartphone.GSM.SIM.DeleteMessage (i: index)
[METHOD] org.freesmartphone.GSM.SIM.GetAuthStatus ()
[METHOD] org.freesmartphone.GSM.SIM.GetImsi ()
[METHOD] org.freesmartphone.GSM.SIM.GetMessagebookInfo ()
[METHOD] org.freesmartphone.GSM.SIM.GetPhonebookInfo ()
[METHOD] org.freesmartphone.GSM.SIM.GetServiceCenterNumber ()
[METHOD] org.freesmartphone.GSM.SIM.GetSimCountryCode ()
[METHOD] org.freesmartphone.GSM.SIM.GetSubscriberNumbers ()
[METHOD] org.freesmartphone.GSM.SIM.RetrieveEntry (i: index)
[METHOD] org.freesmartphone.GSM.SIM.RetrieveMessage (i: index)
[METHOD] org.freesmartphone.GSM.SIM.RetrieveMessagebook (s: danh mục)
[METHOD] org.freesmartphone.GSM.SIM.RetrievePhonebook ()
[METHOD] org.freesmartphone.GSM.SIM.SendAuthCode (s: code)
[METHOD] org.freesmartphone.GSM.SIM.SetServiceCenterNumber (s: number)
[METHOD] org.freesmartphone.GSM.SIM.StoreEntry (i: index, s: name, s: number)
[METHOD] org.freesmartphone.GSM.SIM.StoreMessage (s: số, s: nội dung)
[METHOD] org.freesmartphone.GSM.SIM.Unlock (s: puk, s: new_pin)
[SIGNAL] org.freesmartphone.GSM.SIM.AuthStatus (s: trạng thái)
[SIGNAL] org.freesmartphone.GSM.SIM.NewMessage (i: index)
[METHOD] org.freesmartphone.GSM.Network.DisableCallForwarding (s: reason, s: class_)
[METHOD] org.freesmartphone.GSM.Network.EnableCallForwarding (s: reason, s: class_, s: number, i: timeout)
[METHOD] org.freesmartphone.GSM.Network.GetCallForwarding (s: reason)
[METHOD] org.freesmartphone.GSM.Network.GetCallingIdentification ()
[METHOD] org.freesmartphone.GSM.Network.GetNetworkCountryCode ()
[METHOD] org.freesmartphone.GSM.Network.GetSignalStrength ()
[METHOD] org.freesmartphone.GSM.Network.GetStatus ()
[METHOD] org.freesmartphone.GSM.Network.ListProviders ()
[METHOD] org.freesmartphone.GSM.Network.Register ()
[METHOD] org.freesmartphone.GSM.Network.RegisterWithProvider (i: operator_code)
[METHOD] org.freesmartphone.GSM.Network.SetCallingIdentification (s: status)
[METHOD] org.freesmartphone.GSM.Network.Unregister ()
[SIGNAL] org.freesmartphone.GSM.Network.SignalStrength (i: sức mạnh)
[SIGNAL] org.freesmartphone.GSM.Network.Status (một {sv}: trạng thái)
[METHOD] org.freesmartphone.GSM.PDP.ActivateContext (s: apn, s: user, s: password)
[METHOD] org.freesmartphone.GSM.PDP.DeactivateContext ()
[METHOD] org.freesmartphone.GSM.PDP.GetCurrentGprsClass ()
[METHOD] org.freesmartphone.GSM.PDP.ListAvailableGprsClasses ()
[METHOD] org.freesmartphone.GSM.PDP.SetCurrentGprsClass (s: class_)
[SIGNAL] org.freesmartphone.GSM.PDP.ContextStatus (i: index, s: status, a {sv}: properties)
[METHOD] org.freesmartphone.GSM.Test.Command (s: lệnh)
[METHOD] org.freesmartphone.GSM.Test.Echo (s: echo)
Gọi một phương thức trên giao diện:
root @ om-gta02 ~ $ mdbus -s org.freesmartphone.ogsmd / org / freesmartphone / GSM / Device org.freesmartphone.GSM.Device.GetInfo
{'imei': '354651011234567',
'nhà sản xuất': 'FIC / OpenMoko',
'model': '"Modem GSM nhúng Neo1973 GTA02",
'bản sửa đổi': '"HW: GTA02BV5, GSM: gsm_ac_gp_fd_pu_em_cph_ds_vc_cal35_ri_36_amd8_ts0-Moko8"'}
Sử dụng nó trong chế độ nghe:
root @ om-gta02: / local / pkg / fso / framework / framework # mdbus -s -l
lắng nghe tín hiệu trên SystemBus từ dịch vụ 'tất cả', đối tượng 'tất cả' ...
[SIGNAL] org.freedesktop.DBus.NameOwnerĐã thay đổi từ org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u'org.pyneo.muxer '), dbus.String (u': 1.6 '), dbus.String (u' '))
[SIGNAL] org.freedesktop.DBus.NameOwnerĐã thay đổi từ org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u ': 1.6'), dbus.String (u ': 1.6'), dbus.String (u ''))
[SIGNAL] org.freedesktop.DBus.NameOwnerĐã thay đổi từ org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u ': 1.28'), dbus.String (u ''), dbus.String (u ': 1.28'))
[SIGNAL] org.freedesktop.DBus.NameOwnerĐã thay đổi từ org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u'org.freesmartphone.frameworkd '), dbus.String (u' '), dbus.String (u': 1.28 '))
[SIGNAL] org.freedesktop.DBus.NameOwnerĐã thay đổi từ org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u'org.freesmartphone.ogsmd '), dbus.String (u' '), dbus.String (u': 1.28 '))
[SIGNAL] org.freedesktop.DBus.NameOwnerĐã thay đổi từ org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u ': 1.29'), dbus.String (u ''), dbus.String (u ': 1.29'))
[SIGNAL] org.freedesktop.DBus.NameOwnerĐã thay đổi từ org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u'org.pyneo.muxer '), dbus.String (u' '), dbus.String (u': 1.29 '))
[SIGNAL] org.freedesktop.DBus.NameOwnerĐã thay đổi từ org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u ': 1.30'), dbus.String (u ''), dbus.String (u ': 1.30'))
[SIGNAL] org.freesmartphone.GSM.SIM.ReadyStatus from: 1.28 / org / freesmartphone / GSM / Device
(dbus.Boolean (Sai),)
[SIGNAL] org.freesmartphone.GSM.SIM.Auth Trạng thái từ: 1.28 / org / freesmartphone / GSM / Thiết bị
(dbus.String (u'SIM PIN '),)
[SIGNAL] org.freesmartphone.GSM.SIM.Auth Trạng thái từ: 1.28 / org / freesmartphone / GSM / Thiết bị
(dbus.String (u'READY '),)
[SIGNAL] org.freesmartphone.GSM.SIM.ReadyStatus from: 1.28 / org / freesmartphone / GSM / Device
(dbus.Boolean (Đúng),)
Sử dụng mdbus2 trực tuyến bằng các dịch vụ onworks.net