]> pilppa.com Git - libplpbus.git/commitdiff
get_parameter_count method
authorMika Laitio <lamikr@pilppa.org>
Fri, 1 Jul 2011 16:07:37 +0000 (19:07 +0300)
committerMika Laitio <lamikr@pilppa.org>
Fri, 1 Jul 2011 16:07:37 +0000 (19:07 +0300)
new method: BusMessage::get_parameter_count();

Signed-off-by: Mika Laitio <lamikr@pilppa.org>
src/plpbus/BusMessage.cc
src/plpbus/BusMessage.hh

index 99d32a0f9ac9d958dd52a1f25bd317619b3a7abe..47a7b7a11b46b246e5c7758ef78f440876706e73 100644 (file)
@@ -306,6 +306,15 @@ float BusMessage::get_float_parameter(string arg_name_param, int *err_flg) {
        return ret_val;
 }
 
+unsigned long BusMessage::get_parameter_count() {
+       int                     ret_val;
+       DataItemSequence        *seq;
+
+       seq     = (DataItemSequence *)_dataItemSeq;
+       ret_val = seq->length();
+       return ret_val;
+}
+
 void BusMessage::printout_dataitem(long index, void *item) {
        CORBA::TCKind   kind;
        const char      *name;
@@ -369,7 +378,6 @@ void BusMessage::printout() {
        count   = seq->length();
        log_debug("BusMessage.printout(): parameter count: %ld\n", count);
        for (long ii = 0; ii < count; ii++) {
-               printf("item[%ld]\n", ii);
                item    = (*seq)[ii];
                printout_dataitem(ii, &item);
        }
index 21faff61ca012c3646e8b81a53453367470b29c7..05fba365c5ad78ae1aee095de9e2d5c8421b2773 100644 (file)
@@ -31,6 +31,7 @@ namespace plpbus {
                        int get_int_parameter(std::string arg_name_param, int *err_flg);
                        double get_double_parameter(std::string arg_name_param, int *err_flg);
                        float get_float_parameter(std::string arg_name_param, int *err_flg);
+                       unsigned long get_parameter_count();
                        void printout();
                protected:
                        BusMessage();