Esempio n. 1
0
 def _topic_count(self):
     t_count = _uint32_()
     _lib_call("TOSDB_GetTopicCount",
               self._name,
               _pointer(t_count),
               arg_types=(_str_, _PTR_(_uint32_)))
     return t_count.value
Esempio n. 2
0
 def get_block_size(self):
     b_size = _uint32_()
     _lib_call("TOSDB_GetBlockSize",
               self._name,
               _pointer(b_size),
               arg_types=(_str_, _PTR_(_uint32_)))
     return b_size.value
Esempio n. 3
0
 def _get_item_or_topic_count(self, fname):
     c = _uint32_()
     _lib_call("TOSDB_Get" + fname + "Count",
               self._name,
               _pointer(c),
               arg_types=(_str_, _PTR_(_uint32_)))
     return c.value
Esempio n. 4
0
 def _item_count(self):
     i_count = _uint32_()
     _lib_call("TOSDB_GetItemCount",
               self._name,
               _pointer(i_count),
               arg_types=(_str_, _PTR_(_uint32_)))
     return i_count.value
Esempio n. 5
0
    def stream_occupancy(self, item, topic):
        item = self._handle_raw_item(item)
        topic = self._handle_raw_topic(topic)
        occ = _uint32_()

        _lib_call("TOSDB_GetStreamOccupancy",
                  self._name,
                  item.encode("ascii"),
                  topic.encode("ascii"),
                  _pointer(occ),
                  arg_types=(_str_, _str_, _str_, _PTR_(_uint32_)))

        return occ.value
Esempio n. 6
0
 def stream_occupancy(self, item, topic):              
     item = item.upper()
     topic = topic.upper()
     self._valid_item(item)
     self._valid_topic(topic)
     occ = _uint32_()
     
     _lib_call("TOSDB_GetStreamOccupancy", 
               self._name, 
               item.encode("ascii"),
               topic.encode("ascii"), 
               _pointer(occ),
               arg_types=(_str_, _str_, _str_, _PTR_(_uint32_)))
     
     return occ.value
Esempio n. 7
0
 def get_block_size(self):          
     b = _uint32_()
     _lib_call("TOSDB_GetBlockSize", self._name, _pointer(b),
               arg_types=(_str_,_PTR_(_uint32_)))
     return b.value
Esempio n. 8
0
 def _topic_precached_count(self):        
     t = _uint32_()
     _lib_call("TOSDB_GetPreCachedTopicCount", self._name, _pointer(t),
               arg_types=(_str_,_PTR_(_uint32_)))
     return t.value
Esempio n. 9
0
 def _item_precached_count(self):       
     i = _uint32_()
     _lib_call("TOSDB_GetPreCachedItemCount", self._name, _pointer(i),
               arg_types=(_str_,_PTR_(_uint32_)))
     return i.value