MCPcopy Create free account
hub / github.com/FDio/vpp / __init__

Method __init__

src/vpp-api/python/vpp_papi/vpp_stats.py:86–96  ·  view source on GitHub ↗
(self, stats, ptr, fmt)

Source from the content-addressed store, hash-verified

84 """A class representing a VPP vector"""
85
86 def __init__(self, stats, ptr, fmt):
87 self.vec_start = ptr - stats.base
88 self.vec_len = get_vec_len(stats, ptr - stats.base)
89 self.struct = Struct(fmt)
90 self.fmtlen = len(fmt)
91 self.elementsize = self.struct.size
92 self.statseg = stats.statseg
93 self.stats = stats
94
95 if self.vec_start + self.vec_len * self.elementsize >= stats.size:
96 raise IOError("Vector overruns stats segment")
97
98 def __iter__(self):
99 with self.stats.lock:

Callers

nothing calls this directly

Calls 2

get_vec_lenFunction · 0.85
StructClass · 0.85

Tested by

no test coverage detected