این دستور mdbus2 است که می تواند در ارائه دهنده هاست رایگان OnWorks با استفاده از یکی از چندین ایستگاه کاری آنلاین رایگان ما مانند Ubuntu Online، Fedora Online، شبیه ساز آنلاین ویندوز یا شبیه ساز آنلاین MAC OS اجرا شود.
برنامه:
نام
mdbus2 - درون نگری، تعامل و نظارت DBus تعاملی
خلاصه
mdbus2 [گزینه ها...] [ به من خدمت کن [ مسیر شی [ روش [ پارامترهای ... ] ] ]
mdbus2 -سی
mdbus2 -SL
شرح
La mdbus2 دستور برای کاوش و تعامل با سرویس های DBus در شما استفاده می شود سیستم اتوبوس
و جلسه اتوبوس. گذرگاه پیام در سراسر سیستم فقط یک بار وجود دارد و در بسیاری از آنها نصب می شود
سیستم ها به عنوان سرویس "messagebus". گذرگاه پیام جلسه برای ورود به سیستم هر کاربر (شروع شده است
هر بار که یک کاربر وارد می شود) و معمولاً با جلسه X11 شما مرتبط است.
در ساده ترین شکل، mdbus2 خدمات موجود در گذرگاه انتخاب شده را نشان می دهد. با توجه به الف
سرویس نام، موجود را نشان خواهد داد اشیاء توسط سرویس صادر می شود. خدمات داده شده است
نام و یک هدف مسیر، در معرض را نشان خواهد داد روش, سیگنالو املاک از آن
هدف - شی.
تهیه یک روش نام (و پارامترهای)، می توانید متدها را روی شی فراخوانی کنید و آن را دریافت کنید
برگشت ارزش(ها)
در گوش دادن حالت، می توانید سیگنال های ارسال شده در اتوبوس انتخابی را مشاهده کنید.
همچنین شامل یک تعاملی صدف با تاریخچه تکمیل برگه و فرمان.
OPTIONS
--نمایش-ناشناس, -a
همچنین نشان دهد منحصر به فرد خدمات (ناشناس) در اتوبوس.
--سیستم, -s
از گذرگاه سیستم به جای گذرگاه جلسه (پیشفرض) استفاده کنید.
-نمایش pids, -p
نمایش شناسه های فرآیند یونیکس
--گوش کن, -l
حالت شنونده را شروع کنید، که در آن می توانید سیگنال های اتوبوس را مشاهده کنید.
--در ارتباط بودن, -i
یک پوسته تعاملی راه اندازی کنید.
--annotate-types, -t
حاشیه نویسی انواع DBus.
طریقه استفاده
برای فراخوانی یک متد بر روی یک شیء پیاده سازی شده توسط یک سرویس، باید آن را مشخص کنید
مقادیر زیر:
1 سرویس نام، به عنوان مثال org.freesmartphone.ogsmd - نام سرویس مشخص می شود
فرآیند خدمت به تعدادی از اشیاء. هر فرآیندی که به
اتوبوس حداقل یک نام سرویس غیر منحصر به فرد (ناشناس) را دریافت می کند، مانند
: 1.0. نام های منحصر به فرد، مانند org.freesmartphone.ogsmd، معمولا داده می شوند
نماد نام دامنه معکوس تمام حروف کوچک.
2 هدف مسیر، به عنوان مثال /org/freesmartphone/GSM/Device - مسیر شی
یک شیء انضمامی را شناسایی می کند که توسط این فرآیند خدمت می شود. مسیرهای شی معمولا
شبیه مسیرهای سیستم فایل است.
3 روش، به عنوان مثال org.freesmartphone.GSM.Call.Initiate - نام روش
عملیاتی را که بخشی از رابط است (روش ها و سیگنال ها) شناسایی می کند.
از یک شی نام روش استفاده می شود Camel Case با علامت نقطه
4 پارامترهای، به عنوان مثال + 49123456 صدا`. (به be شرح داده شده به علاوه).
مثال ها
دریابید که نام اتوبوس ها در حال حاضر در گذرگاه سیستم ثبت شده است:
root@om-gta02:~# mdbus -s
: 1.0
: 1.1
: 1.2
: 1.42
: 1.47
: 1.60
: 1.61
org.bluz
org.freedesktop.Avahi
org.freedesktop.DBus
org.freesmartphone.frameworkd
org.freesmartphone.ogsmd
org.pyneo.muxer
دریابید که کدام اشیاء توسط یک سرویس خاص ارائه می شوند:
root@om-gta02:~# mdbus -s org.freesmartphone.frameworkd
/
/org
/org/freesmartphone
/org/freesmartphone/Framework
/org/freesmartphone/GSM
/org/freesmartphone/GSM/Device
/org/freesmartphone/GSM/Server
رابط کاربری یک شی خاص را پیدا کنید:
root@om-gta02:~# mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device
[روش] org.freesmartphone.GSM.Call.Activate(i:index)
[روش] org.freesmartphone.GSM.Call.ActivateConference(i:index)
[روش] org.freesmartphone.GSM.Call.HoldActive()
[روش] org.freesmartphone.GSM.Call.Initiate(s:number, s:type_)
[روش] org.freesmartphone.GSM.Call.Release(i:index)
[روش] org.freesmartphone.GSM.Call.ReleaseAll()
[روش] org.freesmartphone.GSM.Call.ReleaseHeld()
[SIGNAL] org.freesmartphone.GSM.Call.CallStatus(i:index، s:status، a{sv}:properties)
[METHOD] org.freedesktop.DBus.Introspectable.Introspect()
[روش] org.freesmartphone.GSM.Device.CancelCommand()
[روش] org.freesmartphone.GSM.Device.GetAntennaPower()
[روش] org.freesmartphone.GSM.Device.GetFeatures()
[روش] org.freesmartphone.GSM.Device.GetInfo()
[روش] org.freesmartphone.GSM.Device.PrepareForSuspend()
[METHOD] org.freesmartphone.GSM.Device.RecoverFromSuspend()
[روش] org.freesmartphone.GSM.Device.SetAntennaPower(b:power)
[روش] org.freesmartphone.GSM.SIM.ChangeAuthCode(s:old_pin، s:new_pin)
[روش] org.freesmartphone.GSM.SIM.DeleteEntry(i:index)
[روش] org.freesmartphone.GSM.SIM.DeleteMessage(i:index)
[روش] org.freesmartphone.GSM.SIM.GetAuthStatus()
[روش] org.freesmartphone.GSM.SIM.GetImsi()
[روش] org.freesmartphone.GSM.SIM.GetMessagebookInfo()
[روش] org.freesmartphone.GSM.SIM.GetPhonebookInfo()
[روش] org.freesmartphone.GSM.SIM.GetServiceCenterNumber()
[روش] org.freesmartphone.GSM.SIM.GetSimCountryCode()
[روش] org.freesmartphone.GSM.SIM.GetSubscriberNumbers()
[روش] org.freesmartphone.GSM.SIM.RetrieveEntry(i:index)
[روش] org.freesmartphone.GSM.SIM.RetrieveMessage(i:index)
[روش] org.freesmartphone.GSM.SIM.RetrieveMessagebook(s:category)
[روش] org.freesmartphone.GSM.SIM.RetrievePhonebook()
[روش] org.freesmartphone.GSM.SIM.SendAuthCode(s:code)
[روش] org.freesmartphone.GSM.SIM.SetServiceCenterNumber(s:number)
[روش] org.freesmartphone.GSM.SIM.StoreEntry(i:index، s:name، s:number)
[روش] org.freesmartphone.GSM.SIM.StoreMessage(s:number, s:contents)
[روش] org.freesmartphone.GSM.SIM.Unlock(s:puk، s:new_pin)
[SIGNAL] org.freesmartphone.GSM.SIM.AuthStatus(s:status)
[SIGNAL] org.freesmartphone.GSM.SIM.NewMessage(i:index)
[روش] org.freesmartphone.GSM.Network.DisableCallForwarding(s:reason، s:class_)
[روش] org.freesmartphone.GSM.Network.EnableCallForwarding(s:reason، s:class_، s:number، i:timeout)
[روش] org.freesmartphone.GSM.Network.GetCallForwarding(s:reason)
[روش] org.freesmartphone.GSM.Network.GetCallingIdentification()
[روش] org.freesmartphone.GSM.Network.GetNetworkCountryCode()
[روش] org.freesmartphone.GSM.Network.GetSignalStrength()
[روش] org.freesmartphone.GSM.Network.GetStatus()
[روش] org.freesmartphone.GSM.Network.ListProviders()
[METHOD] org.freesmartphone.GSM.Network.Register()
[روش] org.freesmartphone.GSM.Network.RegisterWithProvider(i:operator_code)
[روش] org.freesmartphone.GSM.Network.SetCallingIdentification(s:status)
[METHOD] org.freesmartphone.GSM.Network.Unregister()
[SIGNAL] org.freesmartphone.GSM.Network.SignalStrength(i:strength)
[SIGNAL] org.freesmartphone.GSM.Network.Status(a{sv}:status)
[روش] org.freesmartphone.GSM.PDP.ActivateContext(s:apn، s:user، s:password)
[روش] org.freesmartphone.GSM.PDP.DeactivateContext()
[روش] org.freesmartphone.GSM.PDP.GetCurrentGprsClass()
[روش] org.freesmartphone.GSM.PDP.ListAvailableGprsClasses()
[روش] org.freesmartphone.GSM.PDP.SetCurrentGprsClass(s:class_)
[SIGNAL] org.freesmartphone.GSM.PDP.ContextStatus(i:index، s:status، a{sv}:properties)
[روش] org.freesmartphone.GSM.Test.Command(s:command)
[روش] org.freesmartphone.GSM.Test.Echo(s:echo)
فراخوانی یک متد در یک رابط:
root@om-gta02 ~ $ mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.Device.GetInfo
{ 'imei': '354651011234567',
'سازنده': 'FIC/OpenMoko'،
'model': '"Modem Neo1973 GTA02 Embedded GSM"',
'revision': '"HW: GTA02BV5، GSM: gsm_ac_gp_fd_pu_em_cph_ds_vc_cal35_ri_36_amd8_ts0-Moko8"}
از آن در حالت گوش دادن استفاده کنید:
root@om-gta02:/local/pkg/fso/framework/framework# mdbus -s -l
گوش دادن به سیگنال ها در SystemBus از سرویس "همه"، شی "همه"...
[SIGNAL] org.freedesktop.DBus.NameOwnerتغییر از 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تغییر از org.freedesktop.DBus /org/freedesktop/DBus
(dbus.String(u':1.6')، dbus.String(u':1.6')، dbus.String(u''))
[SIGNAL] org.freedesktop.DBus.NameOwnerتغییر از org.freedesktop.DBus /org/freedesktop/DBus
(dbus.String(u':1.28')، dbus.String(u'')، dbus.String(u':1.28'))
[SIGNAL] org.freedesktop.DBus.NameOwnerتغییر از 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تغییر از 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تغییر از org.freedesktop.DBus /org/freedesktop/DBus
(dbus.String(u':1.29')، dbus.String(u'')، dbus.String(u':1.29'))
[SIGNAL] org.freedesktop.DBus.NameOwnerتغییر از 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تغییر از 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 از :1.28 /org/freesmartphone/GSM/Device
(dbus.Boolean(False)،)
[SIGNAL] org.freesmartphone.GSM.SIM.AuthStatus از :1.28 /org/freesmartphone/GSM/Device
(dbus.String(u'SIM PIN')،)
[SIGNAL] org.freesmartphone.GSM.SIM.AuthStatus از :1.28 /org/freesmartphone/GSM/Device
(dbus.String(u'READY')،)
[SIGNAL] org.freesmartphone.GSM.SIM.ReadyStatus از :1.28 /org/freesmartphone/GSM/Device
(dbus.Boolean (درست)،)
از mdbus2 به صورت آنلاین با استفاده از خدمات onworks.net استفاده کنید