You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2010/03/17 18:40:58 UTC

svn commit: r924380 - in /qpid/branches/qmf-devel0.7a/qpid/cpp: examples/qmf-agent/example.cpp examples/qmf-agent/schema.xml managementgen/qmfgen/management-types.xml src/qpid/agent/ManagementAgentImpl.cpp

Author: tross
Date: Wed Mar 17 17:40:58 2010
New Revision: 924380

URL: http://svn.apache.org/viewvc?rev=924380&view=rev
Log:
Fixed encoding for map-properties.

Modified:
    qpid/branches/qmf-devel0.7a/qpid/cpp/examples/qmf-agent/example.cpp
    qpid/branches/qmf-devel0.7a/qpid/cpp/examples/qmf-agent/schema.xml
    qpid/branches/qmf-devel0.7a/qpid/cpp/managementgen/qmfgen/management-types.xml
    qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp

Modified: qpid/branches/qmf-devel0.7a/qpid/cpp/examples/qmf-agent/example.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/cpp/examples/qmf-agent/example.cpp?rev=924380&r1=924379&r2=924380&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/cpp/examples/qmf-agent/example.cpp (original)
+++ qpid/branches/qmf-devel0.7a/qpid/cpp/examples/qmf-agent/example.cpp Wed Mar 17 17:40:58 2010
@@ -24,6 +24,7 @@
 #include <qpid/agent/ManagementAgent.h>
 #include <qpid/sys/Mutex.h>
 #include <qpid/sys/Time.h>
+#include "qpid/messaging/Variant.h"
 #include "qmf/org/apache/qpid/agent/example/Parent.h"
 #include "qmf/org/apache/qpid/agent/example/Child.h"
 #include "qmf/org/apache/qpid/agent/example/ArgsParentCreate_child.h"
@@ -44,6 +45,7 @@ using qpid::management::ManagementObject
 using qpid::management::Manageable;
 using qpid::management::Args;
 using qpid::sys::Mutex;
+using qpid::messaging::Variant;
 namespace _qmf = qmf::org::apache::qpid::agent::example;
 
 class ChildClass;
@@ -98,6 +100,11 @@ CoreClass::CoreClass(ManagementAgent* _a
 
     agent->addObject(mgmtObject, persistId++);
     mgmtObject->set_state("IDLE");
+
+    Variant::Map args;
+    args["first"] = "String data";
+    args["second"] = 34;
+    mgmtObject->set_args(args);
 }
 
 void CoreClass::doLoop()

Modified: qpid/branches/qmf-devel0.7a/qpid/cpp/examples/qmf-agent/schema.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/cpp/examples/qmf-agent/schema.xml?rev=924380&r1=924379&r2=924380&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/cpp/examples/qmf-agent/schema.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/cpp/examples/qmf-agent/schema.xml Wed Mar 17 17:40:58 2010
@@ -29,6 +29,7 @@
     This class represents a parent object
 
     <property name="name"      type="sstr" access="RC" index="y"/>
+    <property name="args"      type="map"  access="RO"/>
 
     <statistic name="state" type="sstr"                desc="Operational state of the link"/>
     <statistic name="count" type="count64" unit="tick" desc="Counter that increases monotonically"/>

Modified: qpid/branches/qmf-devel0.7a/qpid/cpp/managementgen/qmfgen/management-types.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/cpp/managementgen/qmfgen/management-types.xml?rev=924380&r1=924379&r2=924380&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/cpp/managementgen/qmfgen/management-types.xml (original)
+++ qpid/branches/qmf-devel0.7a/qpid/cpp/managementgen/qmfgen/management-types.xml Wed Mar 17 17:40:58 2010
@@ -39,8 +39,8 @@
 <type name="deltaTime" base="DELTATIME" cpp="uint64_t"      encode="@.putLongLong(#)"    decode="# = @.getLongLong()"  stream="#" size="8" accessor="direct" init="0"/>
 <type name="float"     base="FLOAT"     cpp="float"         encode="@.putFloat(#)"       decode="# = @.getFloat()"     stream="#" size="4" accessor="direct" init="0."/>
 <type name="double"    base="DOUBLE"    cpp="double"        encode="@.putDouble(#)"      decode="# = @.getDouble()"    stream="#" size="8" accessor="direct" init="0."/>
-<type name="uuid"      base="UUID"      cpp="::qpid::messaging::Uuid" encode="#.encode(@)"       decode="#.decode(@)"    stream="#" size="16" accessor="direct" init="::qpid::messaging::Uuid()" byRef="y" unmap="(#).asUuid().data()" map="::qpid::messaging::Uuid((#).data())" />
-<type name="map"       base="FTABLE"    cpp="::qpid::messaging::VariantMap" encode="#.encode(@)" decode="#.decode(@)"    stream="#" size="#.encodedSize()" accessor="direct" init="::qpid::messaging::VariantMap()" byRef="y" unmap="::qpid::messaging::VariantMap(); assert(false); /*TBD*/" map='(assert(false),"TBD: unsupported type")' />
+<type name="uuid"      base="UUID"      cpp="::qpid::messaging::Uuid" encode="#.encode(@)"       decode="#.decode(@)"  stream="#" size="16" accessor="direct" init="::qpid::messaging::Uuid()" byRef="y" unmap="(#).asUuid().data()" map="::qpid::messaging::Uuid((#).data())" />
+<type name="map"       base="FTABLE"    cpp="::qpid::messaging::VariantMap" encode="#.encode(@)" decode="#.decode(@)"  stream="#" size="#.encodedSize()" accessor="direct" init="::qpid::messaging::VariantMap()" byRef="y" unmap="::qpid::messaging::VariantMap(); assert(false); /*TBD*/"/>
 
 <type name="hilo8"   base="U8"   cpp="uint8_t"  encode="@.putOctet(#)"    decode="# = @.getOctet()"    style="wm" stream="#" size="1" accessor="counter" init="0"/>
 <type name="hilo16"  base="U16"  cpp="uint16_t" encode="@.putShort(#)"    decode="# = @.getShort()"    style="wm" stream="#" size="2" accessor="counter" init="0"/>

Modified: qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp?rev=924380&r1=924379&r2=924380&view=diff
==============================================================================
--- qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp (original)
+++ qpid/branches/qmf-devel0.7a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp Wed Mar 17 17:40:58 2010
@@ -864,6 +864,7 @@ void ManagementAgentImpl::periodicProces
             headers["qmf.agent"] = name_address;
 
             connThreadBody.sendBuffer(str, 0, headers, "qpid.management", key.str());
+            QPID_LOG(trace, "SENT DataIndication key=" << key.str());
         }
     }
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org