(self, stats, ptr, fmt)
| 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: |
nothing calls this directly
no test coverage detected