1

How to get description of service's event & action?

asked 2015-09-16 19:37:51 -0700

daniel.hung gravatar image

updated 2015-09-16 19:51:50 -0700

Hi All,

Based on this article, I can get the list of event & action from ACServerSample. https://ask.allseenalliance.org/quest...

It looks like this.

    /MyDeviceEventsAndActions
            org.alljoyn.ACServerSample.Actions
            <interface name="org.alljoyn.ACServerSample.Actions">
                <method name="SetModeToAuto">
                </method>
                <method name="SetModeToCool">
                </method>
                <method name="SetModeToFan">
                </method>
                <method name="SetModeToHeat">
                </method>
                <method name="SetModeToOff">
                </method>
                <property name="Version" type="q" access="read"/>
            </interface>
            org.alljoyn.ACServerSample.Events
            <interface name="org.alljoyn.ACServerSample.Events">
                <signal name="ModeSetToOff">
                </signal>
                <signal name="ModeSetToOn">
                </signal>
                <signal name="Temperature60FReached">
                </signal>
                <signal name="Temperature80FReached">
                </signal>
                <property name="Version" type="q" access="read"/>
            </interface>
            org.allseen.Introspectable

However, I also want to get the readable description. How could I do this in C++? For example, for <method name="SetModeToOff">, I should get <description>Set AC mode to Off</description>.

Thanks, Daniel

edit retag flag offensive close merge delete

Comments

you might ask on the core mailing list. https://lists.allseenalliance.org/mailman/listinfo/allseen-core

ry.jones ( 2015-09-16 21:53:11 -0700 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-09-21 01:07:32 -0700

praveenb gravatar image

updated 2015-10-20 16:39:58 -0700

org.allseen.Introspectable is an interface that contains two methods, GetDescriptionLanguages and IntrospectWithDescription. You can read about Events & Actions here.

Briefly, the way to get a human-readable description is as follows:

  1. Create a ProxyBusObject with the name of the remote peer, the session id established with the remote peer and the Bus Object path interested in.
  2. Using the ProxyBusObject created above make a MethodCall for the interface org.allseen.Introspectable and the member IntrospectWithDescrption. The method requires one input parameter, the language. If an empty string "" is passed, the description for the default language is returned.

An example of this can be found here.

edit flag offensive delete publish link more

Comments

Hi Pravenenb, Thank you! It works!

daniel.hung ( 2015-09-21 01:19:41 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-09-16 19:37:51 -0700

Seen: 196 times

Last updated: Oct 20 '15