diff options
author | Ted Ross <tross@apache.org> | 2010-03-17 17:40:58 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2010-03-17 17:40:58 +0000 |
commit | 21755e0efb0a994689503c69ab831106e270ad03 (patch) | |
tree | 6d83e5f6428eea5491398565466153a4cff92df7 | |
parent | abd00458baef20580c487567ab402aa27c7b3e3a (diff) | |
download | qpid-python-21755e0efb0a994689503c69ab831106e270ad03.tar.gz |
Fixed encoding for map-properties.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qmf-devel0.7a@924380 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/examples/qmf-agent/example.cpp | 7 | ||||
-rw-r--r-- | qpid/cpp/examples/qmf-agent/schema.xml | 1 | ||||
-rw-r--r-- | qpid/cpp/managementgen/qmfgen/management-types.xml | 4 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp | 1 |
4 files changed, 11 insertions, 2 deletions
diff --git a/qpid/cpp/examples/qmf-agent/example.cpp b/qpid/cpp/examples/qmf-agent/example.cpp index e4420788c2..9766a61bd4 100644 --- a/qpid/cpp/examples/qmf-agent/example.cpp +++ b/qpid/cpp/examples/qmf-agent/example.cpp @@ -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* _agent, string _name) : name(_name), agent 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() diff --git a/qpid/cpp/examples/qmf-agent/schema.xml b/qpid/cpp/examples/qmf-agent/schema.xml index 1bf701a655..5662683eab 100644 --- a/qpid/cpp/examples/qmf-agent/schema.xml +++ b/qpid/cpp/examples/qmf-agent/schema.xml @@ -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"/> diff --git a/qpid/cpp/managementgen/qmfgen/management-types.xml b/qpid/cpp/managementgen/qmfgen/management-types.xml index d2c1bdc9e0..139be6c5df 100644 --- a/qpid/cpp/managementgen/qmfgen/management-types.xml +++ b/qpid/cpp/managementgen/qmfgen/management-types.xml @@ -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"/> diff --git a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp b/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp index 344dd4f43b..963b09a31d 100644 --- a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp +++ b/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp @@ -864,6 +864,7 @@ void ManagementAgentImpl::periodicProcessing() headers["qmf.agent"] = name_address; connThreadBody.sendBuffer(str, 0, headers, "qpid.management", key.str()); + QPID_LOG(trace, "SENT DataIndication key=" << key.str()); } } |