コード例 #1
0
ファイル: AVP_Integer32.py プロジェクト: w0x12ef/diameter
 def __init__(self, code, value, vendor_id=0):
     AVP.__init__(self, code, struct.pack("!I", value), vendor_id)
コード例 #2
0
ファイル: AVP_Address.py プロジェクト: w0x12ef/diameter
 def __init__(self, code, address, vendor_id=0):
     """Constructs an AVP_Address. The address is expected to tuple (family,address)"""
     AVP.__init__(self, code, _pack_address(address), vendor_id)
コード例 #3
0
 def __init__(self, code, avps=[], vendor_id=0):
     AVP.__init__(self, code, _pack(avps), vendor_id)
コード例 #4
0
 def __init__(self, code=0, payload="", vendor_id=0):
     AVP.__init__(self, code, payload, vendor_id)
コード例 #5
0
 def __init__(self, code, value="", vendor_id=0):
     AVP.__init__(self, code, utf8encoder(value)[0], vendor_id)