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

Method appendNum

extras/packetforge/ProtocolHeader.py:224–236  ·  view source on GitHub ↗
(self, big, exp, size)

Source from the content-addressed store, hash-verified

222 return result
223
224 def appendNum(self, big, exp, size):
225 num = 0
226 if exp != None:
227 _, num = ExpressionConverter.ToNum(exp)
228 if num == None:
229 print("Invalid byte expression")
230 return None
231
232 # cut msb
233 num = num & ((1 << size) - 1)
234 big = big << size
235 big = big | num
236 return big
237
238 def appendUInt64(self, big, exp, size):
239 u64 = 0

Callers 1

appendMethod · 0.95

Calls 1

printFunction · 0.85

Tested by

no test coverage detected