cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## trailer.h (module 'network'): void ns3::Trailer::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_pure_virtual=True, is_const=True, is_virtual=True) ## trailer.h (module 'network'): void ns3::Trailer::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3TriangularRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::TriangularRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::TriangularRandomVariable::TriangularRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetMean() const [member function] cls.add_method('GetMean', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetMin() const [member function] cls.add_method('GetMin', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetMax() const [member function] cls.add_method('GetMax', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetValue(double mean, double min, double max) [member function] cls.add_method('GetValue', 'double', [param('double', 'mean'), param('double', 'min'), param('double', 'max')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::TriangularRandomVariable::GetInteger(uint32_t mean, uint32_t min, uint32_t max) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mean'), param('uint32_t', 'min'), param('uint32_t', 'max')]) ## random-variable-stream.h (module 'core'): double ns3::TriangularRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::TriangularRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3UanHeaderCommon_methods(root_module, cls): ## uan-header-common.h (module 'uan'): ns3::UanHeaderCommon::UanHeaderCommon(ns3::UanHeaderCommon const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanHeaderCommon const &', 'arg0')]) ## uan-header-common.h (module 'uan'): ns3::UanHeaderCommon::UanHeaderCommon() [constructor] cls.add_constructor([]) ## uan-header-common.h (module 'uan'): ns3::UanHeaderCommon::UanHeaderCommon(ns3::UanAddress const src, ns3::UanAddress const dest, uint8_t type) [constructor] cls.add_constructor([param('ns3::UanAddress const', 'src'), param('ns3::UanAddress const', 'dest'), param('uint8_t', 'type')]) ## uan-header-common.h (module 'uan'): uint32_t ns3::UanHeaderCommon::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## uan-header-common.h (module 'uan'): ns3::UanAddress ns3::UanHeaderCommon::GetDest() const [member function] cls.add_method('GetDest', 'ns3::UanAddress', [], is_const=True) ## uan-header-common.h (module 'uan'): ns3::TypeId ns3::UanHeaderCommon::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## uan-header-common.h (module 'uan'): uint32_t ns3::UanHeaderCommon::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## uan-header-common.h (module 'uan'): ns3::UanAddress ns3::UanHeaderCommon::GetSrc() const [member function] cls.add_method('GetSrc', 'ns3::UanAddress', [], is_const=True) ## uan-header-common.h (module 'uan'): uint8_t ns3::UanHeaderCommon::GetType() const [member function] cls.add_method('GetType', 'uint8_t', [], is_const=True) ## uan-header-common.h (module 'uan'): static ns3::TypeId ns3::UanHeaderCommon::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-header-common.h (module 'uan'): void ns3::UanHeaderCommon::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## uan-header-common.h (module 'uan'): void ns3::UanHeaderCommon::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## uan-header-common.h (module 'uan'): void ns3::UanHeaderCommon::SetDest(ns3::UanAddress dest) [member function] cls.add_method('SetDest', 'void', [param('ns3::UanAddress', 'dest')]) ## uan-header-common.h (module 'uan'): void ns3::UanHeaderCommon::SetSrc(ns3::UanAddress src) [member function] cls.add_method('SetSrc', 'void', [param('ns3::UanAddress', 'src')]) ## uan-header-common.h (module 'uan'): void ns3::UanHeaderCommon::SetType(uint8_t type) [member function] cls.add_method('SetType', 'void', [param('uint8_t', 'type')]) return def register_Ns3UanHeaderRcAck_methods(root_module, cls): ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcAck::UanHeaderRcAck(ns3::UanHeaderRcAck const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanHeaderRcAck const &', 'arg0')]) ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcAck::UanHeaderRcAck() [constructor] cls.add_constructor([]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcAck::AddNackedFrame(uint8_t frame) [member function] cls.add_method('AddNackedFrame', 'void', [param('uint8_t', 'frame')]) ## uan-header-rc.h (module 'uan'): uint32_t ns3::UanHeaderRcAck::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## uan-header-rc.h (module 'uan'): uint8_t ns3::UanHeaderRcAck::GetFrameNo() const [member function] cls.add_method('GetFrameNo', 'uint8_t', [], is_const=True) ## uan-header-rc.h (module 'uan'): ns3::TypeId ns3::UanHeaderRcAck::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): std::set, std::allocator > const & ns3::UanHeaderRcAck::GetNackedFrames() const [member function] cls.add_method('GetNackedFrames', 'std::set< unsigned char > const &', [], is_const=True) ## uan-header-rc.h (module 'uan'): uint8_t ns3::UanHeaderRcAck::GetNoNacks() const [member function] cls.add_method('GetNoNacks', 'uint8_t', [], is_const=True) ## uan-header-rc.h (module 'uan'): uint32_t ns3::UanHeaderRcAck::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): static ns3::TypeId ns3::UanHeaderRcAck::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcAck::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcAck::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcAck::SetFrameNo(uint8_t frameNo) [member function] cls.add_method('SetFrameNo', 'void', [param('uint8_t', 'frameNo')]) return def register_Ns3UanHeaderRcCts_methods(root_module, cls): ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcCts::UanHeaderRcCts(ns3::UanHeaderRcCts const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanHeaderRcCts const &', 'arg0')]) ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcCts::UanHeaderRcCts() [constructor] cls.add_constructor([]) ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcCts::UanHeaderRcCts(uint8_t frameNo, uint8_t retryNo, ns3::Time rtsTs, ns3::Time delay, ns3::UanAddress addr) [constructor] cls.add_constructor([param('uint8_t', 'frameNo'), param('uint8_t', 'retryNo'), param('ns3::Time', 'rtsTs'), param('ns3::Time', 'delay'), param('ns3::UanAddress', 'addr')]) ## uan-header-rc.h (module 'uan'): uint32_t ns3::UanHeaderRcCts::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## uan-header-rc.h (module 'uan'): ns3::UanAddress ns3::UanHeaderRcCts::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::UanAddress', [], is_const=True) ## uan-header-rc.h (module 'uan'): ns3::Time ns3::UanHeaderRcCts::GetDelayToTx() const [member function] cls.add_method('GetDelayToTx', 'ns3::Time', [], is_const=True) ## uan-header-rc.h (module 'uan'): uint8_t ns3::UanHeaderRcCts::GetFrameNo() const [member function] cls.add_method('GetFrameNo', 'uint8_t', [], is_const=True) ## uan-header-rc.h (module 'uan'): ns3::TypeId ns3::UanHeaderRcCts::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): uint8_t ns3::UanHeaderRcCts::GetRetryNo() const [member function] cls.add_method('GetRetryNo', 'uint8_t', [], is_const=True) ## uan-header-rc.h (module 'uan'): ns3::Time ns3::UanHeaderRcCts::GetRtsTimeStamp() const [member function] cls.add_method('GetRtsTimeStamp', 'ns3::Time', [], is_const=True) ## uan-header-rc.h (module 'uan'): uint32_t ns3::UanHeaderRcCts::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): static ns3::TypeId ns3::UanHeaderRcCts::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCts::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCts::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCts::SetAddress(ns3::UanAddress addr) [member function] cls.add_method('SetAddress', 'void', [param('ns3::UanAddress', 'addr')]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCts::SetDelayToTx(ns3::Time delay) [member function] cls.add_method('SetDelayToTx', 'void', [param('ns3::Time', 'delay')]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCts::SetFrameNo(uint8_t frameNo) [member function] cls.add_method('SetFrameNo', 'void', [param('uint8_t', 'frameNo')]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCts::SetRetryNo(uint8_t no) [member function] cls.add_method('SetRetryNo', 'void', [param('uint8_t', 'no')]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCts::SetRtsTimeStamp(ns3::Time timeStamp) [member function] cls.add_method('SetRtsTimeStamp', 'void', [param('ns3::Time', 'timeStamp')]) return def register_Ns3UanHeaderRcCtsGlobal_methods(root_module, cls): ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcCtsGlobal::UanHeaderRcCtsGlobal(ns3::UanHeaderRcCtsGlobal const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanHeaderRcCtsGlobal const &', 'arg0')]) ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcCtsGlobal::UanHeaderRcCtsGlobal() [constructor] cls.add_constructor([]) ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcCtsGlobal::UanHeaderRcCtsGlobal(ns3::Time wt, ns3::Time ts, uint16_t rate, uint16_t retryRate) [constructor] cls.add_constructor([param('ns3::Time', 'wt'), param('ns3::Time', 'ts'), param('uint16_t', 'rate'), param('uint16_t', 'retryRate')]) ## uan-header-rc.h (module 'uan'): uint32_t ns3::UanHeaderRcCtsGlobal::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## uan-header-rc.h (module 'uan'): ns3::TypeId ns3::UanHeaderRcCtsGlobal::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): uint16_t ns3::UanHeaderRcCtsGlobal::GetRateNum() const [member function] cls.add_method('GetRateNum', 'uint16_t', [], is_const=True) ## uan-header-rc.h (module 'uan'): uint16_t ns3::UanHeaderRcCtsGlobal::GetRetryRate() const [member function] cls.add_method('GetRetryRate', 'uint16_t', [], is_const=True) ## uan-header-rc.h (module 'uan'): uint32_t ns3::UanHeaderRcCtsGlobal::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): ns3::Time ns3::UanHeaderRcCtsGlobal::GetTxTimeStamp() const [member function] cls.add_method('GetTxTimeStamp', 'ns3::Time', [], is_const=True) ## uan-header-rc.h (module 'uan'): static ns3::TypeId ns3::UanHeaderRcCtsGlobal::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-header-rc.h (module 'uan'): ns3::Time ns3::UanHeaderRcCtsGlobal::GetWindowTime() const [member function] cls.add_method('GetWindowTime', 'ns3::Time', [], is_const=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCtsGlobal::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCtsGlobal::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCtsGlobal::SetRateNum(uint16_t rate) [member function] cls.add_method('SetRateNum', 'void', [param('uint16_t', 'rate')]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCtsGlobal::SetRetryRate(uint16_t rate) [member function] cls.add_method('SetRetryRate', 'void', [param('uint16_t', 'rate')]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCtsGlobal::SetTxTimeStamp(ns3::Time timeStamp) [member function] cls.add_method('SetTxTimeStamp', 'void', [param('ns3::Time', 'timeStamp')]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcCtsGlobal::SetWindowTime(ns3::Time t) [member function] cls.add_method('SetWindowTime', 'void', [param('ns3::Time', 't')]) return def register_Ns3UanHeaderRcData_methods(root_module, cls): ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcData::UanHeaderRcData(ns3::UanHeaderRcData const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanHeaderRcData const &', 'arg0')]) ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcData::UanHeaderRcData() [constructor] cls.add_constructor([]) ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcData::UanHeaderRcData(uint8_t frameNum, ns3::Time propDelay) [constructor] cls.add_constructor([param('uint8_t', 'frameNum'), param('ns3::Time', 'propDelay')]) ## uan-header-rc.h (module 'uan'): uint32_t ns3::UanHeaderRcData::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## uan-header-rc.h (module 'uan'): uint8_t ns3::UanHeaderRcData::GetFrameNo() const [member function] cls.add_method('GetFrameNo', 'uint8_t', [], is_const=True) ## uan-header-rc.h (module 'uan'): ns3::TypeId ns3::UanHeaderRcData::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): ns3::Time ns3::UanHeaderRcData::GetPropDelay() const [member function] cls.add_method('GetPropDelay', 'ns3::Time', [], is_const=True) ## uan-header-rc.h (module 'uan'): uint32_t ns3::UanHeaderRcData::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): static ns3::TypeId ns3::UanHeaderRcData::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcData::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcData::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcData::SetFrameNo(uint8_t frameNum) [member function] cls.add_method('SetFrameNo', 'void', [param('uint8_t', 'frameNum')]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcData::SetPropDelay(ns3::Time propDelay) [member function] cls.add_method('SetPropDelay', 'void', [param('ns3::Time', 'propDelay')]) return def register_Ns3UanHeaderRcRts_methods(root_module, cls): ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcRts::UanHeaderRcRts(ns3::UanHeaderRcRts const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanHeaderRcRts const &', 'arg0')]) ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcRts::UanHeaderRcRts() [constructor] cls.add_constructor([]) ## uan-header-rc.h (module 'uan'): ns3::UanHeaderRcRts::UanHeaderRcRts(uint8_t frameNo, uint8_t retryNo, uint8_t noFrames, uint16_t length, ns3::Time ts) [constructor] cls.add_constructor([param('uint8_t', 'frameNo'), param('uint8_t', 'retryNo'), param('uint8_t', 'noFrames'), param('uint16_t', 'length'), param('ns3::Time', 'ts')]) ## uan-header-rc.h (module 'uan'): uint32_t ns3::UanHeaderRcRts::Deserialize(ns3::Buffer::Iterator start) [member function] cls.add_method('Deserialize', 'uint32_t', [param('ns3::Buffer::Iterator', 'start')], is_virtual=True) ## uan-header-rc.h (module 'uan'): uint8_t ns3::UanHeaderRcRts::GetFrameNo() const [member function] cls.add_method('GetFrameNo', 'uint8_t', [], is_const=True) ## uan-header-rc.h (module 'uan'): ns3::TypeId ns3::UanHeaderRcRts::GetInstanceTypeId() const [member function] cls.add_method('GetInstanceTypeId', 'ns3::TypeId', [], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): uint16_t ns3::UanHeaderRcRts::GetLength() const [member function] cls.add_method('GetLength', 'uint16_t', [], is_const=True) ## uan-header-rc.h (module 'uan'): uint8_t ns3::UanHeaderRcRts::GetNoFrames() const [member function] cls.add_method('GetNoFrames', 'uint8_t', [], is_const=True) ## uan-header-rc.h (module 'uan'): uint8_t ns3::UanHeaderRcRts::GetRetryNo() const [member function] cls.add_method('GetRetryNo', 'uint8_t', [], is_const=True) ## uan-header-rc.h (module 'uan'): uint32_t ns3::UanHeaderRcRts::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): ns3::Time ns3::UanHeaderRcRts::GetTimeStamp() const [member function] cls.add_method('GetTimeStamp', 'ns3::Time', [], is_const=True) ## uan-header-rc.h (module 'uan'): static ns3::TypeId ns3::UanHeaderRcRts::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcRts::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcRts::Serialize(ns3::Buffer::Iterator start) const [member function] cls.add_method('Serialize', 'void', [param('ns3::Buffer::Iterator', 'start')], is_const=True, is_virtual=True) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcRts::SetFrameNo(uint8_t fno) [member function] cls.add_method('SetFrameNo', 'void', [param('uint8_t', 'fno')]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcRts::SetLength(uint16_t length) [member function] cls.add_method('SetLength', 'void', [param('uint16_t', 'length')]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcRts::SetNoFrames(uint8_t no) [member function] cls.add_method('SetNoFrames', 'void', [param('uint8_t', 'no')]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcRts::SetRetryNo(uint8_t no) [member function] cls.add_method('SetRetryNo', 'void', [param('uint8_t', 'no')]) ## uan-header-rc.h (module 'uan'): void ns3::UanHeaderRcRts::SetTimeStamp(ns3::Time timeStamp) [member function] cls.add_method('SetTimeStamp', 'void', [param('ns3::Time', 'timeStamp')]) return def register_Ns3UanMac_methods(root_module, cls): ## uan-mac.h (module 'uan'): ns3::UanMac::UanMac() [constructor] cls.add_constructor([]) ## uan-mac.h (module 'uan'): ns3::UanMac::UanMac(ns3::UanMac const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanMac const &', 'arg0')]) ## uan-mac.h (module 'uan'): int64_t ns3::UanMac::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_pure_virtual=True, is_virtual=True) ## uan-mac.h (module 'uan'): void ns3::UanMac::AttachPhy(ns3::Ptr phy) [member function] cls.add_method('AttachPhy', 'void', [param('ns3::Ptr< ns3::UanPhy >', 'phy')], is_pure_virtual=True, is_virtual=True) ## uan-mac.h (module 'uan'): void ns3::UanMac::Clear() [member function] cls.add_method('Clear', 'void', [], is_pure_virtual=True, is_virtual=True) ## uan-mac.h (module 'uan'): bool ns3::UanMac::Enqueue(ns3::Ptr pkt, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Enqueue', 'bool', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_pure_virtual=True, is_virtual=True) ## uan-mac.h (module 'uan'): ns3::Address ns3::UanMac::GetAddress() [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_pure_virtual=True, is_virtual=True) ## uan-mac.h (module 'uan'): ns3::Address ns3::UanMac::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## uan-mac.h (module 'uan'): static ns3::TypeId ns3::UanMac::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-mac.h (module 'uan'): void ns3::UanMac::SetAddress(ns3::UanAddress addr) [member function] cls.add_method('SetAddress', 'void', [param('ns3::UanAddress', 'addr')], is_pure_virtual=True, is_virtual=True) ## uan-mac.h (module 'uan'): void ns3::UanMac::SetForwardUpCb(ns3::Callback, ns3::UanAddress const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetForwardUpCb', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::UanAddress const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_pure_virtual=True, is_virtual=True) return def register_Ns3UanMacAloha_methods(root_module, cls): ## uan-mac-aloha.h (module 'uan'): ns3::UanMacAloha::UanMacAloha(ns3::UanMacAloha const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanMacAloha const &', 'arg0')]) ## uan-mac-aloha.h (module 'uan'): ns3::UanMacAloha::UanMacAloha() [constructor] cls.add_constructor([]) ## uan-mac-aloha.h (module 'uan'): int64_t ns3::UanMacAloha::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_virtual=True) ## uan-mac-aloha.h (module 'uan'): void ns3::UanMacAloha::AttachPhy(ns3::Ptr phy) [member function] cls.add_method('AttachPhy', 'void', [param('ns3::Ptr< ns3::UanPhy >', 'phy')], is_virtual=True) ## uan-mac-aloha.h (module 'uan'): void ns3::UanMacAloha::Clear() [member function] cls.add_method('Clear', 'void', [], is_virtual=True) ## uan-mac-aloha.h (module 'uan'): bool ns3::UanMacAloha::Enqueue(ns3::Ptr pkt, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Enqueue', 'bool', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) ## uan-mac-aloha.h (module 'uan'): ns3::Address ns3::UanMacAloha::GetAddress() [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_virtual=True) ## uan-mac-aloha.h (module 'uan'): ns3::Address ns3::UanMacAloha::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_const=True, is_virtual=True) ## uan-mac-aloha.h (module 'uan'): static ns3::TypeId ns3::UanMacAloha::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-mac-aloha.h (module 'uan'): void ns3::UanMacAloha::SetAddress(ns3::UanAddress addr) [member function] cls.add_method('SetAddress', 'void', [param('ns3::UanAddress', 'addr')], is_virtual=True) ## uan-mac-aloha.h (module 'uan'): void ns3::UanMacAloha::SetForwardUpCb(ns3::Callback, ns3::UanAddress const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetForwardUpCb', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::UanAddress const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## uan-mac-aloha.h (module 'uan'): void ns3::UanMacAloha::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3UanMacCw_methods(root_module, cls): ## uan-mac-cw.h (module 'uan'): ns3::UanMacCw::UanMacCw(ns3::UanMacCw const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanMacCw const &', 'arg0')]) ## uan-mac-cw.h (module 'uan'): ns3::UanMacCw::UanMacCw() [constructor] cls.add_constructor([]) ## uan-mac-cw.h (module 'uan'): int64_t ns3::UanMacCw::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_virtual=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::AttachPhy(ns3::Ptr phy) [member function] cls.add_method('AttachPhy', 'void', [param('ns3::Ptr< ns3::UanPhy >', 'phy')], is_virtual=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::Clear() [member function] cls.add_method('Clear', 'void', [], is_virtual=True) ## uan-mac-cw.h (module 'uan'): bool ns3::UanMacCw::Enqueue(ns3::Ptr pkt, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Enqueue', 'bool', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) ## uan-mac-cw.h (module 'uan'): ns3::Address ns3::UanMacCw::GetAddress() [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_virtual=True) ## uan-mac-cw.h (module 'uan'): ns3::Address ns3::UanMacCw::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_const=True, is_virtual=True) ## uan-mac-cw.h (module 'uan'): uint32_t ns3::UanMacCw::GetCw() [member function] cls.add_method('GetCw', 'uint32_t', [], is_virtual=True) ## uan-mac-cw.h (module 'uan'): ns3::Time ns3::UanMacCw::GetSlotTime() [member function] cls.add_method('GetSlotTime', 'ns3::Time', [], is_virtual=True) ## uan-mac-cw.h (module 'uan'): static ns3::TypeId ns3::UanMacCw::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::NotifyCcaEnd() [member function] cls.add_method('NotifyCcaEnd', 'void', [], is_virtual=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::NotifyCcaStart() [member function] cls.add_method('NotifyCcaStart', 'void', [], is_virtual=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::NotifyRxEndError() [member function] cls.add_method('NotifyRxEndError', 'void', [], is_virtual=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::NotifyRxEndOk() [member function] cls.add_method('NotifyRxEndOk', 'void', [], is_virtual=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::NotifyRxStart() [member function] cls.add_method('NotifyRxStart', 'void', [], is_virtual=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::NotifyTxStart(ns3::Time duration) [member function] cls.add_method('NotifyTxStart', 'void', [param('ns3::Time', 'duration')], is_virtual=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::SetAddress(ns3::UanAddress addr) [member function] cls.add_method('SetAddress', 'void', [param('ns3::UanAddress', 'addr')], is_virtual=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::SetCw(uint32_t cw) [member function] cls.add_method('SetCw', 'void', [param('uint32_t', 'cw')], is_virtual=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::SetForwardUpCb(ns3::Callback, ns3::UanAddress const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetForwardUpCb', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::UanAddress const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::SetSlotTime(ns3::Time duration) [member function] cls.add_method('SetSlotTime', 'void', [param('ns3::Time', 'duration')], is_virtual=True) ## uan-mac-cw.h (module 'uan'): void ns3::UanMacCw::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3UanMacRc_methods(root_module, cls): ## uan-mac-rc.h (module 'uan'): ns3::UanMacRc::UanMacRc(ns3::UanMacRc const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanMacRc const &', 'arg0')]) ## uan-mac-rc.h (module 'uan'): ns3::UanMacRc::UanMacRc() [constructor] cls.add_constructor([]) ## uan-mac-rc.h (module 'uan'): int64_t ns3::UanMacRc::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_virtual=True) ## uan-mac-rc.h (module 'uan'): void ns3::UanMacRc::AttachPhy(ns3::Ptr phy) [member function] cls.add_method('AttachPhy', 'void', [param('ns3::Ptr< ns3::UanPhy >', 'phy')], is_virtual=True) ## uan-mac-rc.h (module 'uan'): void ns3::UanMacRc::Clear() [member function] cls.add_method('Clear', 'void', [], is_virtual=True) ## uan-mac-rc.h (module 'uan'): bool ns3::UanMacRc::Enqueue(ns3::Ptr pkt, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Enqueue', 'bool', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) ## uan-mac-rc.h (module 'uan'): ns3::Address ns3::UanMacRc::GetAddress() [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_virtual=True) ## uan-mac-rc.h (module 'uan'): ns3::Address ns3::UanMacRc::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_const=True, is_virtual=True) ## uan-mac-rc.h (module 'uan'): static ns3::TypeId ns3::UanMacRc::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-mac-rc.h (module 'uan'): void ns3::UanMacRc::SetAddress(ns3::UanAddress addr) [member function] cls.add_method('SetAddress', 'void', [param('ns3::UanAddress', 'addr')], is_virtual=True) ## uan-mac-rc.h (module 'uan'): void ns3::UanMacRc::SetForwardUpCb(ns3::Callback, ns3::UanAddress const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetForwardUpCb', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::UanAddress const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## uan-mac-rc.h (module 'uan'): void ns3::UanMacRc::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3UanMacRcGw_methods(root_module, cls): ## uan-mac-rc-gw.h (module 'uan'): ns3::UanMacRcGw::UanMacRcGw(ns3::UanMacRcGw const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanMacRcGw const &', 'arg0')]) ## uan-mac-rc-gw.h (module 'uan'): ns3::UanMacRcGw::UanMacRcGw() [constructor] cls.add_constructor([]) ## uan-mac-rc-gw.h (module 'uan'): int64_t ns3::UanMacRcGw::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_virtual=True) ## uan-mac-rc-gw.h (module 'uan'): void ns3::UanMacRcGw::AttachPhy(ns3::Ptr phy) [member function] cls.add_method('AttachPhy', 'void', [param('ns3::Ptr< ns3::UanPhy >', 'phy')], is_virtual=True) ## uan-mac-rc-gw.h (module 'uan'): void ns3::UanMacRcGw::Clear() [member function] cls.add_method('Clear', 'void', [], is_virtual=True) ## uan-mac-rc-gw.h (module 'uan'): bool ns3::UanMacRcGw::Enqueue(ns3::Ptr pkt, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Enqueue', 'bool', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) ## uan-mac-rc-gw.h (module 'uan'): ns3::Address ns3::UanMacRcGw::GetAddress() [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_virtual=True) ## uan-mac-rc-gw.h (module 'uan'): ns3::Address ns3::UanMacRcGw::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_const=True, is_virtual=True) ## uan-mac-rc-gw.h (module 'uan'): static ns3::TypeId ns3::UanMacRcGw::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-mac-rc-gw.h (module 'uan'): void ns3::UanMacRcGw::SetAddress(ns3::UanAddress addr) [member function] cls.add_method('SetAddress', 'void', [param('ns3::UanAddress', 'addr')], is_virtual=True) ## uan-mac-rc-gw.h (module 'uan'): void ns3::UanMacRcGw::SetForwardUpCb(ns3::Callback, ns3::UanAddress const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetForwardUpCb', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::UanAddress const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## uan-mac-rc-gw.h (module 'uan'): void ns3::UanMacRcGw::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3UanNoiseModel_methods(root_module, cls): ## uan-noise-model.h (module 'uan'): ns3::UanNoiseModel::UanNoiseModel() [constructor] cls.add_constructor([]) ## uan-noise-model.h (module 'uan'): ns3::UanNoiseModel::UanNoiseModel(ns3::UanNoiseModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanNoiseModel const &', 'arg0')]) ## uan-noise-model.h (module 'uan'): void ns3::UanNoiseModel::Clear() [member function] cls.add_method('Clear', 'void', [], is_virtual=True) ## uan-noise-model.h (module 'uan'): void ns3::UanNoiseModel::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], is_virtual=True) ## uan-noise-model.h (module 'uan'): double ns3::UanNoiseModel::GetNoiseDbHz(double fKhz) const [member function] cls.add_method('GetNoiseDbHz', 'double', [param('double', 'fKhz')], is_pure_virtual=True, is_const=True, is_virtual=True) ## uan-noise-model.h (module 'uan'): static ns3::TypeId ns3::UanNoiseModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3UanNoiseModelDefault_methods(root_module, cls): ## uan-noise-model-default.h (module 'uan'): ns3::UanNoiseModelDefault::UanNoiseModelDefault(ns3::UanNoiseModelDefault const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanNoiseModelDefault const &', 'arg0')]) ## uan-noise-model-default.h (module 'uan'): ns3::UanNoiseModelDefault::UanNoiseModelDefault() [constructor] cls.add_constructor([]) ## uan-noise-model-default.h (module 'uan'): double ns3::UanNoiseModelDefault::GetNoiseDbHz(double fKhz) const [member function] cls.add_method('GetNoiseDbHz', 'double', [param('double', 'fKhz')], is_const=True, is_virtual=True) ## uan-noise-model-default.h (module 'uan'): static ns3::TypeId ns3::UanNoiseModelDefault::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3UanPhy_methods(root_module, cls): ## uan-phy.h (module 'uan'): ns3::UanPhy::UanPhy() [constructor] cls.add_constructor([]) ## uan-phy.h (module 'uan'): ns3::UanPhy::UanPhy(ns3::UanPhy const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPhy const &', 'arg0')]) ## uan-phy.h (module 'uan'): int64_t ns3::UanPhy::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::Clear() [member function] cls.add_method('Clear', 'void', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::EnergyDepletionHandler() [member function] cls.add_method('EnergyDepletionHandler', 'void', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): double ns3::UanPhy::GetCcaThresholdDb() [member function] cls.add_method('GetCcaThresholdDb', 'double', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): ns3::Ptr ns3::UanPhy::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::UanChannel >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## uan-phy.h (module 'uan'): ns3::Ptr ns3::UanPhy::GetDevice() const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::UanNetDevice >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## uan-phy.h (module 'uan'): ns3::UanTxMode ns3::UanPhy::GetMode(uint32_t n) [member function] cls.add_method('GetMode', 'ns3::UanTxMode', [param('uint32_t', 'n')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): uint32_t ns3::UanPhy::GetNModes() [member function] cls.add_method('GetNModes', 'uint32_t', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): ns3::Ptr ns3::UanPhy::GetPacketRx() const [member function] cls.add_method('GetPacketRx', 'ns3::Ptr< ns3::Packet >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## uan-phy.h (module 'uan'): double ns3::UanPhy::GetRxGainDb() [member function] cls.add_method('GetRxGainDb', 'double', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): double ns3::UanPhy::GetRxThresholdDb() [member function] cls.add_method('GetRxThresholdDb', 'double', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): ns3::Ptr ns3::UanPhy::GetTransducer() [member function] cls.add_method('GetTransducer', 'ns3::Ptr< ns3::UanTransducer >', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): double ns3::UanPhy::GetTxPowerDb() [member function] cls.add_method('GetTxPowerDb', 'double', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): static ns3::TypeId ns3::UanPhy::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-phy.h (module 'uan'): bool ns3::UanPhy::IsStateBusy() [member function] cls.add_method('IsStateBusy', 'bool', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): bool ns3::UanPhy::IsStateCcaBusy() [member function] cls.add_method('IsStateCcaBusy', 'bool', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): bool ns3::UanPhy::IsStateIdle() [member function] cls.add_method('IsStateIdle', 'bool', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): bool ns3::UanPhy::IsStateRx() [member function] cls.add_method('IsStateRx', 'bool', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): bool ns3::UanPhy::IsStateSleep() [member function] cls.add_method('IsStateSleep', 'bool', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): bool ns3::UanPhy::IsStateTx() [member function] cls.add_method('IsStateTx', 'bool', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::NotifyIntChange() [member function] cls.add_method('NotifyIntChange', 'void', [], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::NotifyRxBegin(ns3::Ptr packet) [member function] cls.add_method('NotifyRxBegin', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## uan-phy.h (module 'uan'): void ns3::UanPhy::NotifyRxDrop(ns3::Ptr packet) [member function] cls.add_method('NotifyRxDrop', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## uan-phy.h (module 'uan'): void ns3::UanPhy::NotifyRxEnd(ns3::Ptr packet) [member function] cls.add_method('NotifyRxEnd', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## uan-phy.h (module 'uan'): void ns3::UanPhy::NotifyTransStartTx(ns3::Ptr packet, double txPowerDb, ns3::UanTxMode txMode) [member function] cls.add_method('NotifyTransStartTx', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'txPowerDb'), param('ns3::UanTxMode', 'txMode')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::NotifyTxBegin(ns3::Ptr packet) [member function] cls.add_method('NotifyTxBegin', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## uan-phy.h (module 'uan'): void ns3::UanPhy::NotifyTxDrop(ns3::Ptr packet) [member function] cls.add_method('NotifyTxDrop', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## uan-phy.h (module 'uan'): void ns3::UanPhy::NotifyTxEnd(ns3::Ptr packet) [member function] cls.add_method('NotifyTxEnd', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## uan-phy.h (module 'uan'): void ns3::UanPhy::RegisterListener(ns3::UanPhyListener * listener) [member function] cls.add_method('RegisterListener', 'void', [param('ns3::UanPhyListener *', 'listener')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SendPacket(ns3::Ptr pkt, uint32_t modeNum) [member function] cls.add_method('SendPacket', 'void', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('uint32_t', 'modeNum')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SetCcaThresholdDb(double thresh) [member function] cls.add_method('SetCcaThresholdDb', 'void', [param('double', 'thresh')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SetChannel(ns3::Ptr channel) [member function] cls.add_method('SetChannel', 'void', [param('ns3::Ptr< ns3::UanChannel >', 'channel')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SetDevice(ns3::Ptr device) [member function] cls.add_method('SetDevice', 'void', [param('ns3::Ptr< ns3::UanNetDevice >', 'device')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SetEnergyModelCallback(ns3::Callback callback) [member function] cls.add_method('SetEnergyModelCallback', 'void', [param('ns3::Callback< void, int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SetMac(ns3::Ptr mac) [member function] cls.add_method('SetMac', 'void', [param('ns3::Ptr< ns3::UanMac >', 'mac')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SetReceiveErrorCallback(ns3::Callback, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetReceiveErrorCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SetReceiveOkCallback(ns3::Callback, double, ns3::UanTxMode, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetReceiveOkCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::UanTxMode, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SetRxGainDb(double gain) [member function] cls.add_method('SetRxGainDb', 'void', [param('double', 'gain')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SetRxThresholdDb(double thresh) [member function] cls.add_method('SetRxThresholdDb', 'void', [param('double', 'thresh')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SetSleepMode(bool sleep) [member function] cls.add_method('SetSleepMode', 'void', [param('bool', 'sleep')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SetTransducer(ns3::Ptr trans) [member function] cls.add_method('SetTransducer', 'void', [param('ns3::Ptr< ns3::UanTransducer >', 'trans')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::SetTxPowerDb(double txpwr) [member function] cls.add_method('SetTxPowerDb', 'void', [param('double', 'txpwr')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhy::StartRxPacket(ns3::Ptr pkt, double rxPowerDb, ns3::UanTxMode txMode, ns3::UanPdp pdp) [member function] cls.add_method('StartRxPacket', 'void', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('double', 'rxPowerDb'), param('ns3::UanTxMode', 'txMode'), param('ns3::UanPdp', 'pdp')], is_pure_virtual=True, is_virtual=True) return def register_Ns3UanPhyCalcSinr_methods(root_module, cls): ## uan-phy.h (module 'uan'): ns3::UanPhyCalcSinr::UanPhyCalcSinr() [constructor] cls.add_constructor([]) ## uan-phy.h (module 'uan'): ns3::UanPhyCalcSinr::UanPhyCalcSinr(ns3::UanPhyCalcSinr const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPhyCalcSinr const &', 'arg0')]) ## uan-phy.h (module 'uan'): double ns3::UanPhyCalcSinr::CalcSinrDb(ns3::Ptr pkt, ns3::Time arrTime, double rxPowerDb, double ambNoiseDb, ns3::UanTxMode mode, ns3::UanPdp pdp, std::list > const & arrivalList) const [member function] cls.add_method('CalcSinrDb', 'double', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('ns3::Time', 'arrTime'), param('double', 'rxPowerDb'), param('double', 'ambNoiseDb'), param('ns3::UanTxMode', 'mode'), param('ns3::UanPdp', 'pdp'), param('std::list< ns3::UanPacketArrival > const &', 'arrivalList')], is_pure_virtual=True, is_const=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhyCalcSinr::Clear() [member function] cls.add_method('Clear', 'void', [], is_virtual=True) ## uan-phy.h (module 'uan'): double ns3::UanPhyCalcSinr::DbToKp(double db) const [member function] cls.add_method('DbToKp', 'double', [param('double', 'db')], is_const=True) ## uan-phy.h (module 'uan'): static ns3::TypeId ns3::UanPhyCalcSinr::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-phy.h (module 'uan'): double ns3::UanPhyCalcSinr::KpToDb(double kp) const [member function] cls.add_method('KpToDb', 'double', [param('double', 'kp')], is_const=True) ## uan-phy.h (module 'uan'): void ns3::UanPhyCalcSinr::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3UanPhyCalcSinrDefault_methods(root_module, cls): ## uan-phy-gen.h (module 'uan'): ns3::UanPhyCalcSinrDefault::UanPhyCalcSinrDefault(ns3::UanPhyCalcSinrDefault const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPhyCalcSinrDefault const &', 'arg0')]) ## uan-phy-gen.h (module 'uan'): ns3::UanPhyCalcSinrDefault::UanPhyCalcSinrDefault() [constructor] cls.add_constructor([]) ## uan-phy-gen.h (module 'uan'): double ns3::UanPhyCalcSinrDefault::CalcSinrDb(ns3::Ptr pkt, ns3::Time arrTime, double rxPowerDb, double ambNoiseDb, ns3::UanTxMode mode, ns3::UanPdp pdp, std::list > const & arrivalList) const [member function] cls.add_method('CalcSinrDb', 'double', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('ns3::Time', 'arrTime'), param('double', 'rxPowerDb'), param('double', 'ambNoiseDb'), param('ns3::UanTxMode', 'mode'), param('ns3::UanPdp', 'pdp'), param('std::list< ns3::UanPacketArrival > const &', 'arrivalList')], is_const=True, is_virtual=True) ## uan-phy-gen.h (module 'uan'): static ns3::TypeId ns3::UanPhyCalcSinrDefault::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3UanPhyCalcSinrDual_methods(root_module, cls): ## uan-phy-dual.h (module 'uan'): ns3::UanPhyCalcSinrDual::UanPhyCalcSinrDual(ns3::UanPhyCalcSinrDual const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPhyCalcSinrDual const &', 'arg0')]) ## uan-phy-dual.h (module 'uan'): ns3::UanPhyCalcSinrDual::UanPhyCalcSinrDual() [constructor] cls.add_constructor([]) ## uan-phy-dual.h (module 'uan'): double ns3::UanPhyCalcSinrDual::CalcSinrDb(ns3::Ptr pkt, ns3::Time arrTime, double rxPowerDb, double ambNoiseDb, ns3::UanTxMode mode, ns3::UanPdp pdp, std::list > const & arrivalList) const [member function] cls.add_method('CalcSinrDb', 'double', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('ns3::Time', 'arrTime'), param('double', 'rxPowerDb'), param('double', 'ambNoiseDb'), param('ns3::UanTxMode', 'mode'), param('ns3::UanPdp', 'pdp'), param('std::list< ns3::UanPacketArrival > const &', 'arrivalList')], is_const=True, is_virtual=True) ## uan-phy-dual.h (module 'uan'): static ns3::TypeId ns3::UanPhyCalcSinrDual::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3UanPhyCalcSinrFhFsk_methods(root_module, cls): ## uan-phy-gen.h (module 'uan'): ns3::UanPhyCalcSinrFhFsk::UanPhyCalcSinrFhFsk(ns3::UanPhyCalcSinrFhFsk const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPhyCalcSinrFhFsk const &', 'arg0')]) ## uan-phy-gen.h (module 'uan'): ns3::UanPhyCalcSinrFhFsk::UanPhyCalcSinrFhFsk() [constructor] cls.add_constructor([]) ## uan-phy-gen.h (module 'uan'): double ns3::UanPhyCalcSinrFhFsk::CalcSinrDb(ns3::Ptr pkt, ns3::Time arrTime, double rxPowerDb, double ambNoiseDb, ns3::UanTxMode mode, ns3::UanPdp pdp, std::list > const & arrivalList) const [member function] cls.add_method('CalcSinrDb', 'double', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('ns3::Time', 'arrTime'), param('double', 'rxPowerDb'), param('double', 'ambNoiseDb'), param('ns3::UanTxMode', 'mode'), param('ns3::UanPdp', 'pdp'), param('std::list< ns3::UanPacketArrival > const &', 'arrivalList')], is_const=True, is_virtual=True) ## uan-phy-gen.h (module 'uan'): static ns3::TypeId ns3::UanPhyCalcSinrFhFsk::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3UanPhyDual_methods(root_module, cls): ## uan-phy-dual.h (module 'uan'): ns3::UanPhyDual::UanPhyDual(ns3::UanPhyDual const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPhyDual const &', 'arg0')]) ## uan-phy-dual.h (module 'uan'): ns3::UanPhyDual::UanPhyDual() [constructor] cls.add_constructor([]) ## uan-phy-dual.h (module 'uan'): int64_t ns3::UanPhyDual::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::Clear() [member function] cls.add_method('Clear', 'void', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::EnergyDepletionHandler() [member function] cls.add_method('EnergyDepletionHandler', 'void', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): double ns3::UanPhyDual::GetCcaThresholdDb() [member function] cls.add_method('GetCcaThresholdDb', 'double', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): double ns3::UanPhyDual::GetCcaThresholdPhy1() const [member function] cls.add_method('GetCcaThresholdPhy1', 'double', [], is_const=True) ## uan-phy-dual.h (module 'uan'): double ns3::UanPhyDual::GetCcaThresholdPhy2() const [member function] cls.add_method('GetCcaThresholdPhy2', 'double', [], is_const=True) ## uan-phy-dual.h (module 'uan'): ns3::Ptr ns3::UanPhyDual::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::UanChannel >', [], is_const=True, is_virtual=True) ## uan-phy-dual.h (module 'uan'): ns3::Ptr ns3::UanPhyDual::GetDevice() const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::UanNetDevice >', [], is_const=True, is_virtual=True) ## uan-phy-dual.h (module 'uan'): ns3::UanTxMode ns3::UanPhyDual::GetMode(uint32_t n) [member function] cls.add_method('GetMode', 'ns3::UanTxMode', [param('uint32_t', 'n')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): ns3::UanModesList ns3::UanPhyDual::GetModesPhy1() const [member function] cls.add_method('GetModesPhy1', 'ns3::UanModesList', [], is_const=True) ## uan-phy-dual.h (module 'uan'): ns3::UanModesList ns3::UanPhyDual::GetModesPhy2() const [member function] cls.add_method('GetModesPhy2', 'ns3::UanModesList', [], is_const=True) ## uan-phy-dual.h (module 'uan'): uint32_t ns3::UanPhyDual::GetNModes() [member function] cls.add_method('GetNModes', 'uint32_t', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): ns3::Ptr ns3::UanPhyDual::GetPacketRx() const [member function] cls.add_method('GetPacketRx', 'ns3::Ptr< ns3::Packet >', [], is_const=True, is_virtual=True) ## uan-phy-dual.h (module 'uan'): ns3::Ptr ns3::UanPhyDual::GetPerModelPhy1() const [member function] cls.add_method('GetPerModelPhy1', 'ns3::Ptr< ns3::UanPhyPer >', [], is_const=True) ## uan-phy-dual.h (module 'uan'): ns3::Ptr ns3::UanPhyDual::GetPerModelPhy2() const [member function] cls.add_method('GetPerModelPhy2', 'ns3::Ptr< ns3::UanPhyPer >', [], is_const=True) ## uan-phy-dual.h (module 'uan'): ns3::Ptr ns3::UanPhyDual::GetPhy1PacketRx() const [member function] cls.add_method('GetPhy1PacketRx', 'ns3::Ptr< ns3::Packet >', [], is_const=True) ## uan-phy-dual.h (module 'uan'): ns3::Ptr ns3::UanPhyDual::GetPhy2PacketRx() const [member function] cls.add_method('GetPhy2PacketRx', 'ns3::Ptr< ns3::Packet >', [], is_const=True) ## uan-phy-dual.h (module 'uan'): double ns3::UanPhyDual::GetRxGainDb() [member function] cls.add_method('GetRxGainDb', 'double', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): double ns3::UanPhyDual::GetRxGainDbPhy1() const [member function] cls.add_method('GetRxGainDbPhy1', 'double', [], is_const=True) ## uan-phy-dual.h (module 'uan'): double ns3::UanPhyDual::GetRxGainDbPhy2() const [member function] cls.add_method('GetRxGainDbPhy2', 'double', [], is_const=True) ## uan-phy-dual.h (module 'uan'): double ns3::UanPhyDual::GetRxThresholdDb() [member function] cls.add_method('GetRxThresholdDb', 'double', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): ns3::Ptr ns3::UanPhyDual::GetSinrModelPhy1() const [member function] cls.add_method('GetSinrModelPhy1', 'ns3::Ptr< ns3::UanPhyCalcSinr >', [], is_const=True) ## uan-phy-dual.h (module 'uan'): ns3::Ptr ns3::UanPhyDual::GetSinrModelPhy2() const [member function] cls.add_method('GetSinrModelPhy2', 'ns3::Ptr< ns3::UanPhyCalcSinr >', [], is_const=True) ## uan-phy-dual.h (module 'uan'): ns3::Ptr ns3::UanPhyDual::GetTransducer() [member function] cls.add_method('GetTransducer', 'ns3::Ptr< ns3::UanTransducer >', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): double ns3::UanPhyDual::GetTxPowerDb() [member function] cls.add_method('GetTxPowerDb', 'double', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): double ns3::UanPhyDual::GetTxPowerDbPhy1() const [member function] cls.add_method('GetTxPowerDbPhy1', 'double', [], is_const=True) ## uan-phy-dual.h (module 'uan'): double ns3::UanPhyDual::GetTxPowerDbPhy2() const [member function] cls.add_method('GetTxPowerDbPhy2', 'double', [], is_const=True) ## uan-phy-dual.h (module 'uan'): static ns3::TypeId ns3::UanPhyDual::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-phy-dual.h (module 'uan'): bool ns3::UanPhyDual::IsPhy1Idle() [member function] cls.add_method('IsPhy1Idle', 'bool', []) ## uan-phy-dual.h (module 'uan'): bool ns3::UanPhyDual::IsPhy1Rx() [member function] cls.add_method('IsPhy1Rx', 'bool', []) ## uan-phy-dual.h (module 'uan'): bool ns3::UanPhyDual::IsPhy1Tx() [member function] cls.add_method('IsPhy1Tx', 'bool', []) ## uan-phy-dual.h (module 'uan'): bool ns3::UanPhyDual::IsPhy2Idle() [member function] cls.add_method('IsPhy2Idle', 'bool', []) ## uan-phy-dual.h (module 'uan'): bool ns3::UanPhyDual::IsPhy2Rx() [member function] cls.add_method('IsPhy2Rx', 'bool', []) ## uan-phy-dual.h (module 'uan'): bool ns3::UanPhyDual::IsPhy2Tx() [member function] cls.add_method('IsPhy2Tx', 'bool', []) ## uan-phy-dual.h (module 'uan'): bool ns3::UanPhyDual::IsStateBusy() [member function] cls.add_method('IsStateBusy', 'bool', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): bool ns3::UanPhyDual::IsStateCcaBusy() [member function] cls.add_method('IsStateCcaBusy', 'bool', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): bool ns3::UanPhyDual::IsStateIdle() [member function] cls.add_method('IsStateIdle', 'bool', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): bool ns3::UanPhyDual::IsStateRx() [member function] cls.add_method('IsStateRx', 'bool', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): bool ns3::UanPhyDual::IsStateSleep() [member function] cls.add_method('IsStateSleep', 'bool', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): bool ns3::UanPhyDual::IsStateTx() [member function] cls.add_method('IsStateTx', 'bool', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::NotifyIntChange() [member function] cls.add_method('NotifyIntChange', 'void', [], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::NotifyTransStartTx(ns3::Ptr packet, double txPowerDb, ns3::UanTxMode txMode) [member function] cls.add_method('NotifyTransStartTx', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'txPowerDb'), param('ns3::UanTxMode', 'txMode')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::RegisterListener(ns3::UanPhyListener * listener) [member function] cls.add_method('RegisterListener', 'void', [param('ns3::UanPhyListener *', 'listener')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SendPacket(ns3::Ptr pkt, uint32_t modeNum) [member function] cls.add_method('SendPacket', 'void', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('uint32_t', 'modeNum')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetCcaThresholdDb(double thresh) [member function] cls.add_method('SetCcaThresholdDb', 'void', [param('double', 'thresh')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetCcaThresholdPhy1(double thresh) [member function] cls.add_method('SetCcaThresholdPhy1', 'void', [param('double', 'thresh')]) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetCcaThresholdPhy2(double thresh) [member function] cls.add_method('SetCcaThresholdPhy2', 'void', [param('double', 'thresh')]) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetChannel(ns3::Ptr channel) [member function] cls.add_method('SetChannel', 'void', [param('ns3::Ptr< ns3::UanChannel >', 'channel')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetDevice(ns3::Ptr device) [member function] cls.add_method('SetDevice', 'void', [param('ns3::Ptr< ns3::UanNetDevice >', 'device')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetEnergyModelCallback(ns3::Callback callback) [member function] cls.add_method('SetEnergyModelCallback', 'void', [param('ns3::Callback< void, int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetMac(ns3::Ptr mac) [member function] cls.add_method('SetMac', 'void', [param('ns3::Ptr< ns3::UanMac >', 'mac')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetModesPhy1(ns3::UanModesList modes) [member function] cls.add_method('SetModesPhy1', 'void', [param('ns3::UanModesList', 'modes')]) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetModesPhy2(ns3::UanModesList modes) [member function] cls.add_method('SetModesPhy2', 'void', [param('ns3::UanModesList', 'modes')]) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetPerModelPhy1(ns3::Ptr per) [member function] cls.add_method('SetPerModelPhy1', 'void', [param('ns3::Ptr< ns3::UanPhyPer >', 'per')]) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetPerModelPhy2(ns3::Ptr per) [member function] cls.add_method('SetPerModelPhy2', 'void', [param('ns3::Ptr< ns3::UanPhyPer >', 'per')]) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetReceiveErrorCallback(ns3::Callback, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetReceiveErrorCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetReceiveOkCallback(ns3::Callback, double, ns3::UanTxMode, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetReceiveOkCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::UanTxMode, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetRxGainDb(double gain) [member function] cls.add_method('SetRxGainDb', 'void', [param('double', 'gain')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetRxGainDbPhy1(double gain) [member function] cls.add_method('SetRxGainDbPhy1', 'void', [param('double', 'gain')]) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetRxGainDbPhy2(double gain) [member function] cls.add_method('SetRxGainDbPhy2', 'void', [param('double', 'gain')]) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetRxThresholdDb(double thresh) [member function] cls.add_method('SetRxThresholdDb', 'void', [param('double', 'thresh')], deprecated=True, is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetSinrModelPhy1(ns3::Ptr calcSinr) [member function] cls.add_method('SetSinrModelPhy1', 'void', [param('ns3::Ptr< ns3::UanPhyCalcSinr >', 'calcSinr')]) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetSinrModelPhy2(ns3::Ptr calcSinr) [member function] cls.add_method('SetSinrModelPhy2', 'void', [param('ns3::Ptr< ns3::UanPhyCalcSinr >', 'calcSinr')]) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetSleepMode(bool sleep) [member function] cls.add_method('SetSleepMode', 'void', [param('bool', 'sleep')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetTransducer(ns3::Ptr trans) [member function] cls.add_method('SetTransducer', 'void', [param('ns3::Ptr< ns3::UanTransducer >', 'trans')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetTxPowerDb(double txpwr) [member function] cls.add_method('SetTxPowerDb', 'void', [param('double', 'txpwr')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetTxPowerDbPhy1(double txpwr) [member function] cls.add_method('SetTxPowerDbPhy1', 'void', [param('double', 'txpwr')]) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::SetTxPowerDbPhy2(double txpwr) [member function] cls.add_method('SetTxPowerDbPhy2', 'void', [param('double', 'txpwr')]) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::StartRxPacket(ns3::Ptr pkt, double rxPowerDb, ns3::UanTxMode txMode, ns3::UanPdp pdp) [member function] cls.add_method('StartRxPacket', 'void', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('double', 'rxPowerDb'), param('ns3::UanTxMode', 'txMode'), param('ns3::UanPdp', 'pdp')], is_virtual=True) ## uan-phy-dual.h (module 'uan'): void ns3::UanPhyDual::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3UanPhyGen_methods(root_module, cls): ## uan-phy-gen.h (module 'uan'): ns3::UanPhyGen::UanPhyGen(ns3::UanPhyGen const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPhyGen const &', 'arg0')]) ## uan-phy-gen.h (module 'uan'): ns3::UanPhyGen::UanPhyGen() [constructor] cls.add_constructor([]) ## uan-phy-gen.h (module 'uan'): int64_t ns3::UanPhyGen::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::Clear() [member function] cls.add_method('Clear', 'void', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::EnergyDepletionHandler() [member function] cls.add_method('EnergyDepletionHandler', 'void', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): double ns3::UanPhyGen::GetCcaThresholdDb() [member function] cls.add_method('GetCcaThresholdDb', 'double', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): ns3::Ptr ns3::UanPhyGen::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::UanChannel >', [], is_const=True, is_virtual=True) ## uan-phy-gen.h (module 'uan'): static ns3::UanModesList ns3::UanPhyGen::GetDefaultModes() [member function] cls.add_method('GetDefaultModes', 'ns3::UanModesList', [], is_static=True) ## uan-phy-gen.h (module 'uan'): ns3::Ptr ns3::UanPhyGen::GetDevice() const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::UanNetDevice >', [], is_const=True, is_virtual=True) ## uan-phy-gen.h (module 'uan'): ns3::UanTxMode ns3::UanPhyGen::GetMode(uint32_t n) [member function] cls.add_method('GetMode', 'ns3::UanTxMode', [param('uint32_t', 'n')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): uint32_t ns3::UanPhyGen::GetNModes() [member function] cls.add_method('GetNModes', 'uint32_t', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): ns3::Ptr ns3::UanPhyGen::GetPacketRx() const [member function] cls.add_method('GetPacketRx', 'ns3::Ptr< ns3::Packet >', [], is_const=True, is_virtual=True) ## uan-phy-gen.h (module 'uan'): double ns3::UanPhyGen::GetRxGainDb() [member function] cls.add_method('GetRxGainDb', 'double', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): double ns3::UanPhyGen::GetRxThresholdDb() [member function] cls.add_method('GetRxThresholdDb', 'double', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): ns3::Ptr ns3::UanPhyGen::GetTransducer() [member function] cls.add_method('GetTransducer', 'ns3::Ptr< ns3::UanTransducer >', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): double ns3::UanPhyGen::GetTxPowerDb() [member function] cls.add_method('GetTxPowerDb', 'double', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): static ns3::TypeId ns3::UanPhyGen::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-phy-gen.h (module 'uan'): bool ns3::UanPhyGen::IsStateBusy() [member function] cls.add_method('IsStateBusy', 'bool', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): bool ns3::UanPhyGen::IsStateCcaBusy() [member function] cls.add_method('IsStateCcaBusy', 'bool', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): bool ns3::UanPhyGen::IsStateIdle() [member function] cls.add_method('IsStateIdle', 'bool', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): bool ns3::UanPhyGen::IsStateRx() [member function] cls.add_method('IsStateRx', 'bool', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): bool ns3::UanPhyGen::IsStateSleep() [member function] cls.add_method('IsStateSleep', 'bool', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): bool ns3::UanPhyGen::IsStateTx() [member function] cls.add_method('IsStateTx', 'bool', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::NotifyIntChange() [member function] cls.add_method('NotifyIntChange', 'void', [], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::NotifyTransStartTx(ns3::Ptr packet, double txPowerDb, ns3::UanTxMode txMode) [member function] cls.add_method('NotifyTransStartTx', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'txPowerDb'), param('ns3::UanTxMode', 'txMode')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::RegisterListener(ns3::UanPhyListener * listener) [member function] cls.add_method('RegisterListener', 'void', [param('ns3::UanPhyListener *', 'listener')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SendPacket(ns3::Ptr pkt, uint32_t modeNum) [member function] cls.add_method('SendPacket', 'void', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('uint32_t', 'modeNum')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SetCcaThresholdDb(double thresh) [member function] cls.add_method('SetCcaThresholdDb', 'void', [param('double', 'thresh')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SetChannel(ns3::Ptr channel) [member function] cls.add_method('SetChannel', 'void', [param('ns3::Ptr< ns3::UanChannel >', 'channel')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SetDevice(ns3::Ptr device) [member function] cls.add_method('SetDevice', 'void', [param('ns3::Ptr< ns3::UanNetDevice >', 'device')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SetEnergyModelCallback(ns3::Callback cb) [member function] cls.add_method('SetEnergyModelCallback', 'void', [param('ns3::Callback< void, int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SetMac(ns3::Ptr mac) [member function] cls.add_method('SetMac', 'void', [param('ns3::Ptr< ns3::UanMac >', 'mac')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SetReceiveErrorCallback(ns3::Callback, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetReceiveErrorCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SetReceiveOkCallback(ns3::Callback, double, ns3::UanTxMode, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetReceiveOkCallback', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, double, ns3::UanTxMode, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SetRxGainDb(double gain) [member function] cls.add_method('SetRxGainDb', 'void', [param('double', 'gain')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SetRxThresholdDb(double thresh) [member function] cls.add_method('SetRxThresholdDb', 'void', [param('double', 'thresh')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SetSleepMode(bool sleep) [member function] cls.add_method('SetSleepMode', 'void', [param('bool', 'sleep')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SetTransducer(ns3::Ptr trans) [member function] cls.add_method('SetTransducer', 'void', [param('ns3::Ptr< ns3::UanTransducer >', 'trans')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::SetTxPowerDb(double txpwr) [member function] cls.add_method('SetTxPowerDb', 'void', [param('double', 'txpwr')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::StartRxPacket(ns3::Ptr pkt, double rxPowerDb, ns3::UanTxMode txMode, ns3::UanPdp pdp) [member function] cls.add_method('StartRxPacket', 'void', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('double', 'rxPowerDb'), param('ns3::UanTxMode', 'txMode'), param('ns3::UanPdp', 'pdp')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): void ns3::UanPhyGen::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3UanPhyPer_methods(root_module, cls): ## uan-phy.h (module 'uan'): ns3::UanPhyPer::UanPhyPer() [constructor] cls.add_constructor([]) ## uan-phy.h (module 'uan'): ns3::UanPhyPer::UanPhyPer(ns3::UanPhyPer const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPhyPer const &', 'arg0')]) ## uan-phy.h (module 'uan'): double ns3::UanPhyPer::CalcPer(ns3::Ptr pkt, double sinrDb, ns3::UanTxMode mode) [member function] cls.add_method('CalcPer', 'double', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('double', 'sinrDb'), param('ns3::UanTxMode', 'mode')], is_pure_virtual=True, is_virtual=True) ## uan-phy.h (module 'uan'): void ns3::UanPhyPer::Clear() [member function] cls.add_method('Clear', 'void', [], is_virtual=True) ## uan-phy.h (module 'uan'): static ns3::TypeId ns3::UanPhyPer::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-phy.h (module 'uan'): void ns3::UanPhyPer::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3UanPhyPerGenDefault_methods(root_module, cls): ## uan-phy-gen.h (module 'uan'): ns3::UanPhyPerGenDefault::UanPhyPerGenDefault(ns3::UanPhyPerGenDefault const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPhyPerGenDefault const &', 'arg0')]) ## uan-phy-gen.h (module 'uan'): ns3::UanPhyPerGenDefault::UanPhyPerGenDefault() [constructor] cls.add_constructor([]) ## uan-phy-gen.h (module 'uan'): double ns3::UanPhyPerGenDefault::CalcPer(ns3::Ptr pkt, double sinrDb, ns3::UanTxMode mode) [member function] cls.add_method('CalcPer', 'double', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('double', 'sinrDb'), param('ns3::UanTxMode', 'mode')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): static ns3::TypeId ns3::UanPhyPerGenDefault::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3UanPhyPerUmodem_methods(root_module, cls): ## uan-phy-gen.h (module 'uan'): ns3::UanPhyPerUmodem::UanPhyPerUmodem(ns3::UanPhyPerUmodem const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPhyPerUmodem const &', 'arg0')]) ## uan-phy-gen.h (module 'uan'): ns3::UanPhyPerUmodem::UanPhyPerUmodem() [constructor] cls.add_constructor([]) ## uan-phy-gen.h (module 'uan'): double ns3::UanPhyPerUmodem::CalcPer(ns3::Ptr pkt, double sinrDb, ns3::UanTxMode mode) [member function] cls.add_method('CalcPer', 'double', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('double', 'sinrDb'), param('ns3::UanTxMode', 'mode')], is_virtual=True) ## uan-phy-gen.h (module 'uan'): static ns3::TypeId ns3::UanPhyPerUmodem::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3UanPropModel_methods(root_module, cls): ## uan-prop-model.h (module 'uan'): ns3::UanPropModel::UanPropModel() [constructor] cls.add_constructor([]) ## uan-prop-model.h (module 'uan'): ns3::UanPropModel::UanPropModel(ns3::UanPropModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPropModel const &', 'arg0')]) ## uan-prop-model.h (module 'uan'): void ns3::UanPropModel::Clear() [member function] cls.add_method('Clear', 'void', [], is_virtual=True) ## uan-prop-model.h (module 'uan'): void ns3::UanPropModel::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], is_virtual=True) ## uan-prop-model.h (module 'uan'): ns3::Time ns3::UanPropModel::GetDelay(ns3::Ptr a, ns3::Ptr b, ns3::UanTxMode mode) [member function] cls.add_method('GetDelay', 'ns3::Time', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b'), param('ns3::UanTxMode', 'mode')], is_pure_virtual=True, is_virtual=True) ## uan-prop-model.h (module 'uan'): double ns3::UanPropModel::GetPathLossDb(ns3::Ptr a, ns3::Ptr b, ns3::UanTxMode txMode) [member function] cls.add_method('GetPathLossDb', 'double', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b'), param('ns3::UanTxMode', 'txMode')], is_pure_virtual=True, is_virtual=True) ## uan-prop-model.h (module 'uan'): ns3::UanPdp ns3::UanPropModel::GetPdp(ns3::Ptr a, ns3::Ptr b, ns3::UanTxMode mode) [member function] cls.add_method('GetPdp', 'ns3::UanPdp', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b'), param('ns3::UanTxMode', 'mode')], is_pure_virtual=True, is_virtual=True) ## uan-prop-model.h (module 'uan'): static ns3::TypeId ns3::UanPropModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3UanPropModelIdeal_methods(root_module, cls): ## uan-prop-model-ideal.h (module 'uan'): ns3::UanPropModelIdeal::UanPropModelIdeal(ns3::UanPropModelIdeal const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPropModelIdeal const &', 'arg0')]) ## uan-prop-model-ideal.h (module 'uan'): ns3::UanPropModelIdeal::UanPropModelIdeal() [constructor] cls.add_constructor([]) ## uan-prop-model-ideal.h (module 'uan'): ns3::Time ns3::UanPropModelIdeal::GetDelay(ns3::Ptr a, ns3::Ptr b, ns3::UanTxMode mode) [member function] cls.add_method('GetDelay', 'ns3::Time', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b'), param('ns3::UanTxMode', 'mode')], is_virtual=True) ## uan-prop-model-ideal.h (module 'uan'): double ns3::UanPropModelIdeal::GetPathLossDb(ns3::Ptr a, ns3::Ptr b, ns3::UanTxMode mode) [member function] cls.add_method('GetPathLossDb', 'double', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b'), param('ns3::UanTxMode', 'mode')], is_virtual=True) ## uan-prop-model-ideal.h (module 'uan'): ns3::UanPdp ns3::UanPropModelIdeal::GetPdp(ns3::Ptr a, ns3::Ptr b, ns3::UanTxMode mode) [member function] cls.add_method('GetPdp', 'ns3::UanPdp', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b'), param('ns3::UanTxMode', 'mode')], is_virtual=True) ## uan-prop-model-ideal.h (module 'uan'): static ns3::TypeId ns3::UanPropModelIdeal::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3UanPropModelThorp_methods(root_module, cls): ## uan-prop-model-thorp.h (module 'uan'): ns3::UanPropModelThorp::UanPropModelThorp(ns3::UanPropModelThorp const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanPropModelThorp const &', 'arg0')]) ## uan-prop-model-thorp.h (module 'uan'): ns3::UanPropModelThorp::UanPropModelThorp() [constructor] cls.add_constructor([]) ## uan-prop-model-thorp.h (module 'uan'): ns3::Time ns3::UanPropModelThorp::GetDelay(ns3::Ptr a, ns3::Ptr b, ns3::UanTxMode mode) [member function] cls.add_method('GetDelay', 'ns3::Time', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b'), param('ns3::UanTxMode', 'mode')], is_virtual=True) ## uan-prop-model-thorp.h (module 'uan'): double ns3::UanPropModelThorp::GetPathLossDb(ns3::Ptr a, ns3::Ptr b, ns3::UanTxMode mode) [member function] cls.add_method('GetPathLossDb', 'double', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b'), param('ns3::UanTxMode', 'mode')], is_virtual=True) ## uan-prop-model-thorp.h (module 'uan'): ns3::UanPdp ns3::UanPropModelThorp::GetPdp(ns3::Ptr a, ns3::Ptr b, ns3::UanTxMode mode) [member function] cls.add_method('GetPdp', 'ns3::UanPdp', [param('ns3::Ptr< ns3::MobilityModel >', 'a'), param('ns3::Ptr< ns3::MobilityModel >', 'b'), param('ns3::UanTxMode', 'mode')], is_virtual=True) ## uan-prop-model-thorp.h (module 'uan'): static ns3::TypeId ns3::UanPropModelThorp::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3UanTransducer_methods(root_module, cls): ## uan-transducer.h (module 'uan'): ns3::UanTransducer::UanTransducer() [constructor] cls.add_constructor([]) ## uan-transducer.h (module 'uan'): ns3::UanTransducer::UanTransducer(ns3::UanTransducer const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanTransducer const &', 'arg0')]) ## uan-transducer.h (module 'uan'): void ns3::UanTransducer::AddPhy(ns3::Ptr phy) [member function] cls.add_method('AddPhy', 'void', [param('ns3::Ptr< ns3::UanPhy >', 'phy')], is_pure_virtual=True, is_virtual=True) ## uan-transducer.h (module 'uan'): void ns3::UanTransducer::Clear() [member function] cls.add_method('Clear', 'void', [], is_pure_virtual=True, is_virtual=True) ## uan-transducer.h (module 'uan'): std::list > const & ns3::UanTransducer::GetArrivalList() const [member function] cls.add_method('GetArrivalList', 'std::list< ns3::UanPacketArrival > const &', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## uan-transducer.h (module 'uan'): ns3::Ptr ns3::UanTransducer::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::UanChannel >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## uan-transducer.h (module 'uan'): std::list, std::allocator > > const & ns3::UanTransducer::GetPhyList() const [member function] cls.add_method('GetPhyList', 'std::list< ns3::Ptr< ns3::UanPhy > > const &', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## uan-transducer.h (module 'uan'): ns3::UanTransducer::State ns3::UanTransducer::GetState() const [member function] cls.add_method('GetState', 'ns3::UanTransducer::State', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## uan-transducer.h (module 'uan'): static ns3::TypeId ns3::UanTransducer::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-transducer.h (module 'uan'): bool ns3::UanTransducer::IsRx() const [member function] cls.add_method('IsRx', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## uan-transducer.h (module 'uan'): bool ns3::UanTransducer::IsTx() const [member function] cls.add_method('IsTx', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## uan-transducer.h (module 'uan'): void ns3::UanTransducer::Receive(ns3::Ptr packet, double rxPowerDb, ns3::UanTxMode txMode, ns3::UanPdp pdp) [member function] cls.add_method('Receive', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'rxPowerDb'), param('ns3::UanTxMode', 'txMode'), param('ns3::UanPdp', 'pdp')], is_pure_virtual=True, is_virtual=True) ## uan-transducer.h (module 'uan'): void ns3::UanTransducer::SetChannel(ns3::Ptr chan) [member function] cls.add_method('SetChannel', 'void', [param('ns3::Ptr< ns3::UanChannel >', 'chan')], is_pure_virtual=True, is_virtual=True) ## uan-transducer.h (module 'uan'): void ns3::UanTransducer::Transmit(ns3::Ptr src, ns3::Ptr packet, double txPowerDb, ns3::UanTxMode txMode) [member function] cls.add_method('Transmit', 'void', [param('ns3::Ptr< ns3::UanPhy >', 'src'), param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'txPowerDb'), param('ns3::UanTxMode', 'txMode')], is_pure_virtual=True, is_virtual=True) return def register_Ns3UanTransducerHd_methods(root_module, cls): ## uan-transducer-hd.h (module 'uan'): ns3::UanTransducerHd::UanTransducerHd(ns3::UanTransducerHd const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanTransducerHd const &', 'arg0')]) ## uan-transducer-hd.h (module 'uan'): ns3::UanTransducerHd::UanTransducerHd() [constructor] cls.add_constructor([]) ## uan-transducer-hd.h (module 'uan'): void ns3::UanTransducerHd::AddPhy(ns3::Ptr arg0) [member function] cls.add_method('AddPhy', 'void', [param('ns3::Ptr< ns3::UanPhy >', 'arg0')], is_virtual=True) ## uan-transducer-hd.h (module 'uan'): void ns3::UanTransducerHd::Clear() [member function] cls.add_method('Clear', 'void', [], is_virtual=True) ## uan-transducer-hd.h (module 'uan'): std::list > const & ns3::UanTransducerHd::GetArrivalList() const [member function] cls.add_method('GetArrivalList', 'std::list< ns3::UanPacketArrival > const &', [], is_const=True, is_virtual=True) ## uan-transducer-hd.h (module 'uan'): ns3::Ptr ns3::UanTransducerHd::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::UanChannel >', [], is_const=True, is_virtual=True) ## uan-transducer-hd.h (module 'uan'): std::list, std::allocator > > const & ns3::UanTransducerHd::GetPhyList() const [member function] cls.add_method('GetPhyList', 'std::list< ns3::Ptr< ns3::UanPhy > > const &', [], is_const=True, is_virtual=True) ## uan-transducer-hd.h (module 'uan'): ns3::UanTransducer::State ns3::UanTransducerHd::GetState() const [member function] cls.add_method('GetState', 'ns3::UanTransducer::State', [], is_const=True, is_virtual=True) ## uan-transducer-hd.h (module 'uan'): static ns3::TypeId ns3::UanTransducerHd::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-transducer-hd.h (module 'uan'): bool ns3::UanTransducerHd::IsRx() const [member function] cls.add_method('IsRx', 'bool', [], is_const=True, is_virtual=True) ## uan-transducer-hd.h (module 'uan'): bool ns3::UanTransducerHd::IsTx() const [member function] cls.add_method('IsTx', 'bool', [], is_const=True, is_virtual=True) ## uan-transducer-hd.h (module 'uan'): void ns3::UanTransducerHd::Receive(ns3::Ptr packet, double rxPowerDb, ns3::UanTxMode txMode, ns3::UanPdp pdp) [member function] cls.add_method('Receive', 'void', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'rxPowerDb'), param('ns3::UanTxMode', 'txMode'), param('ns3::UanPdp', 'pdp')], is_virtual=True) ## uan-transducer-hd.h (module 'uan'): void ns3::UanTransducerHd::SetChannel(ns3::Ptr chan) [member function] cls.add_method('SetChannel', 'void', [param('ns3::Ptr< ns3::UanChannel >', 'chan')], is_virtual=True) ## uan-transducer-hd.h (module 'uan'): void ns3::UanTransducerHd::Transmit(ns3::Ptr src, ns3::Ptr packet, double txPowerDb, ns3::UanTxMode txMode) [member function] cls.add_method('Transmit', 'void', [param('ns3::Ptr< ns3::UanPhy >', 'src'), param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'txPowerDb'), param('ns3::UanTxMode', 'txMode')], is_virtual=True) ## uan-transducer-hd.h (module 'uan'): void ns3::UanTransducerHd::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3UniformRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::UniformRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::UniformRandomVariable::UniformRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::UniformRandomVariable::GetMin() const [member function] cls.add_method('GetMin', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::UniformRandomVariable::GetMax() const [member function] cls.add_method('GetMax', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::UniformRandomVariable::GetValue(double min, double max) [member function] cls.add_method('GetValue', 'double', [param('double', 'min'), param('double', 'max')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::UniformRandomVariable::GetInteger(uint32_t min, uint32_t max) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'min'), param('uint32_t', 'max')]) ## random-variable-stream.h (module 'core'): double ns3::UniformRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::UniformRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3WeibullRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::WeibullRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::WeibullRandomVariable::WeibullRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetScale() const [member function] cls.add_method('GetScale', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetShape() const [member function] cls.add_method('GetShape', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetBound() const [member function] cls.add_method('GetBound', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetValue(double scale, double shape, double bound) [member function] cls.add_method('GetValue', 'double', [param('double', 'scale'), param('double', 'shape'), param('double', 'bound')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::WeibullRandomVariable::GetInteger(uint32_t scale, uint32_t shape, uint32_t bound) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'scale'), param('uint32_t', 'shape'), param('uint32_t', 'bound')]) ## random-variable-stream.h (module 'core'): double ns3::WeibullRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::WeibullRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3ZetaRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ZetaRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ZetaRandomVariable::ZetaRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::ZetaRandomVariable::GetAlpha() const [member function] cls.add_method('GetAlpha', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ZetaRandomVariable::GetValue(double alpha) [member function] cls.add_method('GetValue', 'double', [param('double', 'alpha')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZetaRandomVariable::GetInteger(uint32_t alpha) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'alpha')]) ## random-variable-stream.h (module 'core'): double ns3::ZetaRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZetaRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3ZipfRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ZipfRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ZipfRandomVariable::ZipfRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZipfRandomVariable::GetN() const [member function] cls.add_method('GetN', 'uint32_t', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ZipfRandomVariable::GetAlpha() const [member function] cls.add_method('GetAlpha', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ZipfRandomVariable::GetValue(uint32_t n, double alpha) [member function] cls.add_method('GetValue', 'double', [param('uint32_t', 'n'), param('double', 'alpha')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZipfRandomVariable::GetInteger(uint32_t n, uint32_t alpha) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'n'), param('uint32_t', 'alpha')]) ## random-variable-stream.h (module 'core'): double ns3::ZipfRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ZipfRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3AttributeAccessor_methods(root_module, cls): ## attribute.h (module 'core'): ns3::AttributeAccessor::AttributeAccessor(ns3::AttributeAccessor const & arg0) [copy constructor] cls.add_constructor([param('ns3::AttributeAccessor const &', 'arg0')]) ## attribute.h (module 'core'): ns3::AttributeAccessor::AttributeAccessor() [constructor] cls.add_constructor([]) ## attribute.h (module 'core'): bool ns3::AttributeAccessor::Get(ns3::ObjectBase const * object, ns3::AttributeValue & attribute) const [member function] cls.add_method('Get', 'bool', [param('ns3::ObjectBase const *', 'object'), param('ns3::AttributeValue &', 'attribute')], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): bool ns3::AttributeAccessor::HasGetter() const [member function] cls.add_method('HasGetter', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): bool ns3::AttributeAccessor::HasSetter() const [member function] cls.add_method('HasSetter', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): bool ns3::AttributeAccessor::Set(ns3::ObjectBase * object, ns3::AttributeValue const & value) const [member function] cls.add_method('Set', 'bool', [param('ns3::ObjectBase *', 'object', transfer_ownership=False), param('ns3::AttributeValue const &', 'value')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3AttributeChecker_methods(root_module, cls): ## attribute.h (module 'core'): ns3::AttributeChecker::AttributeChecker(ns3::AttributeChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::AttributeChecker const &', 'arg0')]) ## attribute.h (module 'core'): ns3::AttributeChecker::AttributeChecker() [constructor] cls.add_constructor([]) ## attribute.h (module 'core'): bool ns3::AttributeChecker::Check(ns3::AttributeValue const & value) const [member function] cls.add_method('Check', 'bool', [param('ns3::AttributeValue const &', 'value')], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): bool ns3::AttributeChecker::Copy(ns3::AttributeValue const & source, ns3::AttributeValue & destination) const [member function] cls.add_method('Copy', 'bool', [param('ns3::AttributeValue const &', 'source'), param('ns3::AttributeValue &', 'destination')], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): ns3::Ptr ns3::AttributeChecker::Create() const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::AttributeValue >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): ns3::Ptr ns3::AttributeChecker::CreateValidValue(ns3::AttributeValue const & value) const [member function] cls.add_method('CreateValidValue', 'ns3::Ptr< ns3::AttributeValue >', [param('ns3::AttributeValue const &', 'value')], is_const=True) ## attribute.h (module 'core'): std::string ns3::AttributeChecker::GetUnderlyingTypeInformation() const [member function] cls.add_method('GetUnderlyingTypeInformation', 'std::string', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): std::string ns3::AttributeChecker::GetValueTypeName() const [member function] cls.add_method('GetValueTypeName', 'std::string', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): bool ns3::AttributeChecker::HasUnderlyingTypeInformation() const [member function] cls.add_method('HasUnderlyingTypeInformation', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3AttributeValue_methods(root_module, cls): ## attribute.h (module 'core'): ns3::AttributeValue::AttributeValue(ns3::AttributeValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::AttributeValue const &', 'arg0')]) ## attribute.h (module 'core'): ns3::AttributeValue::AttributeValue() [constructor] cls.add_constructor([]) ## attribute.h (module 'core'): ns3::Ptr ns3::AttributeValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## attribute.h (module 'core'): bool ns3::AttributeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_pure_virtual=True, is_virtual=True) ## attribute.h (module 'core'): std::string ns3::AttributeValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3BooleanChecker_methods(root_module, cls): ## boolean.h (module 'core'): ns3::BooleanChecker::BooleanChecker() [constructor] cls.add_constructor([]) ## boolean.h (module 'core'): ns3::BooleanChecker::BooleanChecker(ns3::BooleanChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::BooleanChecker const &', 'arg0')]) return def register_Ns3BooleanValue_methods(root_module, cls): cls.add_output_stream_operator() ## boolean.h (module 'core'): ns3::BooleanValue::BooleanValue(ns3::BooleanValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::BooleanValue const &', 'arg0')]) ## boolean.h (module 'core'): ns3::BooleanValue::BooleanValue() [constructor] cls.add_constructor([]) ## boolean.h (module 'core'): ns3::BooleanValue::BooleanValue(bool value) [constructor] cls.add_constructor([param('bool', 'value')]) ## boolean.h (module 'core'): ns3::Ptr ns3::BooleanValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## boolean.h (module 'core'): bool ns3::BooleanValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## boolean.h (module 'core'): bool ns3::BooleanValue::Get() const [member function] cls.add_method('Get', 'bool', [], is_const=True) ## boolean.h (module 'core'): std::string ns3::BooleanValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## boolean.h (module 'core'): void ns3::BooleanValue::Set(bool value) [member function] cls.add_method('Set', 'void', [param('bool', 'value')]) return def register_Ns3CallbackChecker_methods(root_module, cls): ## callback.h (module 'core'): ns3::CallbackChecker::CallbackChecker() [constructor] cls.add_constructor([]) ## callback.h (module 'core'): ns3::CallbackChecker::CallbackChecker(ns3::CallbackChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::CallbackChecker const &', 'arg0')]) return def register_Ns3CallbackImplBase_methods(root_module, cls): ## callback.h (module 'core'): ns3::CallbackImplBase::CallbackImplBase() [constructor] cls.add_constructor([]) ## callback.h (module 'core'): ns3::CallbackImplBase::CallbackImplBase(ns3::CallbackImplBase const & arg0) [copy constructor] cls.add_constructor([param('ns3::CallbackImplBase const &', 'arg0')]) ## callback.h (module 'core'): std::string ns3::CallbackImplBase::GetTypeid() const [member function] cls.add_method('GetTypeid', 'std::string', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## callback.h (module 'core'): bool ns3::CallbackImplBase::IsEqual(ns3::Ptr other) const [member function] cls.add_method('IsEqual', 'bool', [param('ns3::Ptr< ns3::CallbackImplBase const >', 'other')], is_pure_virtual=True, is_const=True, is_virtual=True) ## callback.h (module 'core'): static std::string ns3::CallbackImplBase::Demangle(std::string const & mangled) [member function] cls.add_method('Demangle', 'std::string', [param('std::string const &', 'mangled')], is_static=True, visibility='protected') return def register_Ns3CallbackValue_methods(root_module, cls): ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue(ns3::CallbackValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::CallbackValue const &', 'arg0')]) ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue() [constructor] cls.add_constructor([]) ## callback.h (module 'core'): ns3::CallbackValue::CallbackValue(ns3::CallbackBase const & base) [constructor] cls.add_constructor([param('ns3::CallbackBase const &', 'base')]) ## callback.h (module 'core'): ns3::Ptr ns3::CallbackValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## callback.h (module 'core'): bool ns3::CallbackValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## callback.h (module 'core'): std::string ns3::CallbackValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## callback.h (module 'core'): void ns3::CallbackValue::Set(ns3::CallbackBase base) [member function] cls.add_method('Set', 'void', [param('ns3::CallbackBase', 'base')]) return def register_Ns3Channel_methods(root_module, cls): ## channel.h (module 'network'): ns3::Channel::Channel(ns3::Channel const & arg0) [copy constructor] cls.add_constructor([param('ns3::Channel const &', 'arg0')]) ## channel.h (module 'network'): ns3::Channel::Channel() [constructor] cls.add_constructor([]) ## channel.h (module 'network'): ns3::Ptr ns3::Channel::GetDevice(uint32_t i) const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_pure_virtual=True, is_const=True, is_virtual=True) ## channel.h (module 'network'): uint32_t ns3::Channel::GetId() const [member function] cls.add_method('GetId', 'uint32_t', [], is_const=True) ## channel.h (module 'network'): uint32_t ns3::Channel::GetNDevices() const [member function] cls.add_method('GetNDevices', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## channel.h (module 'network'): static ns3::TypeId ns3::Channel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) return def register_Ns3ConstantRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ConstantRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ConstantRandomVariable::ConstantRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::ConstantRandomVariable::GetConstant() const [member function] cls.add_method('GetConstant', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ConstantRandomVariable::GetValue(double constant) [member function] cls.add_method('GetValue', 'double', [param('double', 'constant')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ConstantRandomVariable::GetInteger(uint32_t constant) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'constant')]) ## random-variable-stream.h (module 'core'): double ns3::ConstantRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ConstantRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3DeterministicRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::DeterministicRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::DeterministicRandomVariable::DeterministicRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): void ns3::DeterministicRandomVariable::SetValueArray(double * values, uint64_t length) [member function] cls.add_method('SetValueArray', 'void', [param('double *', 'values'), param('uint64_t', 'length')]) ## random-variable-stream.h (module 'core'): double ns3::DeterministicRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::DeterministicRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3DeviceEnergyModel_methods(root_module, cls): ## device-energy-model.h (module 'energy'): ns3::DeviceEnergyModel::DeviceEnergyModel(ns3::DeviceEnergyModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::DeviceEnergyModel const &', 'arg0')]) ## device-energy-model.h (module 'energy'): ns3::DeviceEnergyModel::DeviceEnergyModel() [constructor] cls.add_constructor([]) ## device-energy-model.h (module 'energy'): void ns3::DeviceEnergyModel::ChangeState(int newState) [member function] cls.add_method('ChangeState', 'void', [param('int', 'newState')], is_pure_virtual=True, is_virtual=True) ## device-energy-model.h (module 'energy'): double ns3::DeviceEnergyModel::GetCurrentA() const [member function] cls.add_method('GetCurrentA', 'double', [], is_const=True) ## device-energy-model.h (module 'energy'): double ns3::DeviceEnergyModel::GetTotalEnergyConsumption() const [member function] cls.add_method('GetTotalEnergyConsumption', 'double', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## device-energy-model.h (module 'energy'): static ns3::TypeId ns3::DeviceEnergyModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## device-energy-model.h (module 'energy'): void ns3::DeviceEnergyModel::HandleEnergyDepletion() [member function] cls.add_method('HandleEnergyDepletion', 'void', [], is_pure_virtual=True, is_virtual=True) ## device-energy-model.h (module 'energy'): void ns3::DeviceEnergyModel::HandleEnergyRecharged() [member function] cls.add_method('HandleEnergyRecharged', 'void', [], is_pure_virtual=True, is_virtual=True) ## device-energy-model.h (module 'energy'): void ns3::DeviceEnergyModel::SetEnergySource(ns3::Ptr source) [member function] cls.add_method('SetEnergySource', 'void', [param('ns3::Ptr< ns3::EnergySource >', 'source')], is_pure_virtual=True, is_virtual=True) ## device-energy-model.h (module 'energy'): double ns3::DeviceEnergyModel::DoGetCurrentA() const [member function] cls.add_method('DoGetCurrentA', 'double', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3DoubleValue_methods(root_module, cls): ## double.h (module 'core'): ns3::DoubleValue::DoubleValue() [constructor] cls.add_constructor([]) ## double.h (module 'core'): ns3::DoubleValue::DoubleValue(ns3::DoubleValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::DoubleValue const &', 'arg0')]) ## double.h (module 'core'): ns3::DoubleValue::DoubleValue(double const & value) [constructor] cls.add_constructor([param('double const &', 'value')]) ## double.h (module 'core'): ns3::Ptr ns3::DoubleValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## double.h (module 'core'): bool ns3::DoubleValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## double.h (module 'core'): double ns3::DoubleValue::Get() const [member function] cls.add_method('Get', 'double', [], is_const=True) ## double.h (module 'core'): std::string ns3::DoubleValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## double.h (module 'core'): void ns3::DoubleValue::Set(double const & value) [member function] cls.add_method('Set', 'void', [param('double const &', 'value')]) return def register_Ns3EmpiricalRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): ns3::EmpiricalRandomVariable::EmpiricalRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::CDF(double v, double c) [member function] cls.add_method('CDF', 'void', [param('double', 'v'), param('double', 'c')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::EmpiricalRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::EmpiricalRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): double ns3::EmpiricalRandomVariable::Interpolate(double c1, double c2, double v1, double v2, double r) [member function] cls.add_method('Interpolate', 'double', [param('double', 'c1'), param('double', 'c2'), param('double', 'v1'), param('double', 'v2'), param('double', 'r')], visibility='private', is_virtual=True) ## random-variable-stream.h (module 'core'): void ns3::EmpiricalRandomVariable::Validate() [member function] cls.add_method('Validate', 'void', [], visibility='private', is_virtual=True) return def register_Ns3EmptyAttributeValue_methods(root_module, cls): ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue(ns3::EmptyAttributeValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::EmptyAttributeValue const &', 'arg0')]) ## attribute.h (module 'core'): ns3::EmptyAttributeValue::EmptyAttributeValue() [constructor] cls.add_constructor([]) ## attribute.h (module 'core'): ns3::Ptr ns3::EmptyAttributeValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, visibility='private', is_virtual=True) ## attribute.h (module 'core'): bool ns3::EmptyAttributeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], visibility='private', is_virtual=True) ## attribute.h (module 'core'): std::string ns3::EmptyAttributeValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, visibility='private', is_virtual=True) return def register_Ns3EnergyHarvester_methods(root_module, cls): ## energy-harvester.h (module 'energy'): ns3::EnergyHarvester::EnergyHarvester(ns3::EnergyHarvester const & arg0) [copy constructor] cls.add_constructor([param('ns3::EnergyHarvester const &', 'arg0')]) ## energy-harvester.h (module 'energy'): ns3::EnergyHarvester::EnergyHarvester() [constructor] cls.add_constructor([]) ## energy-harvester.h (module 'energy'): ns3::Ptr ns3::EnergyHarvester::GetEnergySource() const [member function] cls.add_method('GetEnergySource', 'ns3::Ptr< ns3::EnergySource >', [], is_const=True) ## energy-harvester.h (module 'energy'): ns3::Ptr ns3::EnergyHarvester::GetNode() const [member function] cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_const=True) ## energy-harvester.h (module 'energy'): double ns3::EnergyHarvester::GetPower() const [member function] cls.add_method('GetPower', 'double', [], is_const=True) ## energy-harvester.h (module 'energy'): static ns3::TypeId ns3::EnergyHarvester::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## energy-harvester.h (module 'energy'): void ns3::EnergyHarvester::SetEnergySource(ns3::Ptr source) [member function] cls.add_method('SetEnergySource', 'void', [param('ns3::Ptr< ns3::EnergySource >', 'source')]) ## energy-harvester.h (module 'energy'): void ns3::EnergyHarvester::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')]) ## energy-harvester.h (module 'energy'): void ns3::EnergyHarvester::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) ## energy-harvester.h (module 'energy'): double ns3::EnergyHarvester::DoGetPower() const [member function] cls.add_method('DoGetPower', 'double', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3EnergySource_methods(root_module, cls): ## energy-source.h (module 'energy'): ns3::EnergySource::EnergySource(ns3::EnergySource const & arg0) [copy constructor] cls.add_constructor([param('ns3::EnergySource const &', 'arg0')]) ## energy-source.h (module 'energy'): ns3::EnergySource::EnergySource() [constructor] cls.add_constructor([]) ## energy-source.h (module 'energy'): void ns3::EnergySource::AppendDeviceEnergyModel(ns3::Ptr deviceEnergyModelPtr) [member function] cls.add_method('AppendDeviceEnergyModel', 'void', [param('ns3::Ptr< ns3::DeviceEnergyModel >', 'deviceEnergyModelPtr')]) ## energy-source.h (module 'energy'): void ns3::EnergySource::ConnectEnergyHarvester(ns3::Ptr energyHarvesterPtr) [member function] cls.add_method('ConnectEnergyHarvester', 'void', [param('ns3::Ptr< ns3::EnergyHarvester >', 'energyHarvesterPtr')]) ## energy-source.h (module 'energy'): void ns3::EnergySource::DisposeDeviceModels() [member function] cls.add_method('DisposeDeviceModels', 'void', []) ## energy-source.h (module 'energy'): ns3::DeviceEnergyModelContainer ns3::EnergySource::FindDeviceEnergyModels(ns3::TypeId tid) [member function] cls.add_method('FindDeviceEnergyModels', 'ns3::DeviceEnergyModelContainer', [param('ns3::TypeId', 'tid')]) ## energy-source.h (module 'energy'): ns3::DeviceEnergyModelContainer ns3::EnergySource::FindDeviceEnergyModels(std::string name) [member function] cls.add_method('FindDeviceEnergyModels', 'ns3::DeviceEnergyModelContainer', [param('std::string', 'name')]) ## energy-source.h (module 'energy'): double ns3::EnergySource::GetEnergyFraction() [member function] cls.add_method('GetEnergyFraction', 'double', [], is_pure_virtual=True, is_virtual=True) ## energy-source.h (module 'energy'): double ns3::EnergySource::GetInitialEnergy() const [member function] cls.add_method('GetInitialEnergy', 'double', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## energy-source.h (module 'energy'): ns3::Ptr ns3::EnergySource::GetNode() const [member function] cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_const=True) ## energy-source.h (module 'energy'): double ns3::EnergySource::GetRemainingEnergy() [member function] cls.add_method('GetRemainingEnergy', 'double', [], is_pure_virtual=True, is_virtual=True) ## energy-source.h (module 'energy'): double ns3::EnergySource::GetSupplyVoltage() const [member function] cls.add_method('GetSupplyVoltage', 'double', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## energy-source.h (module 'energy'): static ns3::TypeId ns3::EnergySource::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## energy-source.h (module 'energy'): void ns3::EnergySource::InitializeDeviceModels() [member function] cls.add_method('InitializeDeviceModels', 'void', []) ## energy-source.h (module 'energy'): void ns3::EnergySource::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')]) ## energy-source.h (module 'energy'): void ns3::EnergySource::UpdateEnergySource() [member function] cls.add_method('UpdateEnergySource', 'void', [], is_pure_virtual=True, is_virtual=True) ## energy-source.h (module 'energy'): void ns3::EnergySource::BreakDeviceEnergyModelRefCycle() [member function] cls.add_method('BreakDeviceEnergyModelRefCycle', 'void', [], visibility='protected') ## energy-source.h (module 'energy'): double ns3::EnergySource::CalculateTotalCurrent() [member function] cls.add_method('CalculateTotalCurrent', 'double', [], visibility='protected') ## energy-source.h (module 'energy'): void ns3::EnergySource::NotifyEnergyDrained() [member function] cls.add_method('NotifyEnergyDrained', 'void', [], visibility='protected') ## energy-source.h (module 'energy'): void ns3::EnergySource::NotifyEnergyRecharged() [member function] cls.add_method('NotifyEnergyRecharged', 'void', [], visibility='protected') ## energy-source.h (module 'energy'): void ns3::EnergySource::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) return def register_Ns3EnergySourceContainer_methods(root_module, cls): ## energy-source-container.h (module 'energy'): ns3::EnergySourceContainer::EnergySourceContainer(ns3::EnergySourceContainer const & arg0) [copy constructor] cls.add_constructor([param('ns3::EnergySourceContainer const &', 'arg0')]) ## energy-source-container.h (module 'energy'): ns3::EnergySourceContainer::EnergySourceContainer() [constructor] cls.add_constructor([]) ## energy-source-container.h (module 'energy'): ns3::EnergySourceContainer::EnergySourceContainer(ns3::Ptr source) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::EnergySource >', 'source')]) ## energy-source-container.h (module 'energy'): ns3::EnergySourceContainer::EnergySourceContainer(std::string sourceName) [constructor] cls.add_constructor([param('std::string', 'sourceName')]) ## energy-source-container.h (module 'energy'): ns3::EnergySourceContainer::EnergySourceContainer(ns3::EnergySourceContainer const & a, ns3::EnergySourceContainer const & b) [constructor] cls.add_constructor([param('ns3::EnergySourceContainer const &', 'a'), param('ns3::EnergySourceContainer const &', 'b')]) ## energy-source-container.h (module 'energy'): void ns3::EnergySourceContainer::Add(ns3::EnergySourceContainer container) [member function] cls.add_method('Add', 'void', [param('ns3::EnergySourceContainer', 'container')]) ## energy-source-container.h (module 'energy'): void ns3::EnergySourceContainer::Add(ns3::Ptr source) [member function] cls.add_method('Add', 'void', [param('ns3::Ptr< ns3::EnergySource >', 'source')]) ## energy-source-container.h (module 'energy'): void ns3::EnergySourceContainer::Add(std::string sourceName) [member function] cls.add_method('Add', 'void', [param('std::string', 'sourceName')]) ## energy-source-container.h (module 'energy'): __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::EnergySourceContainer::Begin() const [member function] cls.add_method('Begin', '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::EnergySource > const, std::vector< ns3::Ptr< ns3::EnergySource > > >', [], is_const=True) ## energy-source-container.h (module 'energy'): __gnu_cxx::__normal_iterator*,std::vector, std::allocator > > > ns3::EnergySourceContainer::End() const [member function] cls.add_method('End', '__gnu_cxx::__normal_iterator< ns3::Ptr< ns3::EnergySource > const, std::vector< ns3::Ptr< ns3::EnergySource > > >', [], is_const=True) ## energy-source-container.h (module 'energy'): ns3::Ptr ns3::EnergySourceContainer::Get(uint32_t i) const [member function] cls.add_method('Get', 'ns3::Ptr< ns3::EnergySource >', [param('uint32_t', 'i')], is_const=True) ## energy-source-container.h (module 'energy'): uint32_t ns3::EnergySourceContainer::GetN() const [member function] cls.add_method('GetN', 'uint32_t', [], is_const=True) ## energy-source-container.h (module 'energy'): static ns3::TypeId ns3::EnergySourceContainer::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## energy-source-container.h (module 'energy'): void ns3::EnergySourceContainer::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) ## energy-source-container.h (module 'energy'): void ns3::EnergySourceContainer::DoInitialize() [member function] cls.add_method('DoInitialize', 'void', [], visibility='private', is_virtual=True) return def register_Ns3EnumChecker_methods(root_module, cls): ## enum.h (module 'core'): ns3::EnumChecker::EnumChecker(ns3::EnumChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::EnumChecker const &', 'arg0')]) ## enum.h (module 'core'): ns3::EnumChecker::EnumChecker() [constructor] cls.add_constructor([]) ## enum.h (module 'core'): void ns3::EnumChecker::Add(int value, std::string name) [member function] cls.add_method('Add', 'void', [param('int', 'value'), param('std::string', 'name')]) ## enum.h (module 'core'): void ns3::EnumChecker::AddDefault(int value, std::string name) [member function] cls.add_method('AddDefault', 'void', [param('int', 'value'), param('std::string', 'name')]) ## enum.h (module 'core'): bool ns3::EnumChecker::Check(ns3::AttributeValue const & value) const [member function] cls.add_method('Check', 'bool', [param('ns3::AttributeValue const &', 'value')], is_const=True, is_virtual=True) ## enum.h (module 'core'): bool ns3::EnumChecker::Copy(ns3::AttributeValue const & src, ns3::AttributeValue & dst) const [member function] cls.add_method('Copy', 'bool', [param('ns3::AttributeValue const &', 'src'), param('ns3::AttributeValue &', 'dst')], is_const=True, is_virtual=True) ## enum.h (module 'core'): ns3::Ptr ns3::EnumChecker::Create() const [member function] cls.add_method('Create', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## enum.h (module 'core'): std::string ns3::EnumChecker::GetUnderlyingTypeInformation() const [member function] cls.add_method('GetUnderlyingTypeInformation', 'std::string', [], is_const=True, is_virtual=True) ## enum.h (module 'core'): std::string ns3::EnumChecker::GetValueTypeName() const [member function] cls.add_method('GetValueTypeName', 'std::string', [], is_const=True, is_virtual=True) ## enum.h (module 'core'): bool ns3::EnumChecker::HasUnderlyingTypeInformation() const [member function] cls.add_method('HasUnderlyingTypeInformation', 'bool', [], is_const=True, is_virtual=True) return def register_Ns3EnumValue_methods(root_module, cls): ## enum.h (module 'core'): ns3::EnumValue::EnumValue(ns3::EnumValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::EnumValue const &', 'arg0')]) ## enum.h (module 'core'): ns3::EnumValue::EnumValue() [constructor] cls.add_constructor([]) ## enum.h (module 'core'): ns3::EnumValue::EnumValue(int value) [constructor] cls.add_constructor([param('int', 'value')]) ## enum.h (module 'core'): ns3::Ptr ns3::EnumValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## enum.h (module 'core'): bool ns3::EnumValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## enum.h (module 'core'): int ns3::EnumValue::Get() const [member function] cls.add_method('Get', 'int', [], is_const=True) ## enum.h (module 'core'): std::string ns3::EnumValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## enum.h (module 'core'): void ns3::EnumValue::Set(int value) [member function] cls.add_method('Set', 'void', [param('int', 'value')]) return def register_Ns3ErlangRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ErlangRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ErlangRandomVariable::ErlangRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ErlangRandomVariable::GetK() const [member function] cls.add_method('GetK', 'uint32_t', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ErlangRandomVariable::GetLambda() const [member function] cls.add_method('GetLambda', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ErlangRandomVariable::GetValue(uint32_t k, double lambda) [member function] cls.add_method('GetValue', 'double', [param('uint32_t', 'k'), param('double', 'lambda')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ErlangRandomVariable::GetInteger(uint32_t k, uint32_t lambda) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'k'), param('uint32_t', 'lambda')]) ## random-variable-stream.h (module 'core'): double ns3::ErlangRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ErlangRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3EventImpl_methods(root_module, cls): ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl(ns3::EventImpl const & arg0) [copy constructor] cls.add_constructor([param('ns3::EventImpl const &', 'arg0')]) ## event-impl.h (module 'core'): ns3::EventImpl::EventImpl() [constructor] cls.add_constructor([]) ## event-impl.h (module 'core'): void ns3::EventImpl::Cancel() [member function] cls.add_method('Cancel', 'void', []) ## event-impl.h (module 'core'): void ns3::EventImpl::Invoke() [member function] cls.add_method('Invoke', 'void', []) ## event-impl.h (module 'core'): bool ns3::EventImpl::IsCancelled() [member function] cls.add_method('IsCancelled', 'bool', []) ## event-impl.h (module 'core'): void ns3::EventImpl::Notify() [member function] cls.add_method('Notify', 'void', [], is_pure_virtual=True, visibility='protected', is_virtual=True) return def register_Ns3ExponentialRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ExponentialRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ExponentialRandomVariable::ExponentialRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::ExponentialRandomVariable::GetMean() const [member function] cls.add_method('GetMean', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ExponentialRandomVariable::GetBound() const [member function] cls.add_method('GetBound', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ExponentialRandomVariable::GetValue(double mean, double bound) [member function] cls.add_method('GetValue', 'double', [param('double', 'mean'), param('double', 'bound')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ExponentialRandomVariable::GetInteger(uint32_t mean, uint32_t bound) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mean'), param('uint32_t', 'bound')]) ## random-variable-stream.h (module 'core'): double ns3::ExponentialRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ExponentialRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3GammaRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::GammaRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::GammaRandomVariable::GammaRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::GammaRandomVariable::GetAlpha() const [member function] cls.add_method('GetAlpha', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::GammaRandomVariable::GetBeta() const [member function] cls.add_method('GetBeta', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::GammaRandomVariable::GetValue(double alpha, double beta) [member function] cls.add_method('GetValue', 'double', [param('double', 'alpha'), param('double', 'beta')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::GammaRandomVariable::GetInteger(uint32_t alpha, uint32_t beta) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'alpha'), param('uint32_t', 'beta')]) ## random-variable-stream.h (module 'core'): double ns3::GammaRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::GammaRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3IntegerValue_methods(root_module, cls): ## integer.h (module 'core'): ns3::IntegerValue::IntegerValue() [constructor] cls.add_constructor([]) ## integer.h (module 'core'): ns3::IntegerValue::IntegerValue(ns3::IntegerValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::IntegerValue const &', 'arg0')]) ## integer.h (module 'core'): ns3::IntegerValue::IntegerValue(int64_t const & value) [constructor] cls.add_constructor([param('int64_t const &', 'value')]) ## integer.h (module 'core'): ns3::Ptr ns3::IntegerValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## integer.h (module 'core'): bool ns3::IntegerValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## integer.h (module 'core'): int64_t ns3::IntegerValue::Get() const [member function] cls.add_method('Get', 'int64_t', [], is_const=True) ## integer.h (module 'core'): std::string ns3::IntegerValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## integer.h (module 'core'): void ns3::IntegerValue::Set(int64_t const & value) [member function] cls.add_method('Set', 'void', [param('int64_t const &', 'value')]) return def register_Ns3Ipv4AddressChecker_methods(root_module, cls): ## ipv4-address.h (module 'network'): ns3::Ipv4AddressChecker::Ipv4AddressChecker() [constructor] cls.add_constructor([]) ## ipv4-address.h (module 'network'): ns3::Ipv4AddressChecker::Ipv4AddressChecker(ns3::Ipv4AddressChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4AddressChecker const &', 'arg0')]) return def register_Ns3Ipv4AddressValue_methods(root_module, cls): ## ipv4-address.h (module 'network'): ns3::Ipv4AddressValue::Ipv4AddressValue() [constructor] cls.add_constructor([]) ## ipv4-address.h (module 'network'): ns3::Ipv4AddressValue::Ipv4AddressValue(ns3::Ipv4AddressValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4AddressValue const &', 'arg0')]) ## ipv4-address.h (module 'network'): ns3::Ipv4AddressValue::Ipv4AddressValue(ns3::Ipv4Address const & value) [constructor] cls.add_constructor([param('ns3::Ipv4Address const &', 'value')]) ## ipv4-address.h (module 'network'): ns3::Ptr ns3::Ipv4AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4AddressValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## ipv4-address.h (module 'network'): ns3::Ipv4Address ns3::Ipv4AddressValue::Get() const [member function] cls.add_method('Get', 'ns3::Ipv4Address', [], is_const=True) ## ipv4-address.h (module 'network'): std::string ns3::Ipv4AddressValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4AddressValue::Set(ns3::Ipv4Address const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Ipv4Address const &', 'value')]) return def register_Ns3Ipv4MaskChecker_methods(root_module, cls): ## ipv4-address.h (module 'network'): ns3::Ipv4MaskChecker::Ipv4MaskChecker() [constructor] cls.add_constructor([]) ## ipv4-address.h (module 'network'): ns3::Ipv4MaskChecker::Ipv4MaskChecker(ns3::Ipv4MaskChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4MaskChecker const &', 'arg0')]) return def register_Ns3Ipv4MaskValue_methods(root_module, cls): ## ipv4-address.h (module 'network'): ns3::Ipv4MaskValue::Ipv4MaskValue() [constructor] cls.add_constructor([]) ## ipv4-address.h (module 'network'): ns3::Ipv4MaskValue::Ipv4MaskValue(ns3::Ipv4MaskValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv4MaskValue const &', 'arg0')]) ## ipv4-address.h (module 'network'): ns3::Ipv4MaskValue::Ipv4MaskValue(ns3::Ipv4Mask const & value) [constructor] cls.add_constructor([param('ns3::Ipv4Mask const &', 'value')]) ## ipv4-address.h (module 'network'): ns3::Ptr ns3::Ipv4MaskValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## ipv4-address.h (module 'network'): bool ns3::Ipv4MaskValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## ipv4-address.h (module 'network'): ns3::Ipv4Mask ns3::Ipv4MaskValue::Get() const [member function] cls.add_method('Get', 'ns3::Ipv4Mask', [], is_const=True) ## ipv4-address.h (module 'network'): std::string ns3::Ipv4MaskValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## ipv4-address.h (module 'network'): void ns3::Ipv4MaskValue::Set(ns3::Ipv4Mask const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Ipv4Mask const &', 'value')]) return def register_Ns3Ipv6AddressChecker_methods(root_module, cls): ## ipv6-address.h (module 'network'): ns3::Ipv6AddressChecker::Ipv6AddressChecker() [constructor] cls.add_constructor([]) ## ipv6-address.h (module 'network'): ns3::Ipv6AddressChecker::Ipv6AddressChecker(ns3::Ipv6AddressChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv6AddressChecker const &', 'arg0')]) return def register_Ns3Ipv6AddressValue_methods(root_module, cls): ## ipv6-address.h (module 'network'): ns3::Ipv6AddressValue::Ipv6AddressValue() [constructor] cls.add_constructor([]) ## ipv6-address.h (module 'network'): ns3::Ipv6AddressValue::Ipv6AddressValue(ns3::Ipv6AddressValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv6AddressValue const &', 'arg0')]) ## ipv6-address.h (module 'network'): ns3::Ipv6AddressValue::Ipv6AddressValue(ns3::Ipv6Address const & value) [constructor] cls.add_constructor([param('ns3::Ipv6Address const &', 'value')]) ## ipv6-address.h (module 'network'): ns3::Ptr ns3::Ipv6AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6AddressValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## ipv6-address.h (module 'network'): ns3::Ipv6Address ns3::Ipv6AddressValue::Get() const [member function] cls.add_method('Get', 'ns3::Ipv6Address', [], is_const=True) ## ipv6-address.h (module 'network'): std::string ns3::Ipv6AddressValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6AddressValue::Set(ns3::Ipv6Address const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Ipv6Address const &', 'value')]) return def register_Ns3Ipv6PrefixChecker_methods(root_module, cls): ## ipv6-address.h (module 'network'): ns3::Ipv6PrefixChecker::Ipv6PrefixChecker() [constructor] cls.add_constructor([]) ## ipv6-address.h (module 'network'): ns3::Ipv6PrefixChecker::Ipv6PrefixChecker(ns3::Ipv6PrefixChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv6PrefixChecker const &', 'arg0')]) return def register_Ns3Ipv6PrefixValue_methods(root_module, cls): ## ipv6-address.h (module 'network'): ns3::Ipv6PrefixValue::Ipv6PrefixValue() [constructor] cls.add_constructor([]) ## ipv6-address.h (module 'network'): ns3::Ipv6PrefixValue::Ipv6PrefixValue(ns3::Ipv6PrefixValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Ipv6PrefixValue const &', 'arg0')]) ## ipv6-address.h (module 'network'): ns3::Ipv6PrefixValue::Ipv6PrefixValue(ns3::Ipv6Prefix const & value) [constructor] cls.add_constructor([param('ns3::Ipv6Prefix const &', 'value')]) ## ipv6-address.h (module 'network'): ns3::Ptr ns3::Ipv6PrefixValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## ipv6-address.h (module 'network'): bool ns3::Ipv6PrefixValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## ipv6-address.h (module 'network'): ns3::Ipv6Prefix ns3::Ipv6PrefixValue::Get() const [member function] cls.add_method('Get', 'ns3::Ipv6Prefix', [], is_const=True) ## ipv6-address.h (module 'network'): std::string ns3::Ipv6PrefixValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## ipv6-address.h (module 'network'): void ns3::Ipv6PrefixValue::Set(ns3::Ipv6Prefix const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Ipv6Prefix const &', 'value')]) return def register_Ns3LogNormalRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::LogNormalRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::LogNormalRandomVariable::LogNormalRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::LogNormalRandomVariable::GetMu() const [member function] cls.add_method('GetMu', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::LogNormalRandomVariable::GetSigma() const [member function] cls.add_method('GetSigma', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::LogNormalRandomVariable::GetValue(double mu, double sigma) [member function] cls.add_method('GetValue', 'double', [param('double', 'mu'), param('double', 'sigma')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::LogNormalRandomVariable::GetInteger(uint32_t mu, uint32_t sigma) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mu'), param('uint32_t', 'sigma')]) ## random-variable-stream.h (module 'core'): double ns3::LogNormalRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::LogNormalRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3Mac48AddressChecker_methods(root_module, cls): ## mac48-address.h (module 'network'): ns3::Mac48AddressChecker::Mac48AddressChecker() [constructor] cls.add_constructor([]) ## mac48-address.h (module 'network'): ns3::Mac48AddressChecker::Mac48AddressChecker(ns3::Mac48AddressChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Mac48AddressChecker const &', 'arg0')]) return def register_Ns3Mac48AddressValue_methods(root_module, cls): ## mac48-address.h (module 'network'): ns3::Mac48AddressValue::Mac48AddressValue() [constructor] cls.add_constructor([]) ## mac48-address.h (module 'network'): ns3::Mac48AddressValue::Mac48AddressValue(ns3::Mac48AddressValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Mac48AddressValue const &', 'arg0')]) ## mac48-address.h (module 'network'): ns3::Mac48AddressValue::Mac48AddressValue(ns3::Mac48Address const & value) [constructor] cls.add_constructor([param('ns3::Mac48Address const &', 'value')]) ## mac48-address.h (module 'network'): ns3::Ptr ns3::Mac48AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## mac48-address.h (module 'network'): bool ns3::Mac48AddressValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## mac48-address.h (module 'network'): ns3::Mac48Address ns3::Mac48AddressValue::Get() const [member function] cls.add_method('Get', 'ns3::Mac48Address', [], is_const=True) ## mac48-address.h (module 'network'): std::string ns3::Mac48AddressValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## mac48-address.h (module 'network'): void ns3::Mac48AddressValue::Set(ns3::Mac48Address const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Mac48Address const &', 'value')]) return def register_Ns3MobilityModel_methods(root_module, cls): ## mobility-model.h (module 'mobility'): ns3::MobilityModel::MobilityModel(ns3::MobilityModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::MobilityModel const &', 'arg0')]) ## mobility-model.h (module 'mobility'): ns3::MobilityModel::MobilityModel() [constructor] cls.add_constructor([]) ## mobility-model.h (module 'mobility'): int64_t ns3::MobilityModel::AssignStreams(int64_t stream) [member function] cls.add_method('AssignStreams', 'int64_t', [param('int64_t', 'stream')]) ## mobility-model.h (module 'mobility'): double ns3::MobilityModel::GetDistanceFrom(ns3::Ptr position) const [member function] cls.add_method('GetDistanceFrom', 'double', [param('ns3::Ptr< ns3::MobilityModel const >', 'position')], is_const=True) ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::GetPosition() const [member function] cls.add_method('GetPosition', 'ns3::Vector', [], is_const=True) ## mobility-model.h (module 'mobility'): double ns3::MobilityModel::GetRelativeSpeed(ns3::Ptr other) const [member function] cls.add_method('GetRelativeSpeed', 'double', [param('ns3::Ptr< ns3::MobilityModel const >', 'other')], is_const=True) ## mobility-model.h (module 'mobility'): static ns3::TypeId ns3::MobilityModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::GetVelocity() const [member function] cls.add_method('GetVelocity', 'ns3::Vector', [], is_const=True) ## mobility-model.h (module 'mobility'): void ns3::MobilityModel::SetPosition(ns3::Vector const & position) [member function] cls.add_method('SetPosition', 'void', [param('ns3::Vector const &', 'position')]) ## mobility-model.h (module 'mobility'): void ns3::MobilityModel::NotifyCourseChange() const [member function] cls.add_method('NotifyCourseChange', 'void', [], is_const=True, visibility='protected') ## mobility-model.h (module 'mobility'): int64_t ns3::MobilityModel::DoAssignStreams(int64_t start) [member function] cls.add_method('DoAssignStreams', 'int64_t', [param('int64_t', 'start')], visibility='private', is_virtual=True) ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::DoGetPosition() const [member function] cls.add_method('DoGetPosition', 'ns3::Vector', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## mobility-model.h (module 'mobility'): ns3::Vector ns3::MobilityModel::DoGetVelocity() const [member function] cls.add_method('DoGetVelocity', 'ns3::Vector', [], is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) ## mobility-model.h (module 'mobility'): void ns3::MobilityModel::DoSetPosition(ns3::Vector const & position) [member function] cls.add_method('DoSetPosition', 'void', [param('ns3::Vector const &', 'position')], is_pure_virtual=True, visibility='private', is_virtual=True) return def register_Ns3NetDevice_methods(root_module, cls): ## net-device.h (module 'network'): ns3::NetDevice::NetDevice() [constructor] cls.add_constructor([]) ## net-device.h (module 'network'): ns3::NetDevice::NetDevice(ns3::NetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::NetDevice const &', 'arg0')]) ## net-device.h (module 'network'): void ns3::NetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] cls.add_method('AddLinkChangeCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Address ns3::NetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Address ns3::NetDevice::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Ptr ns3::NetDevice::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::Channel >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): uint32_t ns3::NetDevice::GetIfIndex() const [member function] cls.add_method('GetIfIndex', 'uint32_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): uint16_t ns3::NetDevice::GetMtu() const [member function] cls.add_method('GetMtu', 'uint16_t', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Address ns3::NetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv4Address', 'multicastGroup')], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Address ns3::NetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv6Address', 'addr')], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): ns3::Ptr ns3::NetDevice::GetNode() const [member function] cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): static ns3::TypeId ns3::NetDevice::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsBridge() const [member function] cls.add_method('IsBridge', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsBroadcast() const [member function] cls.add_method('IsBroadcast', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsLinkUp() const [member function] cls.add_method('IsLinkUp', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsMulticast() const [member function] cls.add_method('IsMulticast', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::IsPointToPoint() const [member function] cls.add_method('IsPointToPoint', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::NeedsArp() const [member function] cls.add_method('NeedsArp', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::Send(ns3::Ptr packet, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Send', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::SendFrom(ns3::Ptr packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('SendFrom', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetAddress(ns3::Address address) [member function] cls.add_method('SetAddress', 'void', [param('ns3::Address', 'address')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetIfIndex(uint32_t const index) [member function] cls.add_method('SetIfIndex', 'void', [param('uint32_t const', 'index')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::SetMtu(uint16_t const mtu) [member function] cls.add_method('SetMtu', 'bool', [param('uint16_t const', 'mtu')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetPromiscReceiveCallback(ns3::Callback,ns3::Ptr,short unsigned int,const ns3::Address&,const ns3::Address&,ns3::NetDevice::PacketType,ns3::empty,ns3::empty,ns3::empty> cb) [member function] cls.add_method('SetPromiscReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, short unsigned int, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): void ns3::NetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_pure_virtual=True, is_virtual=True) ## net-device.h (module 'network'): bool ns3::NetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', [], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3NixVector_methods(root_module, cls): cls.add_output_stream_operator() ## nix-vector.h (module 'network'): ns3::NixVector::NixVector() [constructor] cls.add_constructor([]) ## nix-vector.h (module 'network'): ns3::NixVector::NixVector(ns3::NixVector const & o) [copy constructor] cls.add_constructor([param('ns3::NixVector const &', 'o')]) ## nix-vector.h (module 'network'): void ns3::NixVector::AddNeighborIndex(uint32_t newBits, uint32_t numberOfBits) [member function] cls.add_method('AddNeighborIndex', 'void', [param('uint32_t', 'newBits'), param('uint32_t', 'numberOfBits')]) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::BitCount(uint32_t numberOfNeighbors) const [member function] cls.add_method('BitCount', 'uint32_t', [param('uint32_t', 'numberOfNeighbors')], is_const=True) ## nix-vector.h (module 'network'): ns3::Ptr ns3::NixVector::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::NixVector >', [], is_const=True) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Deserialize(uint32_t const * buffer, uint32_t size) [member function] cls.add_method('Deserialize', 'uint32_t', [param('uint32_t const *', 'buffer'), param('uint32_t', 'size')]) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::ExtractNeighborIndex(uint32_t numberOfBits) [member function] cls.add_method('ExtractNeighborIndex', 'uint32_t', [param('uint32_t', 'numberOfBits')]) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetRemainingBits() [member function] cls.add_method('GetRemainingBits', 'uint32_t', []) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## nix-vector.h (module 'network'): uint32_t ns3::NixVector::Serialize(uint32_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', [param('uint32_t *', 'buffer'), param('uint32_t', 'maxSize')], is_const=True) return def register_Ns3Node_methods(root_module, cls): ## node.h (module 'network'): ns3::Node::Node(ns3::Node const & arg0) [copy constructor] cls.add_constructor([param('ns3::Node const &', 'arg0')]) ## node.h (module 'network'): ns3::Node::Node() [constructor] cls.add_constructor([]) ## node.h (module 'network'): ns3::Node::Node(uint32_t systemId) [constructor] cls.add_constructor([param('uint32_t', 'systemId')]) ## node.h (module 'network'): uint32_t ns3::Node::AddApplication(ns3::Ptr application) [member function] cls.add_method('AddApplication', 'uint32_t', [param('ns3::Ptr< ns3::Application >', 'application')]) ## node.h (module 'network'): uint32_t ns3::Node::AddDevice(ns3::Ptr device) [member function] cls.add_method('AddDevice', 'uint32_t', [param('ns3::Ptr< ns3::NetDevice >', 'device')]) ## node.h (module 'network'): static bool ns3::Node::ChecksumEnabled() [member function] cls.add_method('ChecksumEnabled', 'bool', [], is_static=True) ## node.h (module 'network'): ns3::Ptr ns3::Node::GetApplication(uint32_t index) const [member function] cls.add_method('GetApplication', 'ns3::Ptr< ns3::Application >', [param('uint32_t', 'index')], is_const=True) ## node.h (module 'network'): ns3::Ptr ns3::Node::GetDevice(uint32_t index) const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'index')], is_const=True) ## node.h (module 'network'): uint32_t ns3::Node::GetId() const [member function] cls.add_method('GetId', 'uint32_t', [], is_const=True) ## node.h (module 'network'): uint32_t ns3::Node::GetNApplications() const [member function] cls.add_method('GetNApplications', 'uint32_t', [], is_const=True) ## node.h (module 'network'): uint32_t ns3::Node::GetNDevices() const [member function] cls.add_method('GetNDevices', 'uint32_t', [], is_const=True) ## node.h (module 'network'): uint32_t ns3::Node::GetSystemId() const [member function] cls.add_method('GetSystemId', 'uint32_t', [], is_const=True) ## node.h (module 'network'): static ns3::TypeId ns3::Node::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## node.h (module 'network'): void ns3::Node::RegisterDeviceAdditionListener(ns3::Callback,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> listener) [member function] cls.add_method('RegisterDeviceAdditionListener', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'listener')]) ## node.h (module 'network'): void ns3::Node::RegisterProtocolHandler(ns3::Callback, ns3::Ptr, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> handler, uint16_t protocolType, ns3::Ptr device, bool promiscuous=false) [member function] cls.add_method('RegisterProtocolHandler', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'handler'), param('uint16_t', 'protocolType'), param('ns3::Ptr< ns3::NetDevice >', 'device'), param('bool', 'promiscuous', default_value='false')]) ## node.h (module 'network'): void ns3::Node::UnregisterDeviceAdditionListener(ns3::Callback,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> listener) [member function] cls.add_method('UnregisterDeviceAdditionListener', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'listener')]) ## node.h (module 'network'): void ns3::Node::UnregisterProtocolHandler(ns3::Callback, ns3::Ptr, unsigned short, ns3::Address const&, ns3::Address const&, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty> handler) [member function] cls.add_method('UnregisterProtocolHandler', 'void', [param('ns3::Callback< void, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'handler')]) ## node.h (module 'network'): void ns3::Node::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) ## node.h (module 'network'): void ns3::Node::DoInitialize() [member function] cls.add_method('DoInitialize', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3NormalRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): ns3::NormalRandomVariable::INFINITE_VALUE [variable] cls.add_static_attribute('INFINITE_VALUE', 'double const', is_const=True) ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::NormalRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::NormalRandomVariable::NormalRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetMean() const [member function] cls.add_method('GetMean', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetVariance() const [member function] cls.add_method('GetVariance', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetBound() const [member function] cls.add_method('GetBound', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue(double mean, double variance, double bound=ns3::NormalRandomVariable::INFINITE_VALUE) [member function] cls.add_method('GetValue', 'double', [param('double', 'mean'), param('double', 'variance'), param('double', 'bound', default_value='ns3::NormalRandomVariable::INFINITE_VALUE')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::NormalRandomVariable::GetInteger(uint32_t mean, uint32_t variance, uint32_t bound) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mean'), param('uint32_t', 'variance'), param('uint32_t', 'bound')]) ## random-variable-stream.h (module 'core'): double ns3::NormalRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::NormalRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3ObjectFactoryChecker_methods(root_module, cls): ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker() [constructor] cls.add_constructor([]) ## object-factory.h (module 'core'): ns3::ObjectFactoryChecker::ObjectFactoryChecker(ns3::ObjectFactoryChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::ObjectFactoryChecker const &', 'arg0')]) return def register_Ns3ObjectFactoryValue_methods(root_module, cls): ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue() [constructor] cls.add_constructor([]) ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactoryValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::ObjectFactoryValue const &', 'arg0')]) ## object-factory.h (module 'core'): ns3::ObjectFactoryValue::ObjectFactoryValue(ns3::ObjectFactory const & value) [constructor] cls.add_constructor([param('ns3::ObjectFactory const &', 'value')]) ## object-factory.h (module 'core'): ns3::Ptr ns3::ObjectFactoryValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## object-factory.h (module 'core'): bool ns3::ObjectFactoryValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## object-factory.h (module 'core'): ns3::ObjectFactory ns3::ObjectFactoryValue::Get() const [member function] cls.add_method('Get', 'ns3::ObjectFactory', [], is_const=True) ## object-factory.h (module 'core'): std::string ns3::ObjectFactoryValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## object-factory.h (module 'core'): void ns3::ObjectFactoryValue::Set(ns3::ObjectFactory const & value) [member function] cls.add_method('Set', 'void', [param('ns3::ObjectFactory const &', 'value')]) return def register_Ns3Packet_methods(root_module, cls): cls.add_output_stream_operator() ## packet.h (module 'network'): ns3::Packet::Packet() [constructor] cls.add_constructor([]) ## packet.h (module 'network'): ns3::Packet::Packet(ns3::Packet const & o) [copy constructor] cls.add_constructor([param('ns3::Packet const &', 'o')]) ## packet.h (module 'network'): ns3::Packet::Packet(uint32_t size) [constructor] cls.add_constructor([param('uint32_t', 'size')]) ## packet.h (module 'network'): ns3::Packet::Packet(uint8_t const * buffer, uint32_t size, bool magic) [constructor] cls.add_constructor([param('uint8_t const *', 'buffer'), param('uint32_t', 'size'), param('bool', 'magic')]) ## packet.h (module 'network'): ns3::Packet::Packet(uint8_t const * buffer, uint32_t size) [constructor] cls.add_constructor([param('uint8_t const *', 'buffer'), param('uint32_t', 'size')]) ## packet.h (module 'network'): void ns3::Packet::AddAtEnd(ns3::Ptr packet) [member function] cls.add_method('AddAtEnd', 'void', [param('ns3::Ptr< ns3::Packet const >', 'packet')]) ## packet.h (module 'network'): void ns3::Packet::AddByteTag(ns3::Tag const & tag) const [member function] cls.add_method('AddByteTag', 'void', [param('ns3::Tag const &', 'tag')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::AddHeader(ns3::Header const & header) [member function] cls.add_method('AddHeader', 'void', [param('ns3::Header const &', 'header')]) ## packet.h (module 'network'): void ns3::Packet::AddPacketTag(ns3::Tag const & tag) const [member function] cls.add_method('AddPacketTag', 'void', [param('ns3::Tag const &', 'tag')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::AddPaddingAtEnd(uint32_t size) [member function] cls.add_method('AddPaddingAtEnd', 'void', [param('uint32_t', 'size')]) ## packet.h (module 'network'): void ns3::Packet::AddTrailer(ns3::Trailer const & trailer) [member function] cls.add_method('AddTrailer', 'void', [param('ns3::Trailer const &', 'trailer')]) ## packet.h (module 'network'): ns3::PacketMetadata::ItemIterator ns3::Packet::BeginItem() const [member function] cls.add_method('BeginItem', 'ns3::PacketMetadata::ItemIterator', [], is_const=True) ## packet.h (module 'network'): ns3::Ptr ns3::Packet::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::Packet >', [], is_const=True) ## packet.h (module 'network'): uint32_t ns3::Packet::CopyData(uint8_t * buffer, uint32_t size) const [member function] cls.add_method('CopyData', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint32_t', 'size')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::CopyData(std::ostream * os, uint32_t size) const [member function] cls.add_method('CopyData', 'void', [param('std::ostream *', 'os'), param('uint32_t', 'size')], is_const=True) ## packet.h (module 'network'): ns3::Ptr ns3::Packet::CreateFragment(uint32_t start, uint32_t length) const [member function] cls.add_method('CreateFragment', 'ns3::Ptr< ns3::Packet >', [param('uint32_t', 'start'), param('uint32_t', 'length')], is_const=True) ## packet.h (module 'network'): static void ns3::Packet::EnableChecking() [member function] cls.add_method('EnableChecking', 'void', [], is_static=True) ## packet.h (module 'network'): static void ns3::Packet::EnablePrinting() [member function] cls.add_method('EnablePrinting', 'void', [], is_static=True) ## packet.h (module 'network'): bool ns3::Packet::FindFirstMatchingByteTag(ns3::Tag & tag) const [member function] cls.add_method('FindFirstMatchingByteTag', 'bool', [param('ns3::Tag &', 'tag')], is_const=True) ## packet.h (module 'network'): ns3::ByteTagIterator ns3::Packet::GetByteTagIterator() const [member function] cls.add_method('GetByteTagIterator', 'ns3::ByteTagIterator', [], is_const=True) ## packet.h (module 'network'): ns3::Ptr ns3::Packet::GetNixVector() const [member function] cls.add_method('GetNixVector', 'ns3::Ptr< ns3::NixVector >', [], is_const=True) ## packet.h (module 'network'): ns3::PacketTagIterator ns3::Packet::GetPacketTagIterator() const [member function] cls.add_method('GetPacketTagIterator', 'ns3::PacketTagIterator', [], is_const=True) ## packet.h (module 'network'): uint32_t ns3::Packet::GetSerializedSize() const [member function] cls.add_method('GetSerializedSize', 'uint32_t', [], is_const=True) ## packet.h (module 'network'): uint32_t ns3::Packet::GetSize() const [member function] cls.add_method('GetSize', 'uint32_t', [], is_const=True) ## packet.h (module 'network'): uint64_t ns3::Packet::GetUid() const [member function] cls.add_method('GetUid', 'uint64_t', [], is_const=True) ## packet.h (module 'network'): uint32_t ns3::Packet::PeekHeader(ns3::Header & header) const [member function] cls.add_method('PeekHeader', 'uint32_t', [param('ns3::Header &', 'header')], is_const=True) ## packet.h (module 'network'): bool ns3::Packet::PeekPacketTag(ns3::Tag & tag) const [member function] cls.add_method('PeekPacketTag', 'bool', [param('ns3::Tag &', 'tag')], is_const=True) ## packet.h (module 'network'): uint32_t ns3::Packet::PeekTrailer(ns3::Trailer & trailer) [member function] cls.add_method('PeekTrailer', 'uint32_t', [param('ns3::Trailer &', 'trailer')]) ## packet.h (module 'network'): void ns3::Packet::Print(std::ostream & os) const [member function] cls.add_method('Print', 'void', [param('std::ostream &', 'os')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::PrintByteTags(std::ostream & os) const [member function] cls.add_method('PrintByteTags', 'void', [param('std::ostream &', 'os')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::PrintPacketTags(std::ostream & os) const [member function] cls.add_method('PrintPacketTags', 'void', [param('std::ostream &', 'os')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::RemoveAllByteTags() [member function] cls.add_method('RemoveAllByteTags', 'void', []) ## packet.h (module 'network'): void ns3::Packet::RemoveAllPacketTags() [member function] cls.add_method('RemoveAllPacketTags', 'void', []) ## packet.h (module 'network'): void ns3::Packet::RemoveAtEnd(uint32_t size) [member function] cls.add_method('RemoveAtEnd', 'void', [param('uint32_t', 'size')]) ## packet.h (module 'network'): void ns3::Packet::RemoveAtStart(uint32_t size) [member function] cls.add_method('RemoveAtStart', 'void', [param('uint32_t', 'size')]) ## packet.h (module 'network'): uint32_t ns3::Packet::RemoveHeader(ns3::Header & header) [member function] cls.add_method('RemoveHeader', 'uint32_t', [param('ns3::Header &', 'header')]) ## packet.h (module 'network'): bool ns3::Packet::RemovePacketTag(ns3::Tag & tag) [member function] cls.add_method('RemovePacketTag', 'bool', [param('ns3::Tag &', 'tag')]) ## packet.h (module 'network'): uint32_t ns3::Packet::RemoveTrailer(ns3::Trailer & trailer) [member function] cls.add_method('RemoveTrailer', 'uint32_t', [param('ns3::Trailer &', 'trailer')]) ## packet.h (module 'network'): bool ns3::Packet::ReplacePacketTag(ns3::Tag & tag) [member function] cls.add_method('ReplacePacketTag', 'bool', [param('ns3::Tag &', 'tag')]) ## packet.h (module 'network'): uint32_t ns3::Packet::Serialize(uint8_t * buffer, uint32_t maxSize) const [member function] cls.add_method('Serialize', 'uint32_t', [param('uint8_t *', 'buffer'), param('uint32_t', 'maxSize')], is_const=True) ## packet.h (module 'network'): void ns3::Packet::SetNixVector(ns3::Ptr nixVector) [member function] cls.add_method('SetNixVector', 'void', [param('ns3::Ptr< ns3::NixVector >', 'nixVector')]) ## packet.h (module 'network'): std::string ns3::Packet::ToString() const [member function] cls.add_method('ToString', 'std::string', [], is_const=True) return def register_Ns3ParetoRandomVariable_methods(root_module, cls): ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::ParetoRandomVariable::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## random-variable-stream.h (module 'core'): ns3::ParetoRandomVariable::ParetoRandomVariable() [constructor] cls.add_constructor([]) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetMean() const [member function] cls.add_method('GetMean', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetShape() const [member function] cls.add_method('GetShape', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetBound() const [member function] cls.add_method('GetBound', 'double', [], is_const=True) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetValue(double mean, double shape, double bound) [member function] cls.add_method('GetValue', 'double', [param('double', 'mean'), param('double', 'shape'), param('double', 'bound')]) ## random-variable-stream.h (module 'core'): uint32_t ns3::ParetoRandomVariable::GetInteger(uint32_t mean, uint32_t shape, uint32_t bound) [member function] cls.add_method('GetInteger', 'uint32_t', [param('uint32_t', 'mean'), param('uint32_t', 'shape'), param('uint32_t', 'bound')]) ## random-variable-stream.h (module 'core'): double ns3::ParetoRandomVariable::GetValue() [member function] cls.add_method('GetValue', 'double', [], is_virtual=True) ## random-variable-stream.h (module 'core'): uint32_t ns3::ParetoRandomVariable::GetInteger() [member function] cls.add_method('GetInteger', 'uint32_t', [], is_virtual=True) return def register_Ns3PointerChecker_methods(root_module, cls): ## pointer.h (module 'core'): ns3::PointerChecker::PointerChecker() [constructor] cls.add_constructor([]) ## pointer.h (module 'core'): ns3::PointerChecker::PointerChecker(ns3::PointerChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::PointerChecker const &', 'arg0')]) ## pointer.h (module 'core'): ns3::TypeId ns3::PointerChecker::GetPointeeTypeId() const [member function] cls.add_method('GetPointeeTypeId', 'ns3::TypeId', [], is_pure_virtual=True, is_const=True, is_virtual=True) return def register_Ns3PointerValue_methods(root_module, cls): ## pointer.h (module 'core'): ns3::PointerValue::PointerValue(ns3::PointerValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::PointerValue const &', 'arg0')]) ## pointer.h (module 'core'): ns3::PointerValue::PointerValue() [constructor] cls.add_constructor([]) ## pointer.h (module 'core'): ns3::PointerValue::PointerValue(ns3::Ptr object) [constructor] cls.add_constructor([param('ns3::Ptr< ns3::Object >', 'object')]) ## pointer.h (module 'core'): ns3::Ptr ns3::PointerValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## pointer.h (module 'core'): bool ns3::PointerValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## pointer.h (module 'core'): ns3::Ptr ns3::PointerValue::GetObject() const [member function] cls.add_method('GetObject', 'ns3::Ptr< ns3::Object >', [], is_const=True) ## pointer.h (module 'core'): std::string ns3::PointerValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## pointer.h (module 'core'): void ns3::PointerValue::SetObject(ns3::Ptr object) [member function] cls.add_method('SetObject', 'void', [param('ns3::Ptr< ns3::Object >', 'object')]) return def register_Ns3TimeValue_methods(root_module, cls): ## nstime.h (module 'core'): ns3::TimeValue::TimeValue() [constructor] cls.add_constructor([]) ## nstime.h (module 'core'): ns3::TimeValue::TimeValue(ns3::TimeValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::TimeValue const &', 'arg0')]) ## nstime.h (module 'core'): ns3::TimeValue::TimeValue(ns3::Time const & value) [constructor] cls.add_constructor([param('ns3::Time const &', 'value')]) ## nstime.h (module 'core'): ns3::Ptr ns3::TimeValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## nstime.h (module 'core'): bool ns3::TimeValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## nstime.h (module 'core'): ns3::Time ns3::TimeValue::Get() const [member function] cls.add_method('Get', 'ns3::Time', [], is_const=True) ## nstime.h (module 'core'): std::string ns3::TimeValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## nstime.h (module 'core'): void ns3::TimeValue::Set(ns3::Time const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Time const &', 'value')]) return def register_Ns3TypeIdChecker_methods(root_module, cls): ## type-id.h (module 'core'): ns3::TypeIdChecker::TypeIdChecker() [constructor] cls.add_constructor([]) ## type-id.h (module 'core'): ns3::TypeIdChecker::TypeIdChecker(ns3::TypeIdChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::TypeIdChecker const &', 'arg0')]) return def register_Ns3TypeIdValue_methods(root_module, cls): ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue() [constructor] cls.add_constructor([]) ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue(ns3::TypeIdValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::TypeIdValue const &', 'arg0')]) ## type-id.h (module 'core'): ns3::TypeIdValue::TypeIdValue(ns3::TypeId const & value) [constructor] cls.add_constructor([param('ns3::TypeId const &', 'value')]) ## type-id.h (module 'core'): ns3::Ptr ns3::TypeIdValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## type-id.h (module 'core'): bool ns3::TypeIdValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## type-id.h (module 'core'): ns3::TypeId ns3::TypeIdValue::Get() const [member function] cls.add_method('Get', 'ns3::TypeId', [], is_const=True) ## type-id.h (module 'core'): std::string ns3::TypeIdValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## type-id.h (module 'core'): void ns3::TypeIdValue::Set(ns3::TypeId const & value) [member function] cls.add_method('Set', 'void', [param('ns3::TypeId const &', 'value')]) return def register_Ns3UanChannel_methods(root_module, cls): ## uan-channel.h (module 'uan'): ns3::UanChannel::UanChannel(ns3::UanChannel const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanChannel const &', 'arg0')]) ## uan-channel.h (module 'uan'): ns3::UanChannel::UanChannel() [constructor] cls.add_constructor([]) ## uan-channel.h (module 'uan'): void ns3::UanChannel::AddDevice(ns3::Ptr dev, ns3::Ptr trans) [member function] cls.add_method('AddDevice', 'void', [param('ns3::Ptr< ns3::UanNetDevice >', 'dev'), param('ns3::Ptr< ns3::UanTransducer >', 'trans')]) ## uan-channel.h (module 'uan'): void ns3::UanChannel::Clear() [member function] cls.add_method('Clear', 'void', []) ## uan-channel.h (module 'uan'): ns3::Ptr ns3::UanChannel::GetDevice(uint32_t i) const [member function] cls.add_method('GetDevice', 'ns3::Ptr< ns3::NetDevice >', [param('uint32_t', 'i')], is_const=True, is_virtual=True) ## uan-channel.h (module 'uan'): uint32_t ns3::UanChannel::GetNDevices() const [member function] cls.add_method('GetNDevices', 'uint32_t', [], is_const=True, is_virtual=True) ## uan-channel.h (module 'uan'): double ns3::UanChannel::GetNoiseDbHz(double fKhz) [member function] cls.add_method('GetNoiseDbHz', 'double', [param('double', 'fKhz')]) ## uan-channel.h (module 'uan'): static ns3::TypeId ns3::UanChannel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-channel.h (module 'uan'): void ns3::UanChannel::SetNoiseModel(ns3::Ptr noise) [member function] cls.add_method('SetNoiseModel', 'void', [param('ns3::Ptr< ns3::UanNoiseModel >', 'noise')]) ## uan-channel.h (module 'uan'): void ns3::UanChannel::SetPropagationModel(ns3::Ptr prop) [member function] cls.add_method('SetPropagationModel', 'void', [param('ns3::Ptr< ns3::UanPropModel >', 'prop')]) ## uan-channel.h (module 'uan'): void ns3::UanChannel::TxPacket(ns3::Ptr src, ns3::Ptr packet, double txPowerDb, ns3::UanTxMode txmode) [member function] cls.add_method('TxPacket', 'void', [param('ns3::Ptr< ns3::UanTransducer >', 'src'), param('ns3::Ptr< ns3::Packet >', 'packet'), param('double', 'txPowerDb'), param('ns3::UanTxMode', 'txmode')]) ## uan-channel.h (module 'uan'): void ns3::UanChannel::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) return def register_Ns3UanModesListChecker_methods(root_module, cls): ## uan-tx-mode.h (module 'uan'): ns3::UanModesListChecker::UanModesListChecker() [constructor] cls.add_constructor([]) ## uan-tx-mode.h (module 'uan'): ns3::UanModesListChecker::UanModesListChecker(ns3::UanModesListChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanModesListChecker const &', 'arg0')]) return def register_Ns3UanModesListValue_methods(root_module, cls): ## uan-tx-mode.h (module 'uan'): ns3::UanModesListValue::UanModesListValue() [constructor] cls.add_constructor([]) ## uan-tx-mode.h (module 'uan'): ns3::UanModesListValue::UanModesListValue(ns3::UanModesListValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanModesListValue const &', 'arg0')]) ## uan-tx-mode.h (module 'uan'): ns3::UanModesListValue::UanModesListValue(ns3::UanModesList const & value) [constructor] cls.add_constructor([param('ns3::UanModesList const &', 'value')]) ## uan-tx-mode.h (module 'uan'): ns3::Ptr ns3::UanModesListValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## uan-tx-mode.h (module 'uan'): bool ns3::UanModesListValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## uan-tx-mode.h (module 'uan'): ns3::UanModesList ns3::UanModesListValue::Get() const [member function] cls.add_method('Get', 'ns3::UanModesList', [], is_const=True) ## uan-tx-mode.h (module 'uan'): std::string ns3::UanModesListValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## uan-tx-mode.h (module 'uan'): void ns3::UanModesListValue::Set(ns3::UanModesList const & value) [member function] cls.add_method('Set', 'void', [param('ns3::UanModesList const &', 'value')]) return def register_Ns3UanNetDevice_methods(root_module, cls): ## uan-net-device.h (module 'uan'): ns3::UanNetDevice::UanNetDevice(ns3::UanNetDevice const & arg0) [copy constructor] cls.add_constructor([param('ns3::UanNetDevice const &', 'arg0')]) ## uan-net-device.h (module 'uan'): ns3::UanNetDevice::UanNetDevice() [constructor] cls.add_constructor([]) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::AddLinkChangeCallback(ns3::Callback callback) [member function] cls.add_method('AddLinkChangeCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')], is_virtual=True) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::Clear() [member function] cls.add_method('Clear', 'void', []) ## uan-net-device.h (module 'uan'): ns3::Address ns3::UanNetDevice::GetAddress() const [member function] cls.add_method('GetAddress', 'ns3::Address', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): ns3::Address ns3::UanNetDevice::GetBroadcast() const [member function] cls.add_method('GetBroadcast', 'ns3::Address', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): ns3::Ptr ns3::UanNetDevice::GetChannel() const [member function] cls.add_method('GetChannel', 'ns3::Ptr< ns3::Channel >', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): uint32_t ns3::UanNetDevice::GetIfIndex() const [member function] cls.add_method('GetIfIndex', 'uint32_t', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): ns3::Ptr ns3::UanNetDevice::GetMac() const [member function] cls.add_method('GetMac', 'ns3::Ptr< ns3::UanMac >', [], is_const=True) ## uan-net-device.h (module 'uan'): uint16_t ns3::UanNetDevice::GetMtu() const [member function] cls.add_method('GetMtu', 'uint16_t', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): ns3::Address ns3::UanNetDevice::GetMulticast(ns3::Ipv4Address multicastGroup) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv4Address', 'multicastGroup')], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): ns3::Address ns3::UanNetDevice::GetMulticast(ns3::Ipv6Address addr) const [member function] cls.add_method('GetMulticast', 'ns3::Address', [param('ns3::Ipv6Address', 'addr')], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): ns3::Ptr ns3::UanNetDevice::GetNode() const [member function] cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): ns3::Ptr ns3::UanNetDevice::GetPhy() const [member function] cls.add_method('GetPhy', 'ns3::Ptr< ns3::UanPhy >', [], is_const=True) ## uan-net-device.h (module 'uan'): ns3::Ptr ns3::UanNetDevice::GetTransducer() const [member function] cls.add_method('GetTransducer', 'ns3::Ptr< ns3::UanTransducer >', [], is_const=True) ## uan-net-device.h (module 'uan'): static ns3::TypeId ns3::UanNetDevice::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## uan-net-device.h (module 'uan'): bool ns3::UanNetDevice::IsBridge() const [member function] cls.add_method('IsBridge', 'bool', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): bool ns3::UanNetDevice::IsBroadcast() const [member function] cls.add_method('IsBroadcast', 'bool', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): bool ns3::UanNetDevice::IsLinkUp() const [member function] cls.add_method('IsLinkUp', 'bool', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): bool ns3::UanNetDevice::IsMulticast() const [member function] cls.add_method('IsMulticast', 'bool', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): bool ns3::UanNetDevice::IsPointToPoint() const [member function] cls.add_method('IsPointToPoint', 'bool', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): bool ns3::UanNetDevice::NeedsArp() const [member function] cls.add_method('NeedsArp', 'bool', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): bool ns3::UanNetDevice::Send(ns3::Ptr packet, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('Send', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) ## uan-net-device.h (module 'uan'): bool ns3::UanNetDevice::SendFrom(ns3::Ptr packet, ns3::Address const & source, ns3::Address const & dest, uint16_t protocolNumber) [member function] cls.add_method('SendFrom', 'bool', [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Address const &', 'source'), param('ns3::Address const &', 'dest'), param('uint16_t', 'protocolNumber')], is_virtual=True) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::SetAddress(ns3::Address address) [member function] cls.add_method('SetAddress', 'void', [param('ns3::Address', 'address')], is_virtual=True) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::SetChannel(ns3::Ptr channel) [member function] cls.add_method('SetChannel', 'void', [param('ns3::Ptr< ns3::UanChannel >', 'channel')]) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::SetIfIndex(uint32_t const index) [member function] cls.add_method('SetIfIndex', 'void', [param('uint32_t const', 'index')], is_virtual=True) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::SetMac(ns3::Ptr mac) [member function] cls.add_method('SetMac', 'void', [param('ns3::Ptr< ns3::UanMac >', 'mac')]) ## uan-net-device.h (module 'uan'): bool ns3::UanNetDevice::SetMtu(uint16_t const mtu) [member function] cls.add_method('SetMtu', 'bool', [param('uint16_t const', 'mtu')], is_virtual=True) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::SetPhy(ns3::Ptr phy) [member function] cls.add_method('SetPhy', 'void', [param('ns3::Ptr< ns3::UanPhy >', 'phy')]) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::SetPromiscReceiveCallback(ns3::Callback,ns3::Ptr,short unsigned int,const ns3::Address&,const ns3::Address&,ns3::NetDevice::PacketType,ns3::empty,ns3::empty,ns3::empty> cb) [member function] cls.add_method('SetPromiscReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, short unsigned int, ns3::Address const &, ns3::Address const &, ns3::NetDevice::PacketType, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::SetReceiveCallback(ns3::Callback, ns3::Ptr, unsigned short, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> cb) [member function] cls.add_method('SetReceiveCallback', 'void', [param('ns3::Callback< bool, ns3::Ptr< ns3::NetDevice >, ns3::Ptr< ns3::Packet const >, unsigned short, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], is_virtual=True) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::SetSleepMode(bool sleep) [member function] cls.add_method('SetSleepMode', 'void', [param('bool', 'sleep')]) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::SetTransducer(ns3::Ptr trans) [member function] cls.add_method('SetTransducer', 'void', [param('ns3::Ptr< ns3::UanTransducer >', 'trans')]) ## uan-net-device.h (module 'uan'): bool ns3::UanNetDevice::SupportsSendFrom() const [member function] cls.add_method('SupportsSendFrom', 'bool', [], is_const=True, is_virtual=True) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='protected', is_virtual=True) ## uan-net-device.h (module 'uan'): void ns3::UanNetDevice::ForwardUp(ns3::Ptr pkt, ns3::UanAddress const & src) [member function] cls.add_method('ForwardUp', 'void', [param('ns3::Ptr< ns3::Packet >', 'pkt'), param('ns3::UanAddress const &', 'src')], visibility='private', is_virtual=True) return def register_Ns3UintegerValue_methods(root_module, cls): ## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue() [constructor] cls.add_constructor([]) ## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(ns3::UintegerValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::UintegerValue const &', 'arg0')]) ## uinteger.h (module 'core'): ns3::UintegerValue::UintegerValue(uint64_t const & value) [constructor] cls.add_constructor([param('uint64_t const &', 'value')]) ## uinteger.h (module 'core'): ns3::Ptr ns3::UintegerValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## uinteger.h (module 'core'): bool ns3::UintegerValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## uinteger.h (module 'core'): uint64_t ns3::UintegerValue::Get() const [member function] cls.add_method('Get', 'uint64_t', [], is_const=True) ## uinteger.h (module 'core'): std::string ns3::UintegerValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## uinteger.h (module 'core'): void ns3::UintegerValue::Set(uint64_t const & value) [member function] cls.add_method('Set', 'void', [param('uint64_t const &', 'value')]) return def register_Ns3Vector2DChecker_methods(root_module, cls): ## vector.h (module 'core'): ns3::Vector2DChecker::Vector2DChecker() [constructor] cls.add_constructor([]) ## vector.h (module 'core'): ns3::Vector2DChecker::Vector2DChecker(ns3::Vector2DChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Vector2DChecker const &', 'arg0')]) return def register_Ns3Vector2DValue_methods(root_module, cls): ## vector.h (module 'core'): ns3::Vector2DValue::Vector2DValue() [constructor] cls.add_constructor([]) ## vector.h (module 'core'): ns3::Vector2DValue::Vector2DValue(ns3::Vector2DValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Vector2DValue const &', 'arg0')]) ## vector.h (module 'core'): ns3::Vector2DValue::Vector2DValue(ns3::Vector2D const & value) [constructor] cls.add_constructor([param('ns3::Vector2D const &', 'value')]) ## vector.h (module 'core'): ns3::Ptr ns3::Vector2DValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## vector.h (module 'core'): bool ns3::Vector2DValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## vector.h (module 'core'): ns3::Vector2D ns3::Vector2DValue::Get() const [member function] cls.add_method('Get', 'ns3::Vector2D', [], is_const=True) ## vector.h (module 'core'): std::string ns3::Vector2DValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## vector.h (module 'core'): void ns3::Vector2DValue::Set(ns3::Vector2D const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Vector2D const &', 'value')]) return def register_Ns3Vector3DChecker_methods(root_module, cls): ## vector.h (module 'core'): ns3::Vector3DChecker::Vector3DChecker() [constructor] cls.add_constructor([]) ## vector.h (module 'core'): ns3::Vector3DChecker::Vector3DChecker(ns3::Vector3DChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::Vector3DChecker const &', 'arg0')]) return def register_Ns3Vector3DValue_methods(root_module, cls): ## vector.h (module 'core'): ns3::Vector3DValue::Vector3DValue() [constructor] cls.add_constructor([]) ## vector.h (module 'core'): ns3::Vector3DValue::Vector3DValue(ns3::Vector3DValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::Vector3DValue const &', 'arg0')]) ## vector.h (module 'core'): ns3::Vector3DValue::Vector3DValue(ns3::Vector3D const & value) [constructor] cls.add_constructor([param('ns3::Vector3D const &', 'value')]) ## vector.h (module 'core'): ns3::Ptr ns3::Vector3DValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## vector.h (module 'core'): bool ns3::Vector3DValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## vector.h (module 'core'): ns3::Vector3D ns3::Vector3DValue::Get() const [member function] cls.add_method('Get', 'ns3::Vector3D', [], is_const=True) ## vector.h (module 'core'): std::string ns3::Vector3DValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## vector.h (module 'core'): void ns3::Vector3DValue::Set(ns3::Vector3D const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Vector3D const &', 'value')]) return def register_Ns3AcousticModemEnergyModel_methods(root_module, cls): ## acoustic-modem-energy-model.h (module 'uan'): ns3::AcousticModemEnergyModel::AcousticModemEnergyModel(ns3::AcousticModemEnergyModel const & arg0) [copy constructor] cls.add_constructor([param('ns3::AcousticModemEnergyModel const &', 'arg0')]) ## acoustic-modem-energy-model.h (module 'uan'): ns3::AcousticModemEnergyModel::AcousticModemEnergyModel() [constructor] cls.add_constructor([]) ## acoustic-modem-energy-model.h (module 'uan'): void ns3::AcousticModemEnergyModel::ChangeState(int newState) [member function] cls.add_method('ChangeState', 'void', [param('int', 'newState')], is_virtual=True) ## acoustic-modem-energy-model.h (module 'uan'): int ns3::AcousticModemEnergyModel::GetCurrentState() const [member function] cls.add_method('GetCurrentState', 'int', [], is_const=True) ## acoustic-modem-energy-model.h (module 'uan'): double ns3::AcousticModemEnergyModel::GetIdlePowerW() const [member function] cls.add_method('GetIdlePowerW', 'double', [], is_const=True) ## acoustic-modem-energy-model.h (module 'uan'): ns3::Ptr ns3::AcousticModemEnergyModel::GetNode() const [member function] cls.add_method('GetNode', 'ns3::Ptr< ns3::Node >', [], is_const=True, is_virtual=True) ## acoustic-modem-energy-model.h (module 'uan'): double ns3::AcousticModemEnergyModel::GetRxPowerW() const [member function] cls.add_method('GetRxPowerW', 'double', [], is_const=True) ## acoustic-modem-energy-model.h (module 'uan'): double ns3::AcousticModemEnergyModel::GetSleepPowerW() const [member function] cls.add_method('GetSleepPowerW', 'double', [], is_const=True) ## acoustic-modem-energy-model.h (module 'uan'): double ns3::AcousticModemEnergyModel::GetTotalEnergyConsumption() const [member function] cls.add_method('GetTotalEnergyConsumption', 'double', [], is_const=True, is_virtual=True) ## acoustic-modem-energy-model.h (module 'uan'): double ns3::AcousticModemEnergyModel::GetTxPowerW() const [member function] cls.add_method('GetTxPowerW', 'double', [], is_const=True) ## acoustic-modem-energy-model.h (module 'uan'): static ns3::TypeId ns3::AcousticModemEnergyModel::GetTypeId() [member function] cls.add_method('GetTypeId', 'ns3::TypeId', [], is_static=True) ## acoustic-modem-energy-model.h (module 'uan'): void ns3::AcousticModemEnergyModel::HandleEnergyDepletion() [member function] cls.add_method('HandleEnergyDepletion', 'void', [], is_virtual=True) ## acoustic-modem-energy-model.h (module 'uan'): void ns3::AcousticModemEnergyModel::HandleEnergyRecharged() [member function] cls.add_method('HandleEnergyRecharged', 'void', [], is_virtual=True) ## acoustic-modem-energy-model.h (module 'uan'): void ns3::AcousticModemEnergyModel::SetEnergyDepletionCallback(ns3::Callback callback) [member function] cls.add_method('SetEnergyDepletionCallback', 'void', [param('ns3::Callback< void, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'callback')]) ## acoustic-modem-energy-model.h (module 'uan'): void ns3::AcousticModemEnergyModel::SetEnergySource(ns3::Ptr source) [member function] cls.add_method('SetEnergySource', 'void', [param('ns3::Ptr< ns3::EnergySource >', 'source')], is_virtual=True) ## acoustic-modem-energy-model.h (module 'uan'): void ns3::AcousticModemEnergyModel::SetIdlePowerW(double idlePowerW) [member function] cls.add_method('SetIdlePowerW', 'void', [param('double', 'idlePowerW')]) ## acoustic-modem-energy-model.h (module 'uan'): void ns3::AcousticModemEnergyModel::SetNode(ns3::Ptr node) [member function] cls.add_method('SetNode', 'void', [param('ns3::Ptr< ns3::Node >', 'node')], is_virtual=True) ## acoustic-modem-energy-model.h (module 'uan'): void ns3::AcousticModemEnergyModel::SetRxPowerW(double rxPowerW) [member function] cls.add_method('SetRxPowerW', 'void', [param('double', 'rxPowerW')]) ## acoustic-modem-energy-model.h (module 'uan'): void ns3::AcousticModemEnergyModel::SetSleepPowerW(double sleepPowerW) [member function] cls.add_method('SetSleepPowerW', 'void', [param('double', 'sleepPowerW')]) ## acoustic-modem-energy-model.h (module 'uan'): void ns3::AcousticModemEnergyModel::SetTxPowerW(double txPowerW) [member function] cls.add_method('SetTxPowerW', 'void', [param('double', 'txPowerW')]) ## acoustic-modem-energy-model.h (module 'uan'): void ns3::AcousticModemEnergyModel::DoDispose() [member function] cls.add_method('DoDispose', 'void', [], visibility='private', is_virtual=True) ## acoustic-modem-energy-model.h (module 'uan'): double ns3::AcousticModemEnergyModel::DoGetCurrentA() const [member function] cls.add_method('DoGetCurrentA', 'double', [], is_const=True, visibility='private', is_virtual=True) return def register_Ns3AddressChecker_methods(root_module, cls): ## address.h (module 'network'): ns3::AddressChecker::AddressChecker() [constructor] cls.add_constructor([]) ## address.h (module 'network'): ns3::AddressChecker::AddressChecker(ns3::AddressChecker const & arg0) [copy constructor] cls.add_constructor([param('ns3::AddressChecker const &', 'arg0')]) return def register_Ns3AddressValue_methods(root_module, cls): ## address.h (module 'network'): ns3::AddressValue::AddressValue() [constructor] cls.add_constructor([]) ## address.h (module 'network'): ns3::AddressValue::AddressValue(ns3::AddressValue const & arg0) [copy constructor] cls.add_constructor([param('ns3::AddressValue const &', 'arg0')]) ## address.h (module 'network'): ns3::AddressValue::AddressValue(ns3::Address const & value) [constructor] cls.add_constructor([param('ns3::Address const &', 'value')]) ## address.h (module 'network'): ns3::Ptr ns3::AddressValue::Copy() const [member function] cls.add_method('Copy', 'ns3::Ptr< ns3::AttributeValue >', [], is_const=True, is_virtual=True) ## address.h (module 'network'): bool ns3::AddressValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] cls.add_method('DeserializeFromString', 'bool', [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_virtual=True) ## address.h (module 'network'): ns3::Address ns3::AddressValue::Get() const [member function] cls.add_method('Get', 'ns3::Address', [], is_const=True) ## address.h (module 'network'): std::string ns3::AddressValue::SerializeToString(ns3::Ptr checker) const [member function] cls.add_method('SerializeToString', 'std::string', [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], is_const=True, is_virtual=True) ## address.h (module 'network'): void ns3::AddressValue::Set(ns3::Address const & value) [member function] cls.add_method('Set', 'void', [param('ns3::Address const &', 'value')]) return def register_Ns3HashImplementation_methods(root_module, cls): ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation(ns3::Hash::Implementation const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Implementation const &', 'arg0')]) ## hash-function.h (module 'core'): ns3::Hash::Implementation::Implementation() [constructor] cls.add_constructor([]) ## hash-function.h (module 'core'): uint32_t ns3::Hash::Implementation::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_pure_virtual=True, is_virtual=True) ## hash-function.h (module 'core'): uint64_t ns3::Hash::Implementation::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-function.h (module 'core'): void ns3::Hash::Implementation::clear() [member function] cls.add_method('clear', 'void', [], is_pure_virtual=True, is_virtual=True) return def register_Ns3HashFunctionFnv1a_methods(root_module, cls): ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a(ns3::Hash::Function::Fnv1a const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Function::Fnv1a const &', 'arg0')]) ## hash-fnv.h (module 'core'): ns3::Hash::Function::Fnv1a::Fnv1a() [constructor] cls.add_constructor([]) ## hash-fnv.h (module 'core'): uint32_t ns3::Hash::Function::Fnv1a::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-fnv.h (module 'core'): uint64_t ns3::Hash::Function::Fnv1a::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-fnv.h (module 'core'): void ns3::Hash::Function::Fnv1a::clear() [member function] cls.add_method('clear', 'void', [], is_virtual=True) return def register_Ns3HashFunctionHash32_methods(root_module, cls): ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Function::Hash32 const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Function::Hash32 const &', 'arg0')]) ## hash-function.h (module 'core'): ns3::Hash::Function::Hash32::Hash32(ns3::Hash::Hash32Function_ptr hp) [constructor] cls.add_constructor([param('ns3::Hash::Hash32Function_ptr', 'hp')]) ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash32::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash32::clear() [member function] cls.add_method('clear', 'void', [], is_virtual=True) return def register_Ns3HashFunctionHash64_methods(root_module, cls): ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Function::Hash64 const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Function::Hash64 const &', 'arg0')]) ## hash-function.h (module 'core'): ns3::Hash::Function::Hash64::Hash64(ns3::Hash::Hash64Function_ptr hp) [constructor] cls.add_constructor([param('ns3::Hash::Hash64Function_ptr', 'hp')]) ## hash-function.h (module 'core'): uint32_t ns3::Hash::Function::Hash64::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-function.h (module 'core'): uint64_t ns3::Hash::Function::Hash64::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-function.h (module 'core'): void ns3::Hash::Function::Hash64::clear() [member function] cls.add_method('clear', 'void', [], is_virtual=True) return def register_Ns3HashFunctionMurmur3_methods(root_module, cls): ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3(ns3::Hash::Function::Murmur3 const & arg0) [copy constructor] cls.add_constructor([param('ns3::Hash::Function::Murmur3 const &', 'arg0')]) ## hash-murmur3.h (module 'core'): ns3::Hash::Function::Murmur3::Murmur3() [constructor] cls.add_constructor([]) ## hash-murmur3.h (module 'core'): uint32_t ns3::Hash::Function::Murmur3::GetHash32(char const * buffer, size_t const size) [member function] cls.add_method('GetHash32', 'uint32_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-murmur3.h (module 'core'): uint64_t ns3::Hash::Function::Murmur3::GetHash64(char const * buffer, size_t const size) [member function] cls.add_method('GetHash64', 'uint64_t', [param('char const *', 'buffer'), param('size_t const', 'size')], is_virtual=True) ## hash-murmur3.h (module 'core'): void ns3::Hash::Function::Murmur3::clear() [member function] cls.add_method('clear', 'void', [], is_virtual=True) return def register_functions(root_module): module = root_module ## uan-tx-mode.h (module 'uan'): extern ns3::Ptr ns3::MakeUanModesListChecker() [free function] module.add_function('MakeUanModesListChecker', 'ns3::Ptr< ns3::AttributeChecker const >', []) register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) register_functions_ns3_Hash(module.get_submodule('Hash'), root_module) register_functions_ns3_TracedValueCallback(module.get_submodule('TracedValueCallback'), root_module) register_functions_ns3_internal(module.get_submodule('internal'), root_module) return def register_functions_ns3_FatalImpl(module, root_module): return def register_functions_ns3_Hash(module, root_module): register_functions_ns3_Hash_Function(module.get_submodule('Function'), root_module) return def register_functions_ns3_Hash_Function(module, root_module): return def register_functions_ns3_TracedValueCallback(module, root_module): return def register_functions_ns3_internal(module, root_module): return def main(): out = FileCodeSink(sys.stdout) root_module = module_init() register_types(root_module) register_methods(root_module) register_functions(root_module) root_module.generate(out) if __name__ == '__main__': main() from __future__ import print_function import unittest, hashlib, logging import litesockets, time from . import utils import os try: xrange(1) except: xrange=range DIRNAME = os.path.dirname(__file__) TEST_STRING = ("TEST"*100).encode('utf-8') logging.basicConfig(format="%(asctime)s - %(levelname)s - %(name)s - %(message)s") log = logging.getLogger("root") log.setLevel(logging.DEBUG) class TestSSL(unittest.TestCase): def setUp(self): self.SE = litesockets.SocketExecuter() def tearDown(self): self.SE.stop() def test_SimpleSSLSendTest(self): ta = utils.testClass(self.SE) server = self.SE.createTCPServer("localhost", 0) server.setSSLInfo(certfile="%s/tmp.crt"%(DIRNAME), keyfile="%s/tmp.key"%(DIRNAME), do_handshake_on_connect=True) server.setOnClient(ta.accept) server.start() PORT = server.getSocket().getsockname()[1] client = self.SE.createTCPClient("localhost", PORT) test_client = utils.testClass(self.SE) client.setReader(test_client.read) client.enableSSL() client.startSSL() client.connect() client.write(TEST_STRING) utils.waitTill(lambda X: ta.read_len < X, len(TEST_STRING) , 500) self.assertEquals(ta.reads[0], TEST_STRING) ta.reads.pop(0) ta.clients[0].write(TEST_STRING) utils.waitTill(lambda X: test_client.read_len <= X, 0, 500) self.assertEquals(test_client.reads[0], TEST_STRING) print("Done Read") time.sleep(1) client.close() print("{}".format(client)) server.close() utils.waitTill(lambda X: len(self.SE.getClients()) > X, 0, 5000) utils.waitTill(lambda X: len(self.SE.getServers()) > X, 0, 5000) print("Done Waiting") self.assertEquals(0, len(self.SE.getClients())) self.assertEquals(0, len(self.SE.getServers())) def test_SSLsendLots(self): LOOPS = 500 STR_SIZE = len(TEST_STRING) BYTES = STR_SIZE*LOOPS test = utils.testClass(self.SE) server = self.SE.createTCPServer("localhost", 0) server.setSSLInfo(certfile="%s/tmp.crt"%(DIRNAME), keyfile="%s/tmp.key"%(DIRNAME), do_handshake_on_connect=True) server.setOnClient(test.accept) server.start() PORT = server.getSocket().getsockname()[1] client = self.SE.createTCPClient("localhost", PORT) test_client = utils.testClass(self.SE) client.setReader(test_client.read) client.enableSSL() client.connect() client.startSSL() baseSha = hashlib.sha256() for i in xrange(0, LOOPS): baseSha.update(TEST_STRING) client.write(TEST_STRING) newSha = baseSha.hexdigest() utils.waitTill(lambda X: test.read_len < X, BYTES, 5000) self.assertEquals(test.read_len, BYTES) self.assertEquals(hashlib.sha256(b''.join(test.reads)).hexdigest(), newSha) test.clients[0].write(b''.join(test.reads)) utils.waitTill(lambda X: test_client.read_len < X, BYTES, 5000) self.assertEquals(test.read_len, BYTES) self.assertEquals(hashlib.sha256(b''.join(test_client.reads)).hexdigest(), newSha) class TestSSLSelect(TestSSL): def setUp(self): self.SE = litesockets.SocketExecuter(forcePlatform="win") def tearDown(self): self.SE.stop() #!/usr/bin/env python #coding=utf-8 from toughradius.console.libs import pyforms from toughradius.console.libs.pyforms import dataform from toughradius.console.libs.pyforms import rules from toughradius.console.libs.pyforms.rules import button_style, input_style boolean = {0: u"否", 1: u"是"} product_policy = {0: u'预付费包月', 1: u"预付费时长", 2: u"买断包月", 3: u"买断时长", 4: u"预付费流量", 5: u"买断流量"} product_status_dict = {0: u'正常', 1: u"停用"} def product_add_form(): return pyforms.Form( pyforms.Textbox("product_name", rules.len_of(4, 64), description=u"资费名称", required="required", **input_style), pyforms.Dropdown("product_policy", args=product_policy.items(), description=u"计费策略", required="required",**input_style), pyforms.Textbox("fee_months", rules.is_number, description=u"买断授权月数", value=0, **input_style), pyforms.Textbox("fee_times", rules.is_number3, description=u"买断时长(小时)", value=0, **input_style), pyforms.Textbox("fee_flows", rules.is_number3, description=u"买断流量(MB)", value=0, **input_style), pyforms.Textbox("fee_price", rules.is_rmb, description=u"资费价格(元)", required="required", **input_style), pyforms.Hidden("fee_period", rules.is_period, description=u"开放认证时段", **input_style), pyforms.Textbox("concur_number", rules.is_numberOboveZore, description=u"并发数控制(0表示不限制)", value="0",**input_style), pyforms.Dropdown("bind_mac", args=boolean.items(), description=u"是否绑定MAC ", **input_style), pyforms.Dropdown("bind_vlan", args=boolean.items(), description=u"是否绑定VLAN ", **input_style), pyforms.Textbox("input_max_limit", rules.is_number3, description=u"最大上行速率(Mbps)", required="required",**input_style), pyforms.Textbox("output_max_limit", rules.is_number3, description=u"最大下行速率(Mbps)", required="required",**input_style), pyforms.Dropdown("product_status", args=product_status_dict.items(), description=u"资费状态", required="required",**input_style), pyforms.Button("submit", type="submit", id="submit", html=u"提交", **button_style), title=u"增加资费", action="/product/add" ) def product_update_form(): return pyforms.Form( pyforms.Hidden("id", description=u"编号"), pyforms.Hidden("product_policy", description=u""), pyforms.Textbox("product_name", rules.len_of(4, 32), description=u"资费名称", required="required", **input_style), pyforms.Textbox("product_policy_name", description=u"资费策略", readonly="readonly", required="required",**input_style), pyforms.Dropdown("product_status", args=product_status_dict.items(), description=u"资费状态", required="required",**input_style), pyforms.Textbox("fee_months", rules.is_number, description=u"买断授权月数", value=0, **input_style), pyforms.Textbox("fee_times", rules.is_number3, description=u"买断时长(小时)", value=0, **input_style), pyforms.Textbox("fee_flows", rules.is_number3, description=u"买断流量(MB)", value=0, **input_style), pyforms.Textbox("fee_price", rules.is_rmb, description=u"资费价格(元)", required="required", **input_style), pyforms.Hidden("fee_period", rules.is_period, description=u"开放认证时段", **input_style), pyforms.Textbox("concur_number", rules.is_number, description=u"并发数控制(0表示不限制)", required="required",**input_style), pyforms.Dropdown("bind_mac", args=boolean.items(), description=u"是否绑定MAC", required="required", **input_style), pyforms.Dropdown("bind_vlan", args=boolean.items(), description=u"是否绑定VLAN", required="required",**input_style), pyforms.Textbox("input_max_limit", rules.is_number3, description=u"最大上行速率(Mbps)", required="required",**input_style), pyforms.Textbox("output_max_limit", rules.is_number3, description=u"最大下行速率(Mbps)", required="required",**input_style), pyforms.Button("submit", type="submit", html=u"更新", **button_style), title=u"修改资费", action="/product/update" ) product_attr_add_form = pyforms.Form( pyforms.Hidden("product_id", description=u"资费编号"), pyforms.Textbox("attr_name", rules.len_of(1, 255), description=u"策略名称", required="required", help=u"策略参考",**input_style), pyforms.Textbox("attr_value", rules.len_of(1, 255), description=u"策略值", required="required", **input_style), pyforms.Textbox("attr_desc", rules.len_of(1, 255), description=u"策略描述", required="required", **input_style), pyforms.Button("submit", type="submit", html=u"提交", **button_style), title=u"增加策略属性", action="/product/attr/add" ) product_attr_update_form = pyforms.Form( pyforms.Hidden("id", description=u"编号"), pyforms.Hidden("product_id", description=u"资费编号"), pyforms.Textbox("attr_name", rules.len_of(1, 255), description=u"策略名称", readonly="required", **input_style), pyforms.Textbox("attr_value", rules.len_of(1, 255), description=u"策略值", required="required", **input_style), pyforms.Textbox("attr_desc", rules.len_of(1, 255), description=u"策略描述", required="required", **input_style), pyforms.Button("submit", type="submit", html=u"更新", **button_style), title=u"修改策略属性", action="/product/attr/update" ) # fifteenwordsnippets.py # A script that searches a HathiTrust corpus of 6,942 volumes (1700-1923), plus Hoyt & Richard's # corpus of 808 vols (1923-1950), for words related to money. It takes seven words on either # side of those words to create a snippet. # In cases where the possibly-monetary word is ambiguous, e.g. "pounds," it runs the central # seven words of the snippet through a regularized logistic model (created by model_contexts) # in order to make a prediction about the likelihood that this word refers to money. The # model I used is based on 700 manually-tagged snippets; it's about about 87% accurate, # five-fold crossvalidated. import modelingcounter import os, sys import SonicScrewdriver as utils import csv import pickle from bagofwords import WordVector, StandardizingVector from sklearn.linear_model import LogisticRegression # We start with a number of functions borrowed from other scripts; these were used to # generate the logistic model, so we use them also here to clean and normalize snippets. punctuple = ('.', ',', '?', '!', ';', '"', '“', '”', ':', '--', '—', ')', '(', "'", "`", "[", "]", "{", "}") def all_nonalphanumeric(astring): nonalphanum = True for character in astring: if character.isalpha() or character.isdigit(): nonalphanum = False break return nonalphanum def strip_punctuation(astring): global punctuple keepclipping = True suffix = "" while keepclipping == True and len(astring) > 1: keepclipping = False if astring.endswith(punctuple): suffix = astring[-1:] + suffix astring = astring[:-1] keepclipping = True keepclipping = True prefix = "" while keepclipping == True and len(astring) > 1: keepclipping = False if astring.startswith(punctuple): prefix = prefix + astring[:1] astring = astring[1:] keepclipping = True return(prefix, astring, suffix) def as_wordlist(line): ''' Converts a line into a list of words, splitting tokens brutally and unreflectively at punctuation. One of the effects will be to split possessives into noun and s. But this might not be a bad thing for current purposes. ''' line = line.replace('”', ' ') line = line.replace(':', ' ') line = line.replace(';', ' ') line = line.replace('—', ' ') line = line.replace('--', ' ') line = line.replace('.', ' ') line = line.replace(',', ' ') line = line.replace('-', ' ') line = line.replace('—', ' ') line = line.replace("'", ' ') line = line.replace('"', ' ') # That's not the most efficient way to do this computationally, # but it prevents me from having to look up the .translate # method. words = line.split(' ') wordlist = list() for word in words: word = word.lower() prefix, word, suffix = strip_punctuation(word) # In case we missed anything. if len(word) > 0 and not all_nonalphanumeric(word): wordlist.append(word) return wordlist def is_money(wordlist, WINDOWRADIUS, model, features, standardizer): # We're getting a wordlist generated by WINDOWRADIUS, but # we only want the central seven words for our model. startindex = WINDOWRADIUS - 3 endindex = WINDOWRADIUS + 4 modelsegment = ' '.join(wordlist[startindex : endindex]) # You'd think we could just take a list of words, but in # generating the model we ran strings through a particular # tokenizing process, and we should replicate that here. normalizedlist = as_wordlist(modelsegment) vector = WordVector(normalizedlist) vector.selectfeatures(features) # This turns a sparse dictionary into an array with zeroes # for missing features. vector.normalizefrequencies() # raw counts are divided by total counts. vector.standardizefrequencies(standardizer) # features are now centered on the means, and divided by # standard deviations, calculated on the training set classlabel = model.predict(vector.features)[0] if classlabel == 1: return True elif classlabel == 0: return False else: print("ANOMALY!") print(classlabel) return False # Cause that's how I do error handling. # Main script. # Let's load the model. modelfolder = "/Volumes/TARDIS/work/moneycontext/" modelpath = modelfolder + "logisticmodel.p" with open(modelpath, mode = 'rb') as f: logisticmodel = pickle.load(f) standardizerpath = modelfolder + 'standardizer.p' with open(standardizerpath, mode = 'rb') as f: standardizer = pickle.load(f) featurepath = modelfolder + 'featurelist.p' with open(featurepath, mode = 'rb') as f: features = pickle.load(f) # Now load HathiTrust metadata. rows, columns, table = utils.readtsv('/Volumes/TARDIS/work/metadata/MergedMonographs.tsv') ambiguouswords = {'crown', 'crowns', 'guinea', 'guineas', 'nickel', 'sovereign', 'sovereigns', 'pound', 'pounds', 'quid'} moneywords = {'dollar', 'dollars', 'dime', 'dimes', 'nickel', 'nickels', 'pound', 'pounds', 'shilling', 'shillings', 'sovereign', 'sovereigns','cent', 'cents', 'centime', 'centimes', 'crown', 'crowns', 'halfcrown', 'half-crown','penny', 'pennies', 'pence', 'farthing', 'farthings', 'franc', 'francs', 'guilder', 'guilders', 'florin', 'florins', 'guinea', 'guineas', "ha'penny", 'tuppence', 'twopence', 'sixpence', '|arabicprice|', '|price|', 'quid'} # Words I explicitly decided not to include: 'quarter', 'quarters', 'mark', 'marks.' Monetary uses # seemed rare enough relative to others that they'd be more likely to introduce noise than to help. # |arabicprice| is a code the tokenizer in modelingcounter produces whenever it encounters # a number connected to £, $, ¢, s, or d. In the output we convert that to |price|, for no very # good reason. wealthwords = {'fortune', 'fortunes', 'wealth', 'rich', 'riches', 'money', 'moneys', 'fund', 'funds', 'sum', 'sums', 'price', 'prices', 'priced'} # This is by no means an exhaustive list. Owe, loan, borrowed, etc. # If we really want to get at the full range of words potentially # associated with money, topic modeling would be an appropriate lever. # We can perhaps enumerate currency terms intuitively, but not these. alltargetwords = moneywords sourcedir = "/Volumes/TARDIS/work/moneytexts/" filelist = os.listdir(sourcedir) filelist = [x for x in filelist if x.endswith(".txt")] contexts = [] WINDOWRADIUS = 7 ctr = 0 for filename in filelist: htid = utils.pairtreelabel(filename.replace('.fic.txt', '')) if htid not in rows: print(htid) continue else: date = utils.simple_date(htid, table) filepath = os.path.join(sourcedir, filename) with open(filepath, encoding = 'utf-8') as f: filelines = f.readlines() pagelist = [filelines] # The wordcounter module expects a list of pages, each of which is a list of lines. # Ebooks have no pages -- at least as I currently receive them -- so we treat it # all as one giant page. tokenstream = modelingcounter.makestream(pagelist) newcontexts = modelingcounter.extract_snippets(tokenstream, WINDOWRADIUS, alltargetwords) approvedcontexts = [] for snippet, snippettomodel in newcontexts: keyword = snippettomodel[WINDOWRADIUS] keyword = keyword.lower() prefix, keyword, suffix = strip_punctuation(keyword) if keyword in wealthwords: category = 'wealth' elif keyword in ambiguouswords: currency = is_money(snippettomodel, WINDOWRADIUS, logisticmodel, features, standardizer) if currency: category = 'money' else: category = "notmoney" elif keyword in moneywords: category = 'money' else: print('ANOMALY: ' + keyword) # Cause that's how I do error handling. category = 'null' if category == 'money': approvedcontexts.append((htid, date, snippet, keyword, category)) print(ctr) ctr += 1 outfile = "/Volumes/TARDIS/work/moneycontext/twentyfivesnippets.tsv" with open(outfile, mode='a', encoding='utf-8') as f: for context in approvedcontexts: htid, date, alist, keyword, category = context snippet = " ".join(alist) snippet = snippet.replace('\t', '') # Because we don't want stray tabs in our tab-separated values. f.write(htid + '\t' + str(date) + '\t' + keyword + '\t' + category + '\t' + snippet + '\n') sourcedir = "/Volumes/TARDIS/work/US_NOVELS_1923-1950/" filelist = os.listdir(sourcedir) fileset = set([x for x in filelist if x.endswith(".txt")]) filelist = list(fileset) metafile = os.path.join(sourcedir, "US_NOVELS_1923-1950_META.txt") datedict = dict() dateset = set() with open(metafile, newline='', encoding = 'utf-8') as f: reader = csv.reader(f) for fields in reader: idcode = fields[0] date = int(fields[8]) datedict[idcode] = date dateset.add(date) for filename in filelist: htid = utils.pairtreelabel(filename.replace('.txt', '')) if htid not in datedict: print(htid) continue else: date = datedict[htid] filepath = os.path.join(sourcedir, filename) with open(filepath, encoding = 'utf-8') as f: filelines = f.readlines() pagelist = [filelines] # The wordcounter module expects a list of pages, each of which is a list of lines. # Ebooks have no pages -- at least as I currently receive them -- so we treat it # all as one giant page. tokenstream = modelingcounter.makestream(pagelist) newcontexts = modelingcounter.extract_snippets(tokenstream, WINDOWRADIUS, alltargetwords) approvedcontexts = [] for snippet, snippettomodel in newcontexts: keyword = snippettomodel[WINDOWRADIUS] keyword = keyword.lower() prefix, keyword, suffix = strip_punctuation(keyword) if keyword in wealthwords: category = 'wealth' elif keyword in ambiguouswords: currency = is_money(snippettomodel, WINDOWRADIUS, logisticmodel, features, standardizer) if currency: category = 'money' else: category = "notmoney" elif keyword in moneywords: category = 'money' else: print('ANOMALY: ' + keyword) # Cause that's how I do error handling. category = 'null' if category == 'money': approvedcontexts.append((htid, date, snippet, keyword, category)) outfile = "/Volumes/TARDIS/work/moneycontext/twentyfivesnippets.tsv" with open(outfile, mode='a', encoding='utf-8') as f: for context in approvedcontexts: htid, date, alist, keyword, category = context snippet = " ".join(alist) snippet = snippet.replace('\t', '') # Because we don't want stray tabs in our tab-separated values. f.write(htid + '\t' + str(date) + '\t' + keyword + '\t' + category + '\t' + snippet + '\n') # -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # ######################################################################### import autocomplete_light from .models import Profile class ProfileAutocomplete(autocomplete_light.AutocompleteModelTemplate): choice_template = 'autocomplete_response.html' def choices_for_request(self): self.choices = self.choices.exclude(username='AnonymousUser') return super(ProfileAutocomplete, self).choices_for_request() autocomplete_light.register( Profile, ProfileAutocomplete, search_fields=['first_name', 'last_name', 'email', 'username'], ) import re import time import datetime CRON_ORDER = ['minute', 'hour', 'day', 'month', 'dayofweek'] BOUNDS = {'minute': (0, 59), 'hour': (0, 23), 'day': (1, 31), 'month': (1, 12), 'dayofweek': (1, 7)} def str_test(tester): if isinstance(tester, str) or isinstance(tester, unicode): return True return False class CronParseException(Exception): """ Raise this when you're in trouble """ class CronParse(object): def __init__(self, input_cron=None, timezone=None): super(CronParse, self).__init__() self.crontab_times = {} self.crontab_cycle = {} self.ranges = {} self.cron_parts = {} if input_cron is not None: self.set_cron(input_cron=input_cron) def set_cron(self, input_cron): """ Given a string format, store it in components, or, if of the format */x, in crontab_cycle """ if not str_test(input_cron): # We can't handle this raise TypeError('Input must be a string object') split_crons = input_cron.split() if not len(split_crons) == 5: msg = 'Must have five different components for cron format.' raise ValueError(msg) for key, value in zip(CRON_ORDER, split_crons): all_ints = [int(x) for x in re.findall(r"[\d]+", value)] bounds = BOUNDS[key] for num in all_ints: if num < bounds[0] or num > bounds[1]: msg = 'Invalid value {} for {}'.format(num, key) raise ValueError(msg) self.cron_parts[key] = value def get_time(self): """ What time is it? Return a dictionary with the minute, hour, dayofmonth, month, and dayofweek as specified in the cron format. """ result = {} timestamp = time.time() date = datetime.datetime.fromtimestamp(timestamp) return date def get_day_of_week(self, date): # Because datetime and cron count their days differently day_of_week = date.weekday() + 1 if day_of_week == 7: day_of_week = 0 return day_of_week def validate_dt_part(self, dt, component): """ Validate each component of the dt (besides the day of the week) because they all work in more or less the same way. """ time_value = getattr(dt, component) if self.cron_parts[component] == '*': # Always true return True for x in self.cron_parts[component].split(','): # Split into a list of individual parts if x.isdigit(): # Then it's simple if int(x) == time_value: return True continue if '-' in x: # This is a range. Extract the range part and handle it. range_min, range_max = x.split('/')[0].split('-') if time_value < int(range_min) or time_value > int(range_max): continue if not '/' in x: return True if '/' in x: cycle_value = x.split('/')[1] if not cycle_value.isdigit(): raise ValueError('Invalid timevalue %s' % x) if time_value % int(cycle_value) == 0: return True return False def validate_dow(self, dt): """ Validate the day of the week """ if self.cron_parts['dayofweek'] == '*': return True else: current_day = self.get_day_of_week(date=dt) for entry in self.cron_parts['dayofweek']: if entry.isdigit() and\ current_day == int(self.cron_parts['dayofweek']): return True if '-' in entry: mini, maxi = entry.split('/')[0].split('-') if current_day < mini or current_day > maxi: continue if '/' in entry: return True if '*' in entry: cycle_value = entry.split('/')[1] if not cycle_value.isdigit(): raise ValueError('Invalid timevalue %s' % x) if current_day % int(cycle_value) == 0: return True return False def validate_day(self, dt): """ Validate the day as one method. This is because cron uses an OR when both day of month and day of week are specified. """ if self.cron_parts['dayofweek'] == '*': return self.validate_dt_part(dt=dt, component='day') elif self.cron_parts['day'] == '*': return self.validate_dow(dt=dt) else: return (self.validate_dt_part(dt=dt, component='day') or self.validate_dow(dt=dt)) def brute_next(self, now): """ Brute force this - simply iterate through all possible times. """ dt = now while True: valid_day = self.validate_day(dt=dt) valid_month = self.validate_dt_part(dt=dt, component='month') valid_hour = self.validate_dt_part(dt=dt, component='hour') valid_minute = self.validate_dt_part(dt=dt, component='minute') if not valid_month: if dt.month > 11: dt = datetime.datetime(year=dt.year+1, month=1, day=1, hour=0, minute=0) else: dt = datetime.datetime(year=dt.year, month=dt.month+1, day=1, hour=0, minute=0) if not valid_day: # Increment by day and try again dt = dt + datetime.timedelta(days=1) if dt.minute != 0: dt = dt - datetime.timedelta(minutes=dt.minute) if dt.hour != 0: dt = dt - datetime.timedelta(hours=dt.hour) elif not valid_hour: # Increment by an hour and try again dt = dt + datetime.timedelta(hours=1) if dt.minute != 0: dt = dt - datetime.timedelta(minutes=dt.minute) elif not valid_minute: # Increment by one minute dt = dt + datetime.timedelta(minutes=1) elif dt.year - now.year > 100: # There are no hundred year cycles raise CronParseException('Stuck in infinite loop') else: break # At the end return dt def is_valid_time(self, dt=None): """ Given a dt, is now a valid time? """ if not dt: dt = self.get_time() valid_day = self.validate_day(dt=dt) valid_month = self.validate_dt_part(dt=dt, component='month') valid_hour = self.validate_dt_part(dt=dt, component='hour') valid_minute = self.validate_dt_part(dt=dt, component='minute') return valid_day and valid_month and valid_hour and valid_minute # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests.common import TransactionCase class TestPricelist(TransactionCase): def setUp(self): super(TestPricelist, self).setUp() self.datacard = self.env['product.product'].create({'name': 'Office Lamp'}) self.usb_adapter = self.env['product.product'].create({'name': 'Office Chair'}) self.uom_ton = self.env.ref('uom.product_uom_ton') self.uom_unit_id = self.ref('uom.product_uom_unit') self.uom_dozen_id = self.ref('uom.product_uom_dozen') self.uom_kgm_id = self.ref('uom.product_uom_kgm') self.public_pricelist = self.env.ref('product.list0') self.sale_pricelist_id = self.env['product.pricelist'].create({ 'name': 'Sale pricelist', 'item_ids': [(0, 0, { 'compute_price': 'formula', 'base': 'list_price', # based on public price 'price_discount': 10, 'product_id': self.usb_adapter.id, 'applied_on': '0_product_variant', }), (0, 0, { 'compute_price': 'formula', 'base': 'list_price', # based on public price 'price_surcharge': -0.5, 'product_id': self.datacard.id, 'applied_on': '0_product_variant', })] }) def test_10_discount(self): # Make sure the price using a pricelist is the same than without after # applying the computation manually context = {} public_context = dict(context, pricelist=self.public_pricelist.id) pricelist_context = dict(context, pricelist=self.sale_pricelist_id.id) usb_adapter_without_pricelist = self.usb_adapter.with_context(public_context) usb_adapter_with_pricelist = self.usb_adapter.with_context(pricelist_context) self.assertEqual(usb_adapter_with_pricelist.price, usb_adapter_without_pricelist.price*0.9) datacard_without_pricelist = self.datacard.with_context(public_context) datacard_with_pricelist = self.datacard.with_context(pricelist_context) self.assertEqual(datacard_with_pricelist.price, datacard_without_pricelist.price-0.5) # Make sure that changing the unit of measure does not break the unit # price (after converting) unit_context = dict(context, pricelist=self.sale_pricelist_id.id, uom=self.uom_unit_id) dozen_context = dict(context, pricelist=self.sale_pricelist_id.id, uom=self.uom_dozen_id) usb_adapter_unit = self.usb_adapter.with_context(unit_context) usb_adapter_dozen = self.usb_adapter.with_context(dozen_context) self.assertAlmostEqual(usb_adapter_unit.price*12, usb_adapter_dozen.price) datacard_unit = self.datacard.with_context(unit_context) datacard_dozen = self.datacard.with_context(dozen_context) # price_surcharge applies to product default UoM, here "Units", so surcharge will be multiplied self.assertAlmostEqual(datacard_unit.price*12, datacard_dozen.price) def test_20_pricelist_uom(self): # Verify that the pricelist rules are correctly using the product's default UoM # as reference, and return a result according to the target UoM (as specific in the context) kg, tonne = self.uom_kgm_id, self.uom_ton.id tonne_price = 100 # make sure 'tonne' resolves down to 1 'kg'. self.uom_ton.write({'rounding': 0.001}) # setup product stored in 'tonnes', with a discounted pricelist for qty > 3 tonnes spam_id = self.env['product.product'].create({ 'name': '1 tonne of spam', 'uom_id': self.uom_ton.id, 'uom_po_id': self.uom_ton.id, 'list_price': tonne_price, 'type': 'consu' }) self.env['product.pricelist.item'].create({ 'pricelist_id': self.public_pricelist.id, 'applied_on': '0_product_variant', 'compute_price': 'formula', 'base': 'list_price', # based on public price 'min_quantity': 3, # min = 3 tonnes 'price_surcharge': -10, # -10 EUR / tonne 'product_id': spam_id.id }) pricelist = self.public_pricelist def test_unit_price(qty, uom, expected_unit_price): spam = spam_id.with_context({'uom': uom}) unit_price = pricelist.with_context({'uom': uom}).get_product_price(spam, qty, False) self.assertAlmostEqual(unit_price, expected_unit_price, msg='Computed unit price is wrong') # Test prices - they are *per unit*, the quantity is only here to match the pricelist rules! test_unit_price(2, kg, tonne_price / 1000.0) test_unit_price(2000, kg, tonne_price / 1000.0) test_unit_price(3500, kg, (tonne_price - 10) / 1000.0) test_unit_price(2, tonne, tonne_price) test_unit_price(3, tonne, tonne_price - 10) # -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import os from pelican.readers import Readers from pelican.tests.support import unittest, get_settings from .asciidoc_reader import asciidoc_enabled CUR_DIR = os.path.dirname(__file__) CONTENT_PATH = os.path.join(CUR_DIR, 'test_data') @unittest.skipUnless(asciidoc_enabled, "asciidoc isn't installed") class AsciiDocReaderTest(unittest.TestCase): def read_file(self, path, **kwargs): # Isolate from future API changes to readers.read_file r = Readers(settings=get_settings(**kwargs)) return r.read_file(base_path=CONTENT_PATH, path=path) def test_article_with_asc_extension(self): # Ensure the asc extension is being processed by the correct reader page = self.read_file( path='article_with_asc_extension.asc') expected = ('
\n' '

' 'Used for pelican test

\n' '
\n' '
' '

The quick brown fox jumped over ' 'the lazy dog’s back.

' '
\n
\n
\n') self.assertEqual(page.content, expected) expected = { 'category': 'Blog', 'author': 'Author O. Article', 'title': 'Test AsciiDoc File Header', 'date': datetime.datetime(2011, 9, 15, 9, 5), 'tags': ['Linux', 'Python', 'Pelican'], } for key, value in expected.items(): self.assertEqual(value, page.metadata[key], key) def test_article_with_asc_options(self): # test to ensure the ASCIIDOC_OPTIONS is being used page = self.read_file(path='article_with_asc_options.asc', ASCIIDOC_OPTIONS=["-a revision=1.0.42"]) expected = ('
\n' '

' 'Used for pelican test

\n' '
\n' '
' '

version 1.0.42

\n' '
' '

The quick brown fox jumped over ' 'the lazy dog’s back.

' '
\n
\n
\n') self.assertEqual(page.content, expected) """ DIRAC FileCatalog Storage Element Manager mix-in class for SE definitions within the FC database""" from __future__ import absolute_import from __future__ import division from __future__ import print_function __RCSID__ = "$Id$" import six import time import random from DIRAC import S_OK, S_ERROR, gConfig, gLogger from DIRAC.Core.Utilities.Pfn import pfnunparse from DIRAC.DataManagementSystem.DB.FileCatalogComponents.SEManager.SEManagerBase import SEManagerBase class SEManagerDB(SEManagerBase): def _refreshSEs(self, connection=False): req = "SELECT SEID,SEName FROM FC_StorageElements;" res = self.db._query(req) if not res['OK']: return res seNames = set([se[1] for se in res['Value']]) # If there are no changes between the DB and the cache # and we updated the cache recently enough, just return if seNames == set(self.db.seNames) and ((time.time() - self.lastUpdate) < self.seUpdatePeriod): return S_OK() startTime = time.time() self.lock.acquire() waitTime = time.time() gLogger.debug("SEManager RefreshSEs lock created. Waited %.3f seconds." % (waitTime - startTime)) # Check once more the lastUpdate because it could have been updated while we were waiting for the lock if (time.time() - self.lastUpdate) < self.seUpdatePeriod: self.lock.release() return S_OK() for seName, seId in list(self.db.seNames.items()): if seName not in seNames: del self.db.seNames[seName] del self.db.seids[seId] for seid, seName in res['Value']: self.db.seNames[seName] = seid self.db.seids[seid] = seName gLogger.debug("SEManager RefreshSEs lock released. Used %.3f seconds." % (time.time() - waitTime)) # Update the lastUpdate time self.lastUpdate = time.time() self.lock.release() return S_OK() def __addSE(self, seName, connection=False): startTime = time.time() self.lock.acquire() waitTime = time.time() gLogger.debug("SEManager AddSE lock created. Waited %.3f seconds. %s" % (waitTime - startTime, seName)) if seName in self.db.seNames.keys(): seid = self.db.seNames[seName] gLogger.debug("SEManager AddSE lock released. Used %.3f seconds. %s" % (time.time() - waitTime, seName)) self.lock.release() return S_OK(seid) connection = self.db._getConnection() res = self.db.insertFields('FC_StorageElements', ['SEName'], [seName], connection) if not res['OK']: gLogger.debug("SEManager AddSE lock released. Used %.3f seconds. %s" % (time.time() - waitTime, seName)) self.lock.release() if "Duplicate entry" in res['Message']: result = self._refreshSEs(connection) if not result['OK']: return result if seName in self.db.seNames.keys(): seid = self.db.seNames[seName] return S_OK(seid) return res seid = res['lastRowId'] self.db.seids[seid] = seName self.db.seNames[seName] = seid gLogger.debug("SEManager AddSE lock released. Used %.3f seconds. %s" % (time.time() - waitTime, seName)) self.lock.release() return S_OK(seid) def __removeSE(self, seName, connection=False): connection = self.db._getConnection() startTime = time.time() self.lock.acquire() waitTime = time.time() gLogger.debug("SEManager RemoveSE lock created. Waited %.3f seconds. %s" % (waitTime - startTime, seName)) seid = self.db.seNames.get(seName, 'Missing') req = "DELETE FROM FC_StorageElements WHERE SEName='%s'" % seName res = self.db._update(req, connection) if not res['OK']: gLogger.debug("SEManager RemoveSE lock released. Used %.3f seconds. %s" % (time.time() - waitTime, seName)) self.lock.release() return res if seid != 'Missing': self.db.seNames.pop(seName) self.db.seids.pop(seid) gLogger.debug("SEManager RemoveSE lock released. Used %.3f seconds. %s" % (time.time() - waitTime, seName)) self.lock.release() return S_OK() def findSE(self, seName): return self.getSEID(seName) def getSEID(self, seName): """ Get ID for a SE specified by its name """ if isinstance(seName, six.integer_types): return S_OK(seName) if seName in self.db.seNames.keys(): return S_OK(self.db.seNames[seName]) return self.__addSE(seName) def addSE(self, seName): return self.getSEID(seName) def getSEName(self, seID): """Return the name of the SE. Refresh list of SEs if not found, an SE might have been added by a different FileCatalog instance. :param int seID: ID of a storage element :return: S_OK/S_ERROR """ if seID in self.db.seids: return S_OK(self.db.seids[seID]) gLogger.info("getSEName: seID not found, refreshing", "ID: %s" % seID) result = self._refreshSEs(connection=False) if not result['OK']: gLogger.error("getSEName: refreshing failed", result['Message']) return result if seID in self.db.seids: return S_OK(self.db.seids[seID]) gLogger.error("getSEName: seID not found after refreshing", "ID: %s" % seID) return S_ERROR('SE id %d not found' % seID) def deleteSE(self, seName, force=True): # ToDo: Check first if there are replicas using this SE if not force: pass return self.__removeSE(seName) #!c:\\python\\python.exe import threading import getopt import time import sys import os from sulley import pedrpc import pcapy import impacket import impacket.ImpactDecoder PORT = 26001 IFS = [] ERR = lambda msg: sys.stderr.write("ERR> " + msg + "\n") or sys.exit(1) USAGE = "USAGE: network_monitor.py" \ "\n <-d|--device DEVICE #> device to sniff on (see list below)" \ "\n [-f|--filter PCAP FILTER] BPF filter string" \ "\n [-P|--log_path PATH] log directory to store pcaps to" \ "\n [-l|--log_level LEVEL] log level (default 1), increase for more verbosity" \ "\n [--port PORT] TCP port to bind this agent to" \ "\n\nNetwork Device List:\n" #check to make sure at superuser level on linux if sys.platform.startswith('linux'): if os.geteuid() != 0: print "Must be run with elevated permissions on Linux. (e.g. $ sudo python network_monitor.py ...)" sys.exit(2) # add the device list to the usage string. i = 0 for dev in pcapy.findalldevs(): IFS.append(dev) # if we are on windows, try and resolve the device UUID into an IP address. if sys.platform.startswith("win"): import _winreg try: # extract the device UUID and open the TCP/IP parameters key for it. dev = dev[dev.index("{"):dev.index("}")+1] subkey = r"SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\%s" % dev key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, subkey) # if there is a DHCP address snag that, otherwise fall back to the IP address. try: ip = _winreg.QueryValueEx(key, "DhcpIPAddress")[0] except: ip = _winreg.QueryValueEx(key, "IPAddress")[0][0] dev = dev + "\t" + ip except: pass USAGE += " [%d] %s\n" % (i, dev) i += 1 ######################################################################################################################## class pcap_thread (threading.Thread): def __init__ (self, network_monitor, pcap, pcap_save_path): self.network_monitor = network_monitor self.pcap = pcap self.decoder = None self.dumper = self.pcap.dump_open(pcap_save_path) self.active = True self.data_bytes = 0 # register the appropriate decoder. if pcap.datalink() == pcapy.DLT_EN10MB: self.decoder = impacket.ImpactDecoder.EthDecoder() elif pcap.datalink() == pcapy.DLT_LINUX_SLL: self.decoder = impacket.ImpactDecoder.LinuxSLLDecoder() else: raise Exception threading.Thread.__init__(self) def packet_handler (self, header, data): # add the captured data to the PCAP. self.dumper.dump(header, data) # increment the captured byte count. self.data_bytes += len(data) # log the decoded data at the appropriate log level. self.network_monitor.log(self.decoder.decode(data), 15) def run (self): # process packets while the active flag is raised. while self.active: self.pcap.dispatch(0, self.packet_handler) ######################################################################################################################## class network_monitor_pedrpc_server (pedrpc.server): def __init__ (self, host, port, device, filter="", log_path="./", log_level=1): ''' @type host: String @param host: Hostname or IP address to bind server to @type port: Integer @param port: Port to bind server to @type device: String @param device: Name of device to capture packets on @type ignore_pid: Integer @param ignore_pid: (Optional, def=None) Ignore this PID when searching for the target process @type log_path: String @param log_path: (Optional, def="./") Path to save recorded PCAPs to @type log_level: Integer @param log_level: (Optional, def=1) Log output level, increase for more verbosity ''' # initialize the PED-RPC server. pedrpc.server.__init__(self, host, port) self.device = device self.filter = filter self.log_path = log_path self.log_level = log_level self.pcap = None self.pcap_thread = None # ensure the log path is valid. if not os.access(self.log_path, os.X_OK): self.log("invalid log path: %s" % self.log_path) raise Exception self.log("Network Monitor PED-RPC server initialized:") self.log("\t device: %s" % self.device) self.log("\t filter: %s" % self.filter) self.log("\t log path: %s" % self.log_path) self.log("\t log_level: %d" % self.log_level) self.log("Awaiting requests...") def __stop (self): ''' Kill the PCAP thread. ''' if self.pcap_thread: self.log("stopping active packet capture thread.", 10) self.pcap_thread.active = False self.pcap_thread = None def alive (self): ''' Returns True. Useful for PED-RPC clients who want to see if the PED-RPC connection is still alive. ''' return True def post_send (self): ''' This routine is called after the fuzzer transmits a test case and returns the number of bytes captured by the PCAP thread. @rtype: Integer @return: Number of bytes captured in PCAP thread. ''' # grab the number of recorded bytes. data_bytes = self.pcap_thread.data_bytes # stop the packet capture thread. self.__stop() self.log("stopped PCAP thread, snagged %d bytes of data" % data_bytes) return data_bytes def pre_send (self, test_number): ''' This routine is called before the fuzzer transmits a test case and spin off a packet capture thread. ''' self.log("initializing capture for test case #%d" % test_number) # open the capture device and set the BPF filter. self.pcap = pcapy.open_live(self.device, 65355, True, 100) self.pcap.setfilter(self.filter) # instantiate the capture thread. pcap_log_path = "%s/%d.pcap" % (self.log_path, test_number) self.pcap_thread = pcap_thread(self, self.pcap, pcap_log_path) self.pcap_thread.start() def log (self, msg="", level=1): ''' If the supplied message falls under the current log level, print the specified message to screen. @type msg: String @param msg: Message to log ''' if self.log_level >= level: print "[%s] %s" % (time.strftime("%I:%M.%S"), msg) def retrieve (self, test_number): ''' Return the raw binary contents of the PCAP saved for the specified test case number. @type test_number: Integer @param test_number: Test number to retrieve PCAP for. ''' self.log("retrieving PCAP for test case #%d" % test_number) pcap_log_path = "%s/%d.pcap" % (self.log_path, test_number) fh = open(pcap_log_path, "rb") data = fh.read() fh.close() return data def set_filter (self, filter): self.log("updating PCAP filter to '%s'" % filter) self.filter = filter def set_log_path (self, log_path): self.log("updating log path to '%s'" % log_path) self.log_path = log_path ######################################################################################################################## if __name__ == "__main__": # parse command line options. try: opts, args = getopt.getopt(sys.argv[1:], "d:f:P:l:", ["device=", "filter=", "log_path=", "log_level=", "port="]) except getopt.GetoptError: ERR(USAGE) device = None filter = "" log_path = "./" log_level = 1 for opt, arg in opts: if opt in ("-d", "--device"): device = IFS[int(arg)] if opt in ("-f", "--filter"): filter = arg if opt in ("-P", "--log_path"): log_path = arg if opt in ("-l", "--log_level"): log_level = int(arg) if opt in ("--port"): PORT = int(arg) if not device: ERR(USAGE) try: servlet = network_monitor_pedrpc_server("0.0.0.0", PORT, device, filter, log_path, log_level) servlet.serve_forever() except: pass # Copyright (c) 2014-present PlatformIO # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from __future__ import absolute_import import fnmatch import os import sys from SCons import Builder, Util # pylint: disable=import-error from SCons.Node import FS # pylint: disable=import-error from SCons.Script import COMMAND_LINE_TARGETS # pylint: disable=import-error from SCons.Script import AlwaysBuild # pylint: disable=import-error from SCons.Script import DefaultEnvironment # pylint: disable=import-error from SCons.Script import Export # pylint: disable=import-error from SCons.Script import SConscript # pylint: disable=import-error from platformio import __version__, fs from platformio.compat import IS_MACOS, string_types from platformio.package.version import pepver_to_semver SRC_HEADER_EXT = ["h", "hpp"] SRC_ASM_EXT = ["S", "spp", "SPP", "sx", "s", "asm", "ASM"] SRC_C_EXT = ["c"] SRC_CXX_EXT = ["cc", "cpp", "cxx", "c++"] SRC_BUILD_EXT = SRC_C_EXT + SRC_CXX_EXT + SRC_ASM_EXT SRC_FILTER_DEFAULT = ["+<*>", "-<.git%s>" % os.sep, "-<.svn%s>" % os.sep] def scons_patched_match_splitext(path, suffixes=None): """Patch SCons Builder, append $OBJSUFFIX to the end of each target""" tokens = Util.splitext(path) if suffixes and tokens[1] and tokens[1] in suffixes: return (path, tokens[1]) return tokens def GetBuildType(env): return ( "debug" if ( set(["__debug", "sizedata"]) & set(COMMAND_LINE_TARGETS) or env.GetProjectOption("build_type") == "debug" ) else "release" ) def BuildProgram(env): env.ProcessProgramDeps() env.ProcessProjectDeps() # append into the beginning a main LD script if env.get("LDSCRIPT_PATH") and not any("-Wl,-T" in f for f in env["LINKFLAGS"]): env.Prepend(LINKFLAGS=["-T", env.subst("$LDSCRIPT_PATH")]) # enable "cyclic reference" for linker if ( env.get("LIBS") and env.GetCompilerType() == "gcc" and (env.PioPlatform().is_embedded() or not IS_MACOS) ): env.Prepend(_LIBFLAGS="-Wl,--start-group ") env.Append(_LIBFLAGS=" -Wl,--end-group") program = env.Program( os.path.join("$BUILD_DIR", env.subst("$PROGNAME$PROGSUFFIX")), env["PIOBUILDFILES"], ) env.Replace(PIOMAINPROG=program) AlwaysBuild( env.Alias( "checkprogsize", program, env.VerboseAction(env.CheckUploadSize, "Checking size $PIOMAINPROG"), ) ) print("Building in %s mode" % env.GetBuildType()) return program def ProcessProgramDeps(env): def _append_pio_macros(): core_version = pepver_to_semver(__version__) env.AppendUnique( CPPDEFINES=[ ( "PLATFORMIO", int( "{0:02d}{1:02d}{2:02d}".format( core_version.major, core_version.minor, core_version.patch ) ), ) ] ) _append_pio_macros() env.PrintConfiguration() # fix ASM handling under non case-sensitive OS if not Util.case_sensitive_suffixes(".s", ".S"): env.Replace(AS="$CC", ASCOM="$ASPPCOM") # process extra flags from board if "BOARD" in env and "build.extra_flags" in env.BoardConfig(): env.ProcessFlags(env.BoardConfig().get("build.extra_flags")) # apply user flags env.ProcessFlags(env.get("BUILD_FLAGS")) # process framework scripts env.BuildFrameworks(env.get("PIOFRAMEWORK")) if env.GetBuildType() == "debug": env.ConfigureDebugFlags() # remove specified flags env.ProcessUnFlags(env.get("BUILD_UNFLAGS")) if "__test" in COMMAND_LINE_TARGETS: env.ConfigureTestTarget() def ProcessProjectDeps(env): project_lib_builder = env.ConfigureProjectLibBuilder() # prepend project libs to the beginning of list env.Prepend(LIBS=project_lib_builder.build()) # prepend extra linker related options from libs env.PrependUnique( **{ key: project_lib_builder.env.get(key) for key in ("LIBS", "LIBPATH", "LINKFLAGS") if project_lib_builder.env.get(key) } ) projenv = env.Clone() # CPPPATH from dependencies projenv.PrependUnique(CPPPATH=project_lib_builder.env.get("CPPPATH")) # extra build flags from `platformio.ini` projenv.ProcessFlags(env.get("SRC_BUILD_FLAGS")) is_test = "__test" in COMMAND_LINE_TARGETS if is_test: projenv.BuildSources( "$BUILD_TEST_DIR", "$PROJECT_TEST_DIR", "$PIOTEST_SRC_FILTER" ) if not is_test or env.GetProjectOption("test_build_project_src"): projenv.BuildSources( "$BUILD_SRC_DIR", "$PROJECT_SRC_DIR", env.get("SRC_FILTER") ) if not env.get("PIOBUILDFILES") and not COMMAND_LINE_TARGETS: sys.stderr.write( "Error: Nothing to build. Please put your source code files " "to '%s' folder\n" % env.subst("$PROJECT_SRC_DIR") ) env.Exit(1) Export("projenv") def ParseFlagsExtended(env, flags): # pylint: disable=too-many-branches if not isinstance(flags, list): flags = [flags] result = {} for raw in flags: for key, value in env.ParseFlags(str(raw)).items(): if key not in result: result[key] = [] result[key].extend(value) cppdefines = [] for item in result["CPPDEFINES"]: if not Util.is_Sequence(item): cppdefines.append(item) continue name, value = item[:2] if '"' in value: value = value.replace('"', '\\"') elif value.isdigit(): value = int(value) elif value.replace(".", "", 1).isdigit(): value = float(value) cppdefines.append((name, value)) result["CPPDEFINES"] = cppdefines # fix relative CPPPATH & LIBPATH for k in ("CPPPATH", "LIBPATH"): for i, p in enumerate(result.get(k, [])): if os.path.isdir(p): result[k][i] = os.path.realpath(p) # fix relative path for "-include" for i, f in enumerate(result.get("CCFLAGS", [])): if isinstance(f, tuple) and f[0] == "-include": result["CCFLAGS"][i] = (f[0], env.File(os.path.realpath(f[1].get_path()))) return result def ProcessFlags(env, flags): # pylint: disable=too-many-branches if not flags: return env.Append(**env.ParseFlagsExtended(flags)) # Cancel any previous definition of name, either built in or # provided with a -U option // Issue #191 undefines = [ u for u in env.get("CCFLAGS", []) if isinstance(u, string_types) and u.startswith("-U") ] if undefines: for undef in undefines: env["CCFLAGS"].remove(undef) if undef[2:] in env["CPPDEFINES"]: env["CPPDEFINES"].remove(undef[2:]) env.Append(_CPPDEFFLAGS=" %s" % " ".join(undefines)) def ProcessUnFlags(env, flags): if not flags: return parsed = env.ParseFlagsExtended(flags) # get all flags and copy them to each "*FLAGS" variable all_flags = [] for key, unflags in parsed.items(): if key.endswith("FLAGS"): all_flags.extend(unflags) for key, unflags in parsed.items(): if key.endswith("FLAGS"): parsed[key].extend(all_flags) for key, unflags in parsed.items(): for unflag in unflags: for current in env.get(key, []): conditions = [ unflag == current, isinstance(current, (tuple, list)) and unflag[0] == current[0], ] if any(conditions): env[key].remove(current) def MatchSourceFiles(env, src_dir, src_filter=None): src_filter = env.subst(src_filter) if src_filter else None src_filter = src_filter or SRC_FILTER_DEFAULT return fs.match_src_files( env.subst(src_dir), src_filter, SRC_BUILD_EXT + SRC_HEADER_EXT ) def CollectBuildFiles( env, variant_dir, src_dir, src_filter=None, duplicate=False ): # pylint: disable=too-many-locals sources = [] variants = [] src_dir = env.subst(src_dir) if src_dir.endswith(os.sep): src_dir = src_dir[:-1] for item in env.MatchSourceFiles(src_dir, src_filter): _reldir = os.path.dirname(item) _src_dir = os.path.join(src_dir, _reldir) if _reldir else src_dir _var_dir = os.path.join(variant_dir, _reldir) if _reldir else variant_dir if _var_dir not in variants: variants.append(_var_dir) env.VariantDir(_var_dir, _src_dir, duplicate) if fs.path_endswith_ext(item, SRC_BUILD_EXT): sources.append(env.File(os.path.join(_var_dir, os.path.basename(item)))) middlewares = env.get("__PIO_BUILD_MIDDLEWARES") if not middlewares: return sources new_sources = [] for node in sources: new_node = node for callback, pattern in middlewares: if pattern and not fnmatch.fnmatch(node.srcnode().get_path(), pattern): continue new_node = callback(new_node) if new_node: new_sources.append(new_node) return new_sources def AddBuildMiddleware(env, callback, pattern=None): env.Append(__PIO_BUILD_MIDDLEWARES=[(callback, pattern)]) def BuildFrameworks(env, frameworks): if not frameworks: return if "BOARD" not in env: sys.stderr.write( "Please specify `board` in `platformio.ini` to use " "with '%s' framework\n" % ", ".join(frameworks) ) env.Exit(1) board_frameworks = env.BoardConfig().get("frameworks", []) if frameworks == ["platformio"]: if board_frameworks: frameworks.insert(0, board_frameworks[0]) else: sys.stderr.write("Error: Please specify `board` in `platformio.ini`\n") env.Exit(1) for f in frameworks: if f == "arduino": # Arduino IDE appends .o the end of filename Builder.match_splitext = scons_patched_match_splitext if "nobuild" not in COMMAND_LINE_TARGETS: env.ConvertInoToCpp() if f in board_frameworks: SConscript(env.GetFrameworkScript(f), exports="env") else: sys.stderr.write("Error: This board doesn't support %s framework!\n" % f) env.Exit(1) def BuildLibrary(env, variant_dir, src_dir, src_filter=None): env.ProcessUnFlags(env.get("BUILD_UNFLAGS")) return env.StaticLibrary( env.subst(variant_dir), env.CollectBuildFiles(variant_dir, src_dir, src_filter) ) def BuildSources(env, variant_dir, src_dir, src_filter=None): nodes = env.CollectBuildFiles(variant_dir, src_dir, src_filter) DefaultEnvironment().Append( PIOBUILDFILES=[ env.Object(node) if isinstance(node, FS.File) else node for node in nodes ] ) def exists(_): return True def generate(env): env.AddMethod(GetBuildType) env.AddMethod(BuildProgram) env.AddMethod(ProcessProgramDeps) env.AddMethod(ProcessProjectDeps) env.AddMethod(ParseFlagsExtended) env.AddMethod(ProcessFlags) env.AddMethod(ProcessUnFlags) env.AddMethod(MatchSourceFiles) env.AddMethod(CollectBuildFiles) env.AddMethod(AddBuildMiddleware) env.AddMethod(BuildFrameworks) env.AddMethod(BuildLibrary) env.AddMethod(BuildSources) return env import numpy as np import as_classification.ann_models import as_sound.features.extractFeatures as ef import as_classification.utilities import os import matplotlib.pyplot as plt # ------------------------------- # CREATE MODEL # ------------------------------- model = as_classification.ann_models.ANN_5FCL() model.initialize(15,2) # ------------------------------- # READ AUDIO FILES # ------------------------------- speech_data = ef.computeSupervectorForFile(os.path.dirname(os.path.realpath(__file__)) + '/data/Speech.wav', 8000, 2048, 2049) noise_data = ef.computeSupervectorForFile(os.path.dirname(os.path.realpath(__file__)) + '/data/Noise.wav', 8000, 2048, 2049) whole_data = np.hstack((speech_data, noise_data)) whole_data = np.swapaxes(whole_data,0,1) whole_labels = np.zeros((whole_data.shape[0], 2)) whole_labels[:speech_data.shape[1],0] = 1 whole_labels[speech_data.shape[1]:,1] = 1 training_data = {"labels": whole_labels, "data": whole_data} training_data, test_data = as_classification.utilities.divideTrainingData(training_data, 0.6) # ------------------------------- # TRAIN # ------------------------------- model.train(training_data, test_data, 10, 20, 100) model.saveCheckpoint(os.path.dirname(os.path.realpath(__file__)) + '/data/vadModel_ANN_5FCL.chkp') #xp = np.arange(0,prediction.shape[0]) #plt.plot(xp, test_data[:,14], '-b', label='RMS') #plt.plot(xp, prediction[:,0], '-r', label='ANN Output') #plt.legend(loc='upper left') #plt.show() #feat = as_sound.features.extractFeatures.computeSupervector(normalized_data) import copy import inspect from importlib import import_module from django.db import router from django.db.models.query import QuerySet from django.utils import six from django.utils.encoding import python_2_unicode_compatible def ensure_default_manager(cls): """ Ensures that a Model subclass contains a default manager and sets the _default_manager attribute on the class. Also sets up the _base_manager points to a plain Manager instance (which could be the same as _default_manager if it's not a subclass of Manager). """ if cls._meta.swapped: setattr(cls, 'objects', SwappedManagerDescriptor(cls)) return if not getattr(cls, '_default_manager', None): if any(f.name == 'objects' for f in cls._meta.fields): raise ValueError( "Model %s must specify a custom Manager, because it has a " "field named 'objects'" % cls.__name__ ) # Create the default manager, if needed. cls.add_to_class('objects', Manager()) cls._base_manager = cls.objects elif not getattr(cls, '_base_manager', None): default_mgr = cls._default_manager.__class__ if (default_mgr is Manager or getattr(default_mgr, "use_for_related_fields", False)): cls._base_manager = cls._default_manager else: # Default manager isn't a plain Manager class, or a suitable # replacement, so we walk up the base class hierarchy until we hit # something appropriate. for base_class in default_mgr.mro()[1:]: if (base_class is Manager or getattr(base_class, "use_for_related_fields", False)): cls.add_to_class('_base_manager', base_class()) return raise AssertionError( "Should never get here. Please report a bug, including your " "model and model manager setup." ) @python_2_unicode_compatible class BaseManager(object): # Tracks each time a Manager instance is created. Used to retain order. creation_counter = 0 #: If set to True the manager will be serialized into migrations and will #: thus be available in e.g. RunPython operations use_in_migrations = False def __new__(cls, *args, **kwargs): # We capture the arguments to make returning them trivial obj = super(BaseManager, cls).__new__(cls) obj._constructor_args = (args, kwargs) return obj def __init__(self): super(BaseManager, self).__init__() self._set_creation_counter() self.model = None self.name = None self._inherited = False self._db = None self._hints = {} def __str__(self): """ Return "app_label.model_label.manager_name". """ return '%s.%s' % (self.model._meta.label, self.name) def deconstruct(self): """ Returns a 5-tuple of the form (as_manager (True), manager_class, queryset_class, args, kwargs). Raises a ValueError if the manager is dynamically generated. """ qs_class = self._queryset_class if getattr(self, '_built_with_as_manager', False): # using MyQuerySet.as_manager() return ( True, # as_manager None, # manager_class '%s.%s' % (qs_class.__module__, qs_class.__name__), # qs_class None, # args None, # kwargs ) else: module_name = self.__module__ name = self.__class__.__name__ # Make sure it's actually there and not an inner class module = import_module(module_name) if not hasattr(module, name): raise ValueError( "Could not find manager %s in %s.\n" "Please note that you need to inherit from managers you " "dynamically generated with 'from_queryset()'." % (name, module_name) ) return ( False, # as_manager '%s.%s' % (module_name, name), # manager_class None, # qs_class self._constructor_args[0], # args self._constructor_args[1], # kwargs ) def check(self, **kwargs): return [] @classmethod def _get_queryset_methods(cls, queryset_class): def create_method(name, method): def manager_method(self, *args, **kwargs): return getattr(self.get_queryset(), name)(*args, **kwargs) manager_method.__name__ = method.__name__ manager_method.__doc__ = method.__doc__ return manager_method new_methods = {} # Refs http://bugs.python.org/issue1785. predicate = inspect.isfunction if six.PY3 else inspect.ismethod for name, method in inspect.getmembers(queryset_class, predicate=predicate): # Only copy missing methods. if hasattr(cls, name): continue # Only copy public methods or methods with the attribute `queryset_only=False`. queryset_only = getattr(method, 'queryset_only', None) if queryset_only or (queryset_only is None and name.startswith('_')): continue # Copy the method onto the manager. new_methods[name] = create_method(name, method) return new_methods @classmethod def from_queryset(cls, queryset_class, class_name=None): if class_name is None: class_name = '%sFrom%s' % (cls.__name__, queryset_class.__name__) class_dict = { '_queryset_class': queryset_class, } class_dict.update(cls._get_queryset_methods(queryset_class)) return type(class_name, (cls,), class_dict) def contribute_to_class(self, model, name): # TODO: Use weakref because of possible memory leak / circular reference. self.model = model if not self.name: self.name = name # Only contribute the manager if the model is concrete if model._meta.abstract: setattr(model, name, AbstractManagerDescriptor(model)) elif model._meta.swapped: setattr(model, name, SwappedManagerDescriptor(model)) else: # if not model._meta.abstract and not model._meta.swapped: setattr(model, name, ManagerDescriptor(self)) if (not getattr(model, '_default_manager', None) or self.creation_counter < model._default_manager.creation_counter): model._default_manager = self abstract = False if model._meta.abstract or (self._inherited and not self.model._meta.proxy): abstract = True model._meta.managers.append((self.creation_counter, self, abstract)) def _set_creation_counter(self): """ Sets the creation counter value for this instance and increments the class-level copy. """ self.creation_counter = BaseManager.creation_counter BaseManager.creation_counter += 1 def _copy_to_model(self, model): """ Makes a copy of the manager and assigns it to 'model', which should be a child of the existing model (used when inheriting a manager from an abstract base class). """ assert issubclass(model, self.model) mgr = copy.copy(self) mgr._set_creation_counter() mgr.model = model mgr._inherited = True return mgr def db_manager(self, using=None, hints=None): obj = copy.copy(self) obj._db = using or self._db obj._hints = hints or self._hints return obj @property def db(self): return self._db or router.db_for_read(self.model, **self._hints) ####################### # PROXIES TO QUERYSET # ####################### def get_queryset(self): """ Returns a new QuerySet object. Subclasses can override this method to easily customize the behavior of the Manager. """ return self._queryset_class(model=self.model, using=self._db, hints=self._hints) def all(self): # We can't proxy this method through the `QuerySet` like we do for the # rest of the `QuerySet` methods. This is because `QuerySet.all()` # works by creating a "copy" of the current queryset and in making said # copy, all the cached `prefetch_related` lookups are lost. See the # implementation of `RelatedManager.get_queryset()` for a better # understanding of how this comes into play. return self.get_queryset() def __eq__(self, other): return ( isinstance(other, self.__class__) and self._constructor_args == other._constructor_args ) def __ne__(self, other): return not (self == other) def __hash__(self): return id(self) class Manager(BaseManager.from_queryset(QuerySet)): pass class ManagerDescriptor(object): # This class ensures managers aren't accessible via model instances. # For example, Poll.objects works, but poll_obj.objects raises AttributeError. def __init__(self, manager): self.manager = manager def __get__(self, instance, type=None): if instance is not None: raise AttributeError("Manager isn't accessible via %s instances" % type.__name__) return self.manager class AbstractManagerDescriptor(object): # This class provides a better error message when you try to access a # manager on an abstract model. def __init__(self, model): self.model = model def __get__(self, instance, type=None): raise AttributeError("Manager isn't available; %s is abstract" % ( self.model._meta.object_name, )) class SwappedManagerDescriptor(object): # This class provides a better error message when you try to access a # manager on a swapped model. def __init__(self, model): self.model = model def __get__(self, instance, type=None): raise AttributeError( "Manager isn't available; '%s.%s' has been swapped for '%s'" % ( self.model._meta.app_label, self.model._meta.object_name, self.model._meta.swapped, ) ) class EmptyManager(Manager): def __init__(self, model): super(EmptyManager, self).__init__() self.model = model def get_queryset(self): return super(EmptyManager, self).get_queryset().none() # Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.battle.BattleProps from panda3d.core import NodePath, SequenceNode, Texture, VBase4 from direct.actor import Actor from direct.directnotify import DirectNotifyGlobal from otp.otpbase import OTPGlobals import random Props = ((5, 'partyBall', 'partyBall'), (5, 'feather', 'feather-mod', 'feather-chan'), (5, 'lips', 'lips'), (5, 'lipstick', 'lipstick'), (5, 'hat', 'hat'), (5, 'cane', 'cane'), (5, 'cubes', 'cubes-mod', 'cubes-chan'), (5, 'ladder', 'ladder2'), (4, 'fishing-pole', 'fishing-pole-mod', 'fishing-pole-chan'), (5, '1dollar', '1dollar-bill-mod', '1dollar-bill-chan'), (5, 'big-magnet', 'magnet'), (5, 'hypno-goggles', 'hypnotize-mod', 'hypnotize-chan'), (5, 'slideshow', 'av_screen'), (5, 'banana', 'banana-peel-mod', 'banana-peel-chan'), (5, 'rake', 'rake-mod', 'rake-chan'), (5, 'marbles', 'marbles-mod', 'marbles-chan'), (5, 'tnt', 'tnt-mod', 'tnt-chan'), (5, 'trapdoor', 'trapdoor'), (5, 'quicksand', 'quicksand'), (5, 'traintrack', 'traintrack2'), (5, 'train', 'train'), (5, 'megaphone', 'megaphone'), (5, 'aoogah', 'aoogah'), (5, 'bikehorn', 'bikehorn'), (5, 'bugle', 'bugle'), (5, 'elephant', 'elephant'), (5, 'fog_horn', 'fog_horn'), (5, 'whistle', 'whistle'), (5, 'singing', 'singing'), (3.5, 'creampie', 'tart'), (5, 'fruitpie-slice', 'fruit-pie-slice'), (5, 'creampie-slice', 'cream-pie-slice'), (5, 'birthday-cake', 'birthday-cake-mod', 'birthday-cake-chan'), (5, 'wedding-cake', 'wedding_cake'), (3.5, 'squirting-flower', 'squirting-flower'), (5, 'glass', 'glass-mod', 'glass-chan'), (4, 'water-gun', 'water-gun'), (3.5, 'bottle', 'bottle'), (5, 'firehose', 'firehose-mod', 'firehose-chan'), (5, 'hydrant', 'battle_hydrant'), (4, 'stormcloud', 'stormcloud-mod', 'stormcloud-chan'), (5, 'geyser', 'geyser'), (3.5, 'button', 'button'), (5, 'flowerpot', 'flowerpot-mod', 'flowerpot-chan'), (5, 'sandbag', 'sandbag-mod', 'sandbag-chan'), (4, 'anvil', 'anvil-mod', 'anvil-chan'), (5, 'weight', 'weight-mod', 'weight-chan'), (5, 'safe', 'safe-mod', 'safe-chan'), (5, 'piano', 'piano-mod', 'piano-chan'), (5, 'rake-react', 'rake-step-mod', 'rake-step-chan'), (5, 'pad', 'pad'), (4, 'propeller', 'propeller-mod', 'propeller-chan'), (5, 'calculator', 'calculator-mod', 'calculator-chan'), (5, 'rollodex', 'roll-o-dex'), (5, 'rubber-stamp', 'rubber-stamp'), (5, 'rubber-stamp-pad', 'rubber-stamp-pad-mod', 'rubber-stamp-pad-chan'), (5, 'smile', 'smile-mod', 'smile-chan'), (5, 'golf-club', 'golf-club'), (5, 'golf-ball', 'golf-ball'), (5, 'redtape', 'redtape'), (5, 'redtape-tube', 'redtape-tube'), (5, 'bounced-check', 'bounced-check'), (5, 'calculator', 'calculator-mod', 'calculator-chan'), (3.5, 'clip-on-tie', 'clip-on-tie-mod', 'clip-on-tie-chan'), (5, 'pen', 'pen'), (5, 'pencil', 'pencil'), (3, 'snowball', 'snowball'), (3.5, 'phone', 'phone'), (3.5, 'receiver', 'receiver'), (5, 'sharpener', 'sharpener'), (3.5, 'shredder', 'shredder'), (3.5, 'shredder-paper', 'shredder-paper-mod', 'shredder-paper-chan'), (5, 'watercooler', 'watercooler'), (5, 'dagger', 'dagger'), (5, 'card', 'card'), (5, 'baseball', 'baseball'), (5, 'bird', 'bird'), (5, 'can', 'can'), (5, 'cigar', 'cigar'), (5, 'evil-eye', 'evil-eye'), (5, 'gavel', 'gavel'), (5, 'half-windsor', 'half-windsor'), (5, 'lawbook', 'lawbook'), (5, 'newspaper', 'newspaper'), (5, 'pink-slip', 'pink-slip'), (5, 'teeth', 'teeth-mod', 'teeth-chan'), (5, 'power-tie', 'power-tie'), (3.5, 'spray', 'spray'), (3.5, 'splash', 'splash'), (3.5, 'splat', 'splat-mod', 'splat-chan'), (3.5, 'stun', 'stun-mod', 'stun-chan'), (3.5, 'glow', 'glow'), (3.5, 'suit_explosion', 'suit_explosion-mod', 'suit_explosion-chan'), (3.5, 'suit_explosion_dust', 'dust_cloud'), (4, 'ripples', 'ripples'), (4, 'wake', 'wake'), (4, 'splashdown', 'SZ_splashdown-mod', 'SZ_splashdown-chan')) CreampieColor = VBase4(250.0 / 255.0, 241.0 / 255.0, 24.0 / 255.0, 1.0) FruitpieColor = VBase4(55.0 / 255.0, 40.0 / 255.0, 148.0 / 255.0, 1.0) BirthdayCakeColor = VBase4(253.0 / 255.0, 119.0 / 255.0, 220.0 / 255.0, 1.0) SnowballColor = VBase4(1, 1, 1, 1) Splats = {'tart': (0.3, FruitpieColor), 'fruitpie-slice': (0.5, FruitpieColor), 'creampie-slice': (0.5, CreampieColor), 'fruitpie': (0.7, FruitpieColor), 'creampie': (0.7, CreampieColor), 'birthday-cake': (0.9, BirthdayCakeColor), 'wedding-cake': (0.9, BirthdayCakeColor), 'snowball': (0.5, SnowballColor)} Variants = ('tart', 'fruitpie', 'splat-tart', 'dust', 'kapow', 'double-windsor', 'splat-fruitpie-slice', 'splat-creampie-slice', 'splat-fruitpie', 'splat-creampie', 'splat-birthday-cake', 'splat-wedding-cake', 'splat-snowball', 'splash-from-splat', 'clip-on-tie', 'lips', 'small-magnet', '5dollar', '10dollar', 'suit_explosion', 'quicksand', 'trapdoor', 'geyser', 'ship', 'trolley', 'traintrack') class PropPool: notify = DirectNotifyGlobal.directNotify.newCategory('PropPool') def __init__(self): self.props = {} self.propCache = [] self.propStrings = {} self.propTypes = {} self.maxPoolSize = config.GetInt('prop-pool-size', 8) for p in Props: phase = p[0] propName = p[1] modelName = p[2] if len(p) == 4: animName = p[3] propPath = self.getPath(phase, modelName) animPath = self.getPath(phase, animName) self.propTypes[propName] = 'actor' self.propStrings[propName] = (propPath, animPath) else: propPath = self.getPath(phase, modelName) self.propTypes[propName] = 'model' self.propStrings[propName] = (propPath,) propName = 'tart' self.propStrings[propName] = (self.getPath(3.5, 'tart'),) self.propTypes[propName] = 'model' propName = 'fruitpie' self.propStrings[propName] = (self.getPath(3.5, 'tart'),) self.propTypes[propName] = 'model' propName = 'double-windsor' self.propStrings[propName] = (self.getPath(5, 'half-windsor'),) self.propTypes[propName] = 'model' splatAnimFileName = self.getPath(3.5, 'splat-chan') for splat in Splats.keys(): propName = 'splat-' + splat self.propStrings[propName] = (self.getPath(3.5, 'splat-mod'), splatAnimFileName) self.propTypes[propName] = 'actor' propName = 'splash-from-splat' self.propStrings[propName] = (self.getPath(3.5, 'splat-mod'), splatAnimFileName) self.propTypes[propName] = 'actor' propName = 'small-magnet' self.propStrings[propName] = (self.getPath(5, 'magnet'),) self.propTypes[propName] = 'model' propName = '5dollar' self.propStrings[propName] = (self.getPath(5, '1dollar-bill-mod'), self.getPath(5, '1dollar-bill-chan')) self.propTypes[propName] = 'actor' propName = '10dollar' self.propStrings[propName] = (self.getPath(5, '1dollar-bill-mod'), self.getPath(5, '1dollar-bill-chan')) self.propTypes[propName] = 'actor' propName = 'dust' self.propStrings[propName] = (self.getPath(5, 'dust-mod'), self.getPath(5, 'dust-chan')) self.propTypes[propName] = 'actor' propName = 'kapow' self.propStrings[propName] = (self.getPath(5, 'kapow-mod'), self.getPath(5, 'kapow-chan')) self.propTypes[propName] = 'actor' propName = 'ship' self.propStrings[propName] = ('phase_5/models/props/ship',) self.propTypes[propName] = 'model' propName = 'trolley' self.propStrings[propName] = ('phase_4/models/modules/trolley_station_TT',) self.propTypes[propName] = 'model' def getPath(self, phase, model): return 'phase_%s/models/props/%s' % (phase, model) def makeVariant(self, name): if name == 'tart': self.props[name].setScale(0.5) elif name == 'fruitpie': self.props[name].setScale(0.75) elif name == 'double-windsor': self.props[name].setScale(1.5) elif name[:6] == 'splat-': prop = self.props[name] scale = prop.getScale() * Splats[name[6:]][0] prop.setScale(scale) prop.setColor(Splats[name[6:]][1]) elif name == 'splash-from-splat': self.props[name].setColor(0.75, 0.75, 1.0, 1.0) elif name == 'clip-on-tie': tie = self.props[name] tie.getChild(0).setHpr(23.86, -16.03, 9.18) elif name == 'small-magnet': self.props[name].setScale(0.5) elif name == 'shredder-paper': paper = self.props[name] paper.setPosHpr(2.22, -0.95, 1.16, -48.61, 26.57, -111.51) paper.flattenMedium() elif name == 'lips': lips = self.props[name] lips.setPos(0, 0, -3.04) lips.flattenMedium() elif name == '5dollar': tex = loader.loadTexture('phase_5/maps/dollar_5.jpg') tex.setMinfilter(Texture.FTLinearMipmapLinear) tex.setMagfilter(Texture.FTLinear) self.props[name].setTexture(tex, 1) elif name == '10dollar': tex = loader.loadTexture('phase_5/maps/dollar_10.jpg') tex.setMinfilter(Texture.FTLinearMipmapLinear) tex.setMagfilter(Texture.FTLinear) self.props[name].setTexture(tex, 1) elif name == 'dust': bin = 110 for cloudNum in xrange(1, 12): cloudName = '**/cloud' + str(cloudNum) cloud = self.props[name].find(cloudName) cloud.setBin('fixed', bin) bin -= 10 elif name == 'kapow': l = self.props[name].find('**/letters') l.setBin('fixed', 20) e = self.props[name].find('**/explosion') e.setBin('fixed', 10) elif name == 'suit_explosion': joints = ['**/joint_scale_POW', '**/joint_scale_BLAM', '**/joint_scale_BOOM'] joint = random.choice(joints) self.props[name].find(joint).hide() joints.remove(joint) joint = random.choice(joints) self.props[name].find(joint).hide() elif name == 'quicksand' or name == 'trapdoor': p = self.props[name] p.setBin('shadow', -5) p.setDepthWrite(0) p.getChild(0).setPos(0, 0, OTPGlobals.FloorOffset) elif name == 'traintrack' or name == 'traintrack2': prop = self.props[name] prop.find('**/tunnel3').hide() prop.find('**/tunnel2').hide() prop.find('**/tracksA').setPos(0, 0, OTPGlobals.FloorOffset) elif name == 'geyser': p = self.props[name] s = SequenceNode('geyser') p.findAllMatches('**/Splash*').reparentTo(NodePath(s)) s.loop(0) s.setFrameRate(12) p.attachNewNode(s) elif name == 'ship': self.props[name] = self.props[name].find('**/ship_gag') elif name == 'trolley': self.props[name] = self.props[name].find('**/trolley_car') def unloadProps(self): for p in self.props.values(): if type(p) != type(()): self.__delProp(p) self.props = {} self.propCache = [] def getProp(self, name): return self.__getPropCopy(name) def __getPropCopy(self, name): if self.propTypes[name] == 'actor': if name not in self.props: prop = Actor.Actor() prop.loadModel(self.propStrings[name][0]) if settings['smoothAnimations']: prop.setBlend(frameBlend=True) animDict = {} animDict[name] = self.propStrings[name][1] prop.loadAnims(animDict) prop.setName(name) self.storeProp(name, prop) if name in Variants: self.makeVariant(name) return Actor.Actor(other=self.props[name]) else: if name not in self.props: prop = loader.loadModel(self.propStrings[name][0]) prop.setName(name) self.storeProp(name, prop) if name in Variants: self.makeVariant(name) return self.props[name].copyTo(hidden) def storeProp(self, name, prop): self.props[name] = prop self.propCache.append(prop) if len(self.props) > self.maxPoolSize: oldest = self.propCache.pop(0) del self.props[oldest.getName()] self.__delProp(oldest) self.notify.debug('props = %s' % self.props) self.notify.debug('propCache = %s' % self.propCache) def getPropType(self, name): return self.propTypes[name] def __delProp(self, prop): if prop == None: self.notify.warning('tried to delete null prop!') return else: if isinstance(prop, Actor.Actor): prop.cleanup() else: prop.removeNode() return globalPropPool = PropPool() import signal import weakref from django.utils.unittest.compatibility import wraps __unittest = True class _InterruptHandler(object): def __init__(self, default_handler): self.called = False self.default_handler = default_handler def __call__(self, signum, frame): installed_handler = signal.getsignal(signal.SIGINT) if installed_handler is not self: # if we aren't the installed handler, then delegate immediately # to the default handler self.default_handler(signum, frame) if self.called: self.default_handler(signum, frame) self.called = True for result in _results.keys(): result.stop() _results = weakref.WeakKeyDictionary() def registerResult(result): _results[result] = 1 def removeResult(result): return bool(_results.pop(result, None)) _interrupt_handler = None def installHandler(): global _interrupt_handler if _interrupt_handler is None: default_handler = signal.getsignal(signal.SIGINT) _interrupt_handler = _InterruptHandler(default_handler) signal.signal(signal.SIGINT, _interrupt_handler) def removeHandler(method=None): if method is not None: @wraps(method) def inner(*args, **kwargs): initial = signal.getsignal(signal.SIGINT) removeHandler() try: return method(*args, **kwargs) finally: signal.signal(signal.SIGINT, initial) return inner global _interrupt_handler if _interrupt_handler is not None: signal.signal(signal.SIGINT, _interrupt_handler.default_handler) #!/usr/bin/env python # Copyright 2009 Simon Arlott # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Usage: cxacru-cf.py < cxacru-cf.bin # Output: values string suitable for the sysfs adsl_config attribute # # Warning: cxacru-cf.bin with MD5 hash cdbac2689969d5ed5d4850f117702110 # contains mis-aligned values which will stop the modem from being able # to make a connection. If the first and last two bytes are removed then # the values become valid, but the modulation will be forced to ANSI # T1.413 only which may not be appropriate. # # The original binary format is a packed list of le32 values. import sys import struct i = 0 while True: buf = sys.stdin.read(4) if len(buf) == 0: break elif len(buf) != 4: sys.stdout.write("\n") sys.stderr.write("Error: read {0} not 4 bytes\n".format(len(buf))) sys.exit(1) if i > 0: sys.stdout.write(" ") sys.stdout.write("{0:x}={1}".format(i, struct.unpack(" ver) def test_version_1_point_10(): # regression test for gh-2998. assert_(NumpyVersion('1.9.0') < '1.10.0') assert_(NumpyVersion('1.11.0') < '1.11.1') assert_(NumpyVersion('1.11.0') == '1.11.0') assert_(NumpyVersion('1.99.11') < '1.99.12') def test_alpha_beta_rc(): assert_(NumpyVersion('1.8.0rc1') == '1.8.0rc1') for ver in ['1.8.0', '1.8.0rc2']: assert_(NumpyVersion('1.8.0rc1') < ver) for ver in ['1.8.0a2', '1.8.0b3', '1.7.2rc4']: assert_(NumpyVersion('1.8.0rc1') > ver) assert_(NumpyVersion('1.8.0b1') > '1.8.0a2') def test_dev_version(): assert_(NumpyVersion('1.9.0.dev-Unknown') < '1.9.0') for ver in ['1.9.0', '1.9.0a1', '1.9.0b2', '1.9.0b2.dev-ffffffff']: assert_(NumpyVersion('1.9.0.dev-f16acvda') < ver) assert_(NumpyVersion('1.9.0.dev-f16acvda') == '1.9.0.dev-11111111') def test_dev_a_b_rc_mixed(): assert_(NumpyVersion('1.9.0a2.dev-f16acvda') == '1.9.0a2.dev-11111111') assert_(NumpyVersion('1.9.0a2.dev-6acvda54') < '1.9.0a2') def test_raises(): for ver in ['1.9', '1,9.0', '1.7.x']: assert_raises(ValueError, NumpyVersion, ver) if __name__ == "__main__": run_module_suite() """ By specifying the 'proxy' Meta attribute, model subclasses can specify that they will take data directly from the table of their base class table rather than using a new table of their own. This allows them to act as simple proxies, providing a modified interface to the data from the base class. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible # A couple of managers for testing managing overriding in proxy model cases. class PersonManager(models.Manager): def get_queryset(self): return super(PersonManager, self).get_queryset().exclude(name="fred") class SubManager(models.Manager): def get_queryset(self): return super(SubManager, self).get_queryset().exclude(name="wilma") @python_2_unicode_compatible class Person(models.Model): """ A simple concrete base class. """ name = models.CharField(max_length=50) objects = PersonManager() def __str__(self): return self.name class Abstract(models.Model): """ A simple abstract base class, to be used for error checking. """ data = models.CharField(max_length=10) class Meta: abstract = True class MyPerson(Person): """ A proxy subclass, this should not get a new table. Overrides the default manager. """ class Meta: proxy = True ordering = ["name"] permissions = ( ("display_users", "May display users information"), ) objects = SubManager() other = PersonManager() def has_special_name(self): return self.name.lower() == "special" class ManagerMixin(models.Model): excluder = SubManager() class Meta: abstract = True class OtherPerson(Person, ManagerMixin): """ A class with the default manager from Person, plus an secondary manager. """ class Meta: proxy = True ordering = ["name"] class StatusPerson(MyPerson): """ A non-proxy subclass of a proxy, it should get a new table. """ status = models.CharField(max_length=80) # We can even have proxies of proxies (and subclass of those). class MyPersonProxy(MyPerson): class Meta: proxy = True class LowerStatusPerson(MyPersonProxy): status = models.CharField(max_length=80) @python_2_unicode_compatible class User(models.Model): name = models.CharField(max_length=100) def __str__(self): return self.name class UserProxy(User): class Meta: proxy = True class UserProxyProxy(UserProxy): class Meta: proxy = True # We can still use `select_related()` to include related models in our querysets. class Country(models.Model): name = models.CharField(max_length=50) @python_2_unicode_compatible class State(models.Model): name = models.CharField(max_length=50) country = models.ForeignKey(Country) def __str__(self): return self.name class StateProxy(State): class Meta: proxy = True # Proxy models still works with filters (on related fields) # and select_related, even when mixed with model inheritance @python_2_unicode_compatible class BaseUser(models.Model): name = models.CharField(max_length=255) def __str__(self): return ':'.join((self.__class__.__name__, self.name,)) class TrackerUser(BaseUser): status = models.CharField(max_length=50) class ProxyTrackerUser(TrackerUser): class Meta: proxy = True @python_2_unicode_compatible class Issue(models.Model): summary = models.CharField(max_length=255) assignee = models.ForeignKey(ProxyTrackerUser) def __str__(self): return ':'.join((self.__class__.__name__, self.summary,)) class Bug(Issue): version = models.CharField(max_length=50) reporter = models.ForeignKey(BaseUser) class ProxyBug(Bug): """ Proxy of an inherited class """ class Meta: proxy = True class ProxyProxyBug(ProxyBug): """ A proxy of proxy model with related field """ class Meta: proxy = True class Improvement(Issue): """ A model that has relation to a proxy model or to a proxy of proxy model """ version = models.CharField(max_length=50) reporter = models.ForeignKey(ProxyTrackerUser) associated_bug = models.ForeignKey(ProxyProxyBug) class ProxyImprovement(Improvement): class Meta: proxy = True # coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( encode_base_n, ExtractorError, int_or_none, parse_duration, str_to_int, ) class EpornerIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?eporner\.com/hd-porn/(?P\w+)(?:/(?P[\w-]+))?' _TESTS = [{ 'url': 'http://www.eporner.com/hd-porn/95008/Infamous-Tiffany-Teen-Strip-Tease-Video/', 'md5': '39d486f046212d8e1b911c52ab4691f8', 'info_dict': { 'id': 'qlDUmNsj6VS', 'display_id': 'Infamous-Tiffany-Teen-Strip-Tease-Video', 'ext': 'mp4', 'title': 'Infamous Tiffany Teen Strip Tease Video', 'duration': 1838, 'view_count': int, 'age_limit': 18, }, }, { # New (May 2016) URL layout 'url': 'http://www.eporner.com/hd-porn/3YRUtzMcWn0/Star-Wars-XXX-Parody/', 'only_matching': True, }, { 'url': 'http://www.eporner.com/hd-porn/3YRUtzMcWn0', 'only_matching': True, }] def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) video_id = mobj.group('id') display_id = mobj.group('display_id') or video_id webpage, urlh = self._download_webpage_handle(url, display_id) video_id = self._match_id(compat_str(urlh.geturl())) hash = self._search_regex( r'hash\s*:\s*["\']([\da-f]{32})', webpage, 'hash') title = self._og_search_title(webpage, default=None) or self._html_search_regex( r'(.+?) - EPORNER', webpage, 'title') # Reverse engineered from vjs.js def calc_hash(s): return ''.join((encode_base_n(int(s[lb:lb + 8], 16), 36) for lb in range(0, 32, 8))) video = self._download_json( 'http://www.eporner.com/xhr/video/%s' % video_id, display_id, note='Downloading video JSON', query={ 'hash': calc_hash(hash), 'device': 'generic', 'domain': 'www.eporner.com', 'fallback': 'false', }) if video.get('available') is False: raise ExtractorError( '%s said: %s' % (self.IE_NAME, video['message']), expected=True) sources = video['sources'] formats = [] for kind, formats_dict in sources.items(): if not isinstance(formats_dict, dict): continue for format_id, format_dict in formats_dict.items(): if not isinstance(format_dict, dict): continue src = format_dict.get('src') if not isinstance(src, compat_str) or not src.startswith('http'): continue if kind == 'hls': formats.extend(self._extract_m3u8_formats( src, display_id, 'mp4', entry_protocol='m3u8_native', m3u8_id=kind, fatal=False)) else: height = int_or_none(self._search_regex( r'(\d+)[pP]', format_id, 'height', default=None)) fps = int_or_none(self._search_regex( r'(\d+)fps', format_id, 'fps', default=None)) formats.append({ 'url': src, 'format_id': format_id, 'height': height, 'fps': fps, }) self._sort_formats(formats) duration = parse_duration(self._html_search_meta('duration', webpage)) view_count = str_to_int(self._search_regex( r'id="cinemaviews">\s*([0-9,]+)\s*<small>views', webpage, 'view count', fatal=False)) return { 'id': video_id, 'display_id': display_id, 'title': title, 'duration': duration, 'view_count': view_count, 'formats': formats, 'age_limit': 18, } # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Tests the load_forwarding_rules_pipeline.""" from tests.unittest_utils import ForsetiTestCase import mock import MySQLdb # pylint: disable=line-too-long from google.cloud.security.common.data_access import errors as data_access_errors from google.cloud.security.common.data_access import forwarding_rules_dao as frdao from google.cloud.security.common.data_access import project_dao from google.cloud.security.common.gcp_api import compute from google.cloud.security.common.gcp_api import errors as api_errors from google.cloud.security.inventory import errors as inventory_errors from google.cloud.security.inventory.pipelines import base_pipeline from google.cloud.security.inventory.pipelines import load_forwarding_rules_pipeline from tests.inventory.pipelines.test_data import fake_configs from tests.inventory.pipelines.test_data import fake_forwarding_rules from tests.inventory.pipelines.test_data import fake_projects # pylint: enable=line-too-long def _set_count(*args, **kwargs): """Set the pipeline count.""" class LoadForwardingRulesPipelineTest(ForsetiTestCase): """Tests for the load_forwarding_rules_pipeline.""" def setUp(self): """Set up.""" self.cycle_timestamp = '20001225T120000Z' self.configs = fake_configs.FAKE_CONFIGS self.resource_name = 'forwarding_rules' self.mock_compute_client = mock.create_autospec(compute.ComputeClient) self.mock_dao = mock.create_autospec(frdao.ForwardingRulesDao) self.pipeline = ( load_forwarding_rules_pipeline.LoadForwardingRulesPipeline( self.cycle_timestamp, self.configs, self.mock_compute_client, self.mock_dao)) self.project_ids = fake_forwarding_rules \ .FAKE_PROJECT_FWD_RULES_MAP.keys() self.projects = [project_dao.ProjectDao.map_row_to_object(p) for p in fake_projects.EXPECTED_LOADABLE_PROJECTS if p['project_id'] in self.project_ids] def test_can_transform_forwarding_rules(self): """Test transform function works.""" actual = self.pipeline._transform( fake_forwarding_rules.FAKE_PROJECT_FWD_RULES_MAP) self.assertEquals( fake_forwarding_rules.EXPECTED_LOADABLE_FWD_RULES, list(actual)) @mock.patch.object(MySQLdb, 'connect') @mock.patch('google.cloud.security.common.data_access.project_dao.ProjectDao.get_projects') def test_api_is_called_to_retrieve_forwarding_rules( self, mock_get_projects, mock_conn): """Test that API is called to retrieve forwarding rules.""" mock_get_projects.return_value = self.projects self.pipeline._retrieve() self.assertEqual( len(self.project_ids), self.pipeline.api_client.get_forwarding_rules.call_count) @mock.patch.object(MySQLdb, 'connect') @mock.patch('google.cloud.security.common.data_access.project_dao.ProjectDao.get_projects') def test_retrieve_data_is_correct( self, mock_get_projects, mock_conn): """Test _retrieve() data is correct.""" mock_get_projects.return_value = self.projects self.pipeline.api_client.get_forwarding_rules = mock.MagicMock( side_effect=[fake_forwarding_rules.FAKE_API_RESPONSE1, fake_forwarding_rules.FAKE_API_RESPONSE2]) actual = self.pipeline._retrieve() self.assertEquals( fake_forwarding_rules.FAKE_PROJECT_FWD_RULES_MAP, actual) @mock.patch.object(MySQLdb, 'connect') @mock.patch('google.cloud.security.common.data_access.project_dao.ProjectDao.get_projects') def test_retrieve_error_logged_when_api_error( self, mock_get_projects, mock_conn): """Test that LOGGER.error() is called when there is an API error.""" mock_get_projects.return_value = self.projects self.pipeline.api_client.get_forwarding_rules.side_effect = ( api_errors.ApiExecutionError(self.resource_name, mock.MagicMock())) load_forwarding_rules_pipeline.LOGGER = mock.MagicMock() self.pipeline._retrieve() self.assertEqual( len(self.project_ids), load_forwarding_rules_pipeline.LOGGER.error.call_count) @mock.patch.object(MySQLdb, 'connect') @mock.patch('google.cloud.security.common.data_access.project_dao.ProjectDao.get_projects') def test_pipeline_no_rules_loads_nothing( self, mock_get_projects, mock_conn): """Test the pipeline with no forwarding rules.""" mock_get_projects.return_value = self.projects base_pipeline.LOGGER = mock.MagicMock() self.pipeline.api_client.get_forwarding_rules = mock.MagicMock( side_effect=[[], []]) self.pipeline.dao.select_record_count = mock.MagicMock( side_effect=data_access_errors.MySQLError( 'forwarding_rules', mock.MagicMock())) self.pipeline.run() self.assertEquals(None, self.pipeline.count) @mock.patch.object( load_forwarding_rules_pipeline.LoadForwardingRulesPipeline, '_get_loaded_count') @mock.patch.object( load_forwarding_rules_pipeline.LoadForwardingRulesPipeline, '_load') @mock.patch.object( load_forwarding_rules_pipeline.LoadForwardingRulesPipeline, '_transform') @mock.patch.object( load_forwarding_rules_pipeline.LoadForwardingRulesPipeline, '_retrieve') def test_subroutines_are_called_by_run( self, mock_retrieve, mock_transform, mock_load, mock_get_loaded_count): """Test that the subroutines are called by run.""" mock_retrieve.return_value = \ fake_forwarding_rules.FAKE_PROJECT_FWD_RULES_MAP mock_transform.return_value = ( fake_forwarding_rules.EXPECTED_LOADABLE_FWD_RULES) self.pipeline.run() mock_transform.assert_called_once_with( fake_forwarding_rules.FAKE_PROJECT_FWD_RULES_MAP) self.assertEquals(1, mock_load.call_count) # The regular data is loaded. called_args, called_kwargs = mock_load.call_args_list[0] expected_args = ( self.pipeline.RESOURCE_NAME, fake_forwarding_rules.EXPECTED_LOADABLE_FWD_RULES) self.assertEquals(expected_args, called_args) # Copyright (c) 2014 by California Institute of Technology # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # 3. Neither the name of the California Institute of Technology nor # the names of its contributors may be used to endorse or promote # products derived from this software without specific prior # written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALTECH # OR THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. """ Contains XML import and export functions so that we can export (and not recompute) Tulip data structures. """ import numpy import scipy.sparse import xml.etree.ElementTree as ET import polytope from tulip import transys from tulip import hybrid from tulip import abstract # Global names used in tags N_PROPS = 'props' N_PROP = 'prop' N_LOWERBOUND = 'lb' N_UPPERBOUND = 'ub' N_FULLDIM = 'fulldim' N_MINREP = 'minrep' N_VOLUME = 'volume' N_DIMENSION = 'dim' N_BBOX = 'bbox' N_CHEBR = 'chebR' N_CHEBXC = 'chebXc' N_POLYLIST = 'list_poly' N_REGIONLIST = 'list_reg' N_KEY = 'key' N_VALUE = 'value' N_KEYVALUEPAIR = 'pair' N_DOMAIN = 'domain' N_PROPREG = 'proplist' N_ADJ = 'adj' N_ITEM = 'item' # data types used in xml file (attributes) T_SET = 'set' T_STRING = 'str' T_INT = 'int' T_FLOAT = 'float' T_BOOL = 'bool' T_POLYTOPE = 'polytope' T_MATRIX = 'ndarray' T_REGION = 'region' T_DICT = 'dict' T_PPP = 'PPP' T_ADJ = 'adjmatrix' T_TUPLE = 'tuple' T_LIST = 'list' T_LTISYS = 'LtiSysDyn' T_PWASYS = 'PwaSysDyn' T_HYBRIDSYS = 'HybridSysDyn' T_FTS = 'FiniteTransitionSystem' T_OFTS = 'OpenFiniteTransitionSystem' T_HYBRIDSYS = 'SwitchedSysDyn' def _make_pretty(tree, indent=1): """ Modifies the tail attributes of nodes in an XML tree so that the resulting printed XML file looks like an indented tree (and not one long line). @type tree: xml.etree.ElementTree.Element @type indent: int @return: None, just modifies tree by reference @rtype: None """ tab_string = '\n' + '\t'*indent # If a tree has children, put tabs in front of the first child if tree.getchildren(): if tree.text is not None: tree.text = tab_string + tree.text else: tree.text = tab_string # Number of children in the tree N = len(tree.getchildren()) # Recursively run function on children for index, child in enumerate(tree): _make_pretty(child, indent=indent+1) # Print new line and tabs at the tail of each child, except the last # child. Print new line and one fewer tab at the tail of the last child. if index < N - 1: child.tail = tab_string else: child.tail = '\n' + '\t'*(indent-1) def exportXML(data, filename, tag=None): """ Exports a Tulip data structure into an XML file. @param data: The Tulip data structure to export into an xml lfile @type data: L{Polytope}, L{Region}, L{PropPreservingPartition}, L{SwitchedSysDyn}, L{PwaSysDyn}, L{LtiSysDyn} @param filename: The name of the XML file to export to. @type filename: string @param tag: (Optional) What we want the first tag of the XML file to read. @type tag: string @return: No return, just writes text. @rtype: None """ if tag is None: tag = "object" tree = _export_xml(data, None, tag) _make_pretty(tree) pretty_string = ET.tostring(tree) xmlfile = open(filename, 'w') xmlfile.write(pretty_string) xmlfile.close() def importXML(filename): """ Takes a Tulip XML file and returns a Tulip data structure. @param filename: XML file containing exported data to import @type filename: string @return: the data structure exported into the file. @rtype: L{Polytope}, L{Region}, L{PropPreservingPartition}, L{SwitchedSysDyn}, L{PwaSysDyn}, L{LtiSysDyn} """ # Load the file into an xml tree xmltree = ET.parse(filename) # send the root to the general tree parser return _import_xml(xmltree.getroot()) def _import_xml(node): """ Returns the Tulip data structure contained in a parsed XML file. @type tree: xml.etree.ElementTree.Element @rtype: L{Polytope}, L{Region}, L{PropPreservingPartition}, L{HybridSysDyn}, L{PwaSysDyn}, L{LtiSysDyn}, L{FiniteTransitionSystem}, L{OpenFiniteTransitionSystem} """ # Get the type of data this is nodetype = node.attrib['type'] # Call the right import function # Python types if nodetype == T_STRING: return node.text elif nodetype == T_INT: return int(node.text) elif nodetype == T_FLOAT: return float(node.text) elif nodetype == T_BOOL: return bool(node.text) elif nodetype == T_MATRIX: return eval('numpy.array(' + node.text + ')') elif nodetype == T_TUPLE: return _import_list(node, type_str=T_TUPLE) elif nodetype == T_DICT: return _import_dictionary(node) elif nodetype == T_LIST: return _import_list(node) elif nodetype == T_ADJ: return _import_adj(node) elif nodetype == T_SET: return _import_list(node, type_STR=T_SET) # Tulip data structures elif nodetype == T_POLYTOPE: return _import_polytope(node) elif nodetype == T_REGION: return _import_region(node) elif nodetype == T_PPP: return _import_ppp(node) elif nodetype == T_LTISYS: return _import_ltisys(node) elif nodetype == T_PWASYS: return _import_pwasys(node) elif nodetype == T_HYBRIDSYS: return _import_hybridsys(node) else: raise TypeError('Type ' + nodetype + ' is not supported.') def _import_adj(node): # Get number of rows and columns N = _import_xml(node.findall('num_states')[0]) # Make matrix sparse_matrix = scipy.sparse.lil_matrix((N,N)) # Get entries and fill them in with ones entries = _import_xml(node.findall('index_list')[0]) for entry in entries: sparse_matrix[entry[0],entry[1]] = 1 return sparse_matrix def _import_ppp(node): # Domain domain_node = node.findall('domain') if domain_node: domain = _import_xml(domain_node[0]) else: domain = None # Regions regions_node = node.findall('list_reg') if regions_node: list_regions = _import_xml(regions_node[0]) else: list_regions = [] # adj adj_node = node.findall('adj') if adj_node: adjmatrix = _import_xml(adj_node[0]) else: adjmatrix = None # prop_regions prop_regions_node = node.findall('proplist') if prop_regions_node: prop_regions = _import_xml(prop_regions_node[0]) else: prop_regions = None return abstract.prop2partition.PropPreservingPartition(domain=domain, regions=list_regions, adj=adjmatrix, prop_regions=prop_regions) def _import_list(node, type_str=T_LIST): all_stuff = [] for child in node: all_stuff.append(_import_xml(child)) if type_str==T_SET: all_stuff = set(all_stuff) elif type_str==T_TUPLE: all_stuff = tuple(all_stuff) return all_stuff def _import_dictionary(node): dictionary = {} for keyvaluepair in node: key = _import_xml(keyvaluepair.findall(N_KEY)[0]) value = _import_xml(keyvaluepair.findall(N_VALUE)[0]) dictionary[key] = value return dictionary def _import_region(node): # Get the polytope list and import the polytopes polytope_list = node.findall(N_POLYLIST)[0] # Import the polytopes list_poly = _import_xml(polytope_list) return polytope.Region(list_poly=list_poly) def _import_polytope(node): # Get the A matrix A = _import_xml(node.findall('A')[0]) # Get the b matrix b = _import_xml(node.findall('b')[0]) return polytope.Polytope(A=A, b=b) def _import_ltisys(node): A = _import_xml(node.findall('A')[0]) B = _import_xml(node.findall('B')[0]) E = _import_xml(node.findall('E')[0]) K = _import_xml(node.findall('K')[0]) Uset = node.findall('Uset') Wset = node.findall('Wset') domain = node.findall('domain') if not Uset: Uset = None else: Uset = _import_xml(Uset[0]) if not Wset: Wset = None else: Wset = _import_xml(Wset[0]) if not domain: domain = None else: domain = _import_xml(domain[0]) return hybrid.LtiSysDyn(A=A, B=B, E=E, K=K, Uset=Uset, Wset=Wset, domain=domain) def _import_pwasys(node): domain = node.findall('domain') if domain: domain = _import_xml(domain[0]) else: domain = None # Get list of ltisys ltilist = node.findall('ltilist')[0] list_subsys = _import_xml(ltilist) return hybrid.PwaSysDyn(list_subsys=list_subsys, domain=domain) def _import_hybridsys(node): # Get parts, import the non-optional parts disc_domain_size = _import_xml(node.findall('disc_domain_size')[0]) sys_labels = node.findall('sys_labels') env_labels = node.findall('env_labels') cts_ss = _import_xml(node.findall('cts_ss')[0]) dynamics = _import_xml(node.findall('dynamics')[0]) if sys_labels: sys_labels = _import_xml(sys_labels[0]) else: sys_labels = None if env_labels: env_labels = _import_xml(env_labels[0]) else: env_lables = None return hybrid.SwitchedSysDyn(disc_domain_size=disc_domain_size, dynamics=dynamics, cts_ss=cts_ss, env_labels=env_labels, disc_sys_labels=sys_labels) def _export_xml(data, parent=None, tag=None, tag_list=[]): """Exports Tulip data structures to XML structures for later import. This function is called both internal @param data: the data structure to be exported into an XML tree. @type data: numpy.ndarray or L{Polytope} or L{Region} or L{FiniteTransitionSystem} or L{PropPreservingPartition} or L{AbstractSysDyn} or dict @param parent: @type parent: None or xml.etree.ElementTree.Element or xml.etree.ElementTree.SubElement @type tag: None or string @return: None (if parent is None), or an xml tree @rtype: None or xml.etree.ElementTree.Element or xml.etree.ElementTree.SubElement """ # Tulip types (parent might not exist) if isinstance(data, polytope.Polytope): if parent is None: return _export_polytope(data, parent, tag) else: _export_polytope(data, parent, tag) elif isinstance(data, polytope.Region): if parent is None: return _export_region(data, parent, tag) else: _export_region(data, parent, tag) elif isinstance(data, abstract.prop2partition.PropPreservingPartition): if parent is None: return _export_ppp(data, parent, tag) else: _export_ppp(data, parent, tag) elif isinstance(data, hybrid.LtiSysDyn): if parent is None: return _export_ltisys(data, parent, tag) else: _export_ltisys(data, parent, tag) elif isinstance(data, hybrid.PwaSysDyn): if parent is None: return _export_pwasys(data, parent, tag) else: _export_pwasys(data, parent, tag) elif isinstance(data, hybrid.SwitchedSysDyn): if parent is None: return _export_hybridsys(data, parent, tag) else: _export_hybridsys(data, parent, tag) elif isinstance(data, transys.transys.FTS): if parent is None: return _export_fts(data, parent, tag, type_str=T_FTS) else: _export_fts(data, parent, tag, type_str=T_FTS) elif isinstance(data, transys.transys.OpenFTS): if parent is None: return _export_fts(data, parent, tag, type_str=T_OFTS) else: _export_fts(data, parent, tag, type_str=T_OFTS) # parent will always not be none elif (isinstance(data, int) or isinstance(data, numpy.int32)): if tag is None: tag = "integer" new_node = ET.SubElement(parent, tag, type=T_INT) new_node.text = str(data) elif isinstance(data, str): if tag is None: tag = "string" new_node = ET.SubElement(parent, tag, type=T_STRING) new_node.text = data elif (isinstance(data, bool) or isinstance(data, numpy.bool_)): if tag is None: tag = "bool" new_node = ET.SubElement(parent, tag, type=T_BOOL) new_node.text = str(data) elif isinstance(data, float): if tag is None: tag = "float" new_node = ET.SubElement(parent, tag, type=T_FLOAT) new_node.text = str(data) elif isinstance(data, dict): _export_dict(data, parent, tag) elif isinstance(data, numpy.ndarray): if tag is None: tag = "numpyarray" new_node = ET.SubElement(parent, tag, type=T_MATRIX) new_node.text = str(data.tolist()) elif isinstance(data, tuple): #_export_tuple(data, parent, tag) _export_list(data, parent, tag, type_str=T_TUPLE, tag_list=tag_list) elif isinstance(data, list): _export_list(data, parent, tag, type_str=T_LIST, tag_list=tag_list) elif isinstance(data, scipy.sparse.lil.lil_matrix): _export_adj(data, parent, tag) elif isinstance(data, set): #_export_set(data, parent, tag) _export_list(data, parent, tag, type_str=T_SET, tag_list=tag_list) # Type not found else: raise TypeError('Type ' + str(type(data)) + ' is not supported.') def _export_fts(fts, parent, tag, type_str=T_OFTS): if tag is None: tag = "TransitionSystem" if parent is None: tree = ET.Element(tag, type=type_str) else: tree = ET.SubElement(parent, tag, type=type_str) # List of atomic propositions _export_list(fts.aps, tree, 'APs', type_str=T_SET) # List of states with labels N = len(fts.states.find()) tag_list0 = [ 'state' for i in range(N) ] states_list_node = ET.SubElement(tree, 'states') for state in fts.states.find(): state_node = ET.SubElement(states_list_node, 'state') name = state[0] ap_list = state[1]['ap'] _export_xml(state[0], state_node, 'name') _export_xml(ap_list, state_node, 'aps') # _export_list(fts.states.find(), tree, 'states', tag_list=tag_list0) # List of initial states M = len(fts.states.initial) tag_list1 = [ 'state' for i in range(M) ] _export_list(fts.states.initial, tree, 'initial_states', tag_list=tag_list1) # List of actions if hasattr(fts, 'env_actions'): _export_list(fts.env_actions, tree, 'env_actions') if hasattr(fts, 'sys_actions'): _export_list(fts.sys_actions, tree, 'sys_actions') # List of transitions with actions. We're not going to use the usual export # list function to make things more clear transitions_list_node = ET.SubElement(tree, 'transitions') for transition in fts.transitions.find(): transition_node = ET.SubElement(transitions_list_node, 'transition') state1 = transition[0] state2 = transition[1] actions_dict = transition[2] _export_xml(state1, transition_node, 'start_state') _export_xml(state2, transition_node, 'end_state') # start_node = ET.SubElement(transition_node, 'start_state') # start_node.text = state1 # end_node = ET.SubElement(transition_node, 'end_state') # end_node.text = state2 if 'sys_actions' in actions_dict.keys(): _export_xml(actions_dict['sys_actions'], transition_node, tag='sys_action') if 'env_actions' in actions_dict.keys(): _export_xml(actions_dict['env_actions'], transition_node, tag='env_action') # _export_list(fts.transitions.find(), tree, 'transitions') # label_list = [' if parent is None: return tree def _export_ppp(ppp, parent, tag): """ @return: None (if parent is None), or an xml tree @rtype: None or xml.etree.ElementTree.Element or xml.etree.ElementTree.SubElement """ if tag is None: tag = "PropPreservingPartition" if parent is None: tree = ET.Element(tag, type=T_PPP) else: tree = ET.SubElement(parent, tag, type=T_PPP) # Domain (polytope) _export_polytope(ppp.domain, tree, tag=N_DOMAIN) # regions (list of regions) _export_xml(ppp.regions, tree, N_REGIONLIST) # adj (adjacency matrix) _export_adj(ppp.adj, tree, N_ADJ) # prop regions (dictionary mapping strings to regions) _export_xml(ppp.prop_regions, tree, N_PROPREG) if parent is None: return tree def _export_ltisys(ltisys, parent, tag=None): """ @return: None (if parent is None), or an xml tree @rtype: None or xml.etree.ElementTree.Element or xml.etree.ElementTree.SubElement """ if tag is None: tag = "LtiSysDyn" if parent is None: tree = ET.Element(tag, type=T_LTISYS) else: tree = ET.SubElement(parent, tag, type=T_LTISYS) # State space matrices _export_xml(ltisys.A, tree, 'A') _export_xml(ltisys.B, tree, 'B') _export_xml(ltisys.E, tree, 'E') _export_xml(ltisys.K, tree, 'K') # Domain matrices if ltisys.Uset is not None: _export_polytope(ltisys.Uset, tree, 'Uset') if ltisys.Wset is not None: _export_polytope(ltisys.Wset, tree, 'Wset') if ltisys.domain is not None: _export_polytope(ltisys.domain, tree, 'domain') if parent is None: return tree def _export_pwasys(pwasys, parent, tag=None): """ @return: None (if parent is None), or an xml tree @rtype: None or xml.etree.ElementTree.Element or xml.etree.ElementTree.SubElement """ if tag is None: tag = "PwaSysDyn" if parent is None: tree = ET.Element(tag, type=T_PWASYS) else: tree = ET.SubElement(parent, tag, type=T_PWASYS) # Export domain if pwasys.domain is not None: _export_polytope(pwasys.domain, tree, 'domain') # Export lti list _export_list(pwasys.list_subsys, tree, 'ltilist') if parent is None: return tree def _export_hybridsys(hybridsys, parent, tag=None): """ @return: None (if parent is None), or an xml tree @rtype: None or xml.etree.ElementTree.Element or xml.etree.ElementTree.SubElement """ if tag is None: tag = "SwitchedSysDyn" if parent is None: tree = ET.Element(tag, type=T_HYBRIDSYS) else: tree = ET.SubElement(parent, tag, type=T_HYBRIDSYS) # cts_ss _export_xml(hybridsys.cts_ss, tree, tag="cts_ss") # disc_domain_size _export_xml(hybridsys.disc_domain_size, tree, tag="disc_domain_size") # disc_sys_labels _export_xml(hybridsys.disc_sys_labels, tree, tag="sys_labels") # env_labels _export_xml(hybridsys.env_labels, tree, tag="env_labels") # Dynamics _export_dict(hybridsys.dynamics, tree, tag="dynamics") if parent is None: return tree def _export_polytope(poly, parent, tag=None): """Builds an XML tree from a polytope @param poly: Polytope to export @type poly: Polytope @return: None (if parent is None), or an xml tree @rtype: None or xml.etree.ElementTree.Element or xml.etree.ElementTree.SubElement """ if tag is None: tag = "polytope" if parent is None: tree = ET.Element(tag, type=T_POLYTOPE) else: tree = ET.SubElement(parent, tag, type=T_POLYTOPE) # A and b matrices _export_xml(poly.A, tree, 'A') _export_xml(poly.b, tree, 'b') # Optional parts # minimal representation (bool) if poly.minrep is not None: _export_xml(poly.minrep, tree, N_MINREP) # bounding box if poly.bbox is not None: bbox_node = ET.SubElement(tree, N_BBOX) _export_xml(poly.bbox[0], bbox_node, N_LOWERBOUND) _export_xml(poly.bbox[1], bbox_node, N_UPPERBOUND) # chebyshev center (ndarray) if poly.chebXc is not None: _export_xml(poly.chebXc, tree, N_CHEBXC) # chebyshev radius (float) if poly.chebR is not None: _export_xml(poly.chebR, tree, N_CHEBR) # dimension (integer) if poly.dim: _export_xml(poly.dim, tree, N_DIMENSION) # full dimension (bool) if poly.fulldim is not None: _export_xml(poly.fulldim, tree, N_FULLDIM) # volume (float) if poly.volume is not None: _export_xml(poly.volume, tree, N_VOLUME) # Return if there is no parent if parent is None: return tree def _export_region(reg, parent, tag=None): """ @return: None (if parent is None), or an xml tree @rtype: None or xml.etree.ElementTree.Element or xml.etree.ElementTree.SubElement """ if tag is None: tag = "region" if parent is None: tree = ET.Element(tag, type=T_REGION) else: tree = ET.SubElement(parent, tag, type=T_REGION) # Attach list of polytopes _export_list(reg.list_poly, tree, N_POLYLIST) # Attach optional parts of region: # Bounding box, two numpy arrays if reg.bbox is not None: bbox_node = ET.SubElement(tree, N_BBOX) _export_xml(reg.bbox[0], bbox_node, N_LOWERBOUND) _export_xml(reg.bbox[1], bbox_node, N_UPPERBOUND) # Dimension (integer) if reg.dim: _export_xml(reg.dim, tree, N_DIMENSION) # Fulldim (bool) if reg.fulldim is not None: _export_xml(reg.fulldim, tree, N_FULLDIM) # Volume (float) if reg.volume is not None: _export_xml(reg.volume, tree, N_VOLUME) # Chebyshev radius (float) if reg.chebR is not None: _export_xml(reg.chebR, tree, N_CHEBR) # Chebyshev center (array) if reg.chebXc is not None: _export_xml(reg.chebXc, tree, N_CHEBXC) # Propositions that hold in region (set of strings) if reg.props: _export_xml(reg.props, tree, N_PROPS) if parent is None: return tree def _export_adj(matrix, parent, tag=None): """Converts an adjacency matrix (scipy.sparse.lil.lil_matrix) into an xml tree. @param matrix: Sparce adjacency matrix. @type matrix: scipy.sparse.lil.lil_matrix @type parent: None or xml.etree.ElementTree.Element or xml.etree.ElementTree.SubElement @type tag: string @return: None (if parent is None), or an xml tree @rtype: None or xml.etree.ElementTree.Element or xml.etree.ElementTree.SubElement """ if tag is None: tag = "adj" if parent is None: tree = ET.Element(tag, type=T_ADJ) else: tree = ET.SubElement(parent, tag, type=T_ADJ) # number of states, because the matrix must be square (M,N) = matrix.shape _export_xml(N, tree, "num_states") # list of nonzero indices (row_indices, col_indices) = matrix.nonzero() indices = [] for i, row_ind in enumerate(row_indices): col_ind = col_indices[i] indices.append((row_ind, col_ind)) _export_list(indices, tree, "index_list") if parent is None: return tree def _export_dict(dictionary, parent, tag=None): """ Converts a dictionary into an XML tree. The key and value can be any supported type because the function calls _export_xml() on the key and value to form the document tree. @type dictionary: dict @type parent: None or xml.etree.ElementTree.Element or xml.etree.ElementTree.SubElement @type tag: string @return: An XML tree if parent is None. Otherwise, modifies the tree parent is contained in without returning. @rtype: xml.etree.ElementTree.Element or None """ if tag is None: tag = "dict" if parent is None: tree = ET.Element(tag, type=T_DICT) else: tree = ET.SubElement(parent, tag, type=T_DICT) # Make key value pairs for key, value in dictionary.items(): pair_node = ET.SubElement(tree, N_KEYVALUEPAIR) _export_xml(key, parent=pair_node, tag=N_KEY) _export_xml(value, parent=pair_node, tag=N_VALUE) if parent is None: return tree def _export_list(lst, parent, tag=None, type_str=T_LIST, tag_list=[]): # Tag list is either a list of labels or a list of lists if tag is None: tag = "list" if parent is None: tree = ET.Element(tag, type=type_str) else: tree = ET.SubElement(parent, tag, type=type_str) if (tag_list and (len(tag_list) != len(lst))): raise ValueError('len(tag_list) != len(lst).') elif not tag_list: tag_list = [ N_ITEM for item in lst ] for ind, item in enumerate(lst): _export_xml(item, parent=tree, tag=tag_list[ind]) if parent is None: return tree # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== from __future__ import absolute_import from __future__ import division from __future__ import print_function # TODO(josh11b): Forked from contrib/eager/python to test OptimizerV2 the same way # OptimizerV1 is tested. This file should be removed once the fork is resolved. import functools import os import six from tensorflow.contrib.optimizer_v2 import adam from tensorflow.python.client import session as session_lib from tensorflow.python.eager import backprop from tensorflow.python.eager import context from tensorflow.python.eager import function from tensorflow.python.eager import test from tensorflow.python.framework import constant_op from tensorflow.python.framework import ops from tensorflow.python.framework import test_util from tensorflow.python.keras.engine import training from tensorflow.python.keras.layers import core from tensorflow.python.ops import control_flow_ops from tensorflow.python.ops import init_ops from tensorflow.python.ops import resource_variable_ops from tensorflow.python.ops import state_ops from tensorflow.python.ops import template from tensorflow.python.ops import variable_scope from tensorflow.python.training import saver as core_saver from tensorflow.python.training import training_util from tensorflow.python.training.checkpointable import tracking from tensorflow.python.training.checkpointable import util class NonLayerCheckpointable(tracking.Checkpointable): def __init__(self): super(NonLayerCheckpointable, self).__init__() self.a_variable = util.add_variable( self, name="a_variable", shape=[]) # pylint: disable=not-callable class MyModel(training.Model): """A concrete Model for testing.""" def __init__(self): super(MyModel, self).__init__() self._named_dense = core.Dense(1, use_bias=True) self._second = core.Dense(1, use_bias=False) # We can still track Checkpointables which aren't Layers. self._non_layer = NonLayerCheckpointable() def call(self, values): ret = self._second(self._named_dense(values)) return ret class _MirroringSaveable( core_saver.BaseSaverBuilder.ResourceVariableSaveable): def __init__(self, primary_variable, mirrored_variable, name): self._primary_variable = primary_variable self._mirrored_variable = mirrored_variable super(_MirroringSaveable, self).__init__( self._primary_variable, "", name) def restore(self, restored_tensors, restored_shapes): """Restore the same value into both variables.""" tensor, = restored_tensors return control_flow_ops.group( self._primary_variable.assign(tensor), self._mirrored_variable.assign(tensor)) class CheckpointingTests(test.TestCase): @test_util.run_in_graph_and_eager_modes(assert_no_eager_garbage=True) def testNamingWithOptimizer(self): input_value = constant_op.constant([[3.]]) model = MyModel() # A nuisance Model using the same optimizer. Its slot variables should not # go in the checkpoint, since it is never depended on. other_model = MyModel() optimizer = adam.AdamOptimizer(0.001) optimizer_step = training_util.get_or_create_global_step() root_checkpointable = util.Checkpoint( optimizer=optimizer, model=model, optimizer_step=optimizer_step) if context.executing_eagerly(): optimizer.minimize( lambda: model(input_value), global_step=optimizer_step) optimizer.minimize( lambda: other_model(input_value), global_step=optimizer_step) else: train_op = optimizer.minimize( model(input_value), global_step=optimizer_step) optimizer.minimize( other_model(input_value), global_step=optimizer_step) self.evaluate(util.gather_initializers( root_checkpointable)) self.evaluate(train_op) named_variables, serialized_graph, _ = ( util._serialize_object_graph( root_checkpointable, saveables_cache=None)) expected_checkpoint_names = ( # Created in the root node, so no prefix. "optimizer_step", "model/_second/kernel", "model/_named_dense/kernel", "model/_named_dense/bias", # non-Layer dependency of the model "model/_non_layer/a_variable", # The optimizer creates two non-slot variables "optimizer/beta1_power", "optimizer/beta2_power", # Slot variables "model/_second/kernel/.OPTIMIZER_SLOT/optimizer/m", "model/_second/kernel/.OPTIMIZER_SLOT/optimizer/v", "model/_named_dense/kernel/.OPTIMIZER_SLOT/optimizer/m", "model/_named_dense/kernel/.OPTIMIZER_SLOT/optimizer/v", "model/_named_dense/bias/.OPTIMIZER_SLOT/optimizer/m", "model/_named_dense/bias/.OPTIMIZER_SLOT/optimizer/v", ) suffix = "/.ATTRIBUTES/VARIABLE_VALUE" expected_checkpoint_names = [ name + suffix for name in expected_checkpoint_names] # The Dense layers also save get_config() JSON expected_checkpoint_names.extend( ["model/_second/.ATTRIBUTES/OBJECT_CONFIG_JSON", "model/_named_dense/.ATTRIBUTES/OBJECT_CONFIG_JSON"]) named_variables = {v.name: v for v in named_variables} six.assertCountEqual(self, expected_checkpoint_names, named_variables.keys()) # Check that we've mapped to the right variable objects (not exhaustive) self.assertEqual( "global_step", named_variables["optimizer_step" + suffix].full_name) self.assertEqual( "my_model/dense_1/kernel", named_variables["model/_second/kernel" + suffix].full_name) self.assertEqual( "my_model/dense/kernel", named_variables["model/_named_dense/kernel" + suffix].full_name) self.assertEqual( "beta1_power", named_variables["optimizer/beta1_power" + suffix].full_name) self.assertEqual( "beta2_power", named_variables["optimizer/beta2_power" + suffix].full_name) # Spot check the generated protocol buffers. self.assertEqual("optimizer", serialized_graph.nodes[0].children[1].local_name) optimizer_node = serialized_graph.nodes[serialized_graph.nodes[0].children[ 1].node_id] self.assertEqual("beta1_power", optimizer_node.children[0].local_name) self.assertEqual("beta1_power", serialized_graph.nodes[optimizer_node.children[0].node_id] .attributes[0].full_name) self.assertEqual( "my_model/dense/kernel", serialized_graph.nodes[optimizer_node.slot_variables[0] .original_variable_node_id] .attributes[0].full_name) # We strip off the :0 suffix, as variable.name-based saving does. self.assertEqual( "my_model/dense/kernel/Adam", serialized_graph.nodes[optimizer_node.slot_variables[0] .slot_variable_node_id] .attributes[0].full_name) self.assertEqual( "my_model/dense/kernel/Adam:0", optimizer.get_slot( var=model._named_dense.kernel, name="m").name) self.assertEqual( "model/_named_dense/kernel" + suffix, serialized_graph.nodes[ optimizer_node.slot_variables[0] .original_variable_node_id].attributes[0].checkpoint_key) self.assertEqual("m", optimizer_node.slot_variables[0].slot_name) self.assertEqual( "model/_named_dense/kernel/.OPTIMIZER_SLOT/optimizer/m" + suffix, serialized_graph.nodes[ optimizer_node.slot_variables[0] .slot_variable_node_id].attributes[0].checkpoint_key) @test_util.run_in_graph_and_eager_modes def testSaveRestore(self): model = MyModel() optimizer = adam.AdamOptimizer(0.001) root_checkpointable = util.Checkpoint( optimizer=optimizer, model=model) input_value = constant_op.constant([[3.]]) if context.executing_eagerly(): optimizer.minimize( lambda: model(input_value)) else: train_op = optimizer.minimize(model(input_value)) # TODO(allenl): Make initialization more pleasant when graph building. root_checkpointable.save_counter # pylint: disable=pointless-statement self.evaluate(util.gather_initializers( root_checkpointable)) self.evaluate(train_op) prefix = os.path.join(self.get_temp_dir(), "ckpt") self.evaluate(state_ops.assign(model._named_dense.variables[1], [42.])) m_bias_slot = optimizer.get_slot(model._named_dense.variables[1], "m") self.evaluate(state_ops.assign(m_bias_slot, [1.5])) save_path = root_checkpointable.save(file_prefix=prefix) self.evaluate(state_ops.assign(model._named_dense.variables[1], [43.])) self.evaluate(state_ops.assign(root_checkpointable.save_counter, 3)) optimizer_variables = self.evaluate(optimizer.variables()) self.evaluate(state_ops.assign(m_bias_slot, [-2.])) # Immediate restoration status = root_checkpointable.restore(save_path=save_path).assert_consumed() status.run_restore_ops() self.assertAllEqual([42.], self.evaluate(model._named_dense.variables[1])) self.assertAllEqual(1, self.evaluate(root_checkpointable.save_counter)) self.assertAllEqual([1.5], self.evaluate(m_bias_slot)) if not context.executing_eagerly(): return # Restore-on-create is only supported when executing eagerly on_create_model = MyModel() on_create_optimizer = adam.AdamOptimizer( 0.001, # Preserve beta1_power and beta2_power when appying gradients so we can # test that they've been restored correctly. beta1=1.0, beta2=1.0) on_create_root = util.Checkpoint( optimizer=on_create_optimizer, model=on_create_model) # Deferred restoration status = on_create_root.restore(save_path=save_path) on_create_model(constant_op.constant([[3.]])) # create variables self.assertAllEqual(1, self.evaluate(on_create_root.save_counter)) self.assertAllEqual([42.], self.evaluate( on_create_model._named_dense.variables[1])) on_create_m_bias_slot = on_create_optimizer.get_slot( on_create_model._named_dense.variables[1], "m") # Optimizer slot variables are created when the original variable is # restored. self.assertAllEqual([1.5], self.evaluate(on_create_m_bias_slot)) self.assertAllEqual(optimizer_variables[2:], self.evaluate(on_create_optimizer.variables())) dummy_var = resource_variable_ops.ResourceVariable([1.]) on_create_optimizer.minimize(loss=dummy_var.read_value) status.assert_consumed() beta1_power, beta2_power = on_create_optimizer._get_beta_accumulators() self.assertAllEqual(optimizer_variables[0], self.evaluate(beta1_power)) self.assertAllEqual(optimizer_variables[1], self.evaluate(beta2_power)) # TODO(allenl): Debug garbage created by this test in python3. def testDeferredRestorationUsageEager(self): """An idiomatic eager execution example.""" num_training_steps = 10 checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") for training_continuation in range(3): model = MyModel() optimizer = adam.AdamOptimizer(0.001) root = util.Checkpoint( optimizer=optimizer, model=model, optimizer_step=training_util.get_or_create_global_step()) root.restore(core_saver.latest_checkpoint(checkpoint_directory)) for _ in range(num_training_steps): # TODO(allenl): Use a Dataset and serialize/checkpoint it. input_value = constant_op.constant([[3.]]) optimizer.minimize( lambda: model(input_value), # pylint: disable=cell-var-from-loop global_step=root.optimizer_step) root.save(file_prefix=checkpoint_prefix) self.assertEqual((training_continuation + 1) * num_training_steps, root.optimizer_step.numpy()) def testUsageGraph(self): """Expected usage when graph building.""" with context.graph_mode(): num_training_steps = 10 checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") for training_continuation in range(3): with ops.Graph().as_default(): model = MyModel() optimizer = adam.AdamOptimizer(0.001) root = util.Checkpoint( optimizer=optimizer, model=model, global_step=training_util.get_or_create_global_step()) input_value = constant_op.constant([[3.]]) train_op = optimizer.minimize( model(input_value), global_step=root.global_step) checkpoint_path = core_saver.latest_checkpoint(checkpoint_directory) with self.test_session(graph=ops.get_default_graph()) as session: status = root.restore(save_path=checkpoint_path) status.initialize_or_restore(session=session) if checkpoint_path is None: self.assertEqual(0, training_continuation) with self.assertRaises(AssertionError): status.assert_consumed() else: status.assert_consumed() for _ in range(num_training_steps): session.run(train_op) root.save(file_prefix=checkpoint_prefix, session=session) self.assertEqual((training_continuation + 1) * num_training_steps, session.run(root.global_step)) self.assertEqual(training_continuation + 1, session.run(root.save_counter)) @test_util.run_in_graph_and_eager_modes def testAgnosticUsage(self): """Graph/eager agnostic usage.""" # Does create garbage when executing eagerly due to ops.Graph() creation. num_training_steps = 10 checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") for training_continuation in range(3): with ops.Graph().as_default(), self.test_session( graph=ops.get_default_graph()), test_util.device(use_gpu=True): model = MyModel() optimizer = adam.AdamOptimizer(0.001) root = util.Checkpoint( optimizer=optimizer, model=model, global_step=training_util.get_or_create_global_step()) checkpoint_path = core_saver.latest_checkpoint(checkpoint_directory) status = root.restore(save_path=checkpoint_path) input_value = constant_op.constant([[3.]]) train_fn = functools.partial( optimizer.minimize, functools.partial(model, input_value), global_step=root.global_step) if not context.executing_eagerly(): train_fn = functools.partial(self.evaluate, train_fn()) status.initialize_or_restore() for _ in range(num_training_steps): train_fn() root.save(file_prefix=checkpoint_prefix) self.assertEqual((training_continuation + 1) * num_training_steps, self.evaluate(root.global_step)) self.assertEqual(training_continuation + 1, self.evaluate(root.save_counter)) # pylint: disable=cell-var-from-loop @test_util.run_in_graph_and_eager_modes def testWithDefun(self): num_training_steps = 2 checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") for training_continuation in range(3): with ops.Graph().as_default(), self.test_session( graph=ops.get_default_graph()), test_util.device(use_gpu=True): model = MyModel() # Don't actually train so we can test variable values optimizer = adam.AdamOptimizer(0.) root = util.Checkpoint( optimizer=optimizer, model=model, global_step=training_util.get_or_create_global_step()) checkpoint_path = core_saver.latest_checkpoint(checkpoint_directory) status = root.restore(save_path=checkpoint_path) def train_fn(): @function.defun def _call_model(x): return model(x) with backprop.GradientTape() as tape: loss = _call_model(constant_op.constant([[3.]])) gradients = tape.gradient(loss, model.variables) return optimizer.apply_gradients(zip(gradients, model.variables), global_step=root.global_step) if not context.executing_eagerly(): train_fn = functools.partial( self.evaluate, train_fn()) status.initialize_or_restore() for _ in range(num_training_steps): train_fn() if training_continuation > 0: status.assert_consumed() self.assertAllClose([[42.]], self.evaluate(model.variables[0])) else: self.evaluate(model.variables[0].assign([[42.]])) root.save(file_prefix=checkpoint_prefix) self.assertEqual((training_continuation + 1) * num_training_steps, self.evaluate(root.global_step)) self.assertEqual(training_continuation + 1, self.evaluate(root.save_counter)) # pylint: enable=cell-var-from-loop def testAnonymousVarsInInit(self): class Model(training.Model): def __init__(self): super(Model, self).__init__() self.w = resource_variable_ops.ResourceVariable(0.0) self.b = resource_variable_ops.ResourceVariable(0.0) self.vars = [self.w, self.b] def call(self, x): return x * self.w + self.b with context.eager_mode(): model = Model() optimizer = adam.AdamOptimizer(learning_rate=0.05) checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") checkpoint = util.Checkpoint( model=model, optimizer=optimizer) for _ in range(2): checkpoint.save(checkpoint_prefix) with backprop.GradientTape() as tape: loss = (constant_op.constant(1.) - model(constant_op.constant(1.))) ** 2 grad = tape.gradient(loss, model.vars) optimizer.apply_gradients( [(g, v) for g, v in zip(grad, model.vars)]) @test_util.run_in_graph_and_eager_modes def testDeferredSlotRestoration(self): checkpoint_directory = self.get_temp_dir() root = tracking.Checkpointable() root.var = util.add_variable( root, name="var", initializer=0.) optimizer = adam.AdamOptimizer(0.1) if context.executing_eagerly(): optimizer.minimize(root.var.read_value) else: train_op = optimizer.minimize(root.var) # Note that `optimizer` has not been added as a dependency of # `root`. Create a one-off grouping so that slot variables for `root.var` # get initialized too. self.evaluate(util.gather_initializers( util.Checkpoint(root=root, optimizer=optimizer))) self.evaluate(train_op) self.evaluate(state_ops.assign(root.var, 12.)) no_slots_path = util.CheckpointableSaver(root).save( os.path.join(checkpoint_directory, "no_slots")) root.optimizer = optimizer self.evaluate(state_ops.assign(root.var, 13.)) self.evaluate(state_ops.assign(optimizer.get_slot(name="m", var=root.var), 14.)) slots_path = util.CheckpointableSaver(root).save( os.path.join(checkpoint_directory, "with_slots")) new_root = tracking.Checkpointable() # Load the slot-containing checkpoint (deferred), then immediately overwrite # the non-slot variable (also deferred). slot_status = util.CheckpointableSaver( new_root).restore(slots_path) no_slot_status = util.CheckpointableSaver( new_root).restore(no_slots_path) with self.assertRaises(AssertionError): no_slot_status.assert_consumed() new_root.var = util.add_variable( new_root, name="var", shape=[]) no_slot_status.assert_consumed() no_slot_status.run_restore_ops() self.assertEqual(12., self.evaluate(new_root.var)) new_root.optimizer = adam.AdamOptimizer(0.1) with self.assertRaisesRegexp(AssertionError, "beta1_power"): slot_status.assert_consumed() self.assertEqual(12., self.evaluate(new_root.var)) if context.executing_eagerly(): # Slot variables are only created with restoring initializers when # executing eagerly. self.assertEqual(14., self.evaluate( new_root.optimizer.get_slot(name="m", var=new_root.var))) else: self.assertIs(new_root.optimizer.get_slot(name="m", var=new_root.var), None) if context.executing_eagerly(): new_root.optimizer.minimize(new_root.var.read_value) else: train_op = new_root.optimizer.minimize(new_root.var) # The slot variable now exists; restore() didn't create it, but we should # now have a restore op for it. slot_status.run_restore_ops() self.assertEqual(14., self.evaluate( new_root.optimizer.get_slot(name="m", var=new_root.var))) self.evaluate(train_op) slot_status.assert_consumed() def testManySavesGraph(self): """Saves after the first should not modify the graph.""" with context.graph_mode(): graph = ops.Graph() with graph.as_default(), self.test_session(graph): checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") obj = tracking.Checkpointable() obj.var = variable_scope.get_variable(name="v", initializer=0.) obj.opt = adam.AdamOptimizer(0.1) obj.opt.minimize(obj.var.read_value()) self.evaluate(util.gather_initializers(obj)) saver = util.CheckpointableSaver(obj) saver.save(checkpoint_prefix) before_ops = graph.get_operations() saver.save(checkpoint_prefix) self.assertEqual(before_ops, graph.get_operations()) def testManyRestoresGraph(self): """Restores after the first should not modify the graph.""" with context.graph_mode(): graph = ops.Graph() with graph.as_default(), self.test_session(graph): checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") obj = tracking.Checkpointable() obj.var = variable_scope.get_variable(name="v", initializer=0.) obj.opt = adam.AdamOptimizer(0.1) obj.opt.minimize(obj.var.read_value()) self.evaluate(util.gather_initializers(obj)) saver = util.CheckpointableSaver(obj) save_path = saver.save(checkpoint_prefix) saver.restore(save_path) before_ops = graph.get_operations() saver.restore(save_path) self.assertEqual(before_ops, graph.get_operations()) def testMultipleGraphsNonSlotVariables(self): with context.graph_mode(): checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") optimizer = adam.AdamOptimizer(0.001) # Construct a model in one graph first_graph = ops.Graph() first_session = session_lib.Session(graph=first_graph) with first_graph.as_default(), first_session.as_default(): first_variable = resource_variable_ops.ResourceVariable([1.]) first_root_checkpointable = util.Checkpoint( optimizer=optimizer, variable=first_variable) train_op = optimizer.minimize(first_variable.read_value) self.evaluate(util.gather_initializers( first_root_checkpointable)) self.evaluate(train_op) self.evaluate(first_variable.assign([1.])) self.evaluate(optimizer.get_slot( var=first_variable, name="m").assign([2.])) beta1_power, _ = optimizer._get_beta_accumulators() self.evaluate(beta1_power.assign(3.)) # Save and load in a second graph second_graph = ops.Graph() with second_graph.as_default(), session_lib.Session(graph=second_graph): second_variable = resource_variable_ops.ResourceVariable([1.]) second_root_checkpointable = util.Checkpoint( optimizer=optimizer, variable=second_variable) train_op = optimizer.minimize(second_variable.read_value) second_root_checkpointable.restore(None).initialize_or_restore() self.evaluate(train_op) self.evaluate(second_variable.assign([4.])) self.evaluate(optimizer.get_slot( var=second_variable, name="m").assign([5.])) beta1_power, _ = optimizer._get_beta_accumulators() self.evaluate(beta1_power.assign(6.)) save_path = second_root_checkpointable.save(checkpoint_prefix) self.evaluate(second_variable.assign([7.])) self.evaluate(optimizer.get_slot( var=second_variable, name="m").assign([8.])) beta1_power, _ = optimizer._get_beta_accumulators() self.assertAllEqual(6., self.evaluate(beta1_power)) status = second_root_checkpointable.restore(save_path) status.assert_consumed().run_restore_ops() self.assertAllEqual([4.], self.evaluate(second_variable)) self.assertAllEqual([5.], self.evaluate(optimizer.get_slot( var=second_variable, name="m"))) beta1_power, _ = optimizer._get_beta_accumulators() self.assertAllEqual(6., self.evaluate(beta1_power)) # Check that the first graph is unmolested with first_graph.as_default(), first_session.as_default(): self.assertAllEqual([1.], self.evaluate(first_variable)) self.assertAllEqual([2.], self.evaluate(optimizer.get_slot( var=first_variable, name="m"))) beta1_power, _ = optimizer._get_beta_accumulators() self.assertAllEqual(3., self.evaluate(beta1_power)) class TemplateTests(test.TestCase): @test_util.run_in_graph_and_eager_modes def test_checkpointable_save_restore(self): def _templated(): v = variable_scope.get_variable( "v", shape=[1], initializer=init_ops.zeros_initializer(), use_resource=True) v2 = variable_scope.get_variable( "v2", shape=[1], initializer=init_ops.zeros_initializer(), use_resource=True) return v, v + 1., v2 save_template = template.make_template("s1", _templated) v1_save, _, v2_save = save_template() optimizer = adam.AdamOptimizer(0.0) save_root = util.Checkpoint( my_template=save_template, optimizer=optimizer) optimizer.minimize(v1_save.read_value) self.evaluate([v.initializer for v in optimizer.variables()]) self.evaluate(v1_save.assign([12.])) self.evaluate(v2_save.assign([14.])) checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") save_path = save_root.save(checkpoint_prefix) load_template = template.make_template("s2", _templated) load_optimizer = adam.AdamOptimizer(0.0) load_root = util.Checkpoint( my_template=load_template, optimizer=load_optimizer) status = load_root.restore(save_path) var, var_plus_one, var2 = load_template() load_optimizer.minimize(var.read_value) self.assertEqual(2, len(load_template._checkpoint_dependencies)) self.assertEqual("v", load_template._checkpoint_dependencies[0].name) self.assertEqual("v2", load_template._checkpoint_dependencies[1].name) status.assert_consumed().run_restore_ops() self.assertAllEqual([12.], self.evaluate(var)) self.assertAllEqual([13.], self.evaluate(var_plus_one)) self.assertAllEqual([14.], self.evaluate(var2)) class CheckpointCompatibilityTests(test.TestCase): def _initialized_model(self): input_value = constant_op.constant([[3.]]) model = MyModel() optimizer = adam.AdamOptimizer(0.001) optimizer_step = training_util.get_or_create_global_step() root_checkpointable = util.Checkpoint( optimizer=optimizer, model=model, optimizer_step=optimizer_step) train_op = optimizer.minimize( functools.partial(model, input_value), global_step=optimizer_step) self.evaluate(util.gather_initializers( root_checkpointable)) self.evaluate(train_op) # A regular variable, a slot variable, and a non-slot Optimizer variable # with known values to check when loading. self.evaluate(model._named_dense.bias.assign([1.])) self.evaluate(optimizer.get_slot( var=model._named_dense.bias, name="m").assign([2.])) beta1_power, _ = optimizer._get_beta_accumulators() self.evaluate(beta1_power.assign(3.)) return root_checkpointable def _set_sentinels(self, root_checkpointable): self.evaluate(root_checkpointable.model._named_dense.bias.assign([101.])) self.evaluate( root_checkpointable.optimizer.get_slot( var=root_checkpointable.model._named_dense.bias, name="m") .assign([102.])) beta1_power, _ = root_checkpointable.optimizer._get_beta_accumulators() self.evaluate(beta1_power.assign(103.)) def _check_sentinels(self, root_checkpointable): self.assertAllEqual( [1.], self.evaluate(root_checkpointable.model._named_dense.bias)) self.assertAllEqual([2.], self.evaluate( root_checkpointable.optimizer.get_slot( var=root_checkpointable.model._named_dense.bias, name="m"))) beta1_power, _ = root_checkpointable.optimizer._get_beta_accumulators() self.assertAllEqual(3., self.evaluate(beta1_power)) def _write_name_based_checkpoint(self): checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") with context.graph_mode(): save_graph = ops.Graph() with save_graph.as_default(), self.test_session( graph=save_graph) as session: root = self._initialized_model() name_saver = core_saver.Saver() return name_saver.save( sess=session, save_path=checkpoint_prefix, global_step=root.optimizer_step) @test_util.run_in_graph_and_eager_modes def testLoadFromNameBasedSaver(self): """Save a name-based checkpoint, load it using the object-based API.""" with test_util.device(use_gpu=True): save_path = self._write_name_based_checkpoint() root = self._initialized_model() self._set_sentinels(root) with self.assertRaises(AssertionError): self._check_sentinels(root) object_saver = util.CheckpointableSaver(root) self._set_sentinels(root) status = object_saver.restore(save_path) if context.executing_eagerly(): self._check_sentinels(root) if context.executing_eagerly(): with self.assertRaisesRegexp(AssertionError, "OBJECT_CONFIG_JSON"): status.assert_consumed() else: # When graph building, we haven't read any keys, so we don't know # whether the restore will be complete. with self.assertRaisesRegexp(AssertionError, "not restored"): status.assert_consumed() status.run_restore_ops() self._check_sentinels(root) self._set_sentinels(root) status = object_saver.restore(save_path) status.initialize_or_restore() self._check_sentinels(root) # TODO(allenl): Test for the core name-based saver loading object-based # checkpoints once object-based checkpointing is in core. def testSaveGraphLoadEager(self): checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") with context.graph_mode(): save_graph = ops.Graph() with save_graph.as_default(), self.test_session( graph=save_graph) as session: root = self._initialized_model() save_path = root.save( session=session, file_prefix=checkpoint_prefix) with context.eager_mode(): root = self._initialized_model() self._set_sentinels(root) root.restore(save_path).assert_consumed() self._check_sentinels(root) def testSaveEagerLoadGraph(self): checkpoint_directory = self.get_temp_dir() checkpoint_prefix = os.path.join(checkpoint_directory, "ckpt") with context.eager_mode(): root = self._initialized_model() save_path = root.save(file_prefix=checkpoint_prefix) with context.graph_mode(): save_graph = ops.Graph() with save_graph.as_default(), self.test_session( graph=save_graph): root = self._initialized_model() self._set_sentinels(root) root.restore(save_path).assert_consumed().run_restore_ops() self._check_sentinels(root) if __name__ == "__main__": test.main() from __future__ import print_function import numpy as np import cv2 import math import json import sys import phash import operator import signal import base64 from debugger import MTG_Debugger from mtgexception import MTGException from transformer import MTG_Transformer """Scanner module This module is responsible for handling user input and reading the data from the camera to pass off to other modules. """ class MTG_Scanner: """Attributes: running (bool): Is the scanning loop running frame (image): The active frame bApplyTransforms (bool): Should transforms be applied bVertFlip (bool): Should the frame be flipped vertically? threshold (int): Hamming distance threshold detected_card (image): The image of the proposed card detected_id (int): The MultiverseID of the proposed card previous_id (int): The MultiverseID of the last card entered blacklist (array): Array of MultiverseIDs to exclude from detection referencedb (MTG_Reference_DB): The reference database object storagedb (MTG_Storage_DB): The storage database object debugger (MTG_Debugger): The debugging object transformer (MTG_Transformer): The transformer object captureDevice (cv2.VideoCapture): The camera to capture from """ def __init__(self, source, referencedb, storagedb, debug): self.running = False self.frame = None self.bApplyTransforms = False self.bVertFlip = False self.threshold = 15 self.detected_card = None self.detected_id = None self.previous_id = None self.blacklist = [] self.referencedb = referencedb self.storagedb = storagedb self.debugger = MTG_Debugger(debug) self.transformer = MTG_Transformer(self.debugger) self.captureDevice = cv2.VideoCapture(source) def run(self): """Main execution """ self.running = True while(self.running): if (self.detected_card is None): self.debugger.reset() __, frame = self.captureDevice.read() if (frame is None): print('Error: No frame read from camera') break if (self.bApplyTransforms): try: frame = self.transformer.applyTransforms(frame) except MTGException as msg: self.bApplyTransforms = False else: height, width, __ = frame.shape cv2.rectangle( frame, (0, 0), (width - 1, height - 1), (255, 0, 0), 2) if (self.bVertFlip): height, width, __ = frame.shape M = cv2.getRotationMatrix2D( (width / 2, height / 2), 180, 1) frame = cv2.warpAffine(frame, M, (width, height)) self.frame = frame