summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpp/src/qpid/framing/Buffer.cpp32
-rw-r--r--cpp/src/qpid/framing/Buffer.h8
-rw-r--r--cpp/src/qpid/management/ManagementObject.h4
-rw-r--r--python/qpid/management.py16
-rw-r--r--python/qpid/managementdata.py11
-rw-r--r--specs/management-schema.xml2
-rw-r--r--specs/management-types.xml54
7 files changed, 100 insertions, 27 deletions
diff --git a/cpp/src/qpid/framing/Buffer.cpp b/cpp/src/qpid/framing/Buffer.cpp
index 19c94ffd58..9c089fd0f8 100644
--- a/cpp/src/qpid/framing/Buffer.cpp
+++ b/cpp/src/qpid/framing/Buffer.cpp
@@ -74,6 +74,22 @@ void Buffer::putLongLong(uint64_t i){
putLong(lo);
}
+void Buffer::putInt8(int8_t i){
+ data[position++] = (uint8_t) i;
+}
+
+void Buffer::putInt16(int16_t i){
+ putShort((uint16_t) i);
+}
+
+void Buffer::putInt32(int32_t i){
+ putLong((uint32_t) i);
+}
+
+void Buffer::putInt64(int64_t i){
+ putLongLong((uint64_t) i);
+}
+
void Buffer::putFloat(float f){
union {
uint32_t i;
@@ -129,6 +145,22 @@ uint64_t Buffer::getLongLong(){
return hi | lo;
}
+int8_t Buffer::getInt8(){
+ return (int8_t) data[position++];
+}
+
+int16_t Buffer::getInt16(){
+ return (int16_t) getShort();
+}
+
+int32_t Buffer::getInt32(){
+ return (int32_t) getLong();
+}
+
+int64_t Buffer::getInt64(){
+ return (int64_t) getLongLong();
+}
+
float Buffer::getFloat(){
union {
uint32_t i;
diff --git a/cpp/src/qpid/framing/Buffer.h b/cpp/src/qpid/framing/Buffer.h
index 94cc2d320f..a27b15cac0 100644
--- a/cpp/src/qpid/framing/Buffer.h
+++ b/cpp/src/qpid/framing/Buffer.h
@@ -79,6 +79,10 @@ class Buffer
void putShort(uint16_t i);
void putLong(uint32_t i);
void putLongLong(uint64_t i);
+ void putInt8(int8_t i);
+ void putInt16(int16_t i);
+ void putInt32(int32_t i);
+ void putInt64(int64_t i);
void putFloat(float f);
void putDouble(double f);
void putBin128(uint8_t* b);
@@ -87,6 +91,10 @@ class Buffer
uint16_t getShort();
uint32_t getLong();
uint64_t getLongLong();
+ int8_t getInt8();
+ int16_t getInt16();
+ int32_t getInt32();
+ int64_t getInt64();
float getFloat();
double getDouble();
diff --git a/cpp/src/qpid/management/ManagementObject.h b/cpp/src/qpid/management/ManagementObject.h
index ce3051367d..78d065aac2 100644
--- a/cpp/src/qpid/management/ManagementObject.h
+++ b/cpp/src/qpid/management/ManagementObject.h
@@ -62,6 +62,10 @@ class ManagementObject
static const uint8_t TYPE_DOUBLE = 13;
static const uint8_t TYPE_UUID = 14;
static const uint8_t TYPE_FTABLE = 15;
+ static const uint8_t TYPE_S8 = 16;
+ static const uint8_t TYPE_S16 = 17;
+ static const uint8_t TYPE_S32 = 18;
+ static const uint8_t TYPE_S64 = 19;
static const uint8_t ACCESS_RC = 1;
static const uint8_t ACCESS_RW = 2;
diff --git a/python/qpid/management.py b/python/qpid/management.py
index 1059c70ada..83c29a78a5 100644
--- a/python/qpid/management.py
+++ b/python/qpid/management.py
@@ -397,6 +397,14 @@ class managementClient:
codec.write_uuid (value)
elif typecode == 15: # FTABLE
codec.write_map (value)
+ elif typecode == 16:
+ codec.write_int8 (int(value))
+ elif typecode == 17:
+ codec.write_int16 (int(value))
+ elif typecode == 18:
+ codec.write_int32 (int(value))
+ elif typecode == 19:
+ codec.write_int64 (int(value))
else:
raise ValueError ("Invalid type code: %d" % typecode)
@@ -432,6 +440,14 @@ class managementClient:
data = codec.read_uuid ()
elif typecode == 15: # FTABLE
data = codec.read_map ()
+ elif typecode == 16:
+ data = codec.read_int8 ()
+ elif typecode == 17:
+ data = codec.read_int16 ()
+ elif typecode == 18:
+ data = codec.read_int32 ()
+ elif typecode == 19:
+ data = codec.read_int64 ()
else:
raise ValueError ("Invalid type code: %d" % typecode)
return data
diff --git a/python/qpid/managementdata.py b/python/qpid/managementdata.py
index f6ebf4a381..e75cd8a99d 100644
--- a/python/qpid/managementdata.py
+++ b/python/qpid/managementdata.py
@@ -222,7 +222,8 @@ class ManagementData:
if item[0] == key:
typecode = item[1]
unit = item[2]
- if (typecode >= 1 and typecode <= 5) or typecode == 12 or typecode == 13: # numerics
+ if (typecode >= 1 and typecode <= 5) or typecode == 12 or typecode == 13 or \
+ (typecode >= 16 and typecode <= 19):
if unit == None or unit == self.lastUnit:
return str (value)
else:
@@ -329,6 +330,14 @@ class ManagementData:
return "uuid"
elif typecode == 15:
return "field-table"
+ elif typecode == 16:
+ return "int8"
+ elif typecode == 17:
+ return "int16"
+ elif typecode == 18:
+ return "int32"
+ elif typecode == 19:
+ return "int64"
else:
raise ValueError ("Invalid type code: %d" % typecode)
diff --git a/specs/management-schema.xml b/specs/management-schema.xml
index 75c4dffd8e..64b37a1db7 100644
--- a/specs/management-schema.xml
+++ b/specs/management-schema.xml
@@ -80,7 +80,7 @@
<method name="leaveCluster"/>
- <method name="echo" desc="Request a response to test the path to the management agent">
+ <method name="echo" desc="Request a response to test the path to the management broker">
<arg name="sequence" dir="IO" type="uint32" default="0"/>
<arg name="body" dir="IO" type="lstr" default=""/>
</method>
diff --git a/specs/management-types.xml b/specs/management-types.xml
index 7ed320f6fa..309c94c98b 100644
--- a/specs/management-types.xml
+++ b/specs/management-types.xml
@@ -19,34 +19,38 @@
under the License.
-->
-<type name="objId" base="REF" cpp="uint64_t" encode="@.putLongLong (#)" decode="# = @.getLongLong ()" accessor="direct" init="0"/>
-<type name="uint8" base="U8" cpp="uint8_t" encode="@.putOctet (#)" decode="# = @.getOctet ()" accessor="direct" init="0"/>
-<type name="uint16" base="U16" cpp="uint16_t" encode="@.putShort (#)" decode="# = @.getShort ()" accessor="direct" init="0"/>
-<type name="uint32" base="U32" cpp="uint32_t" encode="@.putLong (#)" decode="# = @.getLong ()" accessor="direct" init="0"/>
-<type name="uint64" base="U64" cpp="uint64_t" encode="@.putLongLong (#)" decode="# = @.getLongLong ()" accessor="direct" init="0"/>
-<type name="bool" base="BOOL" cpp="uint8_t" encode="@.putOctet (#?1:0)" decode="# = @.getOctet ()==1" accessor="direct" init="0"/>
-<type name="sstr" base="SSTR" cpp="std::string" encode="@.putShortString (#)" decode="@.getShortString (#)" accessor="direct" init='""'/>
-<type name="lstr" base="LSTR" cpp="std::string" encode="@.putLongString (#)" decode="@.getLongString (#)" accessor="direct" init='""'/>
-<type name="absTime" base="ABSTIME" cpp="uint64_t" encode="@.putLongLong (#)" decode="# = @.getLongLong ()" accessor="direct" init="0"/>
-<type name="deltaTime" base="DELTATIME" cpp="uint64_t" encode="@.putLongLong (#)" decode="# = @.getLongLong ()" accessor="direct" init="0"/>
-<type name="float" base="FLOAT" cpp="float" encode="@.putFloat (#)" decode="# = @.getFloat ()" accessor="direct" init="0."/>
-<type name="double" base="DOUBLE" cpp="double" encode="@.putDouble (#)" decode="# = @.getDouble ()" accessor="direct" init="0."/>
-<type name="uuid" base="UUID" cpp="framing::Uuid" encode="#.encode (@)" decode="#.decode (@)" accessor="direct"/>
-<type name="map" base="FTABLE" cpp="framing::FieldTable" encode="#.encode (@)" decode="#.decode (@)" accessor="direct"/>
+<type name="objId" base="REF" cpp="uint64_t" encode="@.putLongLong(#)" decode="# = @.getLongLong()" accessor="direct" init="0"/>
+<type name="uint8" base="U8" cpp="uint8_t" encode="@.putOctet(#)" decode="# = @.getOctet()" accessor="direct" init="0"/>
+<type name="uint16" base="U16" cpp="uint16_t" encode="@.putShort(#)" decode="# = @.getShort()" accessor="direct" init="0"/>
+<type name="uint32" base="U32" cpp="uint32_t" encode="@.putLong(#)" decode="# = @.getLong()" accessor="direct" init="0"/>
+<type name="uint64" base="U64" cpp="uint64_t" encode="@.putLongLong(#)" decode="# = @.getLongLong()" accessor="direct" init="0"/>
+<type name="int8" base="S8" cpp="int8_t" encode="@.putInt8(#)" decode="# = @.getInt8()" accessor="direct" init="0"/>
+<type name="int16" base="S16" cpp="int16_t" encode="@.putInt16(#)" decode="# = @.getInt16()" accessor="direct" init="0"/>
+<type name="int32" base="S32" cpp="int32_t" encode="@.putInt32(#)" decode="# = @.getInt32()" accessor="direct" init="0"/>
+<type name="int64" base="S46" cpp="int64_t" encode="@.putInt64(#)" decode="# = @.getInt64()" accessor="direct" init="0"/>
+<type name="bool" base="BOOL" cpp="uint8_t" encode="@.putOctet(#?1:0)" decode="# = @.getOctet()==1" accessor="direct" init="0"/>
+<type name="sstr" base="SSTR" cpp="std::string" encode="@.putShortString(#)" decode="@.getShortString(#)" accessor="direct" init='""'/>
+<type name="lstr" base="LSTR" cpp="std::string" encode="@.putLongString(#)" decode="@.getLongString(#)" accessor="direct" init='""'/>
+<type name="absTime" base="ABSTIME" cpp="uint64_t" encode="@.putLongLong(#)" decode="# = @.getLongLong()" accessor="direct" init="0"/>
+<type name="deltaTime" base="DELTATIME" cpp="uint64_t" encode="@.putLongLong(#)" decode="# = @.getLongLong()" accessor="direct" init="0"/>
+<type name="float" base="FLOAT" cpp="float" encode="@.putFloat(#)" decode="# = @.getFloat()" accessor="direct" init="0."/>
+<type name="double" base="DOUBLE" cpp="double" encode="@.putDouble(#)" decode="# = @.getDouble()" accessor="direct" init="0."/>
+<type name="uuid" base="UUID" cpp="framing::Uuid" encode="#.encode(@)" decode="#.decode(@)" accessor="direct"/>
+<type name="map" base="FTABLE" cpp="framing::FieldTable" encode="#.encode(@)" decode="#.decode(@)" accessor="direct"/>
-<type name="hilo8" base="U8" cpp="uint8_t" encode="@.putOctet (#)" decode="# = @.getOctet ()" style="wm" accessor="counter" init="0"/>
-<type name="hilo16" base="U16" cpp="uint16_t" encode="@.putShort (#)" decode="# = @.getShort ()" style="wm" accessor="counter" init="0"/>
-<type name="hilo32" base="U32" cpp="uint32_t" encode="@.putLong (#)" decode="# = @.getLong ()" style="wm" accessor="counter" init="0"/>
-<type name="hilo64" base="U64" cpp="uint64_t" encode="@.putLongLong (#)" decode="# = @.getLongLong ()" style="wm" accessor="counter" init="0"/>
+<type name="hilo8" base="U8" cpp="uint8_t" encode="@.putOctet(#)" decode="# = @.getOctet()" style="wm" accessor="counter" init="0"/>
+<type name="hilo16" base="U16" cpp="uint16_t" encode="@.putShort(#)" decode="# = @.getShort()" style="wm" accessor="counter" init="0"/>
+<type name="hilo32" base="U32" cpp="uint32_t" encode="@.putLong(#)" decode="# = @.getLong()" style="wm" accessor="counter" init="0"/>
+<type name="hilo64" base="U64" cpp="uint64_t" encode="@.putLongLong(#)" decode="# = @.getLongLong()" style="wm" accessor="counter" init="0"/>
-<type name="count8" base="U8" cpp="uint8_t" encode="@.putOctet (#)" decode="# = @.getOctet ()" accessor="counter" init="0" perThread="y"/>
-<type name="count16" base="U16" cpp="uint16_t" encode="@.putShort (#)" decode="# = @.getShort ()" accessor="counter" init="0" perThread="y"/>
-<type name="count32" base="U32" cpp="uint32_t" encode="@.putLong (#)" decode="# = @.getLong ()" accessor="counter" init="0" perThread="y"/>
-<type name="count64" base="U64" cpp="uint64_t" encode="@.putLongLong (#)" decode="# = @.getLongLong ()" accessor="counter" init="0" perThread="y"/>
+<type name="count8" base="U8" cpp="uint8_t" encode="@.putOctet(#)" decode="# = @.getOctet()" accessor="counter" init="0" perThread="y"/>
+<type name="count16" base="U16" cpp="uint16_t" encode="@.putShort(#)" decode="# = @.getShort()" accessor="counter" init="0" perThread="y"/>
+<type name="count32" base="U32" cpp="uint32_t" encode="@.putLong(#)" decode="# = @.getLong()" accessor="counter" init="0" perThread="y"/>
+<type name="count64" base="U64" cpp="uint64_t" encode="@.putLongLong(#)" decode="# = @.getLongLong()" accessor="counter" init="0" perThread="y"/>
<!-- Min/Max/Average statistics -->
-<type name="mma32" base="U32" cpp="uint32_t" encode="@.putLong (#)" decode="# = @.getLong ()" style="mma" accessor="direct" init="0" perThread="y"/>
-<type name="mma64" base="U64" cpp="uint64_t" encode="@.putLongLong (#)" decode="# = @.getLongLong ()" style="mma" accessor="direct" init="0" perThread="y"/>
-<type name="mmaTime" base="DELTATIME" cpp="uint64_t" encode="@.putLongLong (#)" decode="# = @.getLongLong ()" style="mma" accessor="direct" init="0" perThread="y"/>
+<type name="mma32" base="U32" cpp="uint32_t" encode="@.putLong(#)" decode="# = @.getLong()" style="mma" accessor="direct" init="0" perThread="y"/>
+<type name="mma64" base="U64" cpp="uint64_t" encode="@.putLongLong(#)" decode="# = @.getLongLong()" style="mma" accessor="direct" init="0" perThread="y"/>
+<type name="mmaTime" base="DELTATIME" cpp="uint64_t" encode="@.putLongLong(#)" decode="# = @.getLongLong()" style="mma" accessor="direct" init="0" perThread="y"/>
</schema-types>