diff --git "a/codeparrot-valid_1038.txt" "b/codeparrot-valid_1038.txt" new file mode 100644--- /dev/null +++ "b/codeparrot-valid_1038.txt" @@ -0,0 +1,10000 @@ + ## ipv4-header.h (module 'internet'): uint16_t ns3::Ipv4Header::GetFragmentOffset() const [member function] + cls.add_method('GetFragmentOffset', + 'uint16_t', + [], + is_const=True) + ## ipv4-header.h (module 'internet'): uint16_t ns3::Ipv4Header::GetIdentification() const [member function] + cls.add_method('GetIdentification', + 'uint16_t', + [], + is_const=True) + ## ipv4-header.h (module 'internet'): ns3::TypeId ns3::Ipv4Header::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## ipv4-header.h (module 'internet'): uint16_t ns3::Ipv4Header::GetPayloadSize() const [member function] + cls.add_method('GetPayloadSize', + 'uint16_t', + [], + is_const=True) + ## ipv4-header.h (module 'internet'): uint8_t ns3::Ipv4Header::GetProtocol() const [member function] + cls.add_method('GetProtocol', + 'uint8_t', + [], + is_const=True) + ## ipv4-header.h (module 'internet'): uint32_t ns3::Ipv4Header::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## ipv4-header.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4Header::GetSource() const [member function] + cls.add_method('GetSource', + 'ns3::Ipv4Address', + [], + is_const=True) + ## ipv4-header.h (module 'internet'): uint8_t ns3::Ipv4Header::GetTos() const [member function] + cls.add_method('GetTos', + 'uint8_t', + [], + is_const=True) + ## ipv4-header.h (module 'internet'): uint8_t ns3::Ipv4Header::GetTtl() const [member function] + cls.add_method('GetTtl', + 'uint8_t', + [], + is_const=True) + ## ipv4-header.h (module 'internet'): static ns3::TypeId ns3::Ipv4Header::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-header.h (module 'internet'): bool ns3::Ipv4Header::IsChecksumOk() const [member function] + cls.add_method('IsChecksumOk', + 'bool', + [], + is_const=True) + ## ipv4-header.h (module 'internet'): bool ns3::Ipv4Header::IsDontFragment() const [member function] + cls.add_method('IsDontFragment', + 'bool', + [], + is_const=True) + ## ipv4-header.h (module 'internet'): bool ns3::Ipv4Header::IsLastFragment() const [member function] + cls.add_method('IsLastFragment', + 'bool', + [], + is_const=True) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetDestination(ns3::Ipv4Address destination) [member function] + cls.add_method('SetDestination', + 'void', + [param('ns3::Ipv4Address', 'destination')]) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetDontFragment() [member function] + cls.add_method('SetDontFragment', + 'void', + []) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetDscp(ns3::Ipv4Header::DscpType dscp) [member function] + cls.add_method('SetDscp', + 'void', + [param('ns3::Ipv4Header::DscpType', 'dscp')]) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetEcn(ns3::Ipv4Header::EcnType ecn) [member function] + cls.add_method('SetEcn', + 'void', + [param('ns3::Ipv4Header::EcnType', 'ecn')]) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetFragmentOffset(uint16_t offsetBytes) [member function] + cls.add_method('SetFragmentOffset', + 'void', + [param('uint16_t', 'offsetBytes')]) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetIdentification(uint16_t identification) [member function] + cls.add_method('SetIdentification', + 'void', + [param('uint16_t', 'identification')]) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetLastFragment() [member function] + cls.add_method('SetLastFragment', + 'void', + []) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetMayFragment() [member function] + cls.add_method('SetMayFragment', + 'void', + []) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetMoreFragments() [member function] + cls.add_method('SetMoreFragments', + 'void', + []) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetPayloadSize(uint16_t size) [member function] + cls.add_method('SetPayloadSize', + 'void', + [param('uint16_t', 'size')]) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetProtocol(uint8_t num) [member function] + cls.add_method('SetProtocol', + 'void', + [param('uint8_t', 'num')]) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetSource(ns3::Ipv4Address source) [member function] + cls.add_method('SetSource', + 'void', + [param('ns3::Ipv4Address', 'source')]) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetTos(uint8_t tos) [member function] + cls.add_method('SetTos', + 'void', + [param('uint8_t', 'tos')]) + ## ipv4-header.h (module 'internet'): void ns3::Ipv4Header::SetTtl(uint8_t ttl) [member function] + cls.add_method('SetTtl', + 'void', + [param('uint8_t', 'ttl')]) + return + +def register_Ns3Ipv6Header_methods(root_module, cls): + ## ipv6-header.h (module 'internet'): ns3::Ipv6Header::Ipv6Header(ns3::Ipv6Header const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6Header const &', 'arg0')]) + ## ipv6-header.h (module 'internet'): ns3::Ipv6Header::Ipv6Header() [constructor] + cls.add_constructor([]) + ## ipv6-header.h (module 'internet'): uint32_t ns3::Ipv6Header::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## ipv6-header.h (module 'internet'): ns3::Ipv6Address ns3::Ipv6Header::GetDestinationAddress() const [member function] + cls.add_method('GetDestinationAddress', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-header.h (module 'internet'): uint32_t ns3::Ipv6Header::GetFlowLabel() const [member function] + cls.add_method('GetFlowLabel', + 'uint32_t', + [], + is_const=True) + ## ipv6-header.h (module 'internet'): uint8_t ns3::Ipv6Header::GetHopLimit() const [member function] + cls.add_method('GetHopLimit', + 'uint8_t', + [], + is_const=True) + ## ipv6-header.h (module 'internet'): ns3::TypeId ns3::Ipv6Header::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## ipv6-header.h (module 'internet'): uint8_t ns3::Ipv6Header::GetNextHeader() const [member function] + cls.add_method('GetNextHeader', + 'uint8_t', + [], + is_const=True) + ## ipv6-header.h (module 'internet'): uint16_t ns3::Ipv6Header::GetPayloadLength() const [member function] + cls.add_method('GetPayloadLength', + 'uint16_t', + [], + is_const=True) + ## ipv6-header.h (module 'internet'): uint32_t ns3::Ipv6Header::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## ipv6-header.h (module 'internet'): ns3::Ipv6Address ns3::Ipv6Header::GetSourceAddress() const [member function] + cls.add_method('GetSourceAddress', + 'ns3::Ipv6Address', + [], + is_const=True) + ## ipv6-header.h (module 'internet'): uint8_t ns3::Ipv6Header::GetTrafficClass() const [member function] + cls.add_method('GetTrafficClass', + 'uint8_t', + [], + is_const=True) + ## ipv6-header.h (module 'internet'): static ns3::TypeId ns3::Ipv6Header::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv6-header.h (module 'internet'): void ns3::Ipv6Header::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## ipv6-header.h (module 'internet'): void ns3::Ipv6Header::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## ipv6-header.h (module 'internet'): void ns3::Ipv6Header::SetDestinationAddress(ns3::Ipv6Address dst) [member function] + cls.add_method('SetDestinationAddress', + 'void', + [param('ns3::Ipv6Address', 'dst')]) + ## ipv6-header.h (module 'internet'): void ns3::Ipv6Header::SetFlowLabel(uint32_t flow) [member function] + cls.add_method('SetFlowLabel', + 'void', + [param('uint32_t', 'flow')]) + ## ipv6-header.h (module 'internet'): void ns3::Ipv6Header::SetHopLimit(uint8_t limit) [member function] + cls.add_method('SetHopLimit', + 'void', + [param('uint8_t', 'limit')]) + ## ipv6-header.h (module 'internet'): void ns3::Ipv6Header::SetNextHeader(uint8_t next) [member function] + cls.add_method('SetNextHeader', + 'void', + [param('uint8_t', 'next')]) + ## ipv6-header.h (module 'internet'): void ns3::Ipv6Header::SetPayloadLength(uint16_t len) [member function] + cls.add_method('SetPayloadLength', + 'void', + [param('uint16_t', 'len')]) + ## ipv6-header.h (module 'internet'): void ns3::Ipv6Header::SetSourceAddress(ns3::Ipv6Address src) [member function] + cls.add_method('SetSourceAddress', + 'void', + [param('ns3::Ipv6Address', 'src')]) + ## ipv6-header.h (module 'internet'): void ns3::Ipv6Header::SetTrafficClass(uint8_t traffic) [member function] + cls.add_method('SetTrafficClass', + 'void', + [param('uint8_t', 'traffic')]) + return + +def register_Ns3Object_methods(root_module, cls): + ## object.h (module 'core'): ns3::Object::Object() [constructor] + cls.add_constructor([]) + ## object.h (module 'core'): void ns3::Object::AggregateObject(ns3::Ptr other) [member function] + cls.add_method('AggregateObject', + 'void', + [param('ns3::Ptr< ns3::Object >', 'other')]) + ## object.h (module 'core'): void ns3::Object::Dispose() [member function] + cls.add_method('Dispose', + 'void', + []) + ## object.h (module 'core'): ns3::Object::AggregateIterator ns3::Object::GetAggregateIterator() const [member function] + cls.add_method('GetAggregateIterator', + 'ns3::Object::AggregateIterator', + [], + is_const=True) + ## object.h (module 'core'): ns3::TypeId ns3::Object::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## object.h (module 'core'): static ns3::TypeId ns3::Object::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## object.h (module 'core'): void ns3::Object::Initialize() [member function] + cls.add_method('Initialize', + 'void', + []) + ## object.h (module 'core'): ns3::Object::Object(ns3::Object const & o) [copy constructor] + cls.add_constructor([param('ns3::Object const &', 'o')], + visibility='protected') + ## object.h (module 'core'): void ns3::Object::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + ## object.h (module 'core'): void ns3::Object::DoInitialize() [member function] + cls.add_method('DoInitialize', + 'void', + [], + visibility='protected', is_virtual=True) + ## object.h (module 'core'): void ns3::Object::NotifyNewAggregate() [member function] + cls.add_method('NotifyNewAggregate', + 'void', + [], + visibility='protected', is_virtual=True) + return + +def register_Ns3ObjectAggregateIterator_methods(root_module, cls): + ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator(ns3::Object::AggregateIterator const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Object::AggregateIterator const &', 'arg0')]) + ## object.h (module 'core'): ns3::Object::AggregateIterator::AggregateIterator() [constructor] + cls.add_constructor([]) + ## object.h (module 'core'): bool ns3::Object::AggregateIterator::HasNext() const [member function] + cls.add_method('HasNext', + 'bool', + [], + is_const=True) + ## object.h (module 'core'): ns3::Ptr ns3::Object::AggregateIterator::Next() [member function] + cls.add_method('Next', + 'ns3::Ptr< ns3::Object const >', + []) + return + +def register_Ns3RandomVariableStream_methods(root_module, cls): + ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::RandomVariableStream::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## random-variable-stream.h (module 'core'): ns3::RandomVariableStream::RandomVariableStream() [constructor] + cls.add_constructor([]) + ## random-variable-stream.h (module 'core'): void ns3::RandomVariableStream::SetStream(int64_t stream) [member function] + cls.add_method('SetStream', + 'void', + [param('int64_t', 'stream')]) + ## random-variable-stream.h (module 'core'): int64_t ns3::RandomVariableStream::GetStream() const [member function] + cls.add_method('GetStream', + 'int64_t', + [], + is_const=True) + ## random-variable-stream.h (module 'core'): void ns3::RandomVariableStream::SetAntithetic(bool isAntithetic) [member function] + cls.add_method('SetAntithetic', + 'void', + [param('bool', 'isAntithetic')]) + ## random-variable-stream.h (module 'core'): bool ns3::RandomVariableStream::IsAntithetic() const [member function] + cls.add_method('IsAntithetic', + 'bool', + [], + is_const=True) + ## random-variable-stream.h (module 'core'): double ns3::RandomVariableStream::GetValue() [member function] + cls.add_method('GetValue', + 'double', + [], + is_pure_virtual=True, is_virtual=True) + ## random-variable-stream.h (module 'core'): uint32_t ns3::RandomVariableStream::GetInteger() [member function] + cls.add_method('GetInteger', + 'uint32_t', + [], + is_pure_virtual=True, is_virtual=True) + ## random-variable-stream.h (module 'core'): ns3::RngStream * ns3::RandomVariableStream::Peek() const [member function] + cls.add_method('Peek', + 'ns3::RngStream *', + [], + is_const=True, visibility='protected') + return + +def register_Ns3SequentialRandomVariable_methods(root_module, cls): + ## random-variable-stream.h (module 'core'): static ns3::TypeId ns3::SequentialRandomVariable::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## random-variable-stream.h (module 'core'): ns3::SequentialRandomVariable::SequentialRandomVariable() [constructor] + cls.add_constructor([]) + ## random-variable-stream.h (module 'core'): double ns3::SequentialRandomVariable::GetMin() const [member function] + cls.add_method('GetMin', + 'double', + [], + is_const=True) + ## random-variable-stream.h (module 'core'): double ns3::SequentialRandomVariable::GetMax() const [member function] + cls.add_method('GetMax', + 'double', + [], + is_const=True) + ## random-variable-stream.h (module 'core'): ns3::Ptr ns3::SequentialRandomVariable::GetIncrement() const [member function] + cls.add_method('GetIncrement', + 'ns3::Ptr< ns3::RandomVariableStream >', + [], + is_const=True) + ## random-variable-stream.h (module 'core'): uint32_t ns3::SequentialRandomVariable::GetConsecutive() const [member function] + cls.add_method('GetConsecutive', + 'uint32_t', + [], + is_const=True) + ## random-variable-stream.h (module 'core'): double ns3::SequentialRandomVariable::GetValue() [member function] + cls.add_method('GetValue', + 'double', + [], + is_virtual=True) + ## random-variable-stream.h (module 'core'): uint32_t ns3::SequentialRandomVariable::GetInteger() [member function] + cls.add_method('GetInteger', + 'uint32_t', + [], + is_virtual=True) + return + +def register_Ns3SimpleRefCount__Ns3AttributeAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeAccessor__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeAccessor, ns3::empty, ns3::DefaultDeleter< ns3::AttributeAccessor > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + +def register_Ns3SimpleRefCount__Ns3AttributeChecker_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeChecker__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeChecker, ns3::empty, ns3::DefaultDeleter< ns3::AttributeChecker > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + +def register_Ns3SimpleRefCount__Ns3AttributeValue_Ns3Empty_Ns3DefaultDeleter__lt__ns3AttributeValue__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::AttributeValue, ns3::empty, ns3::DefaultDeleter< ns3::AttributeValue > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + +def register_Ns3SimpleRefCount__Ns3CallbackImplBase_Ns3Empty_Ns3DefaultDeleter__lt__ns3CallbackImplBase__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::CallbackImplBase, ns3::empty, ns3::DefaultDeleter< ns3::CallbackImplBase > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + +def register_Ns3SimpleRefCount__Ns3EventImpl_Ns3Empty_Ns3DefaultDeleter__lt__ns3EventImpl__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::EventImpl, ns3::empty, ns3::DefaultDeleter< ns3::EventImpl > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + +def register_Ns3SimpleRefCount__Ns3Ipv4MulticastRoute_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4MulticastRoute__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Ipv4MulticastRoute, ns3::empty, ns3::DefaultDeleter< ns3::Ipv4MulticastRoute > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + +def register_Ns3SimpleRefCount__Ns3Ipv4Route_Ns3Empty_Ns3DefaultDeleter__lt__ns3Ipv4Route__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Ipv4Route, ns3::empty, ns3::DefaultDeleter< ns3::Ipv4Route > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + +def register_Ns3SimpleRefCount__Ns3NixVector_Ns3Empty_Ns3DefaultDeleter__lt__ns3NixVector__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::NixVector, ns3::empty, ns3::DefaultDeleter< ns3::NixVector > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + +def register_Ns3SimpleRefCount__Ns3OutputStreamWrapper_Ns3Empty_Ns3DefaultDeleter__lt__ns3OutputStreamWrapper__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::OutputStreamWrapper, ns3::empty, ns3::DefaultDeleter< ns3::OutputStreamWrapper > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + +def register_Ns3SimpleRefCount__Ns3Packet_Ns3Empty_Ns3DefaultDeleter__lt__ns3Packet__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::Packet, ns3::empty, ns3::DefaultDeleter< ns3::Packet > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + +def register_Ns3SimpleRefCount__Ns3TraceSourceAccessor_Ns3Empty_Ns3DefaultDeleter__lt__ns3TraceSourceAccessor__gt___methods(root_module, cls): + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount() [constructor] + cls.add_constructor([]) + ## simple-ref-count.h (module 'core'): ns3::SimpleRefCount >::SimpleRefCount(ns3::SimpleRefCount > const & o) [copy constructor] + cls.add_constructor([param('ns3::SimpleRefCount< ns3::TraceSourceAccessor, ns3::empty, ns3::DefaultDeleter< ns3::TraceSourceAccessor > > const &', 'o')]) + ## simple-ref-count.h (module 'core'): static void ns3::SimpleRefCount >::Cleanup() [member function] + cls.add_method('Cleanup', + 'void', + [], + is_static=True) + return + +def register_Ns3Socket_methods(root_module, cls): + ## socket.h (module 'network'): ns3::Socket::Socket(ns3::Socket const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Socket const &', 'arg0')]) + ## socket.h (module 'network'): ns3::Socket::Socket() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): int ns3::Socket::Bind(ns3::Address const & address) [member function] + cls.add_method('Bind', + 'int', + [param('ns3::Address const &', 'address')], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): int ns3::Socket::Bind() [member function] + cls.add_method('Bind', + 'int', + [], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): int ns3::Socket::Bind6() [member function] + cls.add_method('Bind6', + 'int', + [], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::Socket::BindToNetDevice(ns3::Ptr netdevice) [member function] + cls.add_method('BindToNetDevice', + 'void', + [param('ns3::Ptr< ns3::NetDevice >', 'netdevice')], + is_virtual=True) + ## socket.h (module 'network'): int ns3::Socket::Close() [member function] + cls.add_method('Close', + 'int', + [], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): int ns3::Socket::Connect(ns3::Address const & address) [member function] + cls.add_method('Connect', + 'int', + [param('ns3::Address const &', 'address')], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): static ns3::Ptr ns3::Socket::CreateSocket(ns3::Ptr node, ns3::TypeId tid) [member function] + cls.add_method('CreateSocket', + 'ns3::Ptr< ns3::Socket >', + [param('ns3::Ptr< ns3::Node >', 'node'), param('ns3::TypeId', 'tid')], + is_static=True) + ## socket.h (module 'network'): bool ns3::Socket::GetAllowBroadcast() const [member function] + cls.add_method('GetAllowBroadcast', + 'bool', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h (module 'network'): ns3::Ptr ns3::Socket::GetBoundNetDevice() [member function] + cls.add_method('GetBoundNetDevice', + 'ns3::Ptr< ns3::NetDevice >', + []) + ## socket.h (module 'network'): ns3::Socket::SocketErrno ns3::Socket::GetErrno() const [member function] + cls.add_method('GetErrno', + 'ns3::Socket::SocketErrno', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTos() const [member function] + cls.add_method('GetIpTos', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpTtl() const [member function] + cls.add_method('GetIpTtl', + 'uint8_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6HopLimit() const [member function] + cls.add_method('GetIpv6HopLimit', + 'uint8_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::Socket::GetIpv6Tclass() const [member function] + cls.add_method('GetIpv6Tclass', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): ns3::Ptr ns3::Socket::GetNode() const [member function] + cls.add_method('GetNode', + 'ns3::Ptr< ns3::Node >', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::Socket::GetRxAvailable() const [member function] + cls.add_method('GetRxAvailable', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h (module 'network'): int ns3::Socket::GetSockName(ns3::Address & address) const [member function] + cls.add_method('GetSockName', + 'int', + [param('ns3::Address &', 'address')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h (module 'network'): ns3::Socket::SocketType ns3::Socket::GetSocketType() const [member function] + cls.add_method('GetSocketType', + 'ns3::Socket::SocketType', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::Socket::GetTxAvailable() const [member function] + cls.add_method('GetTxAvailable', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::Socket::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTos() const [member function] + cls.add_method('IsIpRecvTos', + 'bool', + [], + is_const=True) + ## socket.h (module 'network'): bool ns3::Socket::IsIpRecvTtl() const [member function] + cls.add_method('IsIpRecvTtl', + 'bool', + [], + is_const=True) + ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvHopLimit() const [member function] + cls.add_method('IsIpv6RecvHopLimit', + 'bool', + [], + is_const=True) + ## socket.h (module 'network'): bool ns3::Socket::IsIpv6RecvTclass() const [member function] + cls.add_method('IsIpv6RecvTclass', + 'bool', + [], + is_const=True) + ## socket.h (module 'network'): bool ns3::Socket::IsRecvPktInfo() const [member function] + cls.add_method('IsRecvPktInfo', + 'bool', + [], + is_const=True) + ## socket.h (module 'network'): int ns3::Socket::Listen() [member function] + cls.add_method('Listen', + 'int', + [], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): ns3::Ptr ns3::Socket::Recv(uint32_t maxSize, uint32_t flags) [member function] + cls.add_method('Recv', + 'ns3::Ptr< ns3::Packet >', + [param('uint32_t', 'maxSize'), param('uint32_t', 'flags')], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): ns3::Ptr ns3::Socket::Recv() [member function] + cls.add_method('Recv', + 'ns3::Ptr< ns3::Packet >', + []) + ## socket.h (module 'network'): int ns3::Socket::Recv(uint8_t * buf, uint32_t size, uint32_t flags) [member function] + cls.add_method('Recv', + 'int', + [param('uint8_t *', 'buf'), param('uint32_t', 'size'), param('uint32_t', 'flags')]) + ## socket.h (module 'network'): ns3::Ptr ns3::Socket::RecvFrom(uint32_t maxSize, uint32_t flags, ns3::Address & fromAddress) [member function] + cls.add_method('RecvFrom', + 'ns3::Ptr< ns3::Packet >', + [param('uint32_t', 'maxSize'), param('uint32_t', 'flags'), param('ns3::Address &', 'fromAddress')], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): ns3::Ptr ns3::Socket::RecvFrom(ns3::Address & fromAddress) [member function] + cls.add_method('RecvFrom', + 'ns3::Ptr< ns3::Packet >', + [param('ns3::Address &', 'fromAddress')]) + ## socket.h (module 'network'): int ns3::Socket::RecvFrom(uint8_t * buf, uint32_t size, uint32_t flags, ns3::Address & fromAddress) [member function] + cls.add_method('RecvFrom', + 'int', + [param('uint8_t *', 'buf'), param('uint32_t', 'size'), param('uint32_t', 'flags'), param('ns3::Address &', 'fromAddress')]) + ## socket.h (module 'network'): int ns3::Socket::Send(ns3::Ptr p, uint32_t flags) [member function] + cls.add_method('Send', + 'int', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint32_t', 'flags')], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): int ns3::Socket::Send(ns3::Ptr p) [member function] + cls.add_method('Send', + 'int', + [param('ns3::Ptr< ns3::Packet >', 'p')]) + ## socket.h (module 'network'): int ns3::Socket::Send(uint8_t const * buf, uint32_t size, uint32_t flags) [member function] + cls.add_method('Send', + 'int', + [param('uint8_t const *', 'buf'), param('uint32_t', 'size'), param('uint32_t', 'flags')]) + ## socket.h (module 'network'): int ns3::Socket::SendTo(ns3::Ptr p, uint32_t flags, ns3::Address const & toAddress) [member function] + cls.add_method('SendTo', + 'int', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('uint32_t', 'flags'), param('ns3::Address const &', 'toAddress')], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): int ns3::Socket::SendTo(uint8_t const * buf, uint32_t size, uint32_t flags, ns3::Address const & address) [member function] + cls.add_method('SendTo', + 'int', + [param('uint8_t const *', 'buf'), param('uint32_t', 'size'), param('uint32_t', 'flags'), param('ns3::Address const &', 'address')]) + ## socket.h (module 'network'): void ns3::Socket::SetAcceptCallback(ns3::Callback, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> connectionRequest, ns3::Callback, ns3::Address const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> newConnectionCreated) [member function] + cls.add_method('SetAcceptCallback', + 'void', + [param('ns3::Callback< bool, ns3::Ptr< ns3::Socket >, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'connectionRequest'), param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::Address const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'newConnectionCreated')]) + ## socket.h (module 'network'): bool ns3::Socket::SetAllowBroadcast(bool allowBroadcast) [member function] + cls.add_method('SetAllowBroadcast', + 'bool', + [param('bool', 'allowBroadcast')], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::Socket::SetCloseCallbacks(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> normalClose, ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> errorClose) [member function] + cls.add_method('SetCloseCallbacks', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'normalClose'), param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'errorClose')]) + ## socket.h (module 'network'): void ns3::Socket::SetConnectCallback(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> connectionSucceeded, ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> connectionFailed) [member function] + cls.add_method('SetConnectCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'connectionSucceeded'), param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'connectionFailed')]) + ## socket.h (module 'network'): void ns3::Socket::SetDataSentCallback(ns3::Callback, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> dataSent) [member function] + cls.add_method('SetDataSentCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'dataSent')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTos(bool ipv4RecvTos) [member function] + cls.add_method('SetIpRecvTos', + 'void', + [param('bool', 'ipv4RecvTos')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpRecvTtl(bool ipv4RecvTtl) [member function] + cls.add_method('SetIpRecvTtl', + 'void', + [param('bool', 'ipv4RecvTtl')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpTos(uint8_t ipTos) [member function] + cls.add_method('SetIpTos', + 'void', + [param('uint8_t', 'ipTos')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpTtl(uint8_t ipTtl) [member function] + cls.add_method('SetIpTtl', + 'void', + [param('uint8_t', 'ipTtl')], + is_virtual=True) + ## socket.h (module 'network'): void ns3::Socket::SetIpv6HopLimit(uint8_t ipHopLimit) [member function] + cls.add_method('SetIpv6HopLimit', + 'void', + [param('uint8_t', 'ipHopLimit')], + is_virtual=True) + ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvHopLimit(bool ipv6RecvHopLimit) [member function] + cls.add_method('SetIpv6RecvHopLimit', + 'void', + [param('bool', 'ipv6RecvHopLimit')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpv6RecvTclass(bool ipv6RecvTclass) [member function] + cls.add_method('SetIpv6RecvTclass', + 'void', + [param('bool', 'ipv6RecvTclass')]) + ## socket.h (module 'network'): void ns3::Socket::SetIpv6Tclass(int ipTclass) [member function] + cls.add_method('SetIpv6Tclass', + 'void', + [param('int', 'ipTclass')]) + ## socket.h (module 'network'): void ns3::Socket::SetRecvCallback(ns3::Callback, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> arg0) [member function] + cls.add_method('SetRecvCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'arg0')]) + ## socket.h (module 'network'): void ns3::Socket::SetRecvPktInfo(bool flag) [member function] + cls.add_method('SetRecvPktInfo', + 'void', + [param('bool', 'flag')]) + ## socket.h (module 'network'): void ns3::Socket::SetSendCallback(ns3::Callback, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> sendCb) [member function] + cls.add_method('SetSendCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Socket >, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'sendCb')]) + ## socket.h (module 'network'): int ns3::Socket::ShutdownRecv() [member function] + cls.add_method('ShutdownRecv', + 'int', + [], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): int ns3::Socket::ShutdownSend() [member function] + cls.add_method('ShutdownSend', + 'int', + [], + is_pure_virtual=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::Socket::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTos() const [member function] + cls.add_method('IsManualIpTos', + 'bool', + [], + is_const=True, visibility='protected') + ## socket.h (module 'network'): bool ns3::Socket::IsManualIpTtl() const [member function] + cls.add_method('IsManualIpTtl', + 'bool', + [], + is_const=True, visibility='protected') + ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6HopLimit() const [member function] + cls.add_method('IsManualIpv6HopLimit', + 'bool', + [], + is_const=True, visibility='protected') + ## socket.h (module 'network'): bool ns3::Socket::IsManualIpv6Tclass() const [member function] + cls.add_method('IsManualIpv6Tclass', + 'bool', + [], + is_const=True, visibility='protected') + ## socket.h (module 'network'): void ns3::Socket::NotifyConnectionFailed() [member function] + cls.add_method('NotifyConnectionFailed', + 'void', + [], + visibility='protected') + ## socket.h (module 'network'): bool ns3::Socket::NotifyConnectionRequest(ns3::Address const & from) [member function] + cls.add_method('NotifyConnectionRequest', + 'bool', + [param('ns3::Address const &', 'from')], + visibility='protected') + ## socket.h (module 'network'): void ns3::Socket::NotifyConnectionSucceeded() [member function] + cls.add_method('NotifyConnectionSucceeded', + 'void', + [], + visibility='protected') + ## socket.h (module 'network'): void ns3::Socket::NotifyDataRecv() [member function] + cls.add_method('NotifyDataRecv', + 'void', + [], + visibility='protected') + ## socket.h (module 'network'): void ns3::Socket::NotifyDataSent(uint32_t size) [member function] + cls.add_method('NotifyDataSent', + 'void', + [param('uint32_t', 'size')], + visibility='protected') + ## socket.h (module 'network'): void ns3::Socket::NotifyErrorClose() [member function] + cls.add_method('NotifyErrorClose', + 'void', + [], + visibility='protected') + ## socket.h (module 'network'): void ns3::Socket::NotifyNewConnectionCreated(ns3::Ptr socket, ns3::Address const & from) [member function] + cls.add_method('NotifyNewConnectionCreated', + 'void', + [param('ns3::Ptr< ns3::Socket >', 'socket'), param('ns3::Address const &', 'from')], + visibility='protected') + ## socket.h (module 'network'): void ns3::Socket::NotifyNormalClose() [member function] + cls.add_method('NotifyNormalClose', + 'void', + [], + visibility='protected') + ## socket.h (module 'network'): void ns3::Socket::NotifySend(uint32_t spaceAvailable) [member function] + cls.add_method('NotifySend', + 'void', + [param('uint32_t', 'spaceAvailable')], + visibility='protected') + return + +def register_Ns3SocketAddressTag_methods(root_module, cls): + ## socket.h (module 'network'): ns3::SocketAddressTag::SocketAddressTag(ns3::SocketAddressTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SocketAddressTag const &', 'arg0')]) + ## socket.h (module 'network'): ns3::SocketAddressTag::SocketAddressTag() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): void ns3::SocketAddressTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_virtual=True) + ## socket.h (module 'network'): ns3::Address ns3::SocketAddressTag::GetAddress() const [member function] + cls.add_method('GetAddress', + 'ns3::Address', + [], + is_const=True) + ## socket.h (module 'network'): ns3::TypeId ns3::SocketAddressTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::SocketAddressTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::SocketAddressTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): void ns3::SocketAddressTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketAddressTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketAddressTag::SetAddress(ns3::Address addr) [member function] + cls.add_method('SetAddress', + 'void', + [param('ns3::Address', 'addr')]) + return + +def register_Ns3SocketIpTosTag_methods(root_module, cls): + ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag(ns3::SocketIpTosTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SocketIpTosTag const &', 'arg0')]) + ## socket.h (module 'network'): ns3::SocketIpTosTag::SocketIpTosTag() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): void ns3::SocketIpTosTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_virtual=True) + ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpTosTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::SocketIpTosTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::SocketIpTosTag::GetTos() const [member function] + cls.add_method('GetTos', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpTosTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): void ns3::SocketIpTosTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpTosTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpTosTag::SetTos(uint8_t tos) [member function] + cls.add_method('SetTos', + 'void', + [param('uint8_t', 'tos')]) + return + +def register_Ns3SocketIpTtlTag_methods(root_module, cls): + ## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag(ns3::SocketIpTtlTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SocketIpTtlTag const &', 'arg0')]) + ## socket.h (module 'network'): ns3::SocketIpTtlTag::SocketIpTtlTag() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): void ns3::SocketIpTtlTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_virtual=True) + ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpTtlTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::SocketIpTtlTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::SocketIpTtlTag::GetTtl() const [member function] + cls.add_method('GetTtl', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpTtlTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): void ns3::SocketIpTtlTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpTtlTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpTtlTag::SetTtl(uint8_t ttl) [member function] + cls.add_method('SetTtl', + 'void', + [param('uint8_t', 'ttl')]) + return + +def register_Ns3SocketIpv6HopLimitTag_methods(root_module, cls): + ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag(ns3::SocketIpv6HopLimitTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SocketIpv6HopLimitTag const &', 'arg0')]) + ## socket.h (module 'network'): ns3::SocketIpv6HopLimitTag::SocketIpv6HopLimitTag() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::SocketIpv6HopLimitTag::GetHopLimit() const [member function] + cls.add_method('GetHopLimit', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6HopLimitTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::SocketIpv6HopLimitTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6HopLimitTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpv6HopLimitTag::SetHopLimit(uint8_t hopLimit) [member function] + cls.add_method('SetHopLimit', + 'void', + [param('uint8_t', 'hopLimit')]) + return + +def register_Ns3SocketIpv6TclassTag_methods(root_module, cls): + ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag(ns3::SocketIpv6TclassTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SocketIpv6TclassTag const &', 'arg0')]) + ## socket.h (module 'network'): ns3::SocketIpv6TclassTag::SocketIpv6TclassTag() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_virtual=True) + ## socket.h (module 'network'): ns3::TypeId ns3::SocketIpv6TclassTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::SocketIpv6TclassTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint8_t ns3::SocketIpv6TclassTag::GetTclass() const [member function] + cls.add_method('GetTclass', + 'uint8_t', + [], + is_const=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::SocketIpv6TclassTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketIpv6TclassTag::SetTclass(uint8_t tclass) [member function] + cls.add_method('SetTclass', + 'void', + [param('uint8_t', 'tclass')]) + return + +def register_Ns3SocketSetDontFragmentTag_methods(root_module, cls): + ## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag(ns3::SocketSetDontFragmentTag const & arg0) [copy constructor] + cls.add_constructor([param('ns3::SocketSetDontFragmentTag const &', 'arg0')]) + ## socket.h (module 'network'): ns3::SocketSetDontFragmentTag::SocketSetDontFragmentTag() [constructor] + cls.add_constructor([]) + ## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Deserialize(ns3::TagBuffer i) [member function] + cls.add_method('Deserialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Disable() [member function] + cls.add_method('Disable', + 'void', + []) + ## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Enable() [member function] + cls.add_method('Enable', + 'void', + []) + ## socket.h (module 'network'): ns3::TypeId ns3::SocketSetDontFragmentTag::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): uint32_t ns3::SocketSetDontFragmentTag::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): static ns3::TypeId ns3::SocketSetDontFragmentTag::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## socket.h (module 'network'): bool ns3::SocketSetDontFragmentTag::IsEnabled() const [member function] + cls.add_method('IsEnabled', + 'bool', + [], + is_const=True) + ## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## socket.h (module 'network'): void ns3::SocketSetDontFragmentTag::Serialize(ns3::TagBuffer i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::TagBuffer', 'i')], + is_const=True, is_virtual=True) + return + +def register_Ns3Time_methods(root_module, cls): + cls.add_binary_comparison_operator('!=') + cls.add_inplace_numeric_operator('+=', param('ns3::Time const &', 'right')) + cls.add_binary_numeric_operator('+', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) + cls.add_binary_numeric_operator('-', root_module['ns3::Time'], root_module['ns3::Time'], param('ns3::Time const &', 'right')) + cls.add_binary_comparison_operator('<') + cls.add_binary_comparison_operator('>') + cls.add_inplace_numeric_operator('-=', param('ns3::Time const &', 'right')) + cls.add_output_stream_operator() + cls.add_binary_comparison_operator('<=') + cls.add_binary_comparison_operator('==') + cls.add_binary_comparison_operator('>=') + ## nstime.h (module 'core'): ns3::Time::Time() [constructor] + cls.add_constructor([]) + ## nstime.h (module 'core'): ns3::Time::Time(ns3::Time const & o) [copy constructor] + cls.add_constructor([param('ns3::Time const &', 'o')]) + ## nstime.h (module 'core'): ns3::Time::Time(double v) [constructor] + cls.add_constructor([param('double', 'v')]) + ## nstime.h (module 'core'): ns3::Time::Time(int v) [constructor] + cls.add_constructor([param('int', 'v')]) + ## nstime.h (module 'core'): ns3::Time::Time(long int v) [constructor] + cls.add_constructor([param('long int', 'v')]) + ## nstime.h (module 'core'): ns3::Time::Time(long long int v) [constructor] + cls.add_constructor([param('long long int', 'v')]) + ## nstime.h (module 'core'): ns3::Time::Time(unsigned int v) [constructor] + cls.add_constructor([param('unsigned int', 'v')]) + ## nstime.h (module 'core'): ns3::Time::Time(long unsigned int v) [constructor] + cls.add_constructor([param('long unsigned int', 'v')]) + ## nstime.h (module 'core'): ns3::Time::Time(long long unsigned int v) [constructor] + cls.add_constructor([param('long long unsigned int', 'v')]) + ## nstime.h (module 'core'): ns3::Time::Time(std::string const & s) [constructor] + cls.add_constructor([param('std::string const &', 's')]) + ## nstime.h (module 'core'): ns3::Time::Time(ns3::int64x64_t const & value) [constructor] + cls.add_constructor([param('ns3::int64x64_t const &', 'value')]) + ## nstime.h (module 'core'): int ns3::Time::Compare(ns3::Time const & o) const [member function] + cls.add_method('Compare', + 'int', + [param('ns3::Time const &', 'o')], + is_const=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & from, ns3::Time::Unit timeUnit) [member function] + cls.add_method('From', + 'ns3::Time', + [param('ns3::int64x64_t const &', 'from'), param('ns3::Time::Unit', 'timeUnit')], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::From(ns3::int64x64_t const & value) [member function] + cls.add_method('From', + 'ns3::Time', + [param('ns3::int64x64_t const &', 'value')], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromDouble(double value, ns3::Time::Unit timeUnit) [member function] + cls.add_method('FromDouble', + 'ns3::Time', + [param('double', 'value'), param('ns3::Time::Unit', 'timeUnit')], + is_static=True) + ## nstime.h (module 'core'): static ns3::Time ns3::Time::FromInteger(uint64_t value, ns3::Time::Unit timeUnit) [member function] + cls.add_method('FromInteger', + 'ns3::Time', + [param('uint64_t', 'value'), param('ns3::Time::Unit', 'timeUnit')], + is_static=True) + ## nstime.h (module 'core'): double ns3::Time::GetDouble() const [member function] + cls.add_method('GetDouble', + 'double', + [], + is_const=True) + ## nstime.h (module 'core'): int64_t ns3::Time::GetFemtoSeconds() const [member function] + cls.add_method('GetFemtoSeconds', + 'int64_t', + [], + is_const=True) + ## nstime.h (module 'core'): int64_t ns3::Time::GetInteger() const [member function] + cls.add_method('GetInteger', + 'int64_t', + [], + is_const=True) + ## nstime.h (module 'core'): int64_t ns3::Time::GetMicroSeconds() const [member function] + cls.add_method('GetMicroSeconds', + 'int64_t', + [], + is_const=True) + ## nstime.h (module 'core'): int64_t ns3::Time::GetMilliSeconds() const [member function] + cls.add_method('GetMilliSeconds', + 'int64_t', + [], + is_const=True) + ## nstime.h (module 'core'): int64_t ns3::Time::GetNanoSeconds() const [member function] + cls.add_method('GetNanoSeconds', + 'int64_t', + [], + is_const=True) + ## nstime.h (module 'core'): int64_t ns3::Time::GetPicoSeconds() const [member function] + cls.add_method('GetPicoSeconds', + 'int64_t', + [], + is_const=True) + ## nstime.h (module 'core'): static ns3::Time::Unit ns3::Time::GetResolution() [member function] + cls.add_method('GetResolution', + 'ns3::Time::Unit', + [], + is_static=True) + ## nstime.h (module 'core'): double ns3::Time::GetSeconds() const [member function] + cls.add_method('GetSeconds', + 'double', + [], + is_const=True) + ## nstime.h (module 'core'): int64_t ns3::Time::GetTimeStep() const [member function] + cls.add_method('GetTimeStep', + 'int64_t', + [], + is_const=True) + ## nstime.h (module 'core'): bool ns3::Time::IsNegative() const [member function] + cls.add_method('IsNegative', + 'bool', + [], + is_const=True) + ## nstime.h (module 'core'): bool ns3::Time::IsPositive() const [member function] + cls.add_method('IsPositive', + 'bool', + [], + is_const=True) + ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyNegative() const [member function] + cls.add_method('IsStrictlyNegative', + 'bool', + [], + is_const=True) + ## nstime.h (module 'core'): bool ns3::Time::IsStrictlyPositive() const [member function] + cls.add_method('IsStrictlyPositive', + 'bool', + [], + is_const=True) + ## nstime.h (module 'core'): bool ns3::Time::IsZero() const [member function] + cls.add_method('IsZero', + 'bool', + [], + is_const=True) + ## nstime.h (module 'core'): static void ns3::Time::SetResolution(ns3::Time::Unit resolution) [member function] + cls.add_method('SetResolution', + 'void', + [param('ns3::Time::Unit', 'resolution')], + is_static=True) + ## nstime.h (module 'core'): ns3::int64x64_t ns3::Time::To(ns3::Time::Unit timeUnit) const [member function] + cls.add_method('To', + 'ns3::int64x64_t', + [param('ns3::Time::Unit', 'timeUnit')], + is_const=True) + ## nstime.h (module 'core'): double ns3::Time::ToDouble(ns3::Time::Unit timeUnit) const [member function] + cls.add_method('ToDouble', + 'double', + [param('ns3::Time::Unit', 'timeUnit')], + is_const=True) + ## nstime.h (module 'core'): int64_t ns3::Time::ToInteger(ns3::Time::Unit timeUnit) const [member function] + cls.add_method('ToInteger', + 'int64_t', + [param('ns3::Time::Unit', 'timeUnit')], + is_const=True) + return + +def register_Ns3TraceSourceAccessor_methods(root_module, cls): + ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor::TraceSourceAccessor(ns3::TraceSourceAccessor const & arg0) [copy constructor] + cls.add_constructor([param('ns3::TraceSourceAccessor const &', 'arg0')]) + ## trace-source-accessor.h (module 'core'): ns3::TraceSourceAccessor::TraceSourceAccessor() [constructor] + cls.add_constructor([]) + ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::Connect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function] + cls.add_method('Connect', + 'bool', + [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::ConnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function] + cls.add_method('ConnectWithoutContext', + 'bool', + [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::Disconnect(ns3::ObjectBase * obj, std::string context, ns3::CallbackBase const & cb) const [member function] + cls.add_method('Disconnect', + 'bool', + [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('std::string', 'context'), param('ns3::CallbackBase const &', 'cb')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## trace-source-accessor.h (module 'core'): bool ns3::TraceSourceAccessor::DisconnectWithoutContext(ns3::ObjectBase * obj, ns3::CallbackBase const & cb) const [member function] + cls.add_method('DisconnectWithoutContext', + 'bool', + [param('ns3::ObjectBase *', 'obj', transfer_ownership=False), param('ns3::CallbackBase const &', 'cb')], + is_pure_virtual=True, is_const=True, is_virtual=True) + return + +def register_Ns3Trailer_methods(root_module, cls): + cls.add_output_stream_operator() + ## trailer.h (module 'network'): ns3::Trailer::Trailer() [constructor] + cls.add_constructor([]) + ## trailer.h (module 'network'): ns3::Trailer::Trailer(ns3::Trailer const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Trailer const &', 'arg0')]) + ## trailer.h (module 'network'): uint32_t ns3::Trailer::Deserialize(ns3::Buffer::Iterator end) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'end')], + is_pure_virtual=True, is_virtual=True) + ## trailer.h (module 'network'): uint32_t ns3::Trailer::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## trailer.h (module 'network'): static ns3::TypeId ns3::Trailer::GetTypeId() [member function] + 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_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_Ns3WifiMacHeader_methods(root_module, cls): + ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacHeader::WifiMacHeader(ns3::WifiMacHeader const & arg0) [copy constructor] + cls.add_constructor([param('ns3::WifiMacHeader const &', 'arg0')]) + ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacHeader::WifiMacHeader() [constructor] + cls.add_constructor([]) + ## wifi-mac-header.h (module 'wifi'): uint32_t ns3::WifiMacHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## wifi-mac-header.h (module 'wifi'): ns3::Mac48Address ns3::WifiMacHeader::GetAddr1() const [member function] + cls.add_method('GetAddr1', + 'ns3::Mac48Address', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): ns3::Mac48Address ns3::WifiMacHeader::GetAddr2() const [member function] + cls.add_method('GetAddr2', + 'ns3::Mac48Address', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): ns3::Mac48Address ns3::WifiMacHeader::GetAddr3() const [member function] + cls.add_method('GetAddr3', + 'ns3::Mac48Address', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): ns3::Mac48Address ns3::WifiMacHeader::GetAddr4() const [member function] + cls.add_method('GetAddr4', + 'ns3::Mac48Address', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): ns3::Time ns3::WifiMacHeader::GetDuration() const [member function] + cls.add_method('GetDuration', + 'ns3::Time', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): uint16_t ns3::WifiMacHeader::GetFragmentNumber() const [member function] + cls.add_method('GetFragmentNumber', + 'uint16_t', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): ns3::TypeId ns3::WifiMacHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacHeader::QosAckPolicy ns3::WifiMacHeader::GetQosAckPolicy() const [member function] + cls.add_method('GetQosAckPolicy', + 'ns3::WifiMacHeader::QosAckPolicy', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): uint8_t ns3::WifiMacHeader::GetQosTid() const [member function] + cls.add_method('GetQosTid', + 'uint8_t', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): uint8_t ns3::WifiMacHeader::GetQosTxopLimit() const [member function] + cls.add_method('GetQosTxopLimit', + 'uint8_t', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): uint16_t ns3::WifiMacHeader::GetRawDuration() const [member function] + cls.add_method('GetRawDuration', + 'uint16_t', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): uint16_t ns3::WifiMacHeader::GetSequenceControl() const [member function] + cls.add_method('GetSequenceControl', + 'uint16_t', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): uint16_t ns3::WifiMacHeader::GetSequenceNumber() const [member function] + cls.add_method('GetSequenceNumber', + 'uint16_t', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): uint32_t ns3::WifiMacHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## wifi-mac-header.h (module 'wifi'): uint32_t ns3::WifiMacHeader::GetSize() const [member function] + cls.add_method('GetSize', + 'uint32_t', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): ns3::WifiMacType ns3::WifiMacHeader::GetType() const [member function] + cls.add_method('GetType', + 'ns3::WifiMacType', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): static ns3::TypeId ns3::WifiMacHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## wifi-mac-header.h (module 'wifi'): char const * ns3::WifiMacHeader::GetTypeString() const [member function] + cls.add_method('GetTypeString', + 'char const *', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsAck() const [member function] + cls.add_method('IsAck', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsAction() const [member function] + cls.add_method('IsAction', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsAssocReq() const [member function] + cls.add_method('IsAssocReq', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsAssocResp() const [member function] + cls.add_method('IsAssocResp', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsAuthentication() const [member function] + cls.add_method('IsAuthentication', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsBeacon() const [member function] + cls.add_method('IsBeacon', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsBlockAck() const [member function] + cls.add_method('IsBlockAck', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsBlockAckReq() const [member function] + cls.add_method('IsBlockAckReq', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsCfpoll() const [member function] + cls.add_method('IsCfpoll', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsCtl() const [member function] + cls.add_method('IsCtl', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsCts() const [member function] + cls.add_method('IsCts', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsData() const [member function] + cls.add_method('IsData', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsDeauthentication() const [member function] + cls.add_method('IsDeauthentication', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsDisassociation() const [member function] + cls.add_method('IsDisassociation', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsFromDs() const [member function] + cls.add_method('IsFromDs', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsMgt() const [member function] + cls.add_method('IsMgt', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsMoreFragments() const [member function] + cls.add_method('IsMoreFragments', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsMultihopAction() const [member function] + cls.add_method('IsMultihopAction', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsProbeReq() const [member function] + cls.add_method('IsProbeReq', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsProbeResp() const [member function] + cls.add_method('IsProbeResp', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsQosAck() const [member function] + cls.add_method('IsQosAck', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsQosAmsdu() const [member function] + cls.add_method('IsQosAmsdu', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsQosBlockAck() const [member function] + cls.add_method('IsQosBlockAck', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsQosData() const [member function] + cls.add_method('IsQosData', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsQosEosp() const [member function] + cls.add_method('IsQosEosp', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsQosNoAck() const [member function] + cls.add_method('IsQosNoAck', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsReassocReq() const [member function] + cls.add_method('IsReassocReq', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsReassocResp() const [member function] + cls.add_method('IsReassocResp', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsRetry() const [member function] + cls.add_method('IsRetry', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsRts() const [member function] + cls.add_method('IsRts', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): bool ns3::WifiMacHeader::IsToDs() const [member function] + cls.add_method('IsToDs', + 'bool', + [], + is_const=True) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAction() [member function] + cls.add_method('SetAction', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAddr1(ns3::Mac48Address address) [member function] + cls.add_method('SetAddr1', + 'void', + [param('ns3::Mac48Address', 'address')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAddr2(ns3::Mac48Address address) [member function] + cls.add_method('SetAddr2', + 'void', + [param('ns3::Mac48Address', 'address')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAddr3(ns3::Mac48Address address) [member function] + cls.add_method('SetAddr3', + 'void', + [param('ns3::Mac48Address', 'address')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAddr4(ns3::Mac48Address address) [member function] + cls.add_method('SetAddr4', + 'void', + [param('ns3::Mac48Address', 'address')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAssocReq() [member function] + cls.add_method('SetAssocReq', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetAssocResp() [member function] + cls.add_method('SetAssocResp', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetBeacon() [member function] + cls.add_method('SetBeacon', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetBlockAck() [member function] + cls.add_method('SetBlockAck', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetBlockAckReq() [member function] + cls.add_method('SetBlockAckReq', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetDsFrom() [member function] + cls.add_method('SetDsFrom', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetDsNotFrom() [member function] + cls.add_method('SetDsNotFrom', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetDsNotTo() [member function] + cls.add_method('SetDsNotTo', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetDsTo() [member function] + cls.add_method('SetDsTo', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetDuration(ns3::Time duration) [member function] + cls.add_method('SetDuration', + 'void', + [param('ns3::Time', 'duration')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetFragmentNumber(uint8_t frag) [member function] + cls.add_method('SetFragmentNumber', + 'void', + [param('uint8_t', 'frag')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetId(uint16_t id) [member function] + cls.add_method('SetId', + 'void', + [param('uint16_t', 'id')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetMoreFragments() [member function] + cls.add_method('SetMoreFragments', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetMultihopAction() [member function] + cls.add_method('SetMultihopAction', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetNoMoreFragments() [member function] + cls.add_method('SetNoMoreFragments', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetNoRetry() [member function] + cls.add_method('SetNoRetry', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetProbeReq() [member function] + cls.add_method('SetProbeReq', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetProbeResp() [member function] + cls.add_method('SetProbeResp', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosAckPolicy(ns3::WifiMacHeader::QosAckPolicy arg0) [member function] + cls.add_method('SetQosAckPolicy', + 'void', + [param('ns3::WifiMacHeader::QosAckPolicy', 'arg0')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosAmsdu() [member function] + cls.add_method('SetQosAmsdu', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosBlockAck() [member function] + cls.add_method('SetQosBlockAck', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosEosp() [member function] + cls.add_method('SetQosEosp', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosNoAck() [member function] + cls.add_method('SetQosNoAck', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosNoAmsdu() [member function] + cls.add_method('SetQosNoAmsdu', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosNoEosp() [member function] + cls.add_method('SetQosNoEosp', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosNormalAck() [member function] + cls.add_method('SetQosNormalAck', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosTid(uint8_t tid) [member function] + cls.add_method('SetQosTid', + 'void', + [param('uint8_t', 'tid')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetQosTxopLimit(uint8_t txop) [member function] + cls.add_method('SetQosTxopLimit', + 'void', + [param('uint8_t', 'txop')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetRawDuration(uint16_t duration) [member function] + cls.add_method('SetRawDuration', + 'void', + [param('uint16_t', 'duration')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetRetry() [member function] + cls.add_method('SetRetry', + 'void', + []) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetSequenceNumber(uint16_t seq) [member function] + cls.add_method('SetSequenceNumber', + 'void', + [param('uint16_t', 'seq')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetType(ns3::WifiMacType type) [member function] + cls.add_method('SetType', + 'void', + [param('ns3::WifiMacType', 'type')]) + ## wifi-mac-header.h (module 'wifi'): void ns3::WifiMacHeader::SetTypeData() [member function] + cls.add_method('SetTypeData', + 'void', + []) + 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_Ns3ArpCache_methods(root_module, cls): + ## arp-cache.h (module 'internet'): ns3::ArpCache::ArpCache() [constructor] + cls.add_constructor([]) + ## arp-cache.h (module 'internet'): ns3::ArpCache::Entry * ns3::ArpCache::Add(ns3::Ipv4Address to) [member function] + cls.add_method('Add', + 'ns3::ArpCache::Entry *', + [param('ns3::Ipv4Address', 'to')]) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::Flush() [member function] + cls.add_method('Flush', + 'void', + []) + ## arp-cache.h (module 'internet'): ns3::Time ns3::ArpCache::GetAliveTimeout() const [member function] + cls.add_method('GetAliveTimeout', + 'ns3::Time', + [], + is_const=True) + ## arp-cache.h (module 'internet'): ns3::Time ns3::ArpCache::GetDeadTimeout() const [member function] + cls.add_method('GetDeadTimeout', + 'ns3::Time', + [], + is_const=True) + ## arp-cache.h (module 'internet'): ns3::Ptr ns3::ArpCache::GetDevice() const [member function] + cls.add_method('GetDevice', + 'ns3::Ptr< ns3::NetDevice >', + [], + is_const=True) + ## arp-cache.h (module 'internet'): ns3::Ptr ns3::ArpCache::GetInterface() const [member function] + cls.add_method('GetInterface', + 'ns3::Ptr< ns3::Ipv4Interface >', + [], + is_const=True) + ## arp-cache.h (module 'internet'): static ns3::TypeId ns3::ArpCache::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## arp-cache.h (module 'internet'): ns3::Time ns3::ArpCache::GetWaitReplyTimeout() const [member function] + cls.add_method('GetWaitReplyTimeout', + 'ns3::Time', + [], + is_const=True) + ## arp-cache.h (module 'internet'): ns3::ArpCache::Entry * ns3::ArpCache::Lookup(ns3::Ipv4Address destination) [member function] + cls.add_method('Lookup', + 'ns3::ArpCache::Entry *', + [param('ns3::Ipv4Address', 'destination')]) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::SetAliveTimeout(ns3::Time aliveTimeout) [member function] + cls.add_method('SetAliveTimeout', + 'void', + [param('ns3::Time', 'aliveTimeout')]) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::SetArpRequestCallback(ns3::Callback, ns3::Ipv4Address, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> arpRequestCallback) [member function] + cls.add_method('SetArpRequestCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::ArpCache const >, ns3::Ipv4Address, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'arpRequestCallback')]) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::SetDeadTimeout(ns3::Time deadTimeout) [member function] + cls.add_method('SetDeadTimeout', + 'void', + [param('ns3::Time', 'deadTimeout')]) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::SetDevice(ns3::Ptr device, ns3::Ptr interface) [member function] + cls.add_method('SetDevice', + 'void', + [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Ipv4Interface >', 'interface')]) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::SetWaitReplyTimeout(ns3::Time waitReplyTimeout) [member function] + cls.add_method('SetWaitReplyTimeout', + 'void', + [param('ns3::Time', 'waitReplyTimeout')]) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::StartWaitReplyTimer() [member function] + cls.add_method('StartWaitReplyTimer', + 'void', + []) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='private', is_virtual=True) + return + +def register_Ns3ArpCacheEntry_methods(root_module, cls): + ## arp-cache.h (module 'internet'): ns3::ArpCache::Entry::Entry(ns3::ArpCache::Entry const & arg0) [copy constructor] + cls.add_constructor([param('ns3::ArpCache::Entry const &', 'arg0')]) + ## arp-cache.h (module 'internet'): ns3::ArpCache::Entry::Entry(ns3::ArpCache * arp) [constructor] + cls.add_constructor([param('ns3::ArpCache *', 'arp')]) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::Entry::ClearRetries() [member function] + cls.add_method('ClearRetries', + 'void', + []) + ## arp-cache.h (module 'internet'): ns3::Ptr ns3::ArpCache::Entry::DequeuePending() [member function] + cls.add_method('DequeuePending', + 'ns3::Ptr< ns3::Packet >', + []) + ## arp-cache.h (module 'internet'): ns3::Ipv4Address ns3::ArpCache::Entry::GetIpv4Address() const [member function] + cls.add_method('GetIpv4Address', + 'ns3::Ipv4Address', + [], + is_const=True) + ## arp-cache.h (module 'internet'): ns3::Address ns3::ArpCache::Entry::GetMacAddress() const [member function] + cls.add_method('GetMacAddress', + 'ns3::Address', + [], + is_const=True) + ## arp-cache.h (module 'internet'): uint32_t ns3::ArpCache::Entry::GetRetries() const [member function] + cls.add_method('GetRetries', + 'uint32_t', + [], + is_const=True) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::Entry::IncrementRetries() [member function] + cls.add_method('IncrementRetries', + 'void', + []) + ## arp-cache.h (module 'internet'): bool ns3::ArpCache::Entry::IsAlive() [member function] + cls.add_method('IsAlive', + 'bool', + []) + ## arp-cache.h (module 'internet'): bool ns3::ArpCache::Entry::IsDead() [member function] + cls.add_method('IsDead', + 'bool', + []) + ## arp-cache.h (module 'internet'): bool ns3::ArpCache::Entry::IsExpired() const [member function] + cls.add_method('IsExpired', + 'bool', + [], + is_const=True) + ## arp-cache.h (module 'internet'): bool ns3::ArpCache::Entry::IsWaitReply() [member function] + cls.add_method('IsWaitReply', + 'bool', + []) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::Entry::MarkAlive(ns3::Address macAddress) [member function] + cls.add_method('MarkAlive', + 'void', + [param('ns3::Address', 'macAddress')]) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::Entry::MarkDead() [member function] + cls.add_method('MarkDead', + 'void', + []) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::Entry::MarkWaitReply(ns3::Ptr waiting) [member function] + cls.add_method('MarkWaitReply', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'waiting')]) + ## arp-cache.h (module 'internet'): void ns3::ArpCache::Entry::SetIpv4Address(ns3::Ipv4Address destination) [member function] + cls.add_method('SetIpv4Address', + 'void', + [param('ns3::Ipv4Address', 'destination')]) + ## arp-cache.h (module 'internet'): bool ns3::ArpCache::Entry::UpdateWaitReply(ns3::Ptr waiting) [member function] + cls.add_method('UpdateWaitReply', + 'bool', + [param('ns3::Ptr< ns3::Packet >', 'waiting')]) + 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_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'): 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) + 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_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_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 arg0, double arg1, double arg2, double arg3, double arg4) [member function] + cls.add_method('Interpolate', + 'double', + [param('double', 'arg0'), param('double', 'arg1'), param('double', 'arg2'), param('double', 'arg3'), param('double', 'arg4')], + 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_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 v, std::string name) [member function] + cls.add_method('Add', + 'void', + [param('int', 'v'), param('std::string', 'name')]) + ## enum.h (module 'core'): void ns3::EnumChecker::AddDefault(int v, std::string name) [member function] + cls.add_method('AddDefault', + 'void', + [param('int', 'v'), 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 v) [constructor] + cls.add_constructor([param('int', 'v')]) + ## 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 v) [member function] + cls.add_method('Set', + 'void', + [param('int', 'v')]) + 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_Ns3IpL4Protocol_methods(root_module, cls): + ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::IpL4Protocol() [constructor] + cls.add_constructor([]) + ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::IpL4Protocol(ns3::IpL4Protocol const & arg0) [copy constructor] + cls.add_constructor([param('ns3::IpL4Protocol const &', 'arg0')]) + ## ip-l4-protocol.h (module 'internet'): ns3::Callback,ns3::Ipv4Address,ns3::Ipv4Address,unsigned char,ns3::Ptr,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ns3::IpL4Protocol::GetDownTarget() const [member function] + cls.add_method('GetDownTarget', + 'ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::Ipv4Address, ns3::Ipv4Address, unsigned char, ns3::Ptr< ns3::Ipv4Route >, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ip-l4-protocol.h (module 'internet'): ns3::Callback,ns3::Ipv6Address,ns3::Ipv6Address,unsigned char,ns3::Ptr,ns3::empty,ns3::empty,ns3::empty,ns3::empty> ns3::IpL4Protocol::GetDownTarget6() const [member function] + cls.add_method('GetDownTarget6', + 'ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::Ipv6Address, ns3::Ipv6Address, unsigned char, ns3::Ptr< ns3::Ipv6Route >, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ip-l4-protocol.h (module 'internet'): int ns3::IpL4Protocol::GetProtocolNumber() const [member function] + cls.add_method('GetProtocolNumber', + 'int', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ip-l4-protocol.h (module 'internet'): static ns3::TypeId ns3::IpL4Protocol::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::RxStatus ns3::IpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr incomingInterface) [member function] + cls.add_method('Receive', + 'ns3::IpL4Protocol::RxStatus', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::Ipv4Interface >', 'incomingInterface')], + is_pure_virtual=True, is_virtual=True) + ## ip-l4-protocol.h (module 'internet'): ns3::IpL4Protocol::RxStatus ns3::IpL4Protocol::Receive(ns3::Ptr p, ns3::Ipv6Header const & header, ns3::Ptr incomingInterface) [member function] + cls.add_method('Receive', + 'ns3::IpL4Protocol::RxStatus', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Header const &', 'header'), param('ns3::Ptr< ns3::Ipv6Interface >', 'incomingInterface')], + is_pure_virtual=True, is_virtual=True) + ## ip-l4-protocol.h (module 'internet'): void ns3::IpL4Protocol::ReceiveIcmp(ns3::Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, ns3::Ipv4Address payloadSource, ns3::Ipv4Address payloadDestination, uint8_t const * payload) [member function] + cls.add_method('ReceiveIcmp', + 'void', + [param('ns3::Ipv4Address', 'icmpSource'), param('uint8_t', 'icmpTtl'), param('uint8_t', 'icmpType'), param('uint8_t', 'icmpCode'), param('uint32_t', 'icmpInfo'), param('ns3::Ipv4Address', 'payloadSource'), param('ns3::Ipv4Address', 'payloadDestination'), param('uint8_t const *', 'payload')], + is_virtual=True) + ## ip-l4-protocol.h (module 'internet'): void ns3::IpL4Protocol::ReceiveIcmp(ns3::Ipv6Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, ns3::Ipv6Address payloadSource, ns3::Ipv6Address payloadDestination, uint8_t const * payload) [member function] + cls.add_method('ReceiveIcmp', + 'void', + [param('ns3::Ipv6Address', 'icmpSource'), param('uint8_t', 'icmpTtl'), param('uint8_t', 'icmpType'), param('uint8_t', 'icmpCode'), param('uint32_t', 'icmpInfo'), param('ns3::Ipv6Address', 'payloadSource'), param('ns3::Ipv6Address', 'payloadDestination'), param('uint8_t const *', 'payload')], + is_virtual=True) + ## ip-l4-protocol.h (module 'internet'): void ns3::IpL4Protocol::SetDownTarget(ns3::Callback,ns3::Ipv4Address,ns3::Ipv4Address,unsigned char,ns3::Ptr,ns3::empty,ns3::empty,ns3::empty,ns3::empty> cb) [member function] + cls.add_method('SetDownTarget', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::Ipv4Address, ns3::Ipv4Address, unsigned char, ns3::Ptr< ns3::Ipv4Route >, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], + is_pure_virtual=True, is_virtual=True) + ## ip-l4-protocol.h (module 'internet'): void ns3::IpL4Protocol::SetDownTarget6(ns3::Callback,ns3::Ipv6Address,ns3::Ipv6Address,unsigned char,ns3::Ptr,ns3::empty,ns3::empty,ns3::empty,ns3::empty> cb) [member function] + cls.add_method('SetDownTarget6', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Packet >, ns3::Ipv6Address, ns3::Ipv6Address, unsigned char, ns3::Ptr< ns3::Ipv6Route >, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')], + is_pure_virtual=True, is_virtual=True) + return + +def register_Ns3Ipv4_methods(root_module, cls): + ## ipv4.h (module 'internet'): ns3::Ipv4::Ipv4(ns3::Ipv4 const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4 const &', 'arg0')]) + ## ipv4.h (module 'internet'): ns3::Ipv4::Ipv4() [constructor] + cls.add_constructor([]) + ## ipv4.h (module 'internet'): bool ns3::Ipv4::AddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('AddAddress', + 'bool', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): uint32_t ns3::Ipv4::AddInterface(ns3::Ptr device) [member function] + cls.add_method('AddInterface', + 'uint32_t', + [param('ns3::Ptr< ns3::NetDevice >', 'device')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): ns3::Ptr ns3::Ipv4::CreateRawSocket() [member function] + cls.add_method('CreateRawSocket', + 'ns3::Ptr< ns3::Socket >', + [], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::DeleteRawSocket(ns3::Ptr socket) [member function] + cls.add_method('DeleteRawSocket', + 'void', + [param('ns3::Ptr< ns3::Socket >', 'socket')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): ns3::Ipv4InterfaceAddress ns3::Ipv4::GetAddress(uint32_t interface, uint32_t addressIndex) const [member function] + cls.add_method('GetAddress', + 'ns3::Ipv4InterfaceAddress', + [param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): int32_t ns3::Ipv4::GetInterfaceForAddress(ns3::Ipv4Address address) const [member function] + cls.add_method('GetInterfaceForAddress', + 'int32_t', + [param('ns3::Ipv4Address', 'address')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): int32_t ns3::Ipv4::GetInterfaceForDevice(ns3::Ptr device) const [member function] + cls.add_method('GetInterfaceForDevice', + 'int32_t', + [param('ns3::Ptr< ns3::NetDevice const >', 'device')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): int32_t ns3::Ipv4::GetInterfaceForPrefix(ns3::Ipv4Address address, ns3::Ipv4Mask mask) const [member function] + cls.add_method('GetInterfaceForPrefix', + 'int32_t', + [param('ns3::Ipv4Address', 'address'), param('ns3::Ipv4Mask', 'mask')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): uint16_t ns3::Ipv4::GetMetric(uint32_t interface) const [member function] + cls.add_method('GetMetric', + 'uint16_t', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): uint16_t ns3::Ipv4::GetMtu(uint32_t interface) const [member function] + cls.add_method('GetMtu', + 'uint16_t', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): uint32_t ns3::Ipv4::GetNAddresses(uint32_t interface) const [member function] + cls.add_method('GetNAddresses', + 'uint32_t', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): uint32_t ns3::Ipv4::GetNInterfaces() const [member function] + cls.add_method('GetNInterfaces', + 'uint32_t', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): ns3::Ptr ns3::Ipv4::GetNetDevice(uint32_t interface) [member function] + cls.add_method('GetNetDevice', + 'ns3::Ptr< ns3::NetDevice >', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): ns3::Ptr ns3::Ipv4::GetProtocol(int protocolNumber) const [member function] + cls.add_method('GetProtocol', + 'ns3::Ptr< ns3::IpL4Protocol >', + [param('int', 'protocolNumber')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): ns3::Ptr ns3::Ipv4::GetRoutingProtocol() const [member function] + cls.add_method('GetRoutingProtocol', + 'ns3::Ptr< ns3::Ipv4RoutingProtocol >', + [], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): static ns3::TypeId ns3::Ipv4::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::Insert(ns3::Ptr protocol) [member function] + cls.add_method('Insert', + 'void', + [param('ns3::Ptr< ns3::IpL4Protocol >', 'protocol')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): bool ns3::Ipv4::IsDestinationAddress(ns3::Ipv4Address address, uint32_t iif) const [member function] + cls.add_method('IsDestinationAddress', + 'bool', + [param('ns3::Ipv4Address', 'address'), param('uint32_t', 'iif')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): bool ns3::Ipv4::IsForwarding(uint32_t interface) const [member function] + cls.add_method('IsForwarding', + 'bool', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): bool ns3::Ipv4::IsUp(uint32_t interface) const [member function] + cls.add_method('IsUp', + 'bool', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4.h (module 'internet'): bool ns3::Ipv4::RemoveAddress(uint32_t interface, uint32_t addressIndex) [member function] + cls.add_method('RemoveAddress', + 'bool', + [param('uint32_t', 'interface'), param('uint32_t', 'addressIndex')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4::SelectSourceAddress(ns3::Ptr device, ns3::Ipv4Address dst, ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e scope) [member function] + cls.add_method('SelectSourceAddress', + 'ns3::Ipv4Address', + [param('ns3::Ptr< ns3::NetDevice const >', 'device'), param('ns3::Ipv4Address', 'dst'), param('ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e', 'scope')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::Send(ns3::Ptr packet, ns3::Ipv4Address source, ns3::Ipv4Address destination, uint8_t protocol, ns3::Ptr route) [member function] + cls.add_method('Send', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'destination'), param('uint8_t', 'protocol'), param('ns3::Ptr< ns3::Ipv4Route >', 'route')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::SendWithHeader(ns3::Ptr packet, ns3::Ipv4Header ipHeader, ns3::Ptr route) [member function] + cls.add_method('SendWithHeader', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Header', 'ipHeader'), param('ns3::Ptr< ns3::Ipv4Route >', 'route')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::SetDown(uint32_t interface) [member function] + cls.add_method('SetDown', + 'void', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::SetForwarding(uint32_t interface, bool val) [member function] + cls.add_method('SetForwarding', + 'void', + [param('uint32_t', 'interface'), param('bool', 'val')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::SetMetric(uint32_t interface, uint16_t metric) [member function] + cls.add_method('SetMetric', + 'void', + [param('uint32_t', 'interface'), param('uint16_t', 'metric')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::SetRoutingProtocol(ns3::Ptr routingProtocol) [member function] + cls.add_method('SetRoutingProtocol', + 'void', + [param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::SetUp(uint32_t interface) [member function] + cls.add_method('SetUp', + 'void', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv4.h (module 'internet'): ns3::Ipv4::IF_ANY [variable] + cls.add_static_attribute('IF_ANY', 'uint32_t const', is_const=True) + ## ipv4.h (module 'internet'): bool ns3::Ipv4::GetIpForward() const [member function] + cls.add_method('GetIpForward', + 'bool', + [], + is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## ipv4.h (module 'internet'): bool ns3::Ipv4::GetWeakEsModel() const [member function] + cls.add_method('GetWeakEsModel', + 'bool', + [], + is_pure_virtual=True, is_const=True, visibility='private', is_virtual=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::SetIpForward(bool forward) [member function] + cls.add_method('SetIpForward', + 'void', + [param('bool', 'forward')], + is_pure_virtual=True, visibility='private', is_virtual=True) + ## ipv4.h (module 'internet'): void ns3::Ipv4::SetWeakEsModel(bool model) [member function] + cls.add_method('SetWeakEsModel', + 'void', + [param('bool', 'model')], + is_pure_virtual=True, visibility='private', is_virtual=True) + 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_Ns3Ipv4Interface_methods(root_module, cls): + ## ipv4-interface.h (module 'internet'): ns3::Ipv4Interface::Ipv4Interface(ns3::Ipv4Interface const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4Interface const &', 'arg0')]) + ## ipv4-interface.h (module 'internet'): ns3::Ipv4Interface::Ipv4Interface() [constructor] + cls.add_constructor([]) + ## ipv4-interface.h (module 'internet'): bool ns3::Ipv4Interface::AddAddress(ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('AddAddress', + 'bool', + [param('ns3::Ipv4InterfaceAddress', 'address')]) + ## ipv4-interface.h (module 'internet'): ns3::Ipv4InterfaceAddress ns3::Ipv4Interface::GetAddress(uint32_t index) const [member function] + cls.add_method('GetAddress', + 'ns3::Ipv4InterfaceAddress', + [param('uint32_t', 'index')], + is_const=True) + ## ipv4-interface.h (module 'internet'): ns3::Ptr ns3::Ipv4Interface::GetArpCache() const [member function] + cls.add_method('GetArpCache', + 'ns3::Ptr< ns3::ArpCache >', + [], + is_const=True) + ## ipv4-interface.h (module 'internet'): ns3::Ptr ns3::Ipv4Interface::GetDevice() const [member function] + cls.add_method('GetDevice', + 'ns3::Ptr< ns3::NetDevice >', + [], + is_const=True) + ## ipv4-interface.h (module 'internet'): uint16_t ns3::Ipv4Interface::GetMetric() const [member function] + cls.add_method('GetMetric', + 'uint16_t', + [], + is_const=True) + ## ipv4-interface.h (module 'internet'): uint32_t ns3::Ipv4Interface::GetNAddresses() const [member function] + cls.add_method('GetNAddresses', + 'uint32_t', + [], + is_const=True) + ## ipv4-interface.h (module 'internet'): static ns3::TypeId ns3::Ipv4Interface::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-interface.h (module 'internet'): bool ns3::Ipv4Interface::IsDown() const [member function] + cls.add_method('IsDown', + 'bool', + [], + is_const=True) + ## ipv4-interface.h (module 'internet'): bool ns3::Ipv4Interface::IsForwarding() const [member function] + cls.add_method('IsForwarding', + 'bool', + [], + is_const=True) + ## ipv4-interface.h (module 'internet'): bool ns3::Ipv4Interface::IsUp() const [member function] + cls.add_method('IsUp', + 'bool', + [], + is_const=True) + ## ipv4-interface.h (module 'internet'): ns3::Ipv4InterfaceAddress ns3::Ipv4Interface::RemoveAddress(uint32_t index) [member function] + cls.add_method('RemoveAddress', + 'ns3::Ipv4InterfaceAddress', + [param('uint32_t', 'index')]) + ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::Send(ns3::Ptr p, ns3::Ipv4Address dest) [member function] + cls.add_method('Send', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Address', 'dest')]) + ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::SetArpCache(ns3::Ptr arg0) [member function] + cls.add_method('SetArpCache', + 'void', + [param('ns3::Ptr< ns3::ArpCache >', 'arg0')]) + ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::SetDevice(ns3::Ptr device) [member function] + cls.add_method('SetDevice', + 'void', + [param('ns3::Ptr< ns3::NetDevice >', 'device')]) + ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::SetDown() [member function] + cls.add_method('SetDown', + 'void', + []) + ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::SetForwarding(bool val) [member function] + cls.add_method('SetForwarding', + 'void', + [param('bool', 'val')]) + ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::SetMetric(uint16_t metric) [member function] + cls.add_method('SetMetric', + 'void', + [param('uint16_t', 'metric')]) + ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::SetNode(ns3::Ptr node) [member function] + cls.add_method('SetNode', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')]) + ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::SetUp() [member function] + cls.add_method('SetUp', + 'void', + []) + ## ipv4-interface.h (module 'internet'): void ns3::Ipv4Interface::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + return + +def register_Ns3Ipv4L3Protocol_methods(root_module, cls): + ## ipv4-l3-protocol.h (module 'internet'): ns3::Ipv4L3Protocol::Ipv4L3Protocol() [constructor] + cls.add_constructor([]) + ## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::AddAddress(uint32_t i, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('AddAddress', + 'bool', + [param('uint32_t', 'i'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): uint32_t ns3::Ipv4L3Protocol::AddInterface(ns3::Ptr device) [member function] + cls.add_method('AddInterface', + 'uint32_t', + [param('ns3::Ptr< ns3::NetDevice >', 'device')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): ns3::Ptr ns3::Ipv4L3Protocol::CreateRawSocket() [member function] + cls.add_method('CreateRawSocket', + 'ns3::Ptr< ns3::Socket >', + [], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::DeleteRawSocket(ns3::Ptr socket) [member function] + cls.add_method('DeleteRawSocket', + 'void', + [param('ns3::Ptr< ns3::Socket >', 'socket')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): ns3::Ipv4InterfaceAddress ns3::Ipv4L3Protocol::GetAddress(uint32_t interfaceIndex, uint32_t addressIndex) const [member function] + cls.add_method('GetAddress', + 'ns3::Ipv4InterfaceAddress', + [param('uint32_t', 'interfaceIndex'), param('uint32_t', 'addressIndex')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): ns3::Ptr ns3::Ipv4L3Protocol::GetInterface(uint32_t i) const [member function] + cls.add_method('GetInterface', + 'ns3::Ptr< ns3::Ipv4Interface >', + [param('uint32_t', 'i')], + is_const=True) + ## ipv4-l3-protocol.h (module 'internet'): int32_t ns3::Ipv4L3Protocol::GetInterfaceForAddress(ns3::Ipv4Address addr) const [member function] + cls.add_method('GetInterfaceForAddress', + 'int32_t', + [param('ns3::Ipv4Address', 'addr')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): int32_t ns3::Ipv4L3Protocol::GetInterfaceForDevice(ns3::Ptr device) const [member function] + cls.add_method('GetInterfaceForDevice', + 'int32_t', + [param('ns3::Ptr< ns3::NetDevice const >', 'device')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): int32_t ns3::Ipv4L3Protocol::GetInterfaceForPrefix(ns3::Ipv4Address addr, ns3::Ipv4Mask mask) const [member function] + cls.add_method('GetInterfaceForPrefix', + 'int32_t', + [param('ns3::Ipv4Address', 'addr'), param('ns3::Ipv4Mask', 'mask')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): uint16_t ns3::Ipv4L3Protocol::GetMetric(uint32_t i) const [member function] + cls.add_method('GetMetric', + 'uint16_t', + [param('uint32_t', 'i')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): uint16_t ns3::Ipv4L3Protocol::GetMtu(uint32_t i) const [member function] + cls.add_method('GetMtu', + 'uint16_t', + [param('uint32_t', 'i')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): uint32_t ns3::Ipv4L3Protocol::GetNAddresses(uint32_t interface) const [member function] + cls.add_method('GetNAddresses', + 'uint32_t', + [param('uint32_t', 'interface')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): uint32_t ns3::Ipv4L3Protocol::GetNInterfaces() const [member function] + cls.add_method('GetNInterfaces', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): ns3::Ptr ns3::Ipv4L3Protocol::GetNetDevice(uint32_t i) [member function] + cls.add_method('GetNetDevice', + 'ns3::Ptr< ns3::NetDevice >', + [param('uint32_t', 'i')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): ns3::Ptr ns3::Ipv4L3Protocol::GetProtocol(int protocolNumber) const [member function] + cls.add_method('GetProtocol', + 'ns3::Ptr< ns3::IpL4Protocol >', + [param('int', 'protocolNumber')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): ns3::Ptr ns3::Ipv4L3Protocol::GetRoutingProtocol() const [member function] + cls.add_method('GetRoutingProtocol', + 'ns3::Ptr< ns3::Ipv4RoutingProtocol >', + [], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): static ns3::TypeId ns3::Ipv4L3Protocol::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::Insert(ns3::Ptr protocol) [member function] + cls.add_method('Insert', + 'void', + [param('ns3::Ptr< ns3::IpL4Protocol >', 'protocol')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsDestinationAddress(ns3::Ipv4Address address, uint32_t iif) const [member function] + cls.add_method('IsDestinationAddress', + 'bool', + [param('ns3::Ipv4Address', 'address'), param('uint32_t', 'iif')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsForwarding(uint32_t i) const [member function] + cls.add_method('IsForwarding', + 'bool', + [param('uint32_t', 'i')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::IsUp(uint32_t i) const [member function] + cls.add_method('IsUp', + 'bool', + [param('uint32_t', 'i')], + is_const=True, is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::Receive(ns3::Ptr device, ns3::Ptr p, uint16_t protocol, ns3::Address const & from, ns3::Address const & to, ns3::NetDevice::PacketType packetType) [member function] + cls.add_method('Receive', + 'void', + [param('ns3::Ptr< ns3::NetDevice >', 'device'), param('ns3::Ptr< ns3::Packet const >', 'p'), param('uint16_t', 'protocol'), param('ns3::Address const &', 'from'), param('ns3::Address const &', 'to'), param('ns3::NetDevice::PacketType', 'packetType')]) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::Remove(ns3::Ptr protocol) [member function] + cls.add_method('Remove', + 'void', + [param('ns3::Ptr< ns3::IpL4Protocol >', 'protocol')]) + ## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::RemoveAddress(uint32_t interfaceIndex, uint32_t addressIndex) [member function] + cls.add_method('RemoveAddress', + 'bool', + [param('uint32_t', 'interfaceIndex'), param('uint32_t', 'addressIndex')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4L3Protocol::SelectSourceAddress(ns3::Ptr device, ns3::Ipv4Address dst, ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e scope) [member function] + cls.add_method('SelectSourceAddress', + 'ns3::Ipv4Address', + [param('ns3::Ptr< ns3::NetDevice const >', 'device'), param('ns3::Ipv4Address', 'dst'), param('ns3::Ipv4InterfaceAddress::InterfaceAddressScope_e', 'scope')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::Send(ns3::Ptr packet, ns3::Ipv4Address source, ns3::Ipv4Address destination, uint8_t protocol, ns3::Ptr route) [member function] + cls.add_method('Send', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Address', 'source'), param('ns3::Ipv4Address', 'destination'), param('uint8_t', 'protocol'), param('ns3::Ptr< ns3::Ipv4Route >', 'route')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::SendWithHeader(ns3::Ptr packet, ns3::Ipv4Header ipHeader, ns3::Ptr route) [member function] + cls.add_method('SendWithHeader', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'packet'), param('ns3::Ipv4Header', 'ipHeader'), param('ns3::Ptr< ns3::Ipv4Route >', 'route')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::SetDefaultTtl(uint8_t ttl) [member function] + cls.add_method('SetDefaultTtl', + 'void', + [param('uint8_t', 'ttl')]) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::SetDown(uint32_t i) [member function] + cls.add_method('SetDown', + 'void', + [param('uint32_t', 'i')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::SetForwarding(uint32_t i, bool val) [member function] + cls.add_method('SetForwarding', + 'void', + [param('uint32_t', 'i'), param('bool', 'val')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::SetMetric(uint32_t i, uint16_t metric) [member function] + cls.add_method('SetMetric', + 'void', + [param('uint32_t', 'i'), param('uint16_t', 'metric')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::SetNode(ns3::Ptr node) [member function] + cls.add_method('SetNode', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')]) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::SetRoutingProtocol(ns3::Ptr routingProtocol) [member function] + cls.add_method('SetRoutingProtocol', + 'void', + [param('ns3::Ptr< ns3::Ipv4RoutingProtocol >', 'routingProtocol')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::SetUp(uint32_t i) [member function] + cls.add_method('SetUp', + 'void', + [param('uint32_t', 'i')], + is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): ns3::Ipv4L3Protocol::PROT_NUMBER [variable] + cls.add_static_attribute('PROT_NUMBER', 'uint16_t const', is_const=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::NotifyNewAggregate() [member function] + cls.add_method('NotifyNewAggregate', + 'void', + [], + visibility='protected', is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::GetIpForward() const [member function] + cls.add_method('GetIpForward', + 'bool', + [], + is_const=True, visibility='private', is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): bool ns3::Ipv4L3Protocol::GetWeakEsModel() const [member function] + cls.add_method('GetWeakEsModel', + 'bool', + [], + is_const=True, visibility='private', is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::SetIpForward(bool forward) [member function] + cls.add_method('SetIpForward', + 'void', + [param('bool', 'forward')], + visibility='private', is_virtual=True) + ## ipv4-l3-protocol.h (module 'internet'): void ns3::Ipv4L3Protocol::SetWeakEsModel(bool model) [member function] + cls.add_method('SetWeakEsModel', + 'void', + [param('bool', 'model')], + visibility='private', is_virtual=True) + 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_Ns3Ipv4MulticastRoute_methods(root_module, cls): + ## ipv4-route.h (module 'internet'): ns3::Ipv4MulticastRoute::Ipv4MulticastRoute(ns3::Ipv4MulticastRoute const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4MulticastRoute const &', 'arg0')]) + ## ipv4-route.h (module 'internet'): ns3::Ipv4MulticastRoute::Ipv4MulticastRoute() [constructor] + cls.add_constructor([]) + ## ipv4-route.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4MulticastRoute::GetGroup() const [member function] + cls.add_method('GetGroup', + 'ns3::Ipv4Address', + [], + is_const=True) + ## ipv4-route.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4MulticastRoute::GetOrigin() const [member function] + cls.add_method('GetOrigin', + 'ns3::Ipv4Address', + [], + is_const=True) + ## ipv4-route.h (module 'internet'): uint32_t ns3::Ipv4MulticastRoute::GetOutputTtl(uint32_t oif) [member function] + cls.add_method('GetOutputTtl', + 'uint32_t', + [param('uint32_t', 'oif')], + deprecated=True) + ## ipv4-route.h (module 'internet'): std::map, std::allocator > > ns3::Ipv4MulticastRoute::GetOutputTtlMap() const [member function] + cls.add_method('GetOutputTtlMap', + 'std::map< unsigned int, unsigned int >', + [], + is_const=True) + ## ipv4-route.h (module 'internet'): uint32_t ns3::Ipv4MulticastRoute::GetParent() const [member function] + cls.add_method('GetParent', + 'uint32_t', + [], + is_const=True) + ## ipv4-route.h (module 'internet'): void ns3::Ipv4MulticastRoute::SetGroup(ns3::Ipv4Address const group) [member function] + cls.add_method('SetGroup', + 'void', + [param('ns3::Ipv4Address const', 'group')]) + ## ipv4-route.h (module 'internet'): void ns3::Ipv4MulticastRoute::SetOrigin(ns3::Ipv4Address const origin) [member function] + cls.add_method('SetOrigin', + 'void', + [param('ns3::Ipv4Address const', 'origin')]) + ## ipv4-route.h (module 'internet'): void ns3::Ipv4MulticastRoute::SetOutputTtl(uint32_t oif, uint32_t ttl) [member function] + cls.add_method('SetOutputTtl', + 'void', + [param('uint32_t', 'oif'), param('uint32_t', 'ttl')]) + ## ipv4-route.h (module 'internet'): void ns3::Ipv4MulticastRoute::SetParent(uint32_t iif) [member function] + cls.add_method('SetParent', + 'void', + [param('uint32_t', 'iif')]) + ## ipv4-route.h (module 'internet'): ns3::Ipv4MulticastRoute::MAX_INTERFACES [variable] + cls.add_static_attribute('MAX_INTERFACES', 'uint32_t const', is_const=True) + ## ipv4-route.h (module 'internet'): ns3::Ipv4MulticastRoute::MAX_TTL [variable] + cls.add_static_attribute('MAX_TTL', 'uint32_t const', is_const=True) + return + +def register_Ns3Ipv4Route_methods(root_module, cls): + cls.add_output_stream_operator() + ## ipv4-route.h (module 'internet'): ns3::Ipv4Route::Ipv4Route(ns3::Ipv4Route const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4Route const &', 'arg0')]) + ## ipv4-route.h (module 'internet'): ns3::Ipv4Route::Ipv4Route() [constructor] + cls.add_constructor([]) + ## ipv4-route.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4Route::GetDestination() const [member function] + cls.add_method('GetDestination', + 'ns3::Ipv4Address', + [], + is_const=True) + ## ipv4-route.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4Route::GetGateway() const [member function] + cls.add_method('GetGateway', + 'ns3::Ipv4Address', + [], + is_const=True) + ## ipv4-route.h (module 'internet'): ns3::Ptr ns3::Ipv4Route::GetOutputDevice() const [member function] + cls.add_method('GetOutputDevice', + 'ns3::Ptr< ns3::NetDevice >', + [], + is_const=True) + ## ipv4-route.h (module 'internet'): ns3::Ipv4Address ns3::Ipv4Route::GetSource() const [member function] + cls.add_method('GetSource', + 'ns3::Ipv4Address', + [], + is_const=True) + ## ipv4-route.h (module 'internet'): void ns3::Ipv4Route::SetDestination(ns3::Ipv4Address dest) [member function] + cls.add_method('SetDestination', + 'void', + [param('ns3::Ipv4Address', 'dest')]) + ## ipv4-route.h (module 'internet'): void ns3::Ipv4Route::SetGateway(ns3::Ipv4Address gw) [member function] + cls.add_method('SetGateway', + 'void', + [param('ns3::Ipv4Address', 'gw')]) + ## ipv4-route.h (module 'internet'): void ns3::Ipv4Route::SetOutputDevice(ns3::Ptr outputDevice) [member function] + cls.add_method('SetOutputDevice', + 'void', + [param('ns3::Ptr< ns3::NetDevice >', 'outputDevice')]) + ## ipv4-route.h (module 'internet'): void ns3::Ipv4Route::SetSource(ns3::Ipv4Address src) [member function] + cls.add_method('SetSource', + 'void', + [param('ns3::Ipv4Address', 'src')]) + return + +def register_Ns3Ipv4RoutingProtocol_methods(root_module, cls): + ## ipv4-routing-protocol.h (module 'internet'): ns3::Ipv4RoutingProtocol::Ipv4RoutingProtocol() [constructor] + cls.add_constructor([]) + ## ipv4-routing-protocol.h (module 'internet'): ns3::Ipv4RoutingProtocol::Ipv4RoutingProtocol(ns3::Ipv4RoutingProtocol const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv4RoutingProtocol const &', 'arg0')]) + ## ipv4-routing-protocol.h (module 'internet'): static ns3::TypeId ns3::Ipv4RoutingProtocol::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv4-routing-protocol.h (module 'internet'): void ns3::Ipv4RoutingProtocol::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyAddAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_pure_virtual=True, is_virtual=True) + ## ipv4-routing-protocol.h (module 'internet'): void ns3::Ipv4RoutingProtocol::NotifyInterfaceDown(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceDown', + 'void', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv4-routing-protocol.h (module 'internet'): void ns3::Ipv4RoutingProtocol::NotifyInterfaceUp(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceUp', + 'void', + [param('uint32_t', 'interface')], + is_pure_virtual=True, is_virtual=True) + ## ipv4-routing-protocol.h (module 'internet'): void ns3::Ipv4RoutingProtocol::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyRemoveAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_pure_virtual=True, is_virtual=True) + ## ipv4-routing-protocol.h (module 'internet'): void ns3::Ipv4RoutingProtocol::PrintRoutingTable(ns3::Ptr stream) const [member function] + cls.add_method('PrintRoutingTable', + 'void', + [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')], + is_pure_virtual=True, is_const=True, is_virtual=True) + ## ipv4-routing-protocol.h (module 'internet'): bool ns3::Ipv4RoutingProtocol::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback, ns3::Ptr, ns3::Ipv4Header const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback, ns3::Ipv4Header const&, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ecb) [member function] + cls.add_method('RouteInput', + 'bool', + [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'lcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')], + is_pure_virtual=True, is_virtual=True) + ## ipv4-routing-protocol.h (module 'internet'): ns3::Ptr ns3::Ipv4RoutingProtocol::RouteOutput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr oif, ns3::Socket::SocketErrno & sockerr) [member function] + cls.add_method('RouteOutput', + 'ns3::Ptr< ns3::Ipv4Route >', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice >', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')], + is_pure_virtual=True, is_virtual=True) + ## ipv4-routing-protocol.h (module 'internet'): void ns3::Ipv4RoutingProtocol::SetIpv4(ns3::Ptr ipv4) [member function] + cls.add_method('SetIpv4', + 'void', + [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], + is_pure_virtual=True, is_virtual=True) + 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_Ns3Ipv6Interface_methods(root_module, cls): + ## ipv6-interface.h (module 'internet'): ns3::Ipv6Interface::Ipv6Interface(ns3::Ipv6Interface const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Ipv6Interface const &', 'arg0')]) + ## ipv6-interface.h (module 'internet'): ns3::Ipv6Interface::Ipv6Interface() [constructor] + cls.add_constructor([]) + ## ipv6-interface.h (module 'internet'): bool ns3::Ipv6Interface::AddAddress(ns3::Ipv6InterfaceAddress iface) [member function] + cls.add_method('AddAddress', + 'bool', + [param('ns3::Ipv6InterfaceAddress', 'iface')]) + ## ipv6-interface.h (module 'internet'): ns3::Ipv6InterfaceAddress ns3::Ipv6Interface::GetAddress(uint32_t index) const [member function] + cls.add_method('GetAddress', + 'ns3::Ipv6InterfaceAddress', + [param('uint32_t', 'index')], + is_const=True) + ## ipv6-interface.h (module 'internet'): ns3::Ipv6InterfaceAddress ns3::Ipv6Interface::GetAddressMatchingDestination(ns3::Ipv6Address dst) [member function] + cls.add_method('GetAddressMatchingDestination', + 'ns3::Ipv6InterfaceAddress', + [param('ns3::Ipv6Address', 'dst')]) + ## ipv6-interface.h (module 'internet'): uint16_t ns3::Ipv6Interface::GetBaseReachableTime() const [member function] + cls.add_method('GetBaseReachableTime', + 'uint16_t', + [], + is_const=True) + ## ipv6-interface.h (module 'internet'): uint8_t ns3::Ipv6Interface::GetCurHopLimit() const [member function] + cls.add_method('GetCurHopLimit', + 'uint8_t', + [], + is_const=True) + ## ipv6-interface.h (module 'internet'): ns3::Ptr ns3::Ipv6Interface::GetDevice() const [member function] + cls.add_method('GetDevice', + 'ns3::Ptr< ns3::NetDevice >', + [], + is_const=True, is_virtual=True) + ## ipv6-interface.h (module 'internet'): ns3::Ipv6InterfaceAddress ns3::Ipv6Interface::GetLinkLocalAddress() const [member function] + cls.add_method('GetLinkLocalAddress', + 'ns3::Ipv6InterfaceAddress', + [], + is_const=True) + ## ipv6-interface.h (module 'internet'): uint16_t ns3::Ipv6Interface::GetMetric() const [member function] + cls.add_method('GetMetric', + 'uint16_t', + [], + is_const=True) + ## ipv6-interface.h (module 'internet'): uint32_t ns3::Ipv6Interface::GetNAddresses() const [member function] + cls.add_method('GetNAddresses', + 'uint32_t', + [], + is_const=True) + ## ipv6-interface.h (module 'internet'): uint16_t ns3::Ipv6Interface::GetReachableTime() const [member function] + cls.add_method('GetReachableTime', + 'uint16_t', + [], + is_const=True) + ## ipv6-interface.h (module 'internet'): uint16_t ns3::Ipv6Interface::GetRetransTimer() const [member function] + cls.add_method('GetRetransTimer', + 'uint16_t', + [], + is_const=True) + ## ipv6-interface.h (module 'internet'): static ns3::TypeId ns3::Ipv6Interface::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## ipv6-interface.h (module 'internet'): bool ns3::Ipv6Interface::IsDown() const [member function] + cls.add_method('IsDown', + 'bool', + [], + is_const=True) + ## ipv6-interface.h (module 'internet'): bool ns3::Ipv6Interface::IsForwarding() const [member function] + cls.add_method('IsForwarding', + 'bool', + [], + is_const=True) + ## ipv6-interface.h (module 'internet'): bool ns3::Ipv6Interface::IsUp() const [member function] + cls.add_method('IsUp', + 'bool', + [], + is_const=True) + ## ipv6-interface.h (module 'internet'): ns3::Ipv6InterfaceAddress ns3::Ipv6Interface::RemoveAddress(uint32_t index) [member function] + cls.add_method('RemoveAddress', + 'ns3::Ipv6InterfaceAddress', + [param('uint32_t', 'index')]) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::Send(ns3::Ptr p, ns3::Ipv6Address dest) [member function] + cls.add_method('Send', + 'void', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv6Address', 'dest')]) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::SetBaseReachableTime(uint16_t baseReachableTime) [member function] + cls.add_method('SetBaseReachableTime', + 'void', + [param('uint16_t', 'baseReachableTime')]) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::SetCurHopLimit(uint8_t curHopLimit) [member function] + cls.add_method('SetCurHopLimit', + 'void', + [param('uint8_t', 'curHopLimit')]) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::SetDevice(ns3::Ptr device) [member function] + cls.add_method('SetDevice', + 'void', + [param('ns3::Ptr< ns3::NetDevice >', 'device')]) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::SetDown() [member function] + cls.add_method('SetDown', + 'void', + []) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::SetForwarding(bool forward) [member function] + cls.add_method('SetForwarding', + 'void', + [param('bool', 'forward')]) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::SetMetric(uint16_t metric) [member function] + cls.add_method('SetMetric', + 'void', + [param('uint16_t', 'metric')]) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::SetNode(ns3::Ptr node) [member function] + cls.add_method('SetNode', + 'void', + [param('ns3::Ptr< ns3::Node >', 'node')]) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::SetNsDadUid(ns3::Ipv6Address address, uint32_t uid) [member function] + cls.add_method('SetNsDadUid', + 'void', + [param('ns3::Ipv6Address', 'address'), param('uint32_t', 'uid')]) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::SetReachableTime(uint16_t reachableTime) [member function] + cls.add_method('SetReachableTime', + 'void', + [param('uint16_t', 'reachableTime')]) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::SetRetransTimer(uint16_t retransTimer) [member function] + cls.add_method('SetRetransTimer', + 'void', + [param('uint16_t', 'retransTimer')]) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::SetState(ns3::Ipv6Address address, ns3::Ipv6InterfaceAddress::State_e state) [member function] + cls.add_method('SetState', + 'void', + [param('ns3::Ipv6Address', 'address'), param('ns3::Ipv6InterfaceAddress::State_e', 'state')]) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::SetUp() [member function] + cls.add_method('SetUp', + 'void', + []) + ## ipv6-interface.h (module 'internet'): void ns3::Ipv6Interface::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + visibility='protected', is_virtual=True) + 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_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,short unsigned int,const ns3::Address&,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 >, short unsigned int, 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_Ns3OutputStreamWrapper_methods(root_module, cls): + ## output-stream-wrapper.h (module 'network'): ns3::OutputStreamWrapper::OutputStreamWrapper(ns3::OutputStreamWrapper const & arg0) [copy constructor] + cls.add_constructor([param('ns3::OutputStreamWrapper const &', 'arg0')]) + ## output-stream-wrapper.h (module 'network'): ns3::OutputStreamWrapper::OutputStreamWrapper(std::string filename, std::_Ios_Openmode filemode) [constructor] + cls.add_constructor([param('std::string', 'filename'), param('std::_Ios_Openmode', 'filemode')]) + ## output-stream-wrapper.h (module 'network'): ns3::OutputStreamWrapper::OutputStreamWrapper(std::ostream * os) [constructor] + cls.add_constructor([param('std::ostream *', 'os')]) + ## output-stream-wrapper.h (module 'network'): std::ostream * ns3::OutputStreamWrapper::GetStream() [member function] + cls.add_method('GetStream', + 'std::ostream *', + []) + 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'): uint8_t const * ns3::Packet::PeekData() const [member function] + cls.add_method('PeekData', + 'uint8_t const *', + [], + deprecated=True, 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'): 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 arg0) [member function] + cls.add_method('SetNixVector', + 'void', + [param('ns3::Ptr< ns3::NixVector >', 'arg0')]) + 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_Ns3TimeChecker_methods(root_module, cls): + ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker() [constructor] + cls.add_constructor([]) + ## nstime.h (module 'core'): ns3::TimeChecker::TimeChecker(ns3::TimeChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::TimeChecker const &', 'arg0')]) + 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_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_Ns3AodvDuplicatePacketDetection_methods(root_module, cls): + ## aodv-dpd.h (module 'aodv'): ns3::aodv::DuplicatePacketDetection::DuplicatePacketDetection(ns3::aodv::DuplicatePacketDetection const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::DuplicatePacketDetection const &', 'arg0')]) + ## aodv-dpd.h (module 'aodv'): ns3::aodv::DuplicatePacketDetection::DuplicatePacketDetection(ns3::Time lifetime) [constructor] + cls.add_constructor([param('ns3::Time', 'lifetime')]) + ## aodv-dpd.h (module 'aodv'): ns3::Time ns3::aodv::DuplicatePacketDetection::GetLifetime() const [member function] + cls.add_method('GetLifetime', + 'ns3::Time', + [], + is_const=True) + ## aodv-dpd.h (module 'aodv'): bool ns3::aodv::DuplicatePacketDetection::IsDuplicate(ns3::Ptr p, ns3::Ipv4Header const & header) [member function] + cls.add_method('IsDuplicate', + 'bool', + [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header')]) + ## aodv-dpd.h (module 'aodv'): void ns3::aodv::DuplicatePacketDetection::SetLifetime(ns3::Time lifetime) [member function] + cls.add_method('SetLifetime', + 'void', + [param('ns3::Time', 'lifetime')]) + return + +def register_Ns3AodvIdCache_methods(root_module, cls): + ## aodv-id-cache.h (module 'aodv'): ns3::aodv::IdCache::IdCache(ns3::aodv::IdCache const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::IdCache const &', 'arg0')]) + ## aodv-id-cache.h (module 'aodv'): ns3::aodv::IdCache::IdCache(ns3::Time lifetime) [constructor] + cls.add_constructor([param('ns3::Time', 'lifetime')]) + ## aodv-id-cache.h (module 'aodv'): ns3::Time ns3::aodv::IdCache::GetLifeTime() const [member function] + cls.add_method('GetLifeTime', + 'ns3::Time', + [], + is_const=True) + ## aodv-id-cache.h (module 'aodv'): uint32_t ns3::aodv::IdCache::GetSize() [member function] + cls.add_method('GetSize', + 'uint32_t', + []) + ## aodv-id-cache.h (module 'aodv'): bool ns3::aodv::IdCache::IsDuplicate(ns3::Ipv4Address addr, uint32_t id) [member function] + cls.add_method('IsDuplicate', + 'bool', + [param('ns3::Ipv4Address', 'addr'), param('uint32_t', 'id')]) + ## aodv-id-cache.h (module 'aodv'): void ns3::aodv::IdCache::Purge() [member function] + cls.add_method('Purge', + 'void', + []) + ## aodv-id-cache.h (module 'aodv'): void ns3::aodv::IdCache::SetLifetime(ns3::Time lifetime) [member function] + cls.add_method('SetLifetime', + 'void', + [param('ns3::Time', 'lifetime')]) + return + +def register_Ns3AodvNeighbors_methods(root_module, cls): + ## aodv-neighbor.h (module 'aodv'): ns3::aodv::Neighbors::Neighbors(ns3::aodv::Neighbors const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::Neighbors const &', 'arg0')]) + ## aodv-neighbor.h (module 'aodv'): ns3::aodv::Neighbors::Neighbors(ns3::Time delay) [constructor] + cls.add_constructor([param('ns3::Time', 'delay')]) + ## aodv-neighbor.h (module 'aodv'): void ns3::aodv::Neighbors::AddArpCache(ns3::Ptr arg0) [member function] + cls.add_method('AddArpCache', + 'void', + [param('ns3::Ptr< ns3::ArpCache >', 'arg0')]) + ## aodv-neighbor.h (module 'aodv'): void ns3::aodv::Neighbors::Clear() [member function] + cls.add_method('Clear', + 'void', + []) + ## aodv-neighbor.h (module 'aodv'): void ns3::aodv::Neighbors::DelArpCache(ns3::Ptr arg0) [member function] + cls.add_method('DelArpCache', + 'void', + [param('ns3::Ptr< ns3::ArpCache >', 'arg0')]) + ## aodv-neighbor.h (module 'aodv'): ns3::Callback ns3::aodv::Neighbors::GetCallback() const [member function] + cls.add_method('GetCallback', + 'ns3::Callback< void, ns3::Ipv4Address, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', + [], + is_const=True) + ## aodv-neighbor.h (module 'aodv'): ns3::Time ns3::aodv::Neighbors::GetExpireTime(ns3::Ipv4Address addr) [member function] + cls.add_method('GetExpireTime', + 'ns3::Time', + [param('ns3::Ipv4Address', 'addr')]) + ## aodv-neighbor.h (module 'aodv'): ns3::Callback ns3::aodv::Neighbors::GetTxErrorCallback() const [member function] + cls.add_method('GetTxErrorCallback', + 'ns3::Callback< void, ns3::WifiMacHeader const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', + [], + is_const=True) + ## aodv-neighbor.h (module 'aodv'): bool ns3::aodv::Neighbors::IsNeighbor(ns3::Ipv4Address addr) [member function] + cls.add_method('IsNeighbor', + 'bool', + [param('ns3::Ipv4Address', 'addr')]) + ## aodv-neighbor.h (module 'aodv'): void ns3::aodv::Neighbors::Purge() [member function] + cls.add_method('Purge', + 'void', + []) + ## aodv-neighbor.h (module 'aodv'): void ns3::aodv::Neighbors::ScheduleTimer() [member function] + cls.add_method('ScheduleTimer', + 'void', + []) + ## aodv-neighbor.h (module 'aodv'): void ns3::aodv::Neighbors::SetCallback(ns3::Callback cb) [member function] + cls.add_method('SetCallback', + 'void', + [param('ns3::Callback< void, ns3::Ipv4Address, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'cb')]) + ## aodv-neighbor.h (module 'aodv'): void ns3::aodv::Neighbors::Update(ns3::Ipv4Address addr, ns3::Time expire) [member function] + cls.add_method('Update', + 'void', + [param('ns3::Ipv4Address', 'addr'), param('ns3::Time', 'expire')]) + return + +def register_Ns3AodvNeighborsNeighbor_methods(root_module, cls): + ## aodv-neighbor.h (module 'aodv'): ns3::aodv::Neighbors::Neighbor::Neighbor(ns3::aodv::Neighbors::Neighbor const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::Neighbors::Neighbor const &', 'arg0')]) + ## aodv-neighbor.h (module 'aodv'): ns3::aodv::Neighbors::Neighbor::Neighbor(ns3::Ipv4Address ip, ns3::Mac48Address mac, ns3::Time t) [constructor] + cls.add_constructor([param('ns3::Ipv4Address', 'ip'), param('ns3::Mac48Address', 'mac'), param('ns3::Time', 't')]) + ## aodv-neighbor.h (module 'aodv'): ns3::aodv::Neighbors::Neighbor::close [variable] + cls.add_instance_attribute('close', 'bool', is_const=False) + ## aodv-neighbor.h (module 'aodv'): ns3::aodv::Neighbors::Neighbor::m_expireTime [variable] + cls.add_instance_attribute('m_expireTime', 'ns3::Time', is_const=False) + ## aodv-neighbor.h (module 'aodv'): ns3::aodv::Neighbors::Neighbor::m_hardwareAddress [variable] + cls.add_instance_attribute('m_hardwareAddress', 'ns3::Mac48Address', is_const=False) + ## aodv-neighbor.h (module 'aodv'): ns3::aodv::Neighbors::Neighbor::m_neighborAddress [variable] + cls.add_instance_attribute('m_neighborAddress', 'ns3::Ipv4Address', is_const=False) + return + +def register_Ns3AodvQueueEntry_methods(root_module, cls): + cls.add_binary_comparison_operator('==') + ## aodv-rqueue.h (module 'aodv'): ns3::aodv::QueueEntry::QueueEntry(ns3::aodv::QueueEntry const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::QueueEntry const &', 'arg0')]) + ## aodv-rqueue.h (module 'aodv'): ns3::aodv::QueueEntry::QueueEntry(ns3::Ptr pa=0, ns3::Ipv4Header const & h=ns3::Ipv4Header(), ns3::Callback, ns3::Ptr, ns3::Ipv4Header const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ucb=ns3::Callback, ns3::Ptr, const ns3::Ipv4Header&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>(), ns3::Callback, ns3::Ipv4Header const&, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ecb=ns3::Callback, const ns3::Ipv4Header&, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>(), ns3::Time exp=ns3::Simulator::Now( )) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::Packet const >', 'pa', default_value='0'), param('ns3::Ipv4Header const &', 'h', default_value='ns3::Ipv4Header()'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb', default_value='ns3::Callback, ns3::Ptr, const ns3::Ipv4Header&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>()'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb', default_value='ns3::Callback, const ns3::Ipv4Header&, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>()'), param('ns3::Time', 'exp', default_value='ns3::Simulator::Now( )')]) + ## aodv-rqueue.h (module 'aodv'): ns3::Callback, ns3::Ipv4Header const&, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ns3::aodv::QueueEntry::GetErrorCallback() const [member function] + cls.add_method('GetErrorCallback', + 'ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', + [], + is_const=True) + ## aodv-rqueue.h (module 'aodv'): ns3::Time ns3::aodv::QueueEntry::GetExpireTime() const [member function] + cls.add_method('GetExpireTime', + 'ns3::Time', + [], + is_const=True) + ## aodv-rqueue.h (module 'aodv'): ns3::Ipv4Header ns3::aodv::QueueEntry::GetIpv4Header() const [member function] + cls.add_method('GetIpv4Header', + 'ns3::Ipv4Header', + [], + is_const=True) + ## aodv-rqueue.h (module 'aodv'): ns3::Ptr ns3::aodv::QueueEntry::GetPacket() const [member function] + cls.add_method('GetPacket', + 'ns3::Ptr< ns3::Packet const >', + [], + is_const=True) + ## aodv-rqueue.h (module 'aodv'): ns3::Callback, ns3::Ptr, ns3::Ipv4Header const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ns3::aodv::QueueEntry::GetUnicastForwardCallback() const [member function] + cls.add_method('GetUnicastForwardCallback', + 'ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', + [], + is_const=True) + ## aodv-rqueue.h (module 'aodv'): void ns3::aodv::QueueEntry::SetErrorCallback(ns3::Callback, ns3::Ipv4Header const&, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ecb) [member function] + cls.add_method('SetErrorCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')]) + ## aodv-rqueue.h (module 'aodv'): void ns3::aodv::QueueEntry::SetExpireTime(ns3::Time exp) [member function] + cls.add_method('SetExpireTime', + 'void', + [param('ns3::Time', 'exp')]) + ## aodv-rqueue.h (module 'aodv'): void ns3::aodv::QueueEntry::SetIpv4Header(ns3::Ipv4Header h) [member function] + cls.add_method('SetIpv4Header', + 'void', + [param('ns3::Ipv4Header', 'h')]) + ## aodv-rqueue.h (module 'aodv'): void ns3::aodv::QueueEntry::SetPacket(ns3::Ptr p) [member function] + cls.add_method('SetPacket', + 'void', + [param('ns3::Ptr< ns3::Packet const >', 'p')]) + ## aodv-rqueue.h (module 'aodv'): void ns3::aodv::QueueEntry::SetUnicastForwardCallback(ns3::Callback, ns3::Ptr, ns3::Ipv4Header const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ucb) [member function] + cls.add_method('SetUnicastForwardCallback', + 'void', + [param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb')]) + return + +def register_Ns3AodvRequestQueue_methods(root_module, cls): + ## aodv-rqueue.h (module 'aodv'): ns3::aodv::RequestQueue::RequestQueue(ns3::aodv::RequestQueue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::RequestQueue const &', 'arg0')]) + ## aodv-rqueue.h (module 'aodv'): ns3::aodv::RequestQueue::RequestQueue(uint32_t maxLen, ns3::Time routeToQueueTimeout) [constructor] + cls.add_constructor([param('uint32_t', 'maxLen'), param('ns3::Time', 'routeToQueueTimeout')]) + ## aodv-rqueue.h (module 'aodv'): bool ns3::aodv::RequestQueue::Dequeue(ns3::Ipv4Address dst, ns3::aodv::QueueEntry & entry) [member function] + cls.add_method('Dequeue', + 'bool', + [param('ns3::Ipv4Address', 'dst'), param('ns3::aodv::QueueEntry &', 'entry')]) + ## aodv-rqueue.h (module 'aodv'): void ns3::aodv::RequestQueue::DropPacketWithDst(ns3::Ipv4Address dst) [member function] + cls.add_method('DropPacketWithDst', + 'void', + [param('ns3::Ipv4Address', 'dst')]) + ## aodv-rqueue.h (module 'aodv'): bool ns3::aodv::RequestQueue::Enqueue(ns3::aodv::QueueEntry & entry) [member function] + cls.add_method('Enqueue', + 'bool', + [param('ns3::aodv::QueueEntry &', 'entry')]) + ## aodv-rqueue.h (module 'aodv'): bool ns3::aodv::RequestQueue::Find(ns3::Ipv4Address dst) [member function] + cls.add_method('Find', + 'bool', + [param('ns3::Ipv4Address', 'dst')]) + ## aodv-rqueue.h (module 'aodv'): uint32_t ns3::aodv::RequestQueue::GetMaxQueueLen() const [member function] + cls.add_method('GetMaxQueueLen', + 'uint32_t', + [], + is_const=True) + ## aodv-rqueue.h (module 'aodv'): ns3::Time ns3::aodv::RequestQueue::GetQueueTimeout() const [member function] + cls.add_method('GetQueueTimeout', + 'ns3::Time', + [], + is_const=True) + ## aodv-rqueue.h (module 'aodv'): uint32_t ns3::aodv::RequestQueue::GetSize() [member function] + cls.add_method('GetSize', + 'uint32_t', + []) + ## aodv-rqueue.h (module 'aodv'): void ns3::aodv::RequestQueue::SetMaxQueueLen(uint32_t len) [member function] + cls.add_method('SetMaxQueueLen', + 'void', + [param('uint32_t', 'len')]) + ## aodv-rqueue.h (module 'aodv'): void ns3::aodv::RequestQueue::SetQueueTimeout(ns3::Time t) [member function] + cls.add_method('SetQueueTimeout', + 'void', + [param('ns3::Time', 't')]) + return + +def register_Ns3AodvRerrHeader_methods(root_module, cls): + cls.add_output_stream_operator() + cls.add_binary_comparison_operator('==') + ## aodv-packet.h (module 'aodv'): ns3::aodv::RerrHeader::RerrHeader(ns3::aodv::RerrHeader const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::RerrHeader const &', 'arg0')]) + ## aodv-packet.h (module 'aodv'): ns3::aodv::RerrHeader::RerrHeader() [constructor] + cls.add_constructor([]) + ## aodv-packet.h (module 'aodv'): bool ns3::aodv::RerrHeader::AddUnDestination(ns3::Ipv4Address dst, uint32_t seqNo) [member function] + cls.add_method('AddUnDestination', + 'bool', + [param('ns3::Ipv4Address', 'dst'), param('uint32_t', 'seqNo')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RerrHeader::Clear() [member function] + cls.add_method('Clear', + 'void', + []) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::RerrHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## aodv-packet.h (module 'aodv'): uint8_t ns3::aodv::RerrHeader::GetDestCount() const [member function] + cls.add_method('GetDestCount', + 'uint8_t', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): ns3::TypeId ns3::aodv::RerrHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): bool ns3::aodv::RerrHeader::GetNoDelete() const [member function] + cls.add_method('GetNoDelete', + 'bool', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::RerrHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): static ns3::TypeId ns3::aodv::RerrHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RerrHeader::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): bool ns3::aodv::RerrHeader::RemoveUnDestination(std::pair & un) [member function] + cls.add_method('RemoveUnDestination', + 'bool', + [param('std::pair< ns3::Ipv4Address, unsigned int > &', 'un')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RerrHeader::Serialize(ns3::Buffer::Iterator i) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'i')], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RerrHeader::SetNoDelete(bool f) [member function] + cls.add_method('SetNoDelete', + 'void', + [param('bool', 'f')]) + return + +def register_Ns3AodvRoutingProtocol_methods(root_module, cls): + ## aodv-routing-protocol.h (module 'aodv'): ns3::aodv::RoutingProtocol::RoutingProtocol(ns3::aodv::RoutingProtocol const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::RoutingProtocol const &', 'arg0')]) + ## aodv-routing-protocol.h (module 'aodv'): ns3::aodv::RoutingProtocol::RoutingProtocol() [constructor] + cls.add_constructor([]) + ## aodv-routing-protocol.h (module 'aodv'): int64_t ns3::aodv::RoutingProtocol::AssignStreams(int64_t stream) [member function] + cls.add_method('AssignStreams', + 'int64_t', + [param('int64_t', 'stream')]) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::DoDispose() [member function] + cls.add_method('DoDispose', + 'void', + [], + is_virtual=True) + ## aodv-routing-protocol.h (module 'aodv'): bool ns3::aodv::RoutingProtocol::GetBroadcastEnable() const [member function] + cls.add_method('GetBroadcastEnable', + 'bool', + [], + is_const=True) + ## aodv-routing-protocol.h (module 'aodv'): bool ns3::aodv::RoutingProtocol::GetDesinationOnlyFlag() const [member function] + cls.add_method('GetDesinationOnlyFlag', + 'bool', + [], + is_const=True) + ## aodv-routing-protocol.h (module 'aodv'): bool ns3::aodv::RoutingProtocol::GetGratuitousReplyFlag() const [member function] + cls.add_method('GetGratuitousReplyFlag', + 'bool', + [], + is_const=True) + ## aodv-routing-protocol.h (module 'aodv'): bool ns3::aodv::RoutingProtocol::GetHelloEnable() const [member function] + cls.add_method('GetHelloEnable', + 'bool', + [], + is_const=True) + ## aodv-routing-protocol.h (module 'aodv'): uint32_t ns3::aodv::RoutingProtocol::GetMaxQueueLen() const [member function] + cls.add_method('GetMaxQueueLen', + 'uint32_t', + [], + is_const=True) + ## aodv-routing-protocol.h (module 'aodv'): ns3::Time ns3::aodv::RoutingProtocol::GetMaxQueueTime() const [member function] + cls.add_method('GetMaxQueueTime', + 'ns3::Time', + [], + is_const=True) + ## aodv-routing-protocol.h (module 'aodv'): static ns3::TypeId ns3::aodv::RoutingProtocol::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::NotifyAddAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyAddAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_virtual=True) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::NotifyInterfaceDown(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceDown', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::NotifyInterfaceUp(uint32_t interface) [member function] + cls.add_method('NotifyInterfaceUp', + 'void', + [param('uint32_t', 'interface')], + is_virtual=True) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::NotifyRemoveAddress(uint32_t interface, ns3::Ipv4InterfaceAddress address) [member function] + cls.add_method('NotifyRemoveAddress', + 'void', + [param('uint32_t', 'interface'), param('ns3::Ipv4InterfaceAddress', 'address')], + is_virtual=True) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::PrintRoutingTable(ns3::Ptr stream) const [member function] + cls.add_method('PrintRoutingTable', + 'void', + [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')], + is_const=True, is_virtual=True) + ## aodv-routing-protocol.h (module 'aodv'): bool ns3::aodv::RoutingProtocol::RouteInput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr idev, ns3::Callback, ns3::Ptr, ns3::Ipv4Header const&, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ucb, ns3::Callback,ns3::Ptr,const ns3::Ipv4Header&,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> mcb, ns3::Callback,const ns3::Ipv4Header&,unsigned int,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty,ns3::empty> lcb, ns3::Callback, ns3::Ipv4Header const&, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty> ecb) [member function] + cls.add_method('RouteInput', + 'bool', + [param('ns3::Ptr< ns3::Packet const >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice const >', 'idev'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4Route >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ucb'), param('ns3::Callback< void, ns3::Ptr< ns3::Ipv4MulticastRoute >, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'mcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, unsigned int, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'lcb'), param('ns3::Callback< void, ns3::Ptr< ns3::Packet const >, ns3::Ipv4Header const &, ns3::Socket::SocketErrno, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty >', 'ecb')], + is_virtual=True) + ## aodv-routing-protocol.h (module 'aodv'): ns3::Ptr ns3::aodv::RoutingProtocol::RouteOutput(ns3::Ptr p, ns3::Ipv4Header const & header, ns3::Ptr oif, ns3::Socket::SocketErrno & sockerr) [member function] + cls.add_method('RouteOutput', + 'ns3::Ptr< ns3::Ipv4Route >', + [param('ns3::Ptr< ns3::Packet >', 'p'), param('ns3::Ipv4Header const &', 'header'), param('ns3::Ptr< ns3::NetDevice >', 'oif'), param('ns3::Socket::SocketErrno &', 'sockerr')], + is_virtual=True) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::SetBroadcastEnable(bool f) [member function] + cls.add_method('SetBroadcastEnable', + 'void', + [param('bool', 'f')]) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::SetDesinationOnlyFlag(bool f) [member function] + cls.add_method('SetDesinationOnlyFlag', + 'void', + [param('bool', 'f')]) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::SetGratuitousReplyFlag(bool f) [member function] + cls.add_method('SetGratuitousReplyFlag', + 'void', + [param('bool', 'f')]) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::SetHelloEnable(bool f) [member function] + cls.add_method('SetHelloEnable', + 'void', + [param('bool', 'f')]) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::SetIpv4(ns3::Ptr ipv4) [member function] + cls.add_method('SetIpv4', + 'void', + [param('ns3::Ptr< ns3::Ipv4 >', 'ipv4')], + is_virtual=True) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::SetMaxQueueLen(uint32_t len) [member function] + cls.add_method('SetMaxQueueLen', + 'void', + [param('uint32_t', 'len')]) + ## aodv-routing-protocol.h (module 'aodv'): void ns3::aodv::RoutingProtocol::SetMaxQueueTime(ns3::Time t) [member function] + cls.add_method('SetMaxQueueTime', + 'void', + [param('ns3::Time', 't')]) + ## aodv-routing-protocol.h (module 'aodv'): ns3::aodv::RoutingProtocol::AODV_PORT [variable] + cls.add_static_attribute('AODV_PORT', 'uint32_t const', is_const=True) + return + +def register_Ns3AodvRoutingTable_methods(root_module, cls): + ## aodv-rtable.h (module 'aodv'): ns3::aodv::RoutingTable::RoutingTable(ns3::aodv::RoutingTable const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::RoutingTable const &', 'arg0')]) + ## aodv-rtable.h (module 'aodv'): ns3::aodv::RoutingTable::RoutingTable(ns3::Time t) [constructor] + cls.add_constructor([param('ns3::Time', 't')]) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTable::AddRoute(ns3::aodv::RoutingTableEntry & r) [member function] + cls.add_method('AddRoute', + 'bool', + [param('ns3::aodv::RoutingTableEntry &', 'r')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTable::Clear() [member function] + cls.add_method('Clear', + 'void', + []) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTable::DeleteAllRoutesFromInterface(ns3::Ipv4InterfaceAddress iface) [member function] + cls.add_method('DeleteAllRoutesFromInterface', + 'void', + [param('ns3::Ipv4InterfaceAddress', 'iface')]) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTable::DeleteRoute(ns3::Ipv4Address dst) [member function] + cls.add_method('DeleteRoute', + 'bool', + [param('ns3::Ipv4Address', 'dst')]) + ## aodv-rtable.h (module 'aodv'): ns3::Time ns3::aodv::RoutingTable::GetBadLinkLifetime() const [member function] + cls.add_method('GetBadLinkLifetime', + 'ns3::Time', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTable::GetListOfDestinationWithNextHop(ns3::Ipv4Address nextHop, std::map, std::allocator > > & unreachable) [member function] + cls.add_method('GetListOfDestinationWithNextHop', + 'void', + [param('ns3::Ipv4Address', 'nextHop'), param('std::map< ns3::Ipv4Address, unsigned int > &', 'unreachable')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTable::InvalidateRoutesWithDst(std::map, std::allocator > > const & unreachable) [member function] + cls.add_method('InvalidateRoutesWithDst', + 'void', + [param('std::map< ns3::Ipv4Address, unsigned int > const &', 'unreachable')]) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTable::LookupRoute(ns3::Ipv4Address dst, ns3::aodv::RoutingTableEntry & rt) [member function] + cls.add_method('LookupRoute', + 'bool', + [param('ns3::Ipv4Address', 'dst'), param('ns3::aodv::RoutingTableEntry &', 'rt')]) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTable::LookupValidRoute(ns3::Ipv4Address dst, ns3::aodv::RoutingTableEntry & rt) [member function] + cls.add_method('LookupValidRoute', + 'bool', + [param('ns3::Ipv4Address', 'dst'), param('ns3::aodv::RoutingTableEntry &', 'rt')]) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTable::MarkLinkAsUnidirectional(ns3::Ipv4Address neighbor, ns3::Time blacklistTimeout) [member function] + cls.add_method('MarkLinkAsUnidirectional', + 'bool', + [param('ns3::Ipv4Address', 'neighbor'), param('ns3::Time', 'blacklistTimeout')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTable::Print(ns3::Ptr stream) const [member function] + cls.add_method('Print', + 'void', + [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')], + is_const=True) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTable::Purge() [member function] + cls.add_method('Purge', + 'void', + []) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTable::SetBadLinkLifetime(ns3::Time t) [member function] + cls.add_method('SetBadLinkLifetime', + 'void', + [param('ns3::Time', 't')]) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTable::SetEntryState(ns3::Ipv4Address dst, ns3::aodv::RouteFlags state) [member function] + cls.add_method('SetEntryState', + 'bool', + [param('ns3::Ipv4Address', 'dst'), param('ns3::aodv::RouteFlags', 'state')]) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTable::Update(ns3::aodv::RoutingTableEntry & rt) [member function] + cls.add_method('Update', + 'bool', + [param('ns3::aodv::RoutingTableEntry &', 'rt')]) + return + +def register_Ns3AodvRoutingTableEntry_methods(root_module, cls): + ## aodv-rtable.h (module 'aodv'): ns3::aodv::RoutingTableEntry::RoutingTableEntry(ns3::aodv::RoutingTableEntry const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::RoutingTableEntry const &', 'arg0')]) + ## aodv-rtable.h (module 'aodv'): ns3::aodv::RoutingTableEntry::RoutingTableEntry(ns3::Ptr dev=0, ns3::Ipv4Address dst=ns3::Ipv4Address(), bool vSeqNo=false, uint32_t m_seqNo=0, ns3::Ipv4InterfaceAddress iface=ns3::Ipv4InterfaceAddress(), uint16_t hops=0, ns3::Ipv4Address nextHop=ns3::Ipv4Address(), ns3::Time lifetime=ns3::Simulator::Now( )) [constructor] + cls.add_constructor([param('ns3::Ptr< ns3::NetDevice >', 'dev', default_value='0'), param('ns3::Ipv4Address', 'dst', default_value='ns3::Ipv4Address()'), param('bool', 'vSeqNo', default_value='false'), param('uint32_t', 'm_seqNo', default_value='0'), param('ns3::Ipv4InterfaceAddress', 'iface', default_value='ns3::Ipv4InterfaceAddress()'), param('uint16_t', 'hops', default_value='0'), param('ns3::Ipv4Address', 'nextHop', default_value='ns3::Ipv4Address()'), param('ns3::Time', 'lifetime', default_value='ns3::Simulator::Now( )')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::DeleteAllPrecursors() [member function] + cls.add_method('DeleteAllPrecursors', + 'void', + []) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTableEntry::DeletePrecursor(ns3::Ipv4Address id) [member function] + cls.add_method('DeletePrecursor', + 'bool', + [param('ns3::Ipv4Address', 'id')]) + ## aodv-rtable.h (module 'aodv'): ns3::Time ns3::aodv::RoutingTableEntry::GetBlacklistTimeout() const [member function] + cls.add_method('GetBlacklistTimeout', + 'ns3::Time', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): ns3::Ipv4Address ns3::aodv::RoutingTableEntry::GetDestination() const [member function] + cls.add_method('GetDestination', + 'ns3::Ipv4Address', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): ns3::aodv::RouteFlags ns3::aodv::RoutingTableEntry::GetFlag() const [member function] + cls.add_method('GetFlag', + 'ns3::aodv::RouteFlags', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): uint16_t ns3::aodv::RoutingTableEntry::GetHop() const [member function] + cls.add_method('GetHop', + 'uint16_t', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): ns3::Ipv4InterfaceAddress ns3::aodv::RoutingTableEntry::GetInterface() const [member function] + cls.add_method('GetInterface', + 'ns3::Ipv4InterfaceAddress', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): ns3::Time ns3::aodv::RoutingTableEntry::GetLifeTime() const [member function] + cls.add_method('GetLifeTime', + 'ns3::Time', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): ns3::Ipv4Address ns3::aodv::RoutingTableEntry::GetNextHop() const [member function] + cls.add_method('GetNextHop', + 'ns3::Ipv4Address', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): ns3::Ptr ns3::aodv::RoutingTableEntry::GetOutputDevice() const [member function] + cls.add_method('GetOutputDevice', + 'ns3::Ptr< ns3::NetDevice >', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::GetPrecursors(std::vector > & prec) const [member function] + cls.add_method('GetPrecursors', + 'void', + [param('std::vector< ns3::Ipv4Address > &', 'prec')], + is_const=True) + ## aodv-rtable.h (module 'aodv'): ns3::Ptr ns3::aodv::RoutingTableEntry::GetRoute() const [member function] + cls.add_method('GetRoute', + 'ns3::Ptr< ns3::Ipv4Route >', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): uint8_t ns3::aodv::RoutingTableEntry::GetRreqCnt() const [member function] + cls.add_method('GetRreqCnt', + 'uint8_t', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): uint32_t ns3::aodv::RoutingTableEntry::GetSeqNo() const [member function] + cls.add_method('GetSeqNo', + 'uint32_t', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTableEntry::GetValidSeqNo() const [member function] + cls.add_method('GetValidSeqNo', + 'bool', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::IncrementRreqCnt() [member function] + cls.add_method('IncrementRreqCnt', + 'void', + []) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTableEntry::InsertPrecursor(ns3::Ipv4Address id) [member function] + cls.add_method('InsertPrecursor', + 'bool', + [param('ns3::Ipv4Address', 'id')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::Invalidate(ns3::Time badLinkLifetime) [member function] + cls.add_method('Invalidate', + 'void', + [param('ns3::Time', 'badLinkLifetime')]) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTableEntry::IsPrecursorListEmpty() const [member function] + cls.add_method('IsPrecursorListEmpty', + 'bool', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTableEntry::IsUnidirectional() const [member function] + cls.add_method('IsUnidirectional', + 'bool', + [], + is_const=True) + ## aodv-rtable.h (module 'aodv'): bool ns3::aodv::RoutingTableEntry::LookupPrecursor(ns3::Ipv4Address id) [member function] + cls.add_method('LookupPrecursor', + 'bool', + [param('ns3::Ipv4Address', 'id')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::Print(ns3::Ptr stream) const [member function] + cls.add_method('Print', + 'void', + [param('ns3::Ptr< ns3::OutputStreamWrapper >', 'stream')], + is_const=True) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::SetBalcklistTimeout(ns3::Time t) [member function] + cls.add_method('SetBalcklistTimeout', + 'void', + [param('ns3::Time', 't')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::SetFlag(ns3::aodv::RouteFlags flag) [member function] + cls.add_method('SetFlag', + 'void', + [param('ns3::aodv::RouteFlags', 'flag')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::SetHop(uint16_t hop) [member function] + cls.add_method('SetHop', + 'void', + [param('uint16_t', 'hop')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::SetInterface(ns3::Ipv4InterfaceAddress iface) [member function] + cls.add_method('SetInterface', + 'void', + [param('ns3::Ipv4InterfaceAddress', 'iface')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::SetLifeTime(ns3::Time lt) [member function] + cls.add_method('SetLifeTime', + 'void', + [param('ns3::Time', 'lt')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::SetNextHop(ns3::Ipv4Address nextHop) [member function] + cls.add_method('SetNextHop', + 'void', + [param('ns3::Ipv4Address', 'nextHop')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::SetOutputDevice(ns3::Ptr dev) [member function] + cls.add_method('SetOutputDevice', + 'void', + [param('ns3::Ptr< ns3::NetDevice >', 'dev')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::SetRoute(ns3::Ptr r) [member function] + cls.add_method('SetRoute', + 'void', + [param('ns3::Ptr< ns3::Ipv4Route >', 'r')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::SetRreqCnt(uint8_t n) [member function] + cls.add_method('SetRreqCnt', + 'void', + [param('uint8_t', 'n')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::SetSeqNo(uint32_t sn) [member function] + cls.add_method('SetSeqNo', + 'void', + [param('uint32_t', 'sn')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::SetUnidirectional(bool u) [member function] + cls.add_method('SetUnidirectional', + 'void', + [param('bool', 'u')]) + ## aodv-rtable.h (module 'aodv'): void ns3::aodv::RoutingTableEntry::SetValidSeqNo(bool s) [member function] + cls.add_method('SetValidSeqNo', + 'void', + [param('bool', 's')]) + ## aodv-rtable.h (module 'aodv'): ns3::aodv::RoutingTableEntry::m_ackTimer [variable] + cls.add_instance_attribute('m_ackTimer', 'ns3::Timer', is_const=False) + return + +def register_Ns3AodvRrepAckHeader_methods(root_module, cls): + cls.add_output_stream_operator() + cls.add_binary_comparison_operator('==') + ## aodv-packet.h (module 'aodv'): ns3::aodv::RrepAckHeader::RrepAckHeader(ns3::aodv::RrepAckHeader const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::RrepAckHeader const &', 'arg0')]) + ## aodv-packet.h (module 'aodv'): ns3::aodv::RrepAckHeader::RrepAckHeader() [constructor] + cls.add_constructor([]) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::RrepAckHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## aodv-packet.h (module 'aodv'): ns3::TypeId ns3::aodv::RrepAckHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::RrepAckHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): static ns3::TypeId ns3::aodv::RrepAckHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RrepAckHeader::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RrepAckHeader::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + return + +def register_Ns3AodvRrepHeader_methods(root_module, cls): + cls.add_output_stream_operator() + cls.add_binary_comparison_operator('==') + ## aodv-packet.h (module 'aodv'): ns3::aodv::RrepHeader::RrepHeader(ns3::aodv::RrepHeader const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::RrepHeader const &', 'arg0')]) + ## aodv-packet.h (module 'aodv'): ns3::aodv::RrepHeader::RrepHeader(uint8_t prefixSize=0, uint8_t hopCount=0, ns3::Ipv4Address dst=ns3::Ipv4Address(), uint32_t dstSeqNo=0, ns3::Ipv4Address origin=ns3::Ipv4Address(), ns3::Time lifetime=ns3::MilliSeconds( )) [constructor] + cls.add_constructor([param('uint8_t', 'prefixSize', default_value='0'), param('uint8_t', 'hopCount', default_value='0'), param('ns3::Ipv4Address', 'dst', default_value='ns3::Ipv4Address()'), param('uint32_t', 'dstSeqNo', default_value='0'), param('ns3::Ipv4Address', 'origin', default_value='ns3::Ipv4Address()'), param('ns3::Time', 'lifetime', default_value='ns3::MilliSeconds(0)')]) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::RrepHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## aodv-packet.h (module 'aodv'): bool ns3::aodv::RrepHeader::GetAckRequired() const [member function] + cls.add_method('GetAckRequired', + 'bool', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): ns3::Ipv4Address ns3::aodv::RrepHeader::GetDst() const [member function] + cls.add_method('GetDst', + 'ns3::Ipv4Address', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::RrepHeader::GetDstSeqno() const [member function] + cls.add_method('GetDstSeqno', + 'uint32_t', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): uint8_t ns3::aodv::RrepHeader::GetHopCount() const [member function] + cls.add_method('GetHopCount', + 'uint8_t', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): ns3::TypeId ns3::aodv::RrepHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): ns3::Time ns3::aodv::RrepHeader::GetLifeTime() const [member function] + cls.add_method('GetLifeTime', + 'ns3::Time', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): ns3::Ipv4Address ns3::aodv::RrepHeader::GetOrigin() const [member function] + cls.add_method('GetOrigin', + 'ns3::Ipv4Address', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): uint8_t ns3::aodv::RrepHeader::GetPrefixSize() const [member function] + cls.add_method('GetPrefixSize', + 'uint8_t', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::RrepHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): static ns3::TypeId ns3::aodv::RrepHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RrepHeader::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RrepHeader::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RrepHeader::SetAckRequired(bool f) [member function] + cls.add_method('SetAckRequired', + 'void', + [param('bool', 'f')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RrepHeader::SetDst(ns3::Ipv4Address a) [member function] + cls.add_method('SetDst', + 'void', + [param('ns3::Ipv4Address', 'a')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RrepHeader::SetDstSeqno(uint32_t s) [member function] + cls.add_method('SetDstSeqno', + 'void', + [param('uint32_t', 's')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RrepHeader::SetHello(ns3::Ipv4Address src, uint32_t srcSeqNo, ns3::Time lifetime) [member function] + cls.add_method('SetHello', + 'void', + [param('ns3::Ipv4Address', 'src'), param('uint32_t', 'srcSeqNo'), param('ns3::Time', 'lifetime')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RrepHeader::SetHopCount(uint8_t count) [member function] + cls.add_method('SetHopCount', + 'void', + [param('uint8_t', 'count')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RrepHeader::SetLifeTime(ns3::Time t) [member function] + cls.add_method('SetLifeTime', + 'void', + [param('ns3::Time', 't')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RrepHeader::SetOrigin(ns3::Ipv4Address a) [member function] + cls.add_method('SetOrigin', + 'void', + [param('ns3::Ipv4Address', 'a')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RrepHeader::SetPrefixSize(uint8_t sz) [member function] + cls.add_method('SetPrefixSize', + 'void', + [param('uint8_t', 'sz')]) + return + +def register_Ns3AodvRreqHeader_methods(root_module, cls): + cls.add_output_stream_operator() + cls.add_binary_comparison_operator('==') + ## aodv-packet.h (module 'aodv'): ns3::aodv::RreqHeader::RreqHeader(ns3::aodv::RreqHeader const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::RreqHeader const &', 'arg0')]) + ## aodv-packet.h (module 'aodv'): ns3::aodv::RreqHeader::RreqHeader(uint8_t flags=0, uint8_t reserved=0, uint8_t hopCount=0, uint32_t requestID=0, ns3::Ipv4Address dst=ns3::Ipv4Address(), uint32_t dstSeqNo=0, ns3::Ipv4Address origin=ns3::Ipv4Address(), uint32_t originSeqNo=0) [constructor] + cls.add_constructor([param('uint8_t', 'flags', default_value='0'), param('uint8_t', 'reserved', default_value='0'), param('uint8_t', 'hopCount', default_value='0'), param('uint32_t', 'requestID', default_value='0'), param('ns3::Ipv4Address', 'dst', default_value='ns3::Ipv4Address()'), param('uint32_t', 'dstSeqNo', default_value='0'), param('ns3::Ipv4Address', 'origin', default_value='ns3::Ipv4Address()'), param('uint32_t', 'originSeqNo', default_value='0')]) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::RreqHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## aodv-packet.h (module 'aodv'): bool ns3::aodv::RreqHeader::GetDestinationOnly() const [member function] + cls.add_method('GetDestinationOnly', + 'bool', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): ns3::Ipv4Address ns3::aodv::RreqHeader::GetDst() const [member function] + cls.add_method('GetDst', + 'ns3::Ipv4Address', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::RreqHeader::GetDstSeqno() const [member function] + cls.add_method('GetDstSeqno', + 'uint32_t', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): bool ns3::aodv::RreqHeader::GetGratiousRrep() const [member function] + cls.add_method('GetGratiousRrep', + 'bool', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): uint8_t ns3::aodv::RreqHeader::GetHopCount() const [member function] + cls.add_method('GetHopCount', + 'uint8_t', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::RreqHeader::GetId() const [member function] + cls.add_method('GetId', + 'uint32_t', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): ns3::TypeId ns3::aodv::RreqHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): ns3::Ipv4Address ns3::aodv::RreqHeader::GetOrigin() const [member function] + cls.add_method('GetOrigin', + 'ns3::Ipv4Address', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::RreqHeader::GetOriginSeqno() const [member function] + cls.add_method('GetOriginSeqno', + 'uint32_t', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::RreqHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): static ns3::TypeId ns3::aodv::RreqHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## aodv-packet.h (module 'aodv'): bool ns3::aodv::RreqHeader::GetUnknownSeqno() const [member function] + cls.add_method('GetUnknownSeqno', + 'bool', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RreqHeader::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RreqHeader::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RreqHeader::SetDestinationOnly(bool f) [member function] + cls.add_method('SetDestinationOnly', + 'void', + [param('bool', 'f')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RreqHeader::SetDst(ns3::Ipv4Address a) [member function] + cls.add_method('SetDst', + 'void', + [param('ns3::Ipv4Address', 'a')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RreqHeader::SetDstSeqno(uint32_t s) [member function] + cls.add_method('SetDstSeqno', + 'void', + [param('uint32_t', 's')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RreqHeader::SetGratiousRrep(bool f) [member function] + cls.add_method('SetGratiousRrep', + 'void', + [param('bool', 'f')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RreqHeader::SetHopCount(uint8_t count) [member function] + cls.add_method('SetHopCount', + 'void', + [param('uint8_t', 'count')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RreqHeader::SetId(uint32_t id) [member function] + cls.add_method('SetId', + 'void', + [param('uint32_t', 'id')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RreqHeader::SetOrigin(ns3::Ipv4Address a) [member function] + cls.add_method('SetOrigin', + 'void', + [param('ns3::Ipv4Address', 'a')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RreqHeader::SetOriginSeqno(uint32_t s) [member function] + cls.add_method('SetOriginSeqno', + 'void', + [param('uint32_t', 's')]) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::RreqHeader::SetUnknownSeqno(bool f) [member function] + cls.add_method('SetUnknownSeqno', + 'void', + [param('bool', 'f')]) + return + +def register_Ns3AodvTypeHeader_methods(root_module, cls): + cls.add_output_stream_operator() + cls.add_binary_comparison_operator('==') + ## aodv-packet.h (module 'aodv'): ns3::aodv::TypeHeader::TypeHeader(ns3::aodv::TypeHeader const & arg0) [copy constructor] + cls.add_constructor([param('ns3::aodv::TypeHeader const &', 'arg0')]) + ## aodv-packet.h (module 'aodv'): ns3::aodv::TypeHeader::TypeHeader(ns3::aodv::MessageType t=::ns3::aodv::AODVTYPE_RREQ) [constructor] + cls.add_constructor([param('ns3::aodv::MessageType', 't', default_value='::ns3::aodv::AODVTYPE_RREQ')]) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::TypeHeader::Deserialize(ns3::Buffer::Iterator start) [member function] + cls.add_method('Deserialize', + 'uint32_t', + [param('ns3::Buffer::Iterator', 'start')], + is_virtual=True) + ## aodv-packet.h (module 'aodv'): ns3::aodv::MessageType ns3::aodv::TypeHeader::Get() const [member function] + cls.add_method('Get', + 'ns3::aodv::MessageType', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): ns3::TypeId ns3::aodv::TypeHeader::GetInstanceTypeId() const [member function] + cls.add_method('GetInstanceTypeId', + 'ns3::TypeId', + [], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): uint32_t ns3::aodv::TypeHeader::GetSerializedSize() const [member function] + cls.add_method('GetSerializedSize', + 'uint32_t', + [], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): static ns3::TypeId ns3::aodv::TypeHeader::GetTypeId() [member function] + cls.add_method('GetTypeId', + 'ns3::TypeId', + [], + is_static=True) + ## aodv-packet.h (module 'aodv'): bool ns3::aodv::TypeHeader::IsValid() const [member function] + cls.add_method('IsValid', + 'bool', + [], + is_const=True) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::TypeHeader::Print(std::ostream & os) const [member function] + cls.add_method('Print', + 'void', + [param('std::ostream &', 'os')], + is_const=True, is_virtual=True) + ## aodv-packet.h (module 'aodv'): void ns3::aodv::TypeHeader::Serialize(ns3::Buffer::Iterator start) const [member function] + cls.add_method('Serialize', + 'void', + [param('ns3::Buffer::Iterator', 'start')], + is_const=True, is_virtual=True) + return + +def register_functions(root_module): + module = root_module + register_functions_ns3_FatalImpl(module.get_submodule('FatalImpl'), root_module) + register_functions_ns3_aodv(module.get_submodule('aodv'), root_module) + return + +def register_functions_ns3_FatalImpl(module, root_module): + return + +def register_functions_ns3_aodv(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() + + +#!/usr/bin/python2.4 +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# Copyright 2008 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +""" +Generic implementation of OS support for most unix-derived OSs. +In general, if os.type is "posix", most if not all of these methods +can be used. For any that are unusable (or where a better +implementation exists), a module can be provided which overrides +these. +""" + +import pwd +import grp +import errno +import os +import platform +import shutil +import sys +import util as os_util +# used to cache contents of passwd and group files +users = {} +uids = {} +users_lastupdate = {} +groups = {} +gids = {} +groups_lastupdate = {} + +# storage to repeat first call to group routines +__been_here = {} + +def already_called(): + callers_name = sys._getframe(1).f_code.co_name + if callers_name in __been_here: + return True + else: + __been_here[callers_name] = True + return False + +def get_isainfo(): + return platform.uname()[5] + +def get_release(): + return os_util.get_os_release() + +def get_platform(): + return platform.uname()[4] + +def get_userid(): + # If the software is being executed with pfexec, the uid or euid will + # likely be 0 which is of no use. Since the os.getlogin() interface + # provided by Python breaks in a number of interesting ways, their + # recommendation is to pull the username from the environment instead. + user = os.getenv('USER', os.getenv('LOGNAME', os.getenv('USERNAME'))) + if user: + try: + return get_user_by_name(user, None, False) + except KeyError: + # The environment username wasn't valid. + pass + return os.getuid() + +def get_username(): + if not already_called(): + get_username() + return pwd.getpwuid(get_userid()).pw_name + +def is_admin(): + return os.getuid() == 0 + +def get_group_by_name(name, dirpath, use_file): + if not already_called(): + get_group_by_name(name, dirpath, use_file) + + if not use_file: + return grp.getgrnam(name).gr_gid + try: + load_groups(dirpath) + return groups[dirpath][name].gr_gid + except OSError, e: + if e.errno != errno.ENOENT: + raise + # If the password file doesn't exist, bootstrap + # ourselves from the current environment. + return grp.getgrnam(name).gr_gid + except KeyError: + raise KeyError, "group name not found: %s" % name + +def get_user_by_name(name, dirpath, use_file): + if not already_called(): + get_user_by_name(name, dirpath, use_file) + + if not use_file: + return pwd.getpwnam(name).pw_uid + try: + load_passwd(dirpath) + return users[dirpath][name].pw_uid + except OSError, e: + if e.errno != errno.ENOENT: + raise + # If the password file doesn't exist, bootstrap + # ourselves from the current environment. + return pwd.getpwnam(name).pw_uid + except KeyError: + raise KeyError, "user name not found: %s" % name + +def get_name_by_gid(gid, dirpath, use_file): + if not already_called(): + get_name_by_gid(gid, dirpath, use_file) + + if not use_file: + return grp.getgrgid(gid).gr_name + try: + load_groups(dirpath) + return gids[dirpath][gid].gr_name + except OSError, e: + if e.errno != errno.ENOENT: + raise + # If the password file doesn't exist, bootstrap + # ourselves from the current environment. + return grp.getgrgid(gid).gr_name + except KeyError: + raise KeyError, "group ID not found: %s" % gid + +def get_name_by_uid(uid, dirpath, use_file): + if not already_called(): + get_name_by_uid(uid, dirpath, use_file) + + if not use_file: + return pwd.getpwuid(uid).pw_name + try: + load_passwd(dirpath) + return uids[dirpath][uid].pw_name + except OSError, e: + if e.errno != errno.ENOENT: + raise + # If the password file doesn't exist, bootstrap + # ourselves from the current environment. + return pwd.getpwuid(uid).pw_name + except KeyError: + raise KeyError, "user ID not found: %d" % uid + +def load_passwd(dirpath): + # check if we need to reload cache + passwd_file = os.path.join(dirpath, "etc/passwd") + passwd_stamp = os.stat(passwd_file).st_mtime + if passwd_stamp <= users_lastupdate.get(dirpath, -1): + return + users[dirpath] = user = {} + uids[dirpath] = uid = {} + f = file(passwd_file) + for line in f: + arr = line.rstrip().split(":") + if len(arr) != 7: + # Skip any line we can't make sense of. + continue + try: + arr[2] = int(arr[2]) + arr[3] = int(arr[3]) + except ValueError: + # Skip any line we can't make sense of. + continue + pw_entry = pwd.struct_passwd(arr) + + user[pw_entry.pw_name] = pw_entry + # Traditional systems allow multiple users to have the same + # user id, so only the first one should be mapped to the + # current pw_entry. + uid.setdefault(pw_entry.pw_uid, pw_entry) + + users_lastupdate[dirpath] = passwd_stamp + f.close() + +def load_groups(dirpath): + # check if we need to reload cache + group_file = os.path.join(dirpath, "etc/group") + group_stamp = os.stat(group_file).st_mtime + if group_stamp <= groups_lastupdate.get(dirpath, -1): + return + groups[dirpath] = group = {} + gids[dirpath] = gid = {} + f = file(group_file) + for line in f: + arr = line.rstrip().split(":") + if len(arr) != 4: + # Skip any line we can't make sense of. + continue + try: + arr[2] = int(arr[2]) + except ValueError: + # Skip any line we can't make sense of. + continue + gr_entry = grp.struct_group(arr) + + group[gr_entry.gr_name] = gr_entry + # Traditional systems allow multiple groups to have the same + # group id, so only the first one should be mapped to the + # current pw_entry. + gid.setdefault(gr_entry.gr_gid, gr_entry) + + groups_lastupdate[dirpath] = group_stamp + f.close() + +def chown(path, owner, group): + return os.chown(path, owner, group) + +def rename(src, dst): + os.rename(src, dst) + +def remove(path): + os.unlink(path) + +def link(src, dst): + os.link(src, dst) + +def split_path(path): + return path.split('/') + +def get_root(path): + return '/' + +def copyfile(src, dst): + shutil.copyfile(src, dst) + + +import os +import json +import time +import socket +from threading import Thread + +IPS = [] + +def trata_cliente(conexao, endereco): + requisicao = conexao.recv(1024) + print requisicao + if requisicao == 'LIST': + arqs = os.listdir('/etc/black/garagem/arquivos/') + conexao.send(json.dumps(arqs)) + elif requisicao == 'GET': + arqs = os.listdir('/etc/black/garagem/arquivos/') + arquivo = conexao.recv(1024) + if arquivo in arqs: + fp = open('/etc/black/garagem/arquivos/{0}'.format(arquivo), 'r') + strng = fp.read(1024) + while strng: + conexao.send(strng) + strng = fp.read(1024) + elif requisicao == 'PUT': + conexao.send('OK') + arqs = os.listdir('/etc/black/garagem/arquivos/') + arquivo = conexao.recv(1024) + print arquivo + print arqs + if arquivo not in arqs: + conexao.send('TRUE') + arq = open('/etc/black/garagem/arquivos/{0}'.format(arquivo), 'w') + while 1: + dados = conexao.recv(1024) + if not dados: + break + arq.write(dados) + arq.close() + else: + conexao.send('FALSE') + conexao.close() + + +def loop_servidor(): + + soquete = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + soquete.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + soquete.bind(('127.0.0.1', 5555)) + soquete.listen(10) + global IPS + # Fica aqui aguardando novas conexoes. + while True: + + # Para cada nova conexao e criado um novo processo para tratar as requisicoes. + conexao = soquete.accept() + novaConexao = [] + novaConexao.append(conexao[0]) + novaConexao.append(conexao[1]) + if conexao[1] not in IPS: + IPS.append(conexao[1]) + Thread(target=trata_cliente, args=(novaConexao)).start() + + +if __name__ == '__main__': + print 'Servidor de Arquivos Iniciou na Porta 5555...' + Thread(target=loop_servidor).start() +from typing import Any, List, Dict, Optional, Text, Union, Tuple, Iterable, TypeVar + +import requests +from jsonschema import validate + +from pykechain.defaults import API_EXTRA_PARAMS +from pykechain.enums import Category +from pykechain.exceptions import APIError, IllegalArgumentError +from pykechain.models import Base, BaseInScope +from pykechain.models.input_checks import check_text, check_type +from pykechain.models.representations.component import RepresentationsComponent +from pykechain.models.validators import PropertyValidator +from pykechain.models.validators.validator_schemas import options_json_schema +from pykechain.utils import clean_empty_values, empty + +T = TypeVar("T") + + +class Property(BaseInScope): + """A virtual object representing a KE-chain property. + + .. versionadded: 3.0 + This is a `Property` to communicate with a KE-chain 3 backend. + + :cvar bulk_update: flag to postpone update of properties until manually requested + :type bulk_update: bool + :ivar type: The property type of the property. One of the types described in :class:`pykechain.enums.PropertyType` + :type type: str + :ivar category: The category of the property, either `Category.MODEL` of `Category.INSTANCE` + :type category: str + :ivar description: description of the property + :type description: str or None + :ivar unit: unit of measure of the property + :type unit: str or None + :ivar model: the id of the model (not the model object) + :type model: str + :ivar output: a boolean if the value is configured as an output (in an activity) + :type output: bool + :ivar part: The (parent) part in which this property is available + :type part: :class:`Part` + :ivar value: the property value, can be set as well as property + :type value: Any + :ivar validators: the list of validators that are available in the property + :type validators: List[PropertyValidator] + :ivar is_valid: if the property conforms to the validators + :type is_valid: bool + :ivar is_invalid: if the property does not conform to the validator + :type is_invalid: bool + """ + + _USE_BULK_UPDATE = False + _update_package = dict() + + def __init__(self, json, **kwargs): + """Construct a Property from a json object.""" + super().__init__(json, **kwargs) + + self.output: bool = json.get('output') + self.model_id: Optional[Text] = json.get('model_id') + self.part_id = json.get('part_id') + self.ref = json.get('ref') + self.type = json.get('property_type') + self.category = json.get('category') + self.description = json.get('description', None) + self.unit = json.get('unit', None) + self.order = json.get('order') + + # Create protected variables + self._value: Any = json.get('value') + self._options: Dict = json.get('value_options', {}) + self._part: Optional['Part'] = None + self._model: Optional['Property'] = None + self._validators: List[PropertyValidator] = [] + self._validation_results: List = [] + self._validation_reasons: List = [] + + self._representations_container = RepresentationsComponent( + self, + self._options.get('representations', {}), + self._save_representations, + ) + + validate(self._options, options_json_schema) + + if self._options.get('validators'): + self._parse_validators() + + def refresh(self, json: Optional[Dict] = None, url: Optional[Text] = None, extra_params: Optional = None) -> None: + """Refresh the object in place.""" + super().refresh(json=json, + url=self._client._build_url('property', property_id=self.id), + extra_params=API_EXTRA_PARAMS['property']) + + def has_value(self) -> bool: + """Predicate to indicate if the property has a value set. + + This predicate determines if the property has a value set. It will not make a call to KE-chain API (in case + of reference properties). So it is a tiny fraction 'cheaper' in terms of processing time than checking the + `Property.value` itself. + + It will return True if the property_type is a Boolean and set to a value of False. + + :returns: True if the property has a value set, otherwise (also when value is None) returns False + :rtype: Bool + """ + if isinstance(self._value, (float, int, bool)): + return True # to prevent "bool(0.00) = False" or "False = False" + else: + return bool(self._value) + + @property + def use_bulk_update(self): + """Set or get the toggle to asynchronously update property values.""" + # set the class attribute to make this value a singleton + return self.__class__._USE_BULK_UPDATE + + @use_bulk_update.setter + def use_bulk_update(self, value): + self.__class__.set_bulk_update(value) + + @classmethod + def set_bulk_update(cls, value): + """Set global class attribute to toggle the use of bulk-updates of properties.""" + assert isinstance(value, bool), "`bulk_update` must be set to a boolean, not {}".format(type(value)) + cls._USE_BULK_UPDATE = value + + @property + def value(self) -> Any: + """Retrieve the data value of a property. + + Setting this value will immediately update the property in KE-chain. + + :returns: the value + """ + return self._value + + @value.setter + def value(self, value: Any) -> None: + value = self.serialize_value(value) + if self.use_bulk_update: + self._pend_update(dict(value=value)) + self._value = value + else: + self._put_value(value) + + @classmethod + def update_values(cls, client: 'Client', use_bulk_update: bool = False) -> None: + """ + Perform the bulk update of property values using the stored values in the `Property` class. + + :param client: Client object + :type client: Client + :param use_bulk_update: set the class attribute, defaults to False. + :type use_bulk_update: bool + :return: None + """ + if cls._USE_BULK_UPDATE: + properties = [dict(id=key, **values) for key, values in cls._update_package.items()] + client.update_properties(properties=properties) + cls._update_package = dict() + cls.set_bulk_update(use_bulk_update) + + def _pend_update(self, data): + """Store the value to be send at a later point in time using `update_values`.""" + existing_data = self.__class__._update_package.get(self.id, None) + if existing_data: + existing_data.update(data) + else: + self.__class__._update_package[self.id] = data + + def _put_value(self, value): + """Send the value to KE-chain.""" + url = self._client._build_url('property', property_id=self.id) + + response = self._client._request('PUT', url, params=API_EXTRA_PARAMS['property'], json={'value': value}) + + if response.status_code != requests.codes.ok: # pragma: no cover + raise APIError("Could not update Property {}".format(self), response=response) + + self.refresh(json=response.json()['results'][0]) + + def serialize_value(self, value: [T]) -> T: + """ + Serialize the value to be set on the property. + + :param value: non-serialized value + :type value: Any + :return: serialized value + """ + return value.id if isinstance(value, Base) else value + + @property + def part(self) -> 'Part': + """ + Retrieve the part that holds this Property. + + :returns: The :class:`Part` associated to this property + :raises APIError: if the `Part` is not found + """ + if self._part is None: + self._part = self._client.part(pk=self.part_id, category=self.category) + return self._part + + def model(self) -> 'AnyProperty': + """ + Model object of the property if the property is an instance otherwise itself. + + Will cache the model object in order to not generate too many API calls. Otherwise will make an API call + to the backend to retrieve its model object. + + :return: `Property` model object if the current `Property` is an instance. + :rtype: :class:`pykechain.models.AnyProperty` + """ + if self.category == Category.MODEL: + return self + elif self._model is None: + self._model = self._client.property(pk=self.model_id, category=Category.MODEL) + return self._model + + @property + def validators(self): + """Provide list of Validator objects. + + :returns: list of :class:`PropertyValidator` objects + :rtype: list(PropertyValidator) + """ + return self._validators + + @validators.setter + def validators(self, validators: Iterable[PropertyValidator]) -> None: + if self.category != Category.MODEL: + raise IllegalArgumentError("To update the list of validators, it can only work on " + "`Property` of category 'MODEL'") + + if not isinstance(validators, (tuple, list)) or not all(isinstance(v, PropertyValidator) for v in validators): + raise IllegalArgumentError('Should be a list or tuple with PropertyValidator objects, ' + 'got {}'.format(type(validators))) + for validator in validators: + validator.validate_json() + + # set the internal validators list + self._validators = list(set(validators)) + + # dump to _json options + self._dump_validators() + + # update the options to KE-chain backend + self.edit(options=self._options) + + def _parse_validators(self): + """Parse the validator in the options to validators.""" + self._validators = [] + validators_json = self._options.get('validators') + for validator_json in validators_json: + self._validators.append(PropertyValidator.parse(json=validator_json)) + + def _dump_validators(self): + """Dump the validators as json inside the _options dictionary with the key `validators`.""" + validators_json = [] + for validator in self._validators: + if isinstance(validator, PropertyValidator): + validators_json.append(validator.as_json()) + else: + raise APIError("validator is not a PropertyValidator: '{}'".format(validator)) + if self._options.get('validators', list()) == validators_json: + # no change + pass + else: + new_options = self._options.copy() # make a copy + new_options.update({'validators': validators_json}) + validate(new_options, options_json_schema) + self._options = new_options + + @property + def is_valid(self) -> Optional[bool]: + """Determine if the value in the property is valid. + + If the value of the property is validated as 'valid', than returns a True, otherwise a False. + When no validators are configured, returns a None. It checks against all configured validators + and returns a single boolean outcome. + + :returns: True when the `value` is valid + :rtype: bool or None + """ + if not self._validators: + return None + else: + self.validate(reason=False) + if all([vr is None for vr in self._validation_results]): + return None + else: + return all(self._validation_results) + + @property + def is_invalid(self) -> Optional[bool]: + """Determine if the value in the property is invalid. + + If the value of the property is validated as 'invalid', than returns a True, otherwise a False. + When no validators are configured, returns a None. It checks against all configured validators + and returns a single boolean outcome. + + :returns: True when the `value` is invalid + :rtype: bool + """ + return not self.is_valid if self.is_valid is not None else None + + def validate(self, reason: bool = True) -> List[Union[bool, Tuple]]: + """Return the validation results and include an (optional) reason. + + If reason keyword is true, the validation is returned for each validation + the [(, ), ...]. If reason is False, only a single list of validation results + for each configured validator is returned. + + :param reason: (optional) switch to indicate if the reason of the validation should be provided + :type reason: bool + :return: list of validation results [bool, bool, ...] or + a list of validation results, reasons [(bool, str), ...] + :rtype: list(bool) or list((bool, str)) + :raises Exception: for incorrect validators or incompatible values + """ + self._validation_results = [validator.is_valid(self._value) for validator in self._validators] + self._validation_reasons = [validator.get_reason() for validator in self._validators] + + if reason: + return list(zip(self._validation_results, self._validation_reasons)) + else: + return self._validation_results + + @property + def representations(self): + """Get and set the property representations.""" + return self._representations_container.get_representations() + + @representations.setter + def representations(self, value): + if self.category != Category.MODEL: + raise IllegalArgumentError("To update the list of representations, it can only work on a " + "`Property` of category '{}'".format(Category.MODEL)) + + self._representations_container.set_representations(value) + + def _save_representations(self, representation_options): + self._options.update({'representations': representation_options}) + self.edit(options=self._options) + + @classmethod + def create(cls, json: dict, **kwargs) -> 'AnyProperty': + """Create a property based on the json data. + + This method will attach the right class to a property, enabling the use of type-specific methods. + + It does not create a property object in KE-chain. But a pseudo :class:`Property` object. + + :param json: the json from which the :class:`Property` object to create + :type json: dict + :return: a :class:`Property` object + """ + property_type = json.get('property_type') + + from pykechain.models import property_type_to_class_map + + # Get specific Property subclass, defaulting to Property itself + property_class = property_type_to_class_map.get(property_type, Property) + + # Call constructor and return new object + return property_class(json, **kwargs) + + def edit( + self, + name: Optional[Text] = empty, + description: Optional[Text] = empty, + unit: Optional[Text] = empty, + options: Optional[Dict] = empty, + **kwargs + ) -> None: + """Edit the details of a property (model). + + Setting an input to None will clear out the value (exception being name). + + :param name: (optional) new name of the property to edit. Cannot be cleared. + :type name: basestring or None or Empty + :param description: (optional) new description of the property. Can be cleared. + :type description: basestring or None or Empty + :param unit: (optional) new unit of the property. Can be cleared. + :type unit: basestring or None or Empty + :param options: (options) new options of the property. Can be cleared. + :type options: dict or None or Empty + :param kwargs: (optional) additional kwargs to be edited + :return: None + :raises APIError: When unable to edit the property + :raises IllegalArgumentError: when the type of the input is provided incorrect. + + Examples + -------- + >>> front_fork = project.part('Front Fork') + >>> color_property = front_fork.property(name='Color') + >>> color_property.edit(name='Shade',description='Could also be called tint, depending on mixture',unit='RGB') + + >>> wheel_property_reference = self.project.model('Bike').property('Reference wheel') + >>> wheel_model = self.project.model('Wheel') + >>> diameter_property = wheel_model.property('Diameter') + >>> spokes_property = wheel_model.property('Spokes') + >>> prefilters = {'property_value': diameter_property.id + ":{}:lte".format(15)} + >>> propmodels_excl = [spokes_property.id] + >>> options = dict() + >>> options['prefilters'] = prefilters + >>> options['propmodels_excl'] = propmodels_excl + >>> wheel_property_reference.edit(options=options) + + Not mentioning an input parameter in the function will leave it unchanged. Setting a parameter as None will + clear its value (where that is possible). The example below will clear the description, but leave everything + else unchanged. + + >>> wheel_property.edit(description=None) + + """ + update_dict = { + 'name': check_text(name, 'name') or self.name, + 'description': check_text(description, 'description') or str(), + 'unit': check_text(unit, 'unit') or str(), + 'value_options': check_type(options, dict, 'options') or dict() + } + + if kwargs: # pragma: no cover + update_dict.update(kwargs) + + update_dict = clean_empty_values(update_dict=update_dict) + + if self.use_bulk_update: + self._pend_update(data=update_dict) + else: + update_dict["id"] = self.id + + response = self._client._request( + 'PUT', + self._client._build_url('property', property_id=self.id), + params=API_EXTRA_PARAMS['property'], + json=update_dict + ) + + if response.status_code != requests.codes.ok: # pragma: no cover + raise APIError("Could not update Property {}".format(self), response=response) + + self.refresh(json=response.json()['results'][0]) + + def delete(self) -> None: + """Delete this property. + + :return: None + :raises APIError: if delete was not successful + """ + response = self._client._request('DELETE', self._client._build_url('property', property_id=self.id)) + + if response.status_code != requests.codes.no_content: # pragma: no cover + raise APIError("Could not delete Property {}".format(self), response=response) + + def copy(self, target_part: 'Part', name: Optional[Text] = None) -> 'Property': + """Copy a property model or instance. + + :param target_part: `Part` object under which the desired `Property` is copied + :type target_part: :class:`Part` + :param name: how the copied `Property` should be called + :type name: basestring + :return: copied :class:`Property` model. + :raises IllegalArgumentError: if property and target_part have different `Category` + + Example + ------- + >>> property_to_copy = client.property(name='Diameter') + >>> bike = client.model('Bike') + >>> property_to_copy.copy(target_part=bike, name='Bike diameter?') + + """ + from pykechain.models import Part + check_type(target_part, Part, 'target_part') + + name = check_text(name, 'name') or self.name + if self.category == Category.MODEL and target_part.category == Category.MODEL: + # Cannot move a `Property` model under a `Part` instance or vice versa + copied_property_model = target_part.add_property(name=name, + property_type=self.type, + description=self.description, + unit=self.unit, + default_value=self.value, + options=self._options + ) + return copied_property_model + elif self.category == Category.INSTANCE and target_part.category == Category.INSTANCE: + target_model = target_part.model() + self_model = self.model() + target_model.add_property(name=name, + property_type=self_model.type, + description=self_model.description, + unit=self_model.unit, + default_value=self_model.value, + options=self_model._options + ) + target_part.refresh() + copied_property_instance = target_part.property(name=name) + copied_property_instance.value = self.value + return copied_property_instance + else: + raise IllegalArgumentError('property "{}" and target part "{}" must have the same category'. + format(self.name, target_part.name)) + + def move(self, target_part: 'Part', name: Optional[Text] = None) -> 'Property': + """Move a property model or instance. + + :param target_part: `Part` object under which the desired `Property` is moved + :type target_part: :class:`Part` + :param name: how the moved `Property` should be called + :type name: basestring + :return: copied :class:`Property` model. + :raises IllegalArgumentError: if property and target_part have different `Category` + + Example + ------- + >>> property_to_move = client.property(name='Diameter') + >>> bike = client.model('Bike') + >>> property_to_move.move(target_part=bike, name='Bike diameter?') + + """ + moved_property = self.copy(target_part=target_part, name=name) + + if self.category == Category.MODEL: + self.delete() + else: + self.model().delete() + return moved_property + +from __future__ import absolute_import + +from datetime import timedelta +from django.utils import timezone +from rest_framework.response import Response + +from sentry.api.bases.team import TeamEndpoint +from sentry.api.serializers import serialize +from sentry.models import Group, GroupStatus, Project + + +class TeamGroupsNewEndpoint(TeamEndpoint): + def get(self, request, team): + """ + Return a list of the newest groups for a given team. + + The resulting query will find groups which have been seen since the + cutoff date, and then sort those by score, returning the highest scoring + groups first. + """ + minutes = int(request.REQUEST.get('minutes', 15)) + limit = min(100, int(request.REQUEST.get('limit', 10))) + + project_list = Project.objects.get_for_user(user=request.user, team=team) + + project_dict = dict((p.id, p) for p in project_list) + + cutoff = timedelta(minutes=minutes) + cutoff_dt = timezone.now() - cutoff + + group_list = list(Group.objects.filter( + project__in=project_dict.keys(), + status=GroupStatus.UNRESOLVED, + active_at__gte=cutoff_dt, + ).extra( + select={'sort_value': 'score'}, + ).order_by('-score', '-first_seen')[:limit]) + + for group in group_list: + group._project_cache = project_dict.get(group.project_id) + + return Response(serialize(group_list, request.user)) + +# (c) 2012-2014, Michael DeHaan +# +# This file is part of Ansible +# +# Ansible 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. +# +# Ansible 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 Ansible. If not, see . + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +import multiprocessing +import os +import tempfile + +from ansible import constants as C +from ansible.errors import AnsibleError +from ansible.executor.play_iterator import PlayIterator +from ansible.executor.stats import AggregateStats +from ansible.module_utils.six import string_types +from ansible.module_utils._text import to_text +from ansible.playbook.block import Block +from ansible.playbook.play_context import PlayContext +from ansible.plugins import callback_loader, strategy_loader, module_loader +from ansible.plugins.callback import CallbackBase +from ansible.template import Templar +from ansible.utils.helpers import pct_to_int +from ansible.vars.hostvars import HostVars +from ansible.vars.reserved import warn_if_reserved + +try: + from __main__ import display +except ImportError: + from ansible.utils.display import Display + display = Display() + + +__all__ = ['TaskQueueManager'] + + +class TaskQueueManager: + + ''' + This class handles the multiprocessing requirements of Ansible by + creating a pool of worker forks, a result handler fork, and a + manager object with shared datastructures/queues for coordinating + work between all processes. + + The queue manager is responsible for loading the play strategy plugin, + which dispatches the Play's tasks to hosts. + ''' + + RUN_OK = 0 + RUN_ERROR = 1 + RUN_FAILED_HOSTS = 2 + RUN_UNREACHABLE_HOSTS = 4 + RUN_FAILED_BREAK_PLAY = 8 + RUN_UNKNOWN_ERROR = 255 + + def __init__(self, inventory, variable_manager, loader, options, passwords, stdout_callback=None, run_additional_callbacks=True, run_tree=False): + + self._inventory = inventory + self._variable_manager = variable_manager + self._loader = loader + self._options = options + self._stats = AggregateStats() + self.passwords = passwords + self._stdout_callback = stdout_callback + self._run_additional_callbacks = run_additional_callbacks + self._run_tree = run_tree + + self._callbacks_loaded = False + self._callback_plugins = [] + self._start_at_done = False + + # make sure the module path (if specified) is parsed and + # added to the module_loader object + if options.module_path is not None: + for path in options.module_path.split(os.pathsep): + module_loader.add_directory(path) + + # a special flag to help us exit cleanly + self._terminated = False + + # this dictionary is used to keep track of notified handlers + self._notified_handlers = dict() + self._listening_handlers = dict() + + # dictionaries to keep track of failed/unreachable hosts + self._failed_hosts = dict() + self._unreachable_hosts = dict() + + self._final_q = multiprocessing.Queue() + + # A temporary file (opened pre-fork) used by connection + # plugins for inter-process locking. + self._connection_lockfile = tempfile.TemporaryFile() + + def _initialize_processes(self, num): + self._workers = [] + + for i in range(num): + rslt_q = multiprocessing.Queue() + self._workers.append([None, rslt_q]) + + def _initialize_notified_handlers(self, play): + ''' + Clears and initializes the shared notified handlers dict with entries + for each handler in the play, which is an empty array that will contain + inventory hostnames for those hosts triggering the handler. + ''' + + # Zero the dictionary first by removing any entries there. + # Proxied dicts don't support iteritems, so we have to use keys() + self._notified_handlers.clear() + self._listening_handlers.clear() + + def _process_block(b): + temp_list = [] + for t in b.block: + if isinstance(t, Block): + temp_list.extend(_process_block(t)) + else: + temp_list.append(t) + return temp_list + + handler_list = [] + for handler_block in play.handlers: + handler_list.extend(_process_block(handler_block)) + + # then initialize it with the given handler list + for handler in handler_list: + if handler._uuid not in self._notified_handlers: + self._notified_handlers[handler._uuid] = [] + if handler.listen: + listeners = handler.listen + if not isinstance(listeners, list): + listeners = [ listeners ] + for listener in listeners: + if listener not in self._listening_handlers: + self._listening_handlers[listener] = [] + self._listening_handlers[listener].append(handler._uuid) + + def load_callbacks(self): + ''' + Loads all available callbacks, with the exception of those which + utilize the CALLBACK_TYPE option. When CALLBACK_TYPE is set to 'stdout', + only one such callback plugin will be loaded. + ''' + + if self._callbacks_loaded: + return + + stdout_callback_loaded = False + if self._stdout_callback is None: + self._stdout_callback = C.DEFAULT_STDOUT_CALLBACK + + if isinstance(self._stdout_callback, CallbackBase): + stdout_callback_loaded = True + elif isinstance(self._stdout_callback, string_types): + if self._stdout_callback not in callback_loader: + raise AnsibleError("Invalid callback for stdout specified: %s" % self._stdout_callback) + else: + self._stdout_callback = callback_loader.get(self._stdout_callback) + stdout_callback_loaded = True + else: + raise AnsibleError("callback must be an instance of CallbackBase or the name of a callback plugin") + + for callback_plugin in callback_loader.all(class_only=True): + if hasattr(callback_plugin, 'CALLBACK_VERSION') and callback_plugin.CALLBACK_VERSION >= 2.0: + # we only allow one callback of type 'stdout' to be loaded, so check + # the name of the current plugin and type to see if we need to skip + # loading this callback plugin + callback_type = getattr(callback_plugin, 'CALLBACK_TYPE', None) + callback_needs_whitelist = getattr(callback_plugin, 'CALLBACK_NEEDS_WHITELIST', False) + (callback_name, _) = os.path.splitext(os.path.basename(callback_plugin._original_path)) + if callback_type == 'stdout': + if callback_name != self._stdout_callback or stdout_callback_loaded: + continue + stdout_callback_loaded = True + elif callback_name == 'tree' and self._run_tree: + pass + elif not self._run_additional_callbacks or (callback_needs_whitelist and ( + C.DEFAULT_CALLBACK_WHITELIST is None or callback_name not in C.DEFAULT_CALLBACK_WHITELIST)): + continue + + self._callback_plugins.append(callback_plugin()) + + self._callbacks_loaded = True + + def run(self, play): + ''' + Iterates over the roles/tasks in a play, using the given (or default) + strategy for queueing tasks. The default is the linear strategy, which + operates like classic Ansible by keeping all hosts in lock-step with + a given task (meaning no hosts move on to the next task until all hosts + are done with the current task). + ''' + + if not self._callbacks_loaded: + self.load_callbacks() + + all_vars = self._variable_manager.get_vars(loader=self._loader, play=play) + warn_if_reserved(all_vars) + templar = Templar(loader=self._loader, variables=all_vars) + + new_play = play.copy() + new_play.post_validate(templar) + new_play.handlers = new_play.compile_roles_handlers() + new_play.handlers + + self.hostvars = HostVars( + inventory=self._inventory, + variable_manager=self._variable_manager, + loader=self._loader, + ) + + # Fork # of forks, # of hosts or serial, whichever is lowest + num_hosts = len(self._inventory.get_hosts(new_play.hosts, ignore_restrictions=True)) + + max_serial = 0 + if new_play.serial: + # the play has not been post_validated here, so we may need + # to convert the scalar value to a list at this point + serial_items = new_play.serial + if not isinstance(serial_items, list): + serial_items = [serial_items] + max_serial = max([pct_to_int(x, num_hosts) for x in serial_items]) + + contenders = [self._options.forks, max_serial, num_hosts] + contenders = [v for v in contenders if v is not None and v > 0] + self._initialize_processes(min(contenders)) + + play_context = PlayContext(new_play, self._options, self.passwords, self._connection_lockfile.fileno()) + for callback_plugin in self._callback_plugins: + if hasattr(callback_plugin, 'set_play_context'): + callback_plugin.set_play_context(play_context) + + self.send_callback('v2_playbook_on_play_start', new_play) + + # initialize the shared dictionary containing the notified handlers + self._initialize_notified_handlers(new_play) + + # load the specified strategy (or the default linear one) + strategy = strategy_loader.get(new_play.strategy, self) + if strategy is None: + raise AnsibleError("Invalid play strategy specified: %s" % new_play.strategy, obj=play._ds) + + # build the iterator + iterator = PlayIterator( + inventory=self._inventory, + play=new_play, + play_context=play_context, + variable_manager=self._variable_manager, + all_vars=all_vars, + start_at_done = self._start_at_done, + ) + + # Because the TQM may survive multiple play runs, we start by marking + # any hosts as failed in the iterator here which may have been marked + # as failed in previous runs. Then we clear the internal list of failed + # hosts so we know what failed this round. + for host_name in self._failed_hosts.keys(): + host = self._inventory.get_host(host_name) + iterator.mark_host_failed(host) + + self.clear_failed_hosts() + + # during initialization, the PlayContext will clear the start_at_task + # field to signal that a matching task was found, so check that here + # and remember it so we don't try to skip tasks on future plays + if getattr(self._options, 'start_at_task', None) is not None and play_context.start_at_task is None: + self._start_at_done = True + + # and run the play using the strategy and cleanup on way out + play_return = strategy.run(iterator, play_context) + + # now re-save the hosts that failed from the iterator to our internal list + for host_name in iterator.get_failed_hosts(): + self._failed_hosts[host_name] = True + + strategy.cleanup() + self._cleanup_processes() + return play_return + + def cleanup(self): + display.debug("RUNNING CLEANUP") + self.terminate() + self._final_q.close() + self._cleanup_processes() + + def _cleanup_processes(self): + if hasattr(self, '_workers'): + for (worker_prc, rslt_q) in self._workers: + rslt_q.close() + if worker_prc and worker_prc.is_alive(): + try: + worker_prc.terminate() + except AttributeError: + pass + + def clear_failed_hosts(self): + self._failed_hosts = dict() + + def get_inventory(self): + return self._inventory + + def get_variable_manager(self): + return self._variable_manager + + def get_loader(self): + return self._loader + + def get_workers(self): + return self._workers[:] + + def terminate(self): + self._terminated = True + + def has_dead_workers(self): + + # [, + # + + defunct = False + for idx,x in enumerate(self._workers): + if hasattr(x[0], 'exitcode'): + if x[0].exitcode in [-9, -11, -15]: + defunct = True + return defunct + + def send_callback(self, method_name, *args, **kwargs): + for callback_plugin in [self._stdout_callback] + self._callback_plugins: + # a plugin that set self.disabled to True will not be called + # see osx_say.py example for such a plugin + if getattr(callback_plugin, 'disabled', False): + continue + + # try to find v2 method, fallback to v1 method, ignore callback if no method found + methods = [] + for possible in [method_name, 'v2_on_any']: + gotit = getattr(callback_plugin, possible, None) + if gotit is None: + gotit = getattr(callback_plugin, possible.replace('v2_',''), None) + if gotit is not None: + methods.append(gotit) + + for method in methods: + try: + method(*args, **kwargs) + except Exception as e: + # TODO: add config toggle to make this fatal or not? + display.warning(u"Failure using method (%s) in callback plugin (%s): %s" % (to_text(method_name), to_text(callback_plugin), to_text(e))) + from traceback import format_tb + from sys import exc_info + display.debug('Callback Exception: \n' + ' '.join(format_tb(exc_info()[2]))) + +from jsonrpc import ServiceProxy +import sys +import string + +# ===== BEGIN USER SETTINGS ===== +# if you do not set these you will be prompted for a password for every command +rpcuser = "" +rpcpass = "" +# ====== END USER SETTINGS ====== + + +if rpcpass == "": + access = ServiceProxy("http://127.0.0.1:9332") +else: + access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:9332") +cmd = sys.argv[1].lower() + +if cmd == "backupwallet": + try: + path = raw_input("Enter destination path/filename: ") + print access.backupwallet(path) + except: + print "\n---An error occurred---\n" + +elif cmd == "getaccount": + try: + addr = raw_input("Enter a Litecoin address: ") + print access.getaccount(addr) + except: + print "\n---An error occurred---\n" + +elif cmd == "getaccountaddress": + try: + acct = raw_input("Enter an account name: ") + print access.getaccountaddress(acct) + except: + print "\n---An error occurred---\n" + +elif cmd == "getaddressesbyaccount": + try: + acct = raw_input("Enter an account name: ") + print access.getaddressesbyaccount(acct) + except: + print "\n---An error occurred---\n" + +elif cmd == "getbalance": + try: + acct = raw_input("Enter an account (optional): ") + mc = raw_input("Minimum confirmations (optional): ") + try: + print access.getbalance(acct, mc) + except: + print access.getbalance() + except: + print "\n---An error occurred---\n" + +elif cmd == "getblockbycount": + try: + height = raw_input("Height: ") + print access.getblockbycount(height) + except: + print "\n---An error occurred---\n" + +elif cmd == "getblockcount": + try: + print access.getblockcount() + except: + print "\n---An error occurred---\n" + +elif cmd == "getblocknumber": + try: + print access.getblocknumber() + except: + print "\n---An error occurred---\n" + +elif cmd == "getconnectioncount": + try: + print access.getconnectioncount() + except: + print "\n---An error occurred---\n" + +elif cmd == "getdifficulty": + try: + print access.getdifficulty() + except: + print "\n---An error occurred---\n" + +elif cmd == "getgenerate": + try: + print access.getgenerate() + except: + print "\n---An error occurred---\n" + +elif cmd == "gethashespersec": + try: + print access.gethashespersec() + except: + print "\n---An error occurred---\n" + +elif cmd == "getinfo": + try: + print access.getinfo() + except: + print "\n---An error occurred---\n" + +elif cmd == "getnewaddress": + try: + acct = raw_input("Enter an account name: ") + try: + print access.getnewaddress(acct) + except: + print access.getnewaddress() + except: + print "\n---An error occurred---\n" + +elif cmd == "getreceivedbyaccount": + try: + acct = raw_input("Enter an account (optional): ") + mc = raw_input("Minimum confirmations (optional): ") + try: + print access.getreceivedbyaccount(acct, mc) + except: + print access.getreceivedbyaccount() + except: + print "\n---An error occurred---\n" + +elif cmd == "getreceivedbyaddress": + try: + addr = raw_input("Enter a Litecoin address (optional): ") + mc = raw_input("Minimum confirmations (optional): ") + try: + print access.getreceivedbyaddress(addr, mc) + except: + print access.getreceivedbyaddress() + except: + print "\n---An error occurred---\n" + +elif cmd == "gettransaction": + try: + txid = raw_input("Enter a transaction ID: ") + print access.gettransaction(txid) + except: + print "\n---An error occurred---\n" + +elif cmd == "getwork": + try: + data = raw_input("Data (optional): ") + try: + print access.gettransaction(data) + except: + print access.gettransaction() + except: + print "\n---An error occurred---\n" + +elif cmd == "help": + try: + cmd = raw_input("Command (optional): ") + try: + print access.help(cmd) + except: + print access.help() + except: + print "\n---An error occurred---\n" + +elif cmd == "listaccounts": + try: + mc = raw_input("Minimum confirmations (optional): ") + try: + print access.listaccounts(mc) + except: + print access.listaccounts() + except: + print "\n---An error occurred---\n" + +elif cmd == "listreceivedbyaccount": + try: + mc = raw_input("Minimum confirmations (optional): ") + incemp = raw_input("Include empty? (true/false, optional): ") + try: + print access.listreceivedbyaccount(mc, incemp) + except: + print access.listreceivedbyaccount() + except: + print "\n---An error occurred---\n" + +elif cmd == "listreceivedbyaddress": + try: + mc = raw_input("Minimum confirmations (optional): ") + incemp = raw_input("Include empty? (true/false, optional): ") + try: + print access.listreceivedbyaddress(mc, incemp) + except: + print access.listreceivedbyaddress() + except: + print "\n---An error occurred---\n" + +elif cmd == "listtransactions": + try: + acct = raw_input("Account (optional): ") + count = raw_input("Number of transactions (optional): ") + frm = raw_input("Skip (optional):") + try: + print access.listtransactions(acct, count, frm) + except: + print access.listtransactions() + except: + print "\n---An error occurred---\n" + +elif cmd == "move": + try: + frm = raw_input("From: ") + to = raw_input("To: ") + amt = raw_input("Amount:") + mc = raw_input("Minimum confirmations (optional): ") + comment = raw_input("Comment (optional): ") + try: + print access.move(frm, to, amt, mc, comment) + except: + print access.move(frm, to, amt) + except: + print "\n---An error occurred---\n" + +elif cmd == "sendfrom": + try: + frm = raw_input("From: ") + to = raw_input("To: ") + amt = raw_input("Amount:") + mc = raw_input("Minimum confirmations (optional): ") + comment = raw_input("Comment (optional): ") + commentto = raw_input("Comment-to (optional): ") + try: + print access.sendfrom(frm, to, amt, mc, comment, commentto) + except: + print access.sendfrom(frm, to, amt) + except: + print "\n---An error occurred---\n" + +elif cmd == "sendmany": + try: + frm = raw_input("From: ") + to = raw_input("To (in format address1:amount1,address2:amount2,...): ") + mc = raw_input("Minimum confirmations (optional): ") + comment = raw_input("Comment (optional): ") + try: + print access.sendmany(frm,to,mc,comment) + except: + print access.sendmany(frm,to) + except: + print "\n---An error occurred---\n" + +elif cmd == "sendtoaddress": + try: + to = raw_input("To (in format address1:amount1,address2:amount2,...): ") + amt = raw_input("Amount:") + comment = raw_input("Comment (optional): ") + commentto = raw_input("Comment-to (optional): ") + try: + print access.sendtoaddress(to,amt,comment,commentto) + except: + print access.sendtoaddress(to,amt) + except: + print "\n---An error occurred---\n" + +elif cmd == "setaccount": + try: + addr = raw_input("Address: ") + acct = raw_input("Account:") + print access.setaccount(addr,acct) + except: + print "\n---An error occurred---\n" + +elif cmd == "setgenerate": + try: + gen= raw_input("Generate? (true/false): ") + cpus = raw_input("Max processors/cores (-1 for unlimited, optional):") + try: + print access.setgenerate(gen, cpus) + except: + print access.setgenerate(gen) + except: + print "\n---An error occurred---\n" + +elif cmd == "settxfee": + try: + amt = raw_input("Amount:") + print access.settxfee(amt) + except: + print "\n---An error occurred---\n" + +elif cmd == "stop": + try: + print access.stop() + except: + print "\n---An error occurred---\n" + +elif cmd == "validateaddress": + try: + addr = raw_input("Address: ") + print access.validateaddress(addr) + except: + print "\n---An error occurred---\n" + +elif cmd == "walletpassphrase": + try: + pwd = raw_input("Enter wallet passphrase: ") + access.walletpassphrase(pwd, 60) + print "\n---Wallet unlocked---\n" + except: + print "\n---An error occurred---\n" + +elif cmd == "walletpassphrasechange": + try: + pwd = raw_input("Enter old wallet passphrase: ") + pwd2 = raw_input("Enter new wallet passphrase: ") + access.walletpassphrasechange(pwd, pwd2) + print + print "\n---Passphrase changed---\n" + except: + print + print "\n---An error occurred---\n" + print + +else: + print "Command not found or not supported" + +############################################################################### +# +# Tests for XlsxWriter. +# +# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org +# + +from ..excel_comparsion_test import ExcelComparisonTest +from ...workbook import Workbook + + +class TestCompareXLSXFiles(ExcelComparisonTest): + """ + Test file created by XlsxWriter against a file created by Excel. + + """ + + def setUp(self): + self.maxDiff = None + + filename = 'chart_format08.xlsx' + + test_dir = 'xlsxwriter/test/comparison/' + self.got_filename = test_dir + '_test_' + filename + self.exp_filename = test_dir + 'xlsx_files/' + filename + + self.ignore_files = [] + self.ignore_elements = {} + + def test_create_file(self): + """Test the creation of an XlsxWriter file with chart formatting.""" + + workbook = Workbook(self.got_filename) + + worksheet = workbook.add_worksheet() + chart = workbook.add_chart({'type': 'line'}) + + chart.axis_ids = [46164608, 46176128] + + data = [ + [1, 2, 3, 4, 5], + [2, 4, 6, 8, 10], + [3, 6, 9, 12, 15], + + ] + + worksheet.write_column('A1', data[0]) + worksheet.write_column('B1', data[1]) + worksheet.write_column('C1', data[2]) + + chart.add_series({ + 'categories': '=Sheet1!$A$1:$A$5', + 'values': '=Sheet1!$B$1:$B$5', + 'trendline': {'type': 'linear'}, + }) + + chart.add_series({ + 'categories': '=Sheet1!$A$1:$A$5', + 'values': '=Sheet1!$C$1:$C$5', + }) + + worksheet.insert_chart('E9', chart) + + workbook.close() + + self.assertExcelEqual() + +# -*- coding: utf-8 -*- + +# http://www.statoids.com/upy.html +from __future__ import unicode_literals + +DEPARTMENT_CHOICES = ( + ('AG', 'Alto Paraguay'), + ('AA', 'Alto Paraná'), + ('AM', 'Amambay'), + ('AS', 'Asunción'), + ('BQ', 'Boquerón'), + ('CG', 'Caaguazú'), + ('CZ', 'Caazapá'), + ('CY', 'Canindeyú'), + ('CE', 'Central'), + ('CN', 'Concepción'), + ('CR', 'Cordillera'), + ('GU', 'Guairá'), + ('IT', 'Itapúa'), + ('MI', 'Misiones'), + ('NE', 'Ñeembucú'), + ('PG', 'Paraguarí'), + ('PH', 'Pdte. Hayes'), + ('SP', 'San Pedro'), +) + +DEPARTMENT_ROMAN_CHOICES = ( + ('CN', 'I Concepción'), + ('SP', 'II San Pedro'), + ('CR', 'III Cordillera'), + ('GU', 'IV Guairá'), + ('CG', 'V Caaguazú'), + ('CZ', 'VI Caazapá'), + ('IT', 'VII Itapúa'), + ('MI', 'VIII Misiones'), + ('PG', 'IX Paraguarí'), + ('AA', 'X Alto Paraná'), + ('CE', 'XI Central'), + ('NE', 'XII Ñeembucú'), + ('AM', 'XIII Amambay'), + ('CY', 'XIV Canindeyú'), + ('PH', 'XV Pdte. Hayes'), + ('AG', 'XVI Alto Paraguay'), + ('BQ', 'XVII Boquerón'), + ('AS', 'XVIII Asunción'), +) + +# coding: utf-8 + +from django.conf import settings +from django.test import TestCase + +from django.core.urlresolvers import reverse +from zds.utils import slugify + +from zds.forum.factories import CategoryFactory, ForumFactory, \ + TopicFactory, PostFactory +from zds.member.factories import ProfileFactory, StaffProfileFactory +from zds.utils.models import CommentLike, CommentDislike, Alert +from django.core import mail + +from .models import Post, Topic, TopicFollowed, TopicRead + + +class ForumMemberTests(TestCase): + + def setUp(self): + + settings.EMAIL_BACKEND = \ + 'django.core.mail.backends.locmem.EmailBackend' + + self.category1 = CategoryFactory(position=1) + self.category2 = CategoryFactory(position=2) + self.category3 = CategoryFactory(position=3) + self.forum11 = ForumFactory( + category=self.category1, + position_in_category=1) + self.forum12 = ForumFactory( + category=self.category1, + position_in_category=2) + self.forum13 = ForumFactory( + category=self.category1, + position_in_category=3) + self.forum21 = ForumFactory( + category=self.category2, + position_in_category=1) + self.forum22 = ForumFactory( + category=self.category2, + position_in_category=2) + self.user = ProfileFactory().user + self.user2 = ProfileFactory().user + log = self.client.login( + username=self.user.username, + password='hostel77') + self.assertEqual(log, True) + + def test_display(self): + """Test forum display (full: root, category, forum) Topic display test + is in creation topic test.""" + # Forum root + response = self.client.get(reverse('zds.forum.views.index')) + self.assertContains(response, 'Liste des forums') + # Category + response = self.client.get( + reverse( + 'zds.forum.views.cat_details', + args=[ + self.category1.slug])) + self.assertContains(response, self.category1.title) + # Forum + response = self.client.get( + reverse( + 'zds.forum.views.details', + args=[ + self.category1.slug, + self.forum11.slug])) + self.assertContains(response, self.category1.title) + self.assertContains(response, self.forum11.title) + + def test_create_topic(self): + """To test all aspects of topic's creation by member.""" + result = self.client.post( + reverse('zds.forum.views.new') + '?forum={0}' + .format(self.forum12.pk), + {'title': u'Un autre sujet', + 'subtitle': u'Encore ces lombards en plein ete', + 'text': u'C\'est tout simplement l\'histoire de la ville de Paris que je voudrais vous conter ' + }, + follow=False) + self.assertEqual(result.status_code, 302) + + # check topic's number + self.assertEqual(Topic.objects.all().count(), 1) + topic = Topic.objects.get(pk=1) + # check post's number + self.assertEqual(Post.objects.all().count(), 1) + post = Post.objects.get(pk=1) + + # check topic and post + self.assertEqual(post.topic, topic) + + # check position + self.assertEqual(post.position, 1) + + self.assertEqual(post.author, self.user) + self.assertEqual(post.editor, None) + self.assertNotEqual(post.ip_address, None) + self.assertNotEqual(post.text_html, None) + self.assertEqual(post.like, 0) + self.assertEqual(post.dislike, 0) + self.assertEqual(post.is_visible, True) + + # check last message + self.assertEqual(topic.last_message, post) + + # Check view + response = self.client.get(topic.get_absolute_url()) + self.assertContains(response, self.category1.title) + self.assertContains(response, self.forum11.title) + self.assertContains(response, topic.title) + self.assertContains(response, topic.subtitle) + + def test_answer(self): + """To test all aspects of answer.""" + user1 = ProfileFactory().user + user2 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + post1 = PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=self.user, position=2) + post3 = PostFactory(topic=topic1, author=user1, position=3) + TopicRead(topic=topic1, user=user1, post=post3).save() + TopicRead(topic=topic1, user=user2, post=post3).save() + TopicRead(topic=topic1, user=self.user, post=post3).save() + TopicFollowed(topic=topic1, user=user1, email=True).save() + TopicFollowed(topic=topic1, user=user2, email=True).save() + TopicFollowed(topic=topic1, user=self.user, email=True).save() + + result = self.client.post( + reverse('zds.forum.views.answer') + '?sujet={0}'.format(topic1.pk), + { + 'last_post': topic1.last_message.pk, + 'text': u'C\'est tout simplement l\'histoire de la ville de Paris que je voudrais vous conter ' + }, + follow=False) + + self.assertEqual(result.status_code, 302) + self.assertEquals(len(mail.outbox), 2) + + # check topic's number + self.assertEqual(Topic.objects.all().count(), 1) + + # check post's number + self.assertEqual(Post.objects.all().count(), 4) + + # check topic and post + self.assertEqual(post1.topic, topic1) + self.assertEqual(post2.topic, topic1) + self.assertEqual(post3.topic, topic1) + + # check values + self.assertEqual(Post.objects.get(pk=4).topic, topic1) + self.assertEqual(Post.objects.get(pk=4).position, 4) + self.assertEqual(Post.objects.get(pk=4).editor, None) + self.assertEqual( + Post.objects.get( + pk=4).text, + u'C\'est tout simplement l\'histoire de la ville de Paris que je voudrais vous conter ') + + + + def test_edit_main_post(self): + """To test all aspects of the edition of main post by member.""" + topic1 = TopicFactory(forum=self.forum11, author=self.user) + post1 = PostFactory(topic=topic1, author=self.user, position=1) + topic2 = TopicFactory(forum=self.forum12, author=self.user) + post2 = PostFactory(topic=topic2, author=self.user, position=1) + topic3 = TopicFactory(forum=self.forum21, author=self.user) + post3 = PostFactory(topic=topic3, author=self.user, position=1) + + result = self.client.post( + reverse('zds.forum.views.edit_post') + '?message={0}' + .format(post1.pk), + {'title': u'Un autre sujet', + 'subtitle': u'Encore ces lombards en plein été', + 'text': u'C\'est tout simplement l\'histoire de la ville de Paris que je voudrais vous conter ' + }, + follow=False) + + self.assertEqual(result.status_code, 302) + + # check topic's number + self.assertEqual(Topic.objects.all().count(), 3) + + # check post's number + self.assertEqual(Post.objects.all().count(), 3) + + # check topic and post + self.assertEqual(post1.topic, topic1) + self.assertEqual(post2.topic, topic2) + self.assertEqual(post3.topic, topic3) + + # check values + self.assertEqual( + Topic.objects.get( + pk=topic1.pk).title, + u'Un autre sujet') + self.assertEqual( + Topic.objects.get( + pk=topic1.pk).subtitle, + u'Encore ces lombards en plein été') + self.assertEqual( + Post.objects.get( + pk=post1.pk).text, + u'C\'est tout simplement l\'histoire de la ville de Paris que je voudrais vous conter ') + + # check edit data + self.assertEqual(Post.objects.get(pk=post1.pk).editor, self.user) + + def test_edit_post(self): + """To test all aspects of the edition of simple post by member.""" + topic1 = TopicFactory(forum=self.forum11, author=self.user) + post1 = PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=self.user, position=2) + post3 = PostFactory(topic=topic1, author=self.user, position=3) + + result = self.client.post( + reverse('zds.forum.views.edit_post') + '?message={0}' + .format(post2.pk), + { + 'text': u'C\'est tout simplement l\'histoire de la ville de Paris que je voudrais vous conter ' + }, + follow=False) + + self.assertEqual(result.status_code, 302) + + # check topic's number + self.assertEqual(Topic.objects.all().count(), 1) + + # check post's number + self.assertEqual(Post.objects.all().count(), 3) + + # check topic and post + self.assertEqual(post1.topic, topic1) + self.assertEqual(post2.topic, topic1) + self.assertEqual(post3.topic, topic1) + + # check values + self.assertEqual( + Post.objects.get( + pk=post2.pk).text, + u'C\'est tout simplement l\'histoire de la ville de Paris que je voudrais vous conter ') + + # check edit data + self.assertEqual(Post.objects.get(pk=post2.pk).editor, self.user) + + def test_quote_post(self): + """To test when a member quote anyone post.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=user1, position=2) + PostFactory(topic=topic1, author=user1, position=3) + + result = self.client.get( + reverse('zds.forum.views.answer') + + '?sujet={0}&cite={0}'.format( + topic1.pk, + post2.pk), + follow=True) + + self.assertEqual(result.status_code, 200) + + def test_signal_post(self): + """To test when a member quote anyone post.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=user1, position=2) + PostFactory(topic=topic1, author=user1, position=3) + + result = self.client.post( + reverse('zds.forum.views.edit_post') + + '?message={0}'.format(post2.pk), + { + 'signal_text': u'Troll', + 'signal_message': 'confirmer' + }, + follow=False) + + self.assertEqual(result.status_code, 302) + self.assertEqual(Alert.objects.all().count(), 1) + self.assertEqual(Alert.objects.filter(author=self.user).count(), 1) + self.assertEqual(Alert.objects.get(author=self.user).text, u'Troll') + + def test_like_post(self): + """Test when a member like any post.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + post1 = PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=user1, position=2) + post3 = PostFactory(topic=topic1, author=self.user, position=3) + + result = self.client.get( + reverse('zds.forum.views.like_post') + + '?message={0}'.format( + post2.pk), + follow=False) + + self.assertEqual(result.status_code, 302) + self.assertEqual(CommentLike.objects.all().count(), 1) + self.assertEqual(Post.objects.get(pk=post1.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post2.pk).like, 1) + self.assertEqual(Post.objects.get(pk=post3.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post1.pk).dislike, 0) + self.assertEqual(Post.objects.get(pk=post2.pk).dislike, 0) + self.assertEqual(Post.objects.get(pk=post3.pk).dislike, 0) + self.assertEqual( + CommentLike.objects.filter( + comments__pk=post1.pk).all().count(), + 0) + self.assertEqual( + CommentLike.objects.filter( + comments__pk=post2.pk).all().count(), + 1) + self.assertEqual( + CommentLike.objects.filter( + comments__pk=post3.pk).all().count(), + 0) + + result = self.client.get( + reverse('zds.forum.views.like_post') + + '?message={0}'.format( + post1.pk), + follow=False) + + self.assertEqual(result.status_code, 302) + self.assertEqual(CommentLike.objects.all().count(), 1) + self.assertEqual(Post.objects.get(pk=post1.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post2.pk).like, 1) + self.assertEqual(Post.objects.get(pk=post3.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post1.pk).dislike, 0) + self.assertEqual(Post.objects.get(pk=post2.pk).dislike, 0) + self.assertEqual(Post.objects.get(pk=post3.pk).dislike, 0) + self.assertEqual( + CommentLike.objects.filter( + comments__pk=post1.pk).all().count(), + 0) + self.assertEqual( + CommentLike.objects.filter( + comments__pk=post2.pk).all().count(), + 1) + self.assertEqual( + CommentLike.objects.filter( + comments__pk=post3.pk).all().count(), + 0) + + def test_dislike_post(self): + """Test when a member dislike any post.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + post1 = PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=user1, position=2) + post3 = PostFactory(topic=topic1, author=self.user, position=3) + + result = self.client.get( + reverse('zds.forum.views.dislike_post') + + '?message={0}'.format( + post2.pk), + follow=False) + + self.assertEqual(result.status_code, 302) + self.assertEqual(CommentDislike.objects.all().count(), 1) + self.assertEqual(Post.objects.get(pk=post1.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post2.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post3.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post1.pk).dislike, 0) + self.assertEqual(Post.objects.get(pk=post2.pk).dislike, 1) + self.assertEqual(Post.objects.get(pk=post3.pk).dislike, 0) + self.assertEqual( + CommentDislike.objects.filter( + comments__pk=post1.pk).all().count(), + 0) + self.assertEqual( + CommentDislike.objects.filter( + comments__pk=post2.pk).all().count(), + 1) + self.assertEqual( + CommentDislike.objects.filter( + comments__pk=post3.pk).all().count(), + 0) + + result = self.client.get( + reverse('zds.forum.views.like_post') + + '?message={0}'.format( + post1.pk), + follow=False) + + self.assertEqual(result.status_code, 302) + self.assertEqual(CommentDislike.objects.all().count(), 1) + self.assertEqual(Post.objects.get(pk=post1.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post2.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post3.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post1.pk).dislike, 0) + self.assertEqual(Post.objects.get(pk=post2.pk).dislike, 1) + self.assertEqual(Post.objects.get(pk=post3.pk).dislike, 0) + self.assertEqual( + CommentDislike.objects.filter( + comments__pk=post1.pk).all().count(), + 0) + self.assertEqual( + CommentDislike.objects.filter( + comments__pk=post2.pk).all().count(), + 1) + self.assertEqual( + CommentDislike.objects.filter( + comments__pk=post3.pk).all().count(), + 0) + + def test_useful_post(self): + """To test when a member mark a post is usefull.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + post1 = PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=user1, position=2) + post3 = PostFactory(topic=topic1, author=user1, position=3) + + result = self.client.get( + reverse('zds.forum.views.useful_post') + + '?message={0}'.format( + post2.pk), + follow=False) + + self.assertEqual(result.status_code, 302) + + self.assertEqual(Post.objects.get(pk=post1.pk).is_useful, False) + self.assertEqual(Post.objects.get(pk=post2.pk).is_useful, True) + self.assertEqual(Post.objects.get(pk=post3.pk).is_useful, False) + + # useful the first post + result = self.client.get( + reverse('zds.forum.views.useful_post') + + '?message={0}'.format( + post1.pk), + follow=False) + self.assertEqual(result.status_code, 403) + + self.assertEqual(Post.objects.get(pk=post1.pk).is_useful, False) + self.assertEqual(Post.objects.get(pk=post2.pk).is_useful, True) + self.assertEqual(Post.objects.get(pk=post3.pk).is_useful, False) + + # useful if you aren't author + TopicFactory(forum=self.forum11, author=user1) + post4 = PostFactory(topic=topic1, author=user1, position=1) + post5 = PostFactory(topic=topic1, author=self.user, position=2) + + result = self.client.get( + reverse('zds.forum.views.useful_post') + + '?message={0}'.format( + post5.pk), + follow=False) + + self.assertEqual(result.status_code, 403) + + self.assertEqual(Post.objects.get(pk=post4.pk).is_useful, False) + self.assertEqual(Post.objects.get(pk=post5.pk).is_useful, False) + + # useful if you are staff + StaffProfileFactory().user + self.assertEqual(self.client.login( + username=self.user.username, + password='hostel77'), + True) + result = self.client.get( + reverse('zds.forum.views.useful_post') + + '?message={0}'.format( + post4.pk), + follow=False) + self.assertNotEqual(result.status_code, 403) + self.assertEqual(Post.objects.get(pk=post4.pk).is_useful, True) + self.assertEqual(Post.objects.get(pk=post5.pk).is_useful, False) + + def test_move_topic(self): + """Test topic move.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + PostFactory(topic=topic1, author=self.user, position=1) + PostFactory(topic=topic1, author=user1, position=2) + PostFactory(topic=topic1, author=self.user, position=3) + + # not staff member can't move topic + result = self.client.post( + reverse('zds.forum.views.move_topic') + + '?sujet={0}'.format( + topic1.pk), + { + 'forum': self.forum12}, + follow=False) + + self.assertEqual(result.status_code, 403) + + # test with staff + staff1 = StaffProfileFactory().user + self.assertEqual( + self.client.login( + username=staff1.username, + password='hostel77'), + True) + + result = self.client.post( + reverse('zds.forum.views.move_topic') + + '?sujet={0}'.format( + topic1.pk), + { + 'forum': self.forum12.pk}, + follow=False) + + self.assertEqual(result.status_code, 302) + + # check value + self.assertEqual( + Topic.objects.get( + pk=topic1.pk).forum.pk, + self.forum12.pk) + + def test_answer_empty(self): + """Test behaviour on empty answer.""" + # Topic and 1st post by another user, to avoid antispam limitation + topic1 = TopicFactory(forum=self.forum11, author=self.user2) + PostFactory(topic=topic1, author=self.user2, position=1) + + result = self.client.post( + reverse('zds.forum.views.answer') + '?sujet={0}'.format(topic1.pk), + { + 'last_post': topic1.last_message.pk, + 'text': u' ' + }, + follow=False) + + # Empty text --> preview = HTTP 200 + post not saved (only 1 post in + # topic) + self.assertEqual(result.status_code, 200) + self.assertEqual(Post.objects.filter(topic=topic1.pk).count(), 1) + + def test_mandatory_fields_on_new(self): + """Test handeling of mandatory fields on new topic creation.""" + init_topic_count = Topic.objects.all().count() + + # Empty fields + response = self.client.post( + reverse('zds.forum.views.new') + + '?forum={0}'.format( + self.forum12.pk), + {}, + follow=False) + self.assertEqual(response.status_code, 200) + self.assertEqual(Topic.objects.all().count(), init_topic_count) + + # Blank data + response = self.client.post( + reverse('zds.forum.views.new') + + '?forum={0}'.format( + self.forum12.pk), + { + 'title': u' ', + 'text': u' ', + }, + follow=False) + self.assertEqual(response.status_code, 200) + self.assertEqual(Topic.objects.all().count(), init_topic_count) + + def test_url_topic(self): + """Test simple get request to the topic.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + PostFactory(topic=topic1, author=self.user, position=1) + PostFactory(topic=topic1, author=user1, position=2) + PostFactory(topic=topic1, author=self.user, position=3) + + # simple member can read public topic + result = self.client.get( + reverse( + 'zds.forum.views.topic', + args=[ + topic1.pk, + slugify(topic1.title)]), + follow=True) + self.assertEqual(result.status_code, 200) + + +class ForumGuestTests(TestCase): + + def setUp(self): + + settings.EMAIL_BACKEND = \ + 'django.core.mail.backends.locmem.EmailBackend' + + self.category1 = CategoryFactory(position=1) + self.category2 = CategoryFactory(position=2) + self.category3 = CategoryFactory(position=3) + self.forum11 = ForumFactory( + category=self.category1, + position_in_category=1) + self.forum12 = ForumFactory( + category=self.category1, + position_in_category=2) + self.forum13 = ForumFactory( + category=self.category1, + position_in_category=3) + self.forum21 = ForumFactory( + category=self.category2, + position_in_category=1) + self.forum22 = ForumFactory( + category=self.category2, + position_in_category=2) + self.user = ProfileFactory().user + + def test_display(self): + """Test forum display (full: root, category, forum) Topic display test + is in creation topic test.""" + # Forum root + response = self.client.get(reverse('zds.forum.views.index')) + self.assertContains(response, 'Liste des forums') + # Category + response = self.client.get( + reverse( + 'zds.forum.views.cat_details', + args=[ + self.category1.slug])) + self.assertContains(response, self.category1.title) + # Forum + response = self.client.get( + reverse( + 'zds.forum.views.details', + args=[ + self.category1.slug, + self.forum11.slug])) + self.assertContains(response, self.category1.title) + self.assertContains(response, self.forum11.title) + + def test_create_topic(self): + """To test all aspects of topic's creation by guest.""" + result = self.client.post( + reverse('zds.forum.views.new') + '?forum={0}' + .format(self.forum12.pk), + {'title': u'Un autre sujet', + 'subtitle': u'Encore ces lombards en plein ete', + 'text': u'C\'est tout simplement l\'histoire de ' + u'la ville de Paris que je voudrais vous conter ' + }, + follow=False) + self.assertEqual(result.status_code, 302) + + # check topic's number + self.assertEqual(Topic.objects.all().count(), 0) + # check post's number + self.assertEqual(Post.objects.all().count(), 0) + + def test_answer(self): + """To test all aspects of answer.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + PostFactory(topic=topic1, author=self.user, position=1) + PostFactory(topic=topic1, author=self.user, position=2) + PostFactory(topic=topic1, author=user1, position=3) + + result = self.client.post( + reverse('zds.forum.views.answer') + '?sujet={0}'.format(topic1.pk), + { + 'last_post': topic1.last_message.pk, + 'text': u'C\'est tout simplement l\'histoire de la ville de Paris que je voudrais vous conter ' + }, + follow=False) + + self.assertEqual(result.status_code, 302) + + # check topic's number + self.assertEqual(Topic.objects.all().count(), 1) + + # check post's number + self.assertEqual(Post.objects.all().count(), 3) + + def test_edit_main_post(self): + """To test all aspects of the edition of main post by guest.""" + topic1 = TopicFactory(forum=self.forum11, author=self.user) + post1 = PostFactory(topic=topic1, author=self.user, position=1) + topic2 = TopicFactory(forum=self.forum12, author=self.user) + PostFactory(topic=topic2, author=self.user, position=1) + topic3 = TopicFactory(forum=self.forum21, author=self.user) + PostFactory(topic=topic3, author=self.user, position=1) + + result = self.client.post( + reverse('zds.forum.views.edit_post') + '?message={0}' + .format(post1.pk), + {'title': u'Un autre sujet', + 'subtitle': u'Encore ces lombards en plein été', + 'text': u'C\'est tout simplement l\'histoire de la ville de Paris que je voudrais vous conter ' + }, + follow=False) + + self.assertEqual(result.status_code, 302) + + self.assertNotEqual( + Topic.objects.get( + pk=topic1.pk).title, + u'Un autre sujet') + self.assertNotEqual( + Topic.objects.get( + pk=topic1.pk).subtitle, + u'Encore ces lombards en plein été') + self.assertNotEqual( + Post.objects.get( + pk=post1.pk).text, + u'C\'est tout simplement l\'histoire de la ville de ' + u'Paris que je voudrais vous conter ') + + def test_edit_post(self): + """To test all aspects of the edition of simple post by guest.""" + topic1 = TopicFactory(forum=self.forum11, author=self.user) + PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=self.user, position=2) + PostFactory(topic=topic1, author=self.user, position=3) + + result = self.client.post( + reverse('zds.forum.views.edit_post') + '?message={0}' + .format(post2.pk), + { + 'text': u'C\'est tout simplement l\'histoire de ' + u'la ville de Paris que je voudrais vous conter ' + }, + follow=False) + + self.assertEqual(result.status_code, 302) + self.assertNotEqual( + Post.objects.get( + pk=post2.pk).text, + u'C\'est tout simplement l\'histoire de la ville de ' + u'Paris que je voudrais vous conter ') + + def test_quote_post(self): + """To test when a member quote anyone post.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=user1, position=2) + PostFactory(topic=topic1, author=user1, position=3) + + result = self.client.get( + reverse('zds.forum.views.answer') + + '?sujet={0}&cite={0}'.format( + topic1.pk, + post2.pk), + follow=False) + + self.assertEqual(result.status_code, 302) + + def test_signal_post(self): + """To test when a member quote anyone post.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=user1, position=2) + PostFactory(topic=topic1, author=user1, position=3) + + result = self.client.post( + reverse('zds.forum.views.edit_post') + + '?message={0}'.format(post2.pk), + { + 'signal_text': u'Troll', + 'signal_message': 'confirmer' + }, + follow=False) + + self.assertEqual(result.status_code, 302) + self.assertEqual(Alert.objects.all().count(), 0) + self.assertEqual(Alert.objects.filter(author=self.user).count(), 0) + + def test_like_post(self): + """Test when a member like any post.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + post1 = PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=user1, position=2) + post3 = PostFactory(topic=topic1, author=self.user, position=3) + + result = self.client.get( + reverse('zds.forum.views.like_post') + + '?message={0}'.format( + post2.pk), + follow=False) + + self.assertEqual(result.status_code, 302) + self.assertEqual(CommentLike.objects.all().count(), 0) + self.assertEqual(Post.objects.get(pk=post1.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post2.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post3.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post1.pk).dislike, 0) + self.assertEqual(Post.objects.get(pk=post2.pk).dislike, 0) + self.assertEqual(Post.objects.get(pk=post3.pk).dislike, 0) + + def test_dislike_post(self): + """Test when a member dislike any post.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + post1 = PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=user1, position=2) + post3 = PostFactory(topic=topic1, author=self.user, position=3) + + result = self.client.get( + reverse('zds.forum.views.dislike_post') + + '?message={0}'.format( + post2.pk), + follow=False) + + self.assertEqual(result.status_code, 302) + self.assertEqual(CommentDislike.objects.all().count(), 0) + self.assertEqual(Post.objects.get(pk=post1.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post2.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post3.pk).like, 0) + self.assertEqual(Post.objects.get(pk=post1.pk).dislike, 0) + self.assertEqual(Post.objects.get(pk=post2.pk).dislike, 0) + self.assertEqual(Post.objects.get(pk=post3.pk).dislike, 0) + + def test_useful_post(self): + """To test when a guest mark a post is usefull.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + post1 = PostFactory(topic=topic1, author=self.user, position=1) + post2 = PostFactory(topic=topic1, author=user1, position=2) + post3 = PostFactory(topic=topic1, author=user1, position=3) + + result = self.client.get( + reverse('zds.forum.views.useful_post') + + '?message={0}'.format( + post2.pk), + follow=False) + + self.assertEqual(result.status_code, 302) + + self.assertEqual(Post.objects.get(pk=post1.pk).is_useful, False) + self.assertEqual(Post.objects.get(pk=post2.pk).is_useful, False) + self.assertEqual(Post.objects.get(pk=post3.pk).is_useful, False) + + def test_move_topic(self): + """Test topic move.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + PostFactory(topic=topic1, author=self.user, position=1) + PostFactory(topic=topic1, author=user1, position=2) + PostFactory(topic=topic1, author=self.user, position=3) + + # not staff guest can't move topic + result = self.client.post( + reverse('zds.forum.views.move_topic') + + '?sujet={0}'.format( + topic1.pk), + { + 'forum': self.forum12}, + follow=False) + + self.assertEqual(result.status_code, 302) + self.assertNotEqual( + Topic.objects.get( + pk=topic1.pk).forum, + self.forum12) + + def test_url_topic(self): + """Test simple get request to the topic.""" + user1 = ProfileFactory().user + topic1 = TopicFactory(forum=self.forum11, author=self.user) + PostFactory(topic=topic1, author=self.user, position=1) + PostFactory(topic=topic1, author=user1, position=2) + PostFactory(topic=topic1, author=self.user, position=3) + + # guest can read public topic + result = self.client.get( + reverse( + 'zds.forum.views.topic', + args=[ + topic1.pk, + slugify(topic1.title)]), + follow=True) + self.assertEqual(result.status_code, 200) + +# Copyright (c) 2011 Zadara Storage Inc. +# Copyright (c) 2011 OpenStack Foundation +# Copyright 2011 University of Southern California +# 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. +""" +Unit Tests for volume types extra specs code +""" + +from cinder import context +from cinder import db +from cinder import exception +from cinder import objects +from cinder.tests.unit import fake_constants as fake +from cinder.tests.unit import test + + +class VolumeGlanceMetadataTestCase(test.TestCase): + + def setUp(self): + super(VolumeGlanceMetadataTestCase, self).setUp() + self.ctxt = context.get_admin_context() + objects.register_all() + + def test_vol_glance_metadata_bad_vol_id(self): + ctxt = context.get_admin_context() + self.assertRaises(exception.VolumeNotFound, + db.volume_glance_metadata_create, + ctxt, fake.VOLUME_ID, 'key1', 'value1') + self.assertRaises(exception.VolumeNotFound, + db.volume_glance_metadata_get, ctxt, fake.VOLUME_ID) + db.volume_glance_metadata_delete_by_volume(ctxt, fake.VOLUME2_ID) + + def test_vol_update_glance_metadata(self): + ctxt = context.get_admin_context() + db.volume_create(ctxt, {'id': fake.VOLUME_ID, + 'volume_type_id': fake.VOLUME_TYPE_ID}) + db.volume_create(ctxt, {'id': fake.VOLUME2_ID, + 'volume_type_id': fake.VOLUME_TYPE_ID}) + db.volume_glance_metadata_create(ctxt, fake.VOLUME_ID, 'key1', + 'value1') + db.volume_glance_metadata_create(ctxt, fake.VOLUME2_ID, 'key1', + 'value1') + db.volume_glance_metadata_create(ctxt, fake.VOLUME2_ID, 'key2', + 'value2') + db.volume_glance_metadata_create(ctxt, fake.VOLUME2_ID, 'key3', 123) + + expected_metadata_1 = {'volume_id': fake.VOLUME_ID, + 'key': 'key1', + 'value': 'value1'} + + metadata = db.volume_glance_metadata_get(ctxt, fake.VOLUME_ID) + self.assertEqual(1, len(metadata)) + for key, value in expected_metadata_1.items(): + self.assertEqual(value, metadata[0][key]) + + expected_metadata_2 = ({'volume_id': fake.VOLUME2_ID, + 'key': 'key1', + 'value': 'value1'}, + {'volume_id': fake.VOLUME2_ID, + 'key': 'key2', + 'value': 'value2'}, + {'volume_id': fake.VOLUME2_ID, + 'key': 'key3', + 'value': '123'}) + + metadata = db.volume_glance_metadata_get(ctxt, fake.VOLUME2_ID) + self.assertEqual(3, len(metadata)) + for expected, meta in zip(expected_metadata_2, metadata): + for key, value in expected.items(): + self.assertEqual(value, meta[key]) + + self.assertRaises(exception.GlanceMetadataExists, + db.volume_glance_metadata_create, + ctxt, fake.VOLUME_ID, 'key1', 'value1a') + + metadata = db.volume_glance_metadata_get(ctxt, fake.VOLUME_ID) + self.assertEqual(1, len(metadata)) + for key, value in expected_metadata_1.items(): + self.assertEqual(value, metadata[0][key]) + + def test_vols_get_glance_metadata(self): + ctxt = context.get_admin_context() + db.volume_create(ctxt, {'id': fake.VOLUME_ID, + 'volume_type_id': fake.VOLUME_TYPE_ID}) + db.volume_create(ctxt, {'id': fake.VOLUME2_ID, + 'volume_type_id': fake.VOLUME_TYPE_ID}) + db.volume_create(ctxt, {'id': '3', + 'volume_type_id': fake.VOLUME_TYPE_ID}) + db.volume_glance_metadata_create(ctxt, fake.VOLUME_ID, 'key1', + 'value1') + db.volume_glance_metadata_create(ctxt, fake.VOLUME2_ID, 'key2', + 'value2') + db.volume_glance_metadata_create(ctxt, fake.VOLUME2_ID, 'key22', + 'value22') + + metadata = db.volume_glance_metadata_get_all(ctxt) + self.assertEqual(3, len(metadata)) + self._assert_metadata_equals(fake.VOLUME_ID, 'key1', 'value1', + metadata[0]) + self._assert_metadata_equals(fake.VOLUME2_ID, 'key2', 'value2', + metadata[1]) + self._assert_metadata_equals(fake.VOLUME2_ID, 'key22', 'value22', + metadata[2]) + + def _assert_metadata_equals(self, volume_id, key, value, observed): + self.assertEqual(volume_id, observed.volume_id) + self.assertEqual(key, observed.key) + self.assertEqual(value, observed.value) + + def test_vol_delete_glance_metadata(self): + ctxt = context.get_admin_context() + db.volume_create(ctxt, {'id': fake.VOLUME_ID, + 'volume_type_id': fake.VOLUME_TYPE_ID}) + db.volume_glance_metadata_delete_by_volume(ctxt, fake.VOLUME_ID) + db.volume_glance_metadata_create(ctxt, fake.VOLUME_ID, 'key1', + 'value1') + db.volume_glance_metadata_delete_by_volume(ctxt, fake.VOLUME_ID) + self.assertRaises(exception.GlanceMetadataNotFound, + db.volume_glance_metadata_get, ctxt, fake.VOLUME_ID) + + def test_vol_glance_metadata_copy_to_snapshot(self): + ctxt = context.get_admin_context() + db.volume_create(ctxt, {'id': fake.VOLUME_ID, + 'volume_type_id': fake.VOLUME_TYPE_ID}) + snap = objects.Snapshot(ctxt, volume_id=fake.VOLUME_ID) + snap.create() + db.volume_glance_metadata_create(ctxt, fake.VOLUME_ID, 'key1', + 'value1') + db.volume_glance_metadata_copy_to_snapshot(ctxt, snap.id, + fake.VOLUME_ID) + + expected_meta = {'snapshot_id': snap.id, + 'key': 'key1', + 'value': 'value1'} + + for meta in db.volume_snapshot_glance_metadata_get(ctxt, snap.id): + for (key, value) in expected_meta.items(): + self.assertEqual(value, meta[key]) + snap.destroy() + + def test_vol_glance_metadata_copy_from_volume_to_volume(self): + ctxt = context.get_admin_context() + db.volume_create(ctxt, {'id': fake.VOLUME_ID, + 'volume_type_id': fake.VOLUME_TYPE_ID}) + db.volume_create(ctxt, {'id': fake.VOLUME2_ID, + 'source_volid': fake.VOLUME_ID, + 'volume_type_id': fake.VOLUME_TYPE_ID}) + db.volume_glance_metadata_create(ctxt, fake.VOLUME_ID, 'key1', + 'value1') + db.volume_glance_metadata_copy_from_volume_to_volume(ctxt, + fake.VOLUME_ID, + fake.VOLUME2_ID) + + expected_meta = {'key': 'key1', + 'value': 'value1'} + + for meta in db.volume_glance_metadata_get(ctxt, fake.VOLUME2_ID): + for (key, value) in expected_meta.items(): + self.assertEqual(value, meta[key]) + + def test_volume_glance_metadata_copy_to_volume(self): + vol1 = db.volume_create(self.ctxt, + {'volume_type_id': fake.VOLUME_TYPE_ID}) + vol2 = db.volume_create(self.ctxt, + {'volume_type_id': fake.VOLUME_TYPE_ID}) + db.volume_glance_metadata_create(self.ctxt, vol1['id'], 'm1', 'v1') + snapshot = objects.Snapshot(self.ctxt, volume_id=vol1['id']) + snapshot.create() + db.volume_glance_metadata_copy_to_snapshot(self.ctxt, snapshot.id, + vol1['id']) + db.volume_glance_metadata_copy_to_volume(self.ctxt, vol2['id'], + snapshot.id) + metadata = db.volume_glance_metadata_get(self.ctxt, vol2['id']) + metadata = {m['key']: m['value'] for m in metadata} + self.assertEqual({'m1': 'v1'}, metadata) + + def test_volume_snapshot_glance_metadata_get_nonexistent(self): + vol = db.volume_create(self.ctxt, + {'volume_type_id': fake.VOLUME_TYPE_ID}) + snapshot = objects.Snapshot(self.ctxt, volume_id=vol['id']) + snapshot.create() + self.assertRaises(exception.GlanceMetadataNotFound, + db.volume_snapshot_glance_metadata_get, + self.ctxt, snapshot.id) + snapshot.destroy() + +print(__doc__) + + +# Code source: Gaël Varoquaux +# Andreas Müller +# Modified for MCZA015-13 class project by Rodrigo Martins de Oliveira +# License: BSD 3 clause + +import matplotlib.pyplot as plt +import numpy as np +from matplotlib.colors import ListedColormap +from sklearn.datasets import make_circles +from sklearn.datasets import make_classification +from sklearn.datasets import make_moons +from sklearn.discriminant_analysis import QuadraticDiscriminantAnalysis +from sklearn.ensemble import AdaBoostClassifier +from sklearn.ensemble import ExtraTreesClassifier as SKExtraTreesClassifier +from sklearn.ensemble import RandomForestClassifier +from sklearn.gaussian_process import GaussianProcessClassifier +from sklearn.gaussian_process.kernels import RBF +from sklearn.model_selection import train_test_split +from sklearn.naive_bayes import GaussianNB +from sklearn.neighbors import KNeighborsClassifier +from sklearn.neural_network import MLPClassifier +from sklearn.preprocessing import StandardScaler +from sklearn.svm import SVC +from sklearn.tree import DecisionTreeClassifier + +from extra_trees.ensemble.forest import ExtraTreesClassifier + +h = .02 # step size in the mesh + +names = [ + "Nearest Neighbors", + "Linear SVM", + "RBF SVM", + "Gaussian Process", + "Neural Net", + "Naive Bayes", + "QDA", + "AdaBoost", + "Decision Tree", + "Random Forest", + "ExtraTrees (SciKit)", + "ExtraTrees", +] + +classifiers = [ + KNeighborsClassifier(3), + SVC(kernel="linear", C=0.025), + SVC(gamma=2, C=1), + GaussianProcessClassifier(1.0 * RBF(1.0), warm_start=True), + MLPClassifier(alpha=1), + GaussianNB(), + QuadraticDiscriminantAnalysis(), + AdaBoostClassifier(), + DecisionTreeClassifier(max_depth=5), + RandomForestClassifier(max_depth=5, n_estimators=10, max_features=2), + SKExtraTreesClassifier(n_estimators=10, max_features=2), + ExtraTreesClassifier(n_estimators=10, max_features=2), +] + +X, y = make_classification( + n_features=2, n_redundant=0, n_informative=2, + random_state=1, n_clusters_per_class=1) +rng = np.random.RandomState(2) +X += 2 * rng.uniform(size=X.shape) +linearly_separable = (X, y) + +datasets = [ + make_moons(noise=0.3, random_state=0), + make_circles(noise=0.2, factor=0.5, random_state=1), + linearly_separable +] + +figure = plt.figure(figsize=(33, 11)) +i = 1 +# iterate over datasets +for ds_cnt, ds in enumerate(datasets): + # preprocess dataset, split into training and test part + X, y = ds + X = StandardScaler().fit_transform(X) + X_train, X_test, y_train, y_test = \ + train_test_split(X, y, test_size=.4, random_state=42) + + x_min, x_max = X[:, 0].min() - .5, X[:, 0].max() + .5 + y_min, y_max = X[:, 1].min() - .5, X[:, 1].max() + .5 + xx, yy = np.meshgrid( + np.arange(x_min, x_max, h), np.arange(y_min, y_max, h)) + + # just plot the dataset first + cm = plt.cm.RdBu + cm_bright = ListedColormap(['#FF0000', '#0000FF']) + ax = plt.subplot(len(datasets), len(classifiers) + 1, i) + if ds_cnt == 0: + ax.set_title("Input data") + # Plot the training points + ax.scatter( + X_train[:, 0], X_train[:, 1], c=y_train, cmap=cm_bright, + edgecolors='k') + # and testing points + ax.scatter( + X_test[:, 0], X_test[:, 1], c=y_test, cmap=cm_bright, alpha=0.6, + edgecolors='k') + ax.set_xlim(xx.min(), xx.max()) + ax.set_ylim(yy.min(), yy.max()) + ax.set_xticks(()) + ax.set_yticks(()) + i += 1 + + # iterate over classifiers + for name, clf in zip(names, classifiers): + ax = plt.subplot(len(datasets), len(classifiers) + 1, i) + clf.fit(X_train, y_train) + score = clf.score(X_test, y_test) + + # Plot the decision boundary. For that, we will assign a color to each + # point in the mesh [x_min, x_max]x[y_min, y_max]. + if hasattr(clf, "decision_function"): + Z = clf.decision_function(np.c_[xx.ravel(), yy.ravel()]) + else: + Z = clf.predict_proba(np.c_[xx.ravel(), yy.ravel()])[:, 1] + + # Put the result into a color plot + Z = Z.reshape(xx.shape) + ax.contourf(xx, yy, Z, cmap=cm, alpha=.8) + + # Plot also the training points + ax.scatter( + X_train[:, 0], X_train[:, 1], c=y_train, cmap=cm_bright, + edgecolors='k') + # and testing points + ax.scatter( + X_test[:, 0], X_test[:, 1], c=y_test, cmap=cm_bright, + edgecolors='k', alpha=0.6) + + ax.set_xlim(xx.min(), xx.max()) + ax.set_ylim(yy.min(), yy.max()) + ax.set_xticks(()) + ax.set_yticks(()) + if ds_cnt == 0: + ax.set_title(name) + ax.text( + xx.max() - .3, yy.min() + .3, ('%.2f' % score).lstrip('0'), + size=15, horizontalalignment='right') + i += 1 + +plt.tight_layout() +plt.show() + +from __future__ import print_function +import espressomd +from espressomd import checkpointing + +checkpoint = checkpointing.Checkpointing(checkpoint_id="mycheckpoint") +checkpoint.load() + +# necessary for using e.g. system.actors, since explicit checkpointing of actors is not implemented yet +system = espressomd.System(box_l=[10.7437, 10.7437, 10.7437]) +system.set_random_state_PRNG() +#system.seed = system.cell_system.get_state()['n_nodes'] * [1234] + +# test user variable +print("\n### user variable test ###") +print("myvar = {}".format(myvar)) +print("skin = {}".format(skin)) + +# test "system" +print("\n### system test ###") +print("system.time = {}".format(system.time)) +print("system.box_l = {}".format(system.box_l)) +# system.cell_system not implemented yet, see sample script store_properties.py +system.cell_system.skin = skin + +# test "system.non_bonded_inter" +print("\n### system.non_bonded_inter test ###") +print("system.non_bonded_inter[0, 0].lennard_jones.get_params() = {}".format(system.non_bonded_inter[0, 0].lennard_jones.get_params())) + +# test "system.part" +print("\n### system.part test ###") +print("system.part[:].pos = {}".format(system.part[:].pos)) + +# test "system.thermostat" +print("\n### system.thermostat test ###") +print("system.thermostat.get_state() = {}".format(system.thermostat.get_state())) + +# test "p3m" +print("\n### p3m test ###") +print("p3m.get_params() = {}".format(p3m.get_params())) +system.actors.add(p3m) + +# test registered objects +# all objects that are registered when writing a checkpoint are automatically registered after loading this checkpoint +print("\n### checkpoint register test ###") +print("checkpoint.get_registered_objects() = {}".format(checkpoint.get_registered_objects())) + + +# integrate system and finally save checkpoint +print("\n### Integrate until user presses ctrl+c ###") +print("Integrating...") +while True: + system.integrator.run(1000) + +"""comments + +Revision ID: 51f5ccfba190 +Revises: 2356a38169ea +Create Date: 2014-01-01 12:08:43.287523 + +""" + +# revision identifiers, used by Alembic. +revision = '51f5ccfba190' +down_revision = '2356a38169ea' + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + ### commands auto generated by Alembic - please adjust! ### + op.create_table('comments', + sa.Column('id', sa.Integer(), nullable=False), + sa.Column('body', sa.Text(), nullable=True), + sa.Column('body_html', sa.Text(), nullable=True), + sa.Column('timestamp', sa.DateTime(), nullable=True), + sa.Column('disabled', sa.Boolean(), nullable=True), + sa.Column('author_id', sa.Integer(), nullable=True), + sa.Column('post_id', sa.Integer(), nullable=True), + sa.ForeignKeyConstraint(['author_id'], ['users.id'], ), + sa.ForeignKeyConstraint(['post_id'], ['posts.id'], ), + sa.PrimaryKeyConstraint('id') + ) + op.create_index('ix_comments_timestamp', 'comments', ['timestamp'], unique=False) + ### end Alembic commands ### + + +def downgrade(): + ### commands auto generated by Alembic - please adjust! ### + op.drop_index('ix_comments_timestamp', 'comments') + op.drop_table('comments') + ### end Alembic commands ### + +# coding: utf-8 +# Copyright (c) 2015 Fabian Barkhau +# License: MIT (see LICENSE file) + + +from kivy.uix.gridlayout import GridLayout +from kivy.uix.scrollview import ScrollView + + +class AbstractScrollView(ScrollView): + + def __init__(self, *args, **kwargs): + + # Setup scroll view + kwargs.update({ + "pos_hint": {'center_x': 0.5, 'center_y': 0.5}, + "do_scroll_x": False + }) + super(AbstractScrollView, self).__init__(*args, **kwargs) + + # create layout + layout = GridLayout(cols=kwargs.get("cols", 1), + padding=kwargs.get("padding", 0), + spacing=kwargs.get("spacing", 0), + size_hint_y=None) + layout.bind(minimum_height=layout.setter('height')) + + # add widgets to layout + entries = kwargs.get('entries', []) + for entry in entries: + widget = self.entry_to_widget(entry) + layout.add_widget(widget) + + # add layout + self.add_widget(layout) + + def entry_to_widget(self, entry): + raise Exception("Abstract method!") + +from __future__ import print_function +from __future__ import absolute_import + +import random +import numpy as np + +import config +from utils.dataset import Dataset + +class BatchGenerator(): + '''Generate Batches''' + def __init__(self): + self.batch_size = config.FLAGS.batch_size + self.buckets = buckets = config.BUCKETS + self.PAD_ID = config.PAD_ID + self.GO_ID = config.GO_ID + + self.load_dataset() + + data_bucket_sizes = [len(self.data[b]) for b in xrange(len(buckets))] + data_total_size = float(sum(data_bucket_sizes)) + + self.data_buckets_scale = [sum(data_bucket_sizes[:i + 1]) / data_total_size for i in xrange(len(data_bucket_sizes))] + + def load_dataset(self): + dataset = Dataset() + self.data = dataset.data + + def next(self): + random_number_01 = np.random.random_sample() + bucket_id = min([i for i in xrange(len(self.data_buckets_scale)) if self.data_buckets_scale[i] > random_number_01]) + + encoder_size, decoder_size = self.buckets[bucket_id] + encoder_inputs, decoder_inputs = [], [] + + for _ in xrange(self.batch_size): + encoder_input, decoder_input = random.choice(self.data[bucket_id]) + + encoder_pad = [self.PAD_ID] * (encoder_size - len(encoder_input)) + encoder_inputs.append(list(reversed(encoder_input + encoder_pad))) + + decoder_pad = [self.PAD_ID] * (decoder_size - len(decoder_input) - 1) + decoder_inputs.append([self.GO_ID] + decoder_input + decoder_pad) + + batch_encoder_inputs, batch_decoder_inputs, batch_target_weights = [], [], [] + + for length_idx in xrange(encoder_size): + batch_encoder_inputs.append(np.array([encoder_inputs[batch_idx][length_idx] for batch_idx in xrange(self.batch_size)], dtype=np.int32)) + + for length_idx in xrange(decoder_size): + batch_decoder_inputs.append(np.array([decoder_inputs[batch_idx][length_idx] for batch_idx in xrange(self.batch_size)], dtype=np.int32)) + + batch_target_weight = np.ones(self.batch_size, dtype=np.float32) + + for batch_idx in xrange(self.batch_size): + if length_idx < decoder_size - 1: + target = decoder_inputs[batch_idx][length_idx + 1] + + if length_idx == decoder_size - 1 or target == self.PAD_ID: + batch_target_weight[batch_idx] = 0.0 + + batch_target_weights.append(batch_target_weight) + + return batch_encoder_inputs, batch_decoder_inputs, batch_target_weights, bucket_id + +# -*- coding: utf-8 -*- +"""QGIS Unit tests for QgsMapUnitScale. + +.. note:: 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. +""" +__author__ = 'Nyall Dawson' +__date__ = '2015-09' +__copyright__ = 'Copyright 2015, The QGIS Project' +# This will get replaced with a git SHA1 when you do a git archive +__revision__ = '$Format:%H$' + +import qgis # NOQA + +from qgis.core import (QgsMapUnitScale, QgsRenderContext, QgsSymbolLayerUtils, QgsSymbol, QgsMapSettings, QgsRectangle, QgsUnitTypes) +from qgis.PyQt.QtCore import QSize +from qgis.testing import unittest + + +class PyQgsMapUnitScale(unittest.TestCase): + + def testConstructor(self): + # test creating QgsMapUnitScale + c = QgsMapUnitScale() + self.assertEqual(c.minScale, 0) + self.assertEqual(c.maxScale, 0) + + c = QgsMapUnitScale(0.0001, 0.005) + self.assertEqual(c.minScale, 0.0001) + self.assertEqual(c.maxScale, 0.005) + + def testEquality(self): + # test equality operator + + c1 = QgsMapUnitScale(0.0001, 0.005) + c1.minSizeMMEnabled = True + c1.minSizeMM = 3 + c1.maxSizeMMEnabled = True + c1.maxSizeMM = 8 + c2 = QgsMapUnitScale(0.0001, 0.005) + c2.minSizeMMEnabled = True + c2.minSizeMM = 3 + c2.maxSizeMMEnabled = True + c2.maxSizeMM = 8 + self.assertEqual(c1, c2) + + c2.minScale = 0.0004 + self.assertNotEqual(c1, c2) + c2.minScale = 0.0001 + + c2.maxScale = 0.007 + self.assertNotEqual(c1, c2) + c2.maxScale = 0.005 + + c2.minSizeMMEnabled = False + self.assertNotEqual(c1, c2) + c2.minSizeMMEnabled = True + + c2.maxSizeMMEnabled = False + self.assertNotEqual(c1, c2) + c2.maxSizeMMEnabled = True + + c2.minSizeMM = 1 + self.assertNotEqual(c1, c2) + c2.minSizeMM = 3 + + c2.maxSizeMM = 100 + self.assertNotEqual(c1, c2) + c2.maxSizeMM = 8 + + self.assertEqual(c1, c2) + + def testMapUnitsPerPixel(self): + # test computeMapUnitsPerPixel + + ms = QgsMapSettings() + ms.setExtent(QgsRectangle(0, 0, 100, 100)) + ms.setOutputSize(QSize(100, 50)) + ms.setOutputDpi(75) + r = QgsRenderContext.fromMapSettings(ms) + + # renderer scale should be about 1:291937841 + + # start with no min/max scale + c = QgsMapUnitScale() + + mup = c.computeMapUnitsPerPixel(r) + self.assertAlmostEqual(mup, 2.0, places=5) + + # add a minimum scale less than the renderer scale, so should be no change + c.minScale = 1 / 350000000.0 + mup = c.computeMapUnitsPerPixel(r) + self.assertAlmostEqual(mup, 2.0, places=5) + + # minimum scale greater than the renderer scale, so should be limited to minScale + c.minScale = 1 / 150000000.0 + mup = c.computeMapUnitsPerPixel(r) + self.assertAlmostEqual(mup, 1.0276160, places=5) + c.minScale = 1 / 50000000.0 + mup = c.computeMapUnitsPerPixel(r) + self.assertAlmostEqual(mup, 0.3425386, places=5) + c.minScale = 1 / 350000000.0 + + # add a maximum scale greater than the renderer scale, so should be no change + c.maxScale = 1 / 150000000.0 + mup = c.computeMapUnitsPerPixel(r) + self.assertAlmostEqual(mup, 2.0, places=5) + + # maximum scale less than the renderer scale, so should be limited to maxScale + c.maxScale = 1 / 350000000.0 + mup = c.computeMapUnitsPerPixel(r) + self.assertAlmostEqual(mup, 2.3977706, places=5) + c.maxScale = 1 / 500000000.0 + mup = c.computeMapUnitsPerPixel(r) + self.assertAlmostEqual(mup, 3.4253867, places=5) + + # test resetting to min/max + c.minScale = 0 + c.maxScale = 0 + mup = c.computeMapUnitsPerPixel(r) + self.assertAlmostEqual(mup, 2.0, places=5) + + def testLineWidthScaleFactor(self): + # test QgsSymbolLayerUtils::lineWidthScaleFactor() using QgsMapUnitScale + + ms = QgsMapSettings() + ms.setExtent(QgsRectangle(0, 0, 100, 100)) + ms.setOutputSize(QSize(100, 50)) + ms.setOutputDpi(300) + r = QgsRenderContext.fromMapSettings(ms) + + # renderer scale should be about 1:291937841 + + # start with no min/max scale + c = QgsMapUnitScale() + + sf = QgsSymbolLayerUtils.lineWidthScaleFactor(r, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(sf, 0.5, places=5) + sf = QgsSymbolLayerUtils.lineWidthScaleFactor(r, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(sf, 11.8110236, places=5) + sf = QgsSymbolLayerUtils.lineWidthScaleFactor(r, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(sf, 33.4800668, places=5) + sf = QgsSymbolLayerUtils.lineWidthScaleFactor(r, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(sf, 1.0, places=5) + + # minimum scale greater than the renderer scale, so should be limited to minScale + c.minScale = 1 / 150000000.0 + sf = QgsSymbolLayerUtils.lineWidthScaleFactor(r, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(sf, 3.89250455, places=5) + # only conversion from mapunits should be affected + sf = QgsSymbolLayerUtils.lineWidthScaleFactor(r, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(sf, 11.8110236, places=5) + sf = QgsSymbolLayerUtils.lineWidthScaleFactor(r, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(sf, 33.4800668, places=5) + sf = QgsSymbolLayerUtils.lineWidthScaleFactor(r, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(sf, 1.0, places=5) + c.minScale = 0 + + # maximum scale less than the renderer scale, so should be limited to maxScale + c.maxScale = 1 / 350000000.0 + sf = QgsSymbolLayerUtils.lineWidthScaleFactor(r, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(sf, 0.5, places=5) + # only conversion from mapunits should be affected + sf = QgsSymbolLayerUtils.lineWidthScaleFactor(r, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(sf, 11.8110236, places=5) + sf = QgsSymbolLayerUtils.lineWidthScaleFactor(r, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(sf, 33.4800668, places=5) + sf = QgsSymbolLayerUtils.lineWidthScaleFactor(r, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(sf, 1.0, places=5) + + def testConvertToPainterUnits(self): + # test QgsSymbolLayerUtils::convertToPainterUnits() using QgsMapUnitScale + + ms = QgsMapSettings() + ms.setExtent(QgsRectangle(0, 0, 100, 100)) + ms.setOutputSize(QSize(100, 50)) + ms.setOutputDpi(300) + r = QgsRenderContext.fromMapSettings(ms) + + # renderer scale should be about 1:291937841 + + # start with no min/max scale + c = QgsMapUnitScale() + + size = QgsSymbolLayerUtils.convertToPainterUnits(r, 2, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(size, 1.0, places=5) + size = QgsSymbolLayerUtils.convertToPainterUnits(r, 2, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(size, 23.622047, places=5) + size = QgsSymbolLayerUtils.convertToPainterUnits(r, 2, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(size, 66.9601332, places=5) + size = QgsSymbolLayerUtils.convertToPainterUnits(r, 2, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(size, 2.0, places=5) + + # minimum size greater than the calculated size, so size should be limited to minSizeMM + c.minSizeMM = 5 + c.minSizeMMEnabled = True + size = QgsSymbolLayerUtils.convertToPainterUnits(r, 2, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(size, 59.0551181, places=5) + # only conversion from mapunits should be affected + size = QgsSymbolLayerUtils.convertToPainterUnits(r, 2, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(size, 23.622047, places=5) + size = QgsSymbolLayerUtils.convertToPainterUnits(r, 2, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(size, 66.9601332, places=5) + size = QgsSymbolLayerUtils.convertToPainterUnits(r, 2, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(size, 2.0, places=5) + c.minSizeMMEnabled = False + + # maximum size less than the calculated size, so size should be limited to maxSizeMM + c.maxSizeMM = 0.1 + c.maxSizeMMEnabled = True + size = QgsSymbolLayerUtils.convertToPainterUnits(r, 2, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(size, 1.0, places=5) + # only conversion from mapunits should be affected + size = QgsSymbolLayerUtils.convertToPainterUnits(r, 2, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(size, 23.622047, places=5) + size = QgsSymbolLayerUtils.convertToPainterUnits(r, 2, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(size, 66.9601332, places=5) + size = QgsSymbolLayerUtils.convertToPainterUnits(r, 2, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(size, 2.0, places=5) + + def testConvertToMapUnits(self): + # test QgsSymbolLayerUtils::convertToMapUnits() using QgsMapUnitScale + + ms = QgsMapSettings() + ms.setExtent(QgsRectangle(0, 0, 100, 100)) + ms.setOutputSize(QSize(100, 50)) + ms.setOutputDpi(300) + r = QgsRenderContext.fromMapSettings(ms) + + # renderer scale should be about 1:291937841 + + # start with no min/max scale + c = QgsMapUnitScale() + + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderMapUnits, c) + self.assertEqual(size, 2.0) + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(size, 47.244094, places=5) + size = QgsSymbolLayerUtils.convertToMapUnits(r, 5.66929, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(size, 47.2440833, places=5) + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(size, 4.0, places=5) + + # minimum size greater than the calculated size, so size should be limited to minSizeMM + c.minSizeMM = 5 + c.minSizeMMEnabled = True + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(size, 118.1102362, places=5) + # only conversion from mapunits should be affected + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(size, 47.244094, places=5) + size = QgsSymbolLayerUtils.convertToMapUnits(r, 5.66929, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(size, 47.2440833, places=5) + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(size, 4.0, places=5) + c.minSizeMMEnabled = False + + # maximum size less than the calculated size, so size should be limited to maxSizeMM + c.maxSizeMM = 0.05 + c.maxSizeMMEnabled = True + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(size, 1.1811023622047245, places=5) + # only conversion from mapunits should be affected + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(size, 47.244094, places=5) + size = QgsSymbolLayerUtils.convertToMapUnits(r, 5.66929, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(size, 47.2440833, places=5) + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(size, 4.0, places=5) + c.maxSizeMMEnabled = False + + # test with minimum scale set + c.minScale = 1 / 150000000.0 + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(size, 15.57001821, places=5) + # only conversion from mapunits should be affected + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(size, 47.244094, places=5) + size = QgsSymbolLayerUtils.convertToMapUnits(r, 5.66929, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(size, 47.2440833, places=5) + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(size, 4.0, places=5) + c.minScale = 0 + + # test with maximum scale set + c.maxScale = 1 / 1550000000.0 + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(size, 1.50677595625, places=5) + # only conversion from mapunits should be affected + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(size, 47.244094, places=5) + size = QgsSymbolLayerUtils.convertToMapUnits(r, 5.66929, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(size, 47.2440833, places=5) + size = QgsSymbolLayerUtils.convertToMapUnits(r, 2, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(size, 4.0, places=5) + c.maxScale = 0 + + def testPixelSizeScaleFactor(self): + # test QgsSymbolLayerUtils::pixelSizeScaleFactor() using QgsMapUnitScale + + ms = QgsMapSettings() + ms.setExtent(QgsRectangle(0, 0, 100, 100)) + ms.setOutputSize(QSize(100, 50)) + ms.setOutputDpi(300) + r = QgsRenderContext.fromMapSettings(ms) + + # renderer scale should be about 1:291937841 + + # start with no min/max scale + c = QgsMapUnitScale() + + sf = QgsSymbolLayerUtils.pixelSizeScaleFactor(r, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(sf, 0.5, places=5) + sf = QgsSymbolLayerUtils.pixelSizeScaleFactor(r, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(sf, 11.8110236, places=5) + sf = QgsSymbolLayerUtils.pixelSizeScaleFactor(r, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(sf, 33.48006689762, places=5) + sf = QgsSymbolLayerUtils.pixelSizeScaleFactor(r, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(sf, 1.0, places=5) + + # minimum scale greater than the renderer scale, so should be limited to minScale + c.minScale = 1 / 150000000.0 + sf = QgsSymbolLayerUtils.pixelSizeScaleFactor(r, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(sf, 3.8925045, places=5) + # only conversion from mapunits should be affected + sf = QgsSymbolLayerUtils.pixelSizeScaleFactor(r, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(sf, 11.811023, places=5) + sf = QgsSymbolLayerUtils.pixelSizeScaleFactor(r, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(sf, 33.48006689762, places=5) + sf = QgsSymbolLayerUtils.pixelSizeScaleFactor(r, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(sf, 1.0, places=5) + c.minScale = 0 + + # maximum scale less than the renderer scale, so should be limited to maxScale + c.maxScale = 1 / 350000000.0 + sf = QgsSymbolLayerUtils.pixelSizeScaleFactor(r, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(sf, 0.5, places=5) + # only conversion from mapunits should be affected + sf = QgsSymbolLayerUtils.pixelSizeScaleFactor(r, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(sf, 11.8110236, places=5) + sf = QgsSymbolLayerUtils.pixelSizeScaleFactor(r, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(sf, 33.48006689762, places=5) + sf = QgsSymbolLayerUtils.pixelSizeScaleFactor(r, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(sf, 1.0, places=5) + + def testMapUnitScaleFactor(self): + # test QgsSymbolLayerUtils::mapUnitScaleFactor() using QgsMapUnitScale + + ms = QgsMapSettings() + ms.setExtent(QgsRectangle(0, 0, 100, 100)) + ms.setOutputSize(QSize(100, 50)) + ms.setOutputDpi(300) + r = QgsRenderContext.fromMapSettings(ms) + + # renderer scale should be about 1:291937841 + + c = QgsMapUnitScale() + sf = QgsSymbolLayerUtils.mapUnitScaleFactor(r, QgsUnitTypes.RenderMapUnits, c) + self.assertAlmostEqual(sf, 1.0, places=5) + sf = QgsSymbolLayerUtils.mapUnitScaleFactor(r, QgsUnitTypes.RenderMillimeters, c) + self.assertAlmostEqual(sf, 23.622047, places=5) + sf = QgsSymbolLayerUtils.mapUnitScaleFactor(r, QgsUnitTypes.RenderPoints, c) + self.assertAlmostEqual(sf, 66.9601332, places=5) + sf = QgsSymbolLayerUtils.mapUnitScaleFactor(r, QgsUnitTypes.RenderPixels, c) + self.assertAlmostEqual(sf, 2.0, places=5) + + def testEncodeDecode(self): + # test encoding and decoding QgsMapUnitScale + + s = QgsMapUnitScale() + s.minScale = 50 + s.maxScale = 100 + s.minSizeMMEnabled = True + s.minSizeMM = 3 + s.maxSizeMMEnabled = False + s.maxSizeMM = 99 + + encode = QgsSymbolLayerUtils.encodeMapUnitScale(s) + r = QgsSymbolLayerUtils.decodeMapUnitScale(encode) + self.assertEqual(s, r) + + # check old style encoding + encode = '9,78.3' + r = QgsSymbolLayerUtils.decodeMapUnitScale(encode) + self.assertEqual(r.minScale, 9) + self.assertEqual(r.maxScale, 78.3) + self.assertFalse(r.minSizeMMEnabled) + self.assertEqual(r.minSizeMM, 0) + self.assertFalse(r.maxSizeMMEnabled) + self.assertEqual(r.maxSizeMM, 0) + + +if __name__ == '__main__': + unittest.main() + +from gpiozero import Button + +class RotaryEncoder: + """ + Decode mechanical rotary encoder pulses. + + The following example will print a Rotary Encoder change direction + + from gpiozero import RotaryEncoder + + def change(value): + if value == 1: + print("clockwise") + else # if change == -1 + print("counterclockwise") + + rotary = RotaryEncoder(2, 3) + rotary.when_rotated = change + + Based in http://abyz.co.uk/rpi/pigpio/examples.html#Python_rotary_encoder_py + """ + gpioA = None + gpioB = None + + levA = 0 + levB = 0 + + lastGpio = None + + when_rotated = lambda *args : None + + def __init__(self, pinA, pinB, pull_up=False): + """ + Uses for dettect rotary encoder changes (set when_rotated attribute) + It takes one parameter which is +1 for clockwise and -1 for counterclockwise. + + :param pinA int : + :param pinB int : + :pull_up bool : + The common contact should be NOT connected to ground? + """ + self.gpioA = Button(pinA, pull_up) + self.gpioB = Button(pinB, pull_up) + + self.levA = 0 + self.levB = 0 + + self.lastGpio = None + + self.gpioA.when_pressed = lambda *args : self.pulse(self.gpioA, 1) + self.gpioA.when_released = lambda *args : self.pulse(self.gpioA, 0) + + self.gpioB.when_pressed = lambda *args : self.pulse(self.gpioB, 1) + self.gpioB.when_released = lambda *args : self.pulse(self.gpioB, 0) + + def pulse(self, gpio, level): + """ + Decode the rotary encoder pulse. + + +---------+ +---------+ 0 + | | | | + A | | | | + | | | | + +---------+ +---------+ +----- 1 + + +---------+ +---------+ 0 + | | | | + B | | | | + | | | | + ----+ +---------+ +---------+ 1 + """ + if gpio == self.gpioA: + self.levA = level + else: + self.levB = level + + if gpio != self.lastGpio: + self.lastGpio = gpio + if gpio == self.gpioA and level == 1: + if self.levB == 1: + self.when_rotated(1) + elif gpio == self.gpioB and level == 1: + if self.levA == 1: + self.when_rotated(-1) + else: + if self.levB == 1: + self.when_rotated(-1) + elif self.levA == 1: + self.when_rotated(1) + + else: + if gpio == self.gpioA and level == 1: + if self.levB == 1: + self.when_rotated(1) + elif gpio == self.gpioB and level == 1: + if self.levA == 1: + self.when_rotated(-1) + else: + if self.levB == 1: + self.when_rotated(-1) + elif self.levA == 1: + self.when_rotated(1) + +""" +database connection + +""" + +import os +import re +import sys +import copy +import random +import inspect +import time +import datetime +import threading +from future.utils import iteritems + +from .command_spec import CommandSpec +from .job_spec import JobSpec +from .work_spec import WorkSpec +from .file_spec import FileSpec +from .event_spec import EventSpec +from .cache_spec import CacheSpec +from .seq_number_spec import SeqNumberSpec +from .panda_queue_spec import PandaQueueSpec +from .job_worker_relation_spec import JobWorkerRelationSpec +from .process_lock_spec import ProcessLockSpec +from .diag_spec import DiagSpec +from .service_metrics_spec import ServiceMetricSpec +from .queue_config_dump_spec import QueueConfigDumpSpec + +from . import core_utils +from pandaharvester.harvesterconfig import harvester_config + +# logger +_logger = core_utils.setup_logger('db_proxy') + +# table names +commandTableName = 'command_table' +jobTableName = 'job_table' +workTableName = 'work_table' +fileTableName = 'file_table' +cacheTableName = 'cache_table' +eventTableName = 'event_table' +seqNumberTableName = 'seq_table' +pandaQueueTableName = 'pq_table' +jobWorkerTableName = 'jw_table' +processLockTableName = 'lock_table' +diagTableName = 'diag_table' +queueConfigDumpTableName = 'qcdump_table' +serviceMetricsTableName = 'sm_table' + +# connection lock +conLock = threading.Lock() + + +# connection class +class DBProxy(object): + # constructor + def __init__(self, thr_name=None, read_only=False): + self.thrName = thr_name + self.verbLog = None + self.useInspect = False + if harvester_config.db.verbose: + self.verbLog = core_utils.make_logger(_logger, method_name='execute') + if self.thrName is None: + currentThr = threading.current_thread() + if currentThr is not None: + self.thrName = currentThr.ident + if hasattr(harvester_config.db, 'useInspect') and harvester_config.db.useInspect is True: + self.useInspect = True + if harvester_config.db.engine == 'mariadb': + if hasattr(harvester_config.db, 'host'): + host = harvester_config.db.host + else: + host = '127.0.0.1' + if hasattr(harvester_config.db, 'port'): + port = harvester_config.db.port + else: + port = 3306 + if hasattr(harvester_config.db, 'useMySQLdb') and harvester_config.db.useMySQLdb is True: + import MySQLdb + import MySQLdb.cursors + + class MyCursor (MySQLdb.cursors.Cursor): + def fetchone(self): + tmpRet = MySQLdb.cursors.Cursor.fetchone(self) + if tmpRet is None: + return None + tmpRet = core_utils.DictTupleHybrid(tmpRet) + tmpRet.set_attributes([d[0] for d in self.description]) + return tmpRet + + def fetchall(self): + tmpRets = MySQLdb.cursors.Cursor.fetchall(self) + if len(tmpRets) == 0: + return tmpRets + newTmpRets = [] + attributes = [d[0] for d in self.description] + for tmpRet in tmpRets: + tmpRet = core_utils.DictTupleHybrid(tmpRet) + tmpRet.set_attributes(attributes) + newTmpRets.append(tmpRet) + return newTmpRets + + self.con = MySQLdb.connect(user=harvester_config.db.user, passwd=harvester_config.db.password, + db=harvester_config.db.schema, host=host, port=port, + cursorclass=MyCursor) + self.cur = self.con.cursor() + else: + import mysql.connector + self.con = mysql.connector.connect(user=harvester_config.db.user, passwd=harvester_config.db.password, + db=harvester_config.db.schema, host=host, port=port) + self.cur = self.con.cursor(named_tuple=True, buffered=True) + else: + import sqlite3 + if read_only: + fd = os.open(harvester_config.db.database_filename, os.O_RDONLY) + database_filename = '/dev/fd/{0}'.format(fd) + else: + database_filename = harvester_config.db.database_filename + self.con = sqlite3.connect(database_filename, + detect_types=sqlite3.PARSE_DECLTYPES | sqlite3.PARSE_COLNAMES, + check_same_thread=False) + core_utils.set_file_permission(harvester_config.db.database_filename) + # change the row factory to use Row + self.con.row_factory = sqlite3.Row + self.cur = self.con.cursor() + self.cur.execute('PRAGMA journal_mode') + resJ = self.cur.fetchone() + if resJ[0] != 'wal': + self.cur.execute('PRAGMA journal_mode = WAL') + # read to avoid database lock + self.cur.fetchone() + self.lockDB = False + # using application side lock if DB doesn't have a mechanism for exclusive access + if harvester_config.db.engine == 'mariadb': + self.usingAppLock = False + else: + self.usingAppLock = True + + # exception handler for type of DBs + def _handle_exception(self, exc, retry_time=30): + tmpLog = core_utils.make_logger(_logger, 'thr={0}'.format(self.thrName), method_name='_handle_exception') + if harvester_config.db.engine == 'mariadb': + tmpLog.warning('exception of mysql {0} occurred'.format(exc.__class__.__name__)) + # Case to try renew connection + isOperationalError = False + if hasattr(harvester_config.db, 'useMySQLdb') and harvester_config.db.useMySQLdb is True: + import MySQLdb + if isinstance(exc, MySQLdb.OperationalError): + isOperationalError = True + else: + import mysql.connector + if isinstance(exc, mysql.connector.errors.OperationalError): + isOperationalError = True + if isOperationalError: + try_timestamp = time.time() + while time.time() - try_timestamp < retry_time: + try: + self.__init__() + tmpLog.info('renewed connection') + break + except Exception as e: + tmpLog.error('failed to renew connection; {0}'.format(e)) + time.sleep(1) + + # convert param dict to list + def convert_params(self, sql, varmap): + # lock database if application side lock is used + if self.usingAppLock and \ + (re.search('^INSERT', sql, re.I) is not None + or re.search('^UPDATE', sql, re.I) is not None + or re.search(' FOR UPDATE', sql, re.I) is not None + or re.search('^DELETE', sql, re.I) is not None + ): + self.lockDB = True + # remove FOR UPDATE for sqlite + if harvester_config.db.engine == 'sqlite': + sql = re.sub(' FOR UPDATE', ' ', sql, re.I) + sql = re.sub('INSERT IGNORE', 'INSERT OR IGNORE', sql, re.I) + else: + sql = re.sub('INSERT OR IGNORE', 'INSERT IGNORE', sql, re.I) + # no conversation unless dict + if not isinstance(varmap, dict): + # using the printf style syntax for mariaDB + if harvester_config.db.engine == 'mariadb': + sql = re.sub(':[^ $,)]+', '%s', sql) + return sql, varmap + paramList = [] + # extract placeholders + items = re.findall(':[^ $,)]+', sql) + for item in items: + if item not in varmap: + raise KeyError('{0} is missing in SQL parameters'.format(item)) + if item not in paramList: + paramList.append(varmap[item]) + # using the printf style syntax for mariaDB + if harvester_config.db.engine == 'mariadb': + sql = re.sub(':[^ $,)]+', '%s', sql) + return sql, paramList + + # wrapper for execute + def execute(self, sql, varmap=None): + sw = core_utils.get_stopwatch() + if varmap is None: + varmap = dict() + # get lock if application side lock is used + if self.usingAppLock and not self.lockDB: + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} locking'.format(self.thrName)) + conLock.acquire() + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} locked'.format(self.thrName)) + # execute + try: + # verbose + if harvester_config.db.verbose: + if not self.useInspect: + self.verbLog.debug('thr={2} sql={0} var={1}'.format(sql, str(varmap), self.thrName)) + else: + self.verbLog.debug('thr={3} sql={0} var={1} exec={2}'.format(sql, str(varmap), + inspect.stack()[1][3], + self.thrName)) + # convert param dict + newSQL, params = self.convert_params(sql, varmap) + # execute + try: + retVal = self.cur.execute(newSQL, params) + except Exception as e: + self._handle_exception(e) + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} exception during execute'.format(self.thrName)) + raise + finally: + # release lock + if self.usingAppLock and not self.lockDB: + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} release'.format(self.thrName)) + conLock.release() + # return + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} {1} sql=[{2}]'.format(self.thrName, sw.get_elapsed_time(), + newSQL.replace('\n', ' ').strip())) + return retVal + + # wrapper for executemany + def executemany(self, sql, varmap_list): + # get lock + if self.usingAppLock and not self.lockDB: + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} locking'.format(self.thrName)) + conLock.acquire() + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} locked'.format(self.thrName)) + try: + # verbose + if harvester_config.db.verbose: + if not self.useInspect: + self.verbLog.debug('thr={2} sql={0} var={1}'.format(sql, str(varmap_list), self.thrName)) + else: + self.verbLog.debug('thr={3} sql={0} var={1} exec={2}'.format(sql, str(varmap_list), + inspect.stack()[1][3], + self.thrName)) + # convert param dict + paramList = [] + newSQL = sql + for varMap in varmap_list: + if varMap is None: + varMap = dict() + newSQL, params = self.convert_params(sql, varMap) + paramList.append(params) + # execute + try: + if harvester_config.db.engine == 'sqlite': + retVal = [] + iList = 0 + nList = 5000 + while iList < len(paramList): + retVal += self.cur.executemany(newSQL, paramList[iList:iList+nList]) + iList += nList + else: + retVal = self.cur.executemany(newSQL, paramList) + except Exception as e: + self._handle_exception(e) + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} exception during executemany'.format(self.thrName)) + raise + finally: + # release lock + if self.usingAppLock and not self.lockDB: + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} release'.format(self.thrName)) + conLock.release() + # return + return retVal + + # commit + def commit(self): + try: + self.con.commit() + except Exception as e: + self._handle_exception(e) + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} exception during commit'.format(self.thrName)) + raise + if self.usingAppLock and self.lockDB: + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} release with commit'.format(self.thrName)) + conLock.release() + self.lockDB = False + + # rollback + def rollback(self): + try: + self.con.rollback() + except Exception as e: + self._handle_exception(e) + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} exception during rollback'.format(self.thrName)) + finally: + if self.usingAppLock and self.lockDB: + if harvester_config.db.verbose: + self.verbLog.debug('thr={0} release with rollback'.format(self.thrName)) + conLock.release() + self.lockDB = False + + # type conversion + def type_conversion(self, attr_type): + # remove decorator + attr_type = attr_type.split('/')[0] + attr_type = attr_type.strip() + if attr_type == 'timestamp': + # add NULL attribute to disable automatic update + attr_type += ' null' + # type conversion + if harvester_config.db.engine == 'mariadb': + if attr_type.startswith('text'): + attr_type = attr_type.replace('text', 'varchar(256)') + elif attr_type.startswith('blob'): + attr_type = attr_type.replace('blob', 'longtext') + elif attr_type.startswith('integer'): + attr_type = attr_type.replace('integer', 'bigint') + attr_type = attr_type.replace('autoincrement', 'auto_increment') + elif harvester_config.db.engine == 'sqlite': + if attr_type.startswith('varchar'): + attr_type = re.sub('varchar\(\d+\)', 'text', attr_type) + attr_type = attr_type.replace('auto_increment', 'autoincrement') + return attr_type + + # check if index is needed + def need_index(self, attr): + isIndex = False + isUnique = False + # look for separator + if '/' in attr: + decorators = attr.split('/')[-1].split() + if 'index' in decorators: + isIndex = True + if 'unique' in decorators: + isIndex = True + isUnique = True + return isIndex, isUnique + + # make table + def make_table(self, cls, table_name): + try: + # get logger + tmpLog = core_utils.make_logger(_logger, method_name='make_table') + tmpLog.debug('table={0}'.format(table_name)) + # check if table already exists + varMap = dict() + varMap[':name'] = table_name + if harvester_config.db.engine == 'mariadb': + varMap[':schema'] = harvester_config.db.schema + sqlC = 'SELECT * FROM information_schema.tables WHERE table_schema=:schema AND table_name=:name ' + else: + varMap[':type'] = 'table' + sqlC = 'SELECT name FROM sqlite_master WHERE type=:type AND tbl_name=:name ' + self.execute(sqlC, varMap) + resC = self.cur.fetchone() + indexes = [] + uniques = set() + # not exists + if resC is None: + # sql to make table + sqlM = 'CREATE TABLE {0}('.format(table_name) + # collect columns + for attr in cls.attributesWithTypes: + # split to name and type + attrName, attrType = attr.split(':') + attrType = self.type_conversion(attrType) + # check if index is needed + isIndex, isUnique = self.need_index(attr) + if isIndex: + indexes.append(attrName) + if isUnique: + uniques.add(attrName) + sqlM += '{0} {1},'.format(attrName, attrType) + sqlM = sqlM[:-1] + sqlM += ')' + # make table + self.execute(sqlM) + # commit + self.commit() + tmpLog.debug('made {0}'.format(table_name)) + else: + # check table + missingAttrs = self.check_table(cls, table_name, True) + if len(missingAttrs) > 0: + for attr in cls.attributesWithTypes: + # split to name and type + attrName, attrType = attr.split(':') + attrType = self.type_conversion(attrType) + # ony missing + if attrName not in missingAttrs: + continue + # check if index is needed + isIndex, isUnique = self.need_index(attr) + if isIndex: + indexes.append(attrName) + if isUnique: + uniques.add(attrName) + # add column + sqlA = 'ALTER TABLE {0} ADD COLUMN '.format(table_name) + sqlA += '{0} {1}'.format(attrName, attrType) + try: + self.execute(sqlA) + # commit + self.commit() + tmpLog.debug('added {0} to {1}'.format(attr, table_name)) + except Exception: + core_utils.dump_error_message(tmpLog) + # make indexes + for index in indexes: + indexName = 'idx_{0}_{1}'.format(index, table_name) + if index in uniques: + sqlI = "CREATE UNIQUE INDEX " + else: + sqlI = "CREATE INDEX " + sqlI += "{0} ON {1}({2}) ".format(indexName, table_name, index) + try: + self.execute(sqlI) + # commit + self.commit() + tmpLog.debug('added {0}'.format(indexName)) + except Exception: + core_utils.dump_error_message(tmpLog) + except Exception: + # roll back + self.rollback() + # dump error + core_utils.dump_error_message(_logger) + return self.check_table(cls, table_name) + + # make tables + def make_tables(self, queue_config_mapper): + outStrs = [] + outStrs += self.make_table(CommandSpec, commandTableName) + outStrs += self.make_table(JobSpec, jobTableName) + outStrs += self.make_table(WorkSpec, workTableName) + outStrs += self.make_table(FileSpec, fileTableName) + outStrs += self.make_table(EventSpec, eventTableName) + outStrs += self.make_table(CacheSpec, cacheTableName) + outStrs += self.make_table(SeqNumberSpec, seqNumberTableName) + outStrs += self.make_table(PandaQueueSpec, pandaQueueTableName) + outStrs += self.make_table(JobWorkerRelationSpec, jobWorkerTableName) + outStrs += self.make_table(ProcessLockSpec, processLockTableName) + outStrs += self.make_table(DiagSpec, diagTableName) + outStrs += self.make_table(QueueConfigDumpSpec, queueConfigDumpTableName) + outStrs += self.make_table(ServiceMetricSpec, serviceMetricsTableName) + + # dump error messages + if len(outStrs) > 0: + errMsg = "ERROR : Definitions of some database tables are incorrect. " + errMsg += "Please add missing columns, or drop those tables " + errMsg += "so that harvester automatically re-creates those tables." + errMsg += "\n" + print (errMsg) + for outStr in outStrs: + print (outStr) + sys.exit(1) + # add sequential numbers + self.add_seq_number('SEQ_workerID', 1) + self.add_seq_number('SEQ_configID', 1) + # fill PandaQueue table + queue_config_mapper.load_data() + # delete process locks + self.clean_process_locks() + + # check table + def check_table(self, cls, table_name, get_missing=False): + # get columns in DB + varMap = dict() + if harvester_config.db.engine == 'mariadb': + varMap[':name'] = table_name + sqlC = 'SELECT column_name,column_type FROM information_schema.columns WHERE table_name=:name ' + else: + sqlC = 'PRAGMA table_info({0}) '.format(table_name) + self.execute(sqlC, varMap) + resC = self.cur.fetchall() + colMap = dict() + for tmpItem in resC: + if harvester_config.db.engine == 'mariadb': + if hasattr(tmpItem, '_asdict'): + tmpItem = tmpItem._asdict() + columnName, columnType = tmpItem['column_name'], tmpItem['column_type'] + else: + columnName, columnType = tmpItem[1], tmpItem[2] + colMap[columnName] = columnType + self.commit() + # check with class definition + outStrs = [] + for attr in cls.attributesWithTypes: + attrName, attrType = attr.split(':') + if attrName not in colMap: + if get_missing: + outStrs.append(attrName) + else: + attrType = self.type_conversion(attrType) + outStrs.append('{0} {1} is missing in {2}'.format(attrName, attrType, table_name)) + return outStrs + + # insert jobs + def insert_jobs(self, jobspec_list): + # get logger + tmpLog = core_utils.make_logger(_logger, method_name='insert_jobs') + tmpLog.debug('{0} jobs'.format(len(jobspec_list))) + try: + # sql to insert a job + sqlJ = "INSERT INTO {0} ({1}) ".format(jobTableName, JobSpec.column_names()) + sqlJ += JobSpec.bind_values_expression() + # sql to insert a file + sqlF = "INSERT INTO {0} ({1}) ".format(fileTableName, FileSpec.column_names()) + sqlF += FileSpec.bind_values_expression() + # sql to delete job + sqlDJ = "DELETE FROM {0} ".format(jobTableName) + sqlDJ += "WHERE PandaID=:PandaID " + # sql to delete files + sqlDF = "DELETE FROM {0} ".format(fileTableName) + sqlDF += "WHERE PandaID=:PandaID " + # sql to delete events + sqlDE = "DELETE FROM {0} ".format(eventTableName) + sqlDE += "WHERE PandaID=:PandaID " + # sql to delete relations + sqlDR = "DELETE FROM {0} ".format(jobWorkerTableName) + sqlDR += "WHERE PandaID=:PandaID " + # loop over all jobs + varMapsJ = [] + varMapsF = [] + for jobSpec in jobspec_list: + # delete job just in case + varMap = dict() + varMap[':PandaID'] = jobSpec.PandaID + self.execute(sqlDJ, varMap) + iDel = self.cur.rowcount + if iDel > 0: + # delete files + self.execute(sqlDF, varMap) + # delete events + self.execute(sqlDE, varMap) + # delete relations + self.execute(sqlDR, varMap) + # commit + self.commit() + # insert job and files + varMap = jobSpec.values_list() + varMapsJ.append(varMap) + for fileSpec in jobSpec.inFiles: + varMap = fileSpec.values_list() + varMapsF.append(varMap) + # insert + self.executemany(sqlJ, varMapsJ) + self.executemany(sqlF, varMapsF) + # commit + self.commit() + # return + return True + except Exception: + # roll back + self.rollback() + # dump error + core_utils.dump_error_message(tmpLog) + # return + return False + + # get job + def get_job(self, panda_id): + try: + # get logger + tmpLog = core_utils.make_logger(_logger, 'PandaID={0}'.format(panda_id), method_name='get_job') + tmpLog.debug('start') + # sql to get job + sql = "SELECT {0} FROM {1} ".format(JobSpec.column_names(), jobTableName) + sql += "WHERE PandaID=:pandaID " + # get job + varMap = dict() + varMap[':pandaID'] = panda_id + self.execute(sql, varMap) + resJ = self.cur.fetchone() + if resJ is None: + jobSpec = None + else: + # make job + jobSpec = JobSpec() + jobSpec.pack(resJ) + # get files + sqlF = "SELECT {0} FROM {1} ".format(FileSpec.column_names(), fileTableName) + sqlF += "WHERE PandaID=:PandaID " + varMap = dict() + varMap[':PandaID'] = panda_id + self.execute(sqlF, varMap) + resFileList = self.cur.fetchall() + for resFile in resFileList: + fileSpec = FileSpec() + fileSpec.pack(resFile) + jobSpec.add_file(fileSpec) + # commit + self.commit() + tmpLog.debug('done') + # return + return jobSpec + except Exception: + # roll back + self.rollback() + # dump error + core_utils.dump_error_message(_logger) + # return + return None + + # get all jobs (fetch entire jobTable) + def get_jobs(self): + try: + # get logger + tmpLog = core_utils.make_logger(_logger, method_name='get_jobs') + tmpLog.debug('start') + # sql to get job + sql = "SELECT {0} FROM {1} ".format(JobSpec.column_names(), jobTableName) + sql += "WHERE PandaID IS NOT NULL" + # get jobs + varMap = None + self.execute(sql, varMap) + resJobs = self.cur.fetchall() + if resJobs is None: + return None + jobSpecList=[] + # make jobs list + for resJ in resJobs: + jobSpec = JobSpec() + jobSpec.pack(resJ) + jobSpecList.append(jobSpec) + tmpLog.debug('done') + # return + return jobSpecList + except Exception: + # roll back + self.rollback() + # dump error + core_utils.dump_error_message(_logger) + # return + return None + + # update job + def update_job(self, jobspec, criteria=None, update_in_file=False): + try: + # get logger + tmpLog = core_utils.make_logger(_logger, 'PandaID={0} subStatus={1}'.format(jobspec.PandaID, + jobspec.subStatus), + method_name='update_job') + tmpLog.debug('start') + if criteria is None: + criteria = {} + # sql to update job + sql = "UPDATE {0} SET {1} ".format(jobTableName, jobspec.bind_update_changes_expression()) + sql += "WHERE PandaID=:PandaID " + # update job + varMap = jobspec.values_map(only_changed=True) + for tmpKey, tmpVal in iteritems(criteria): + mapKey = ':{0}_cr'.format(tmpKey) + sql += "AND {0}={1} ".format(tmpKey, mapKey) + varMap[mapKey] = tmpVal + varMap[':PandaID'] = jobspec.PandaID + self.execute(sql, varMap) + nRow = self.cur.rowcount + if nRow > 0: + # update events + for eventSpec in jobspec.events: + varMap = eventSpec.values_map(only_changed=True) + if varMap != {}: + sqlE = "UPDATE {0} SET {1} ".format(eventTableName, eventSpec.bind_update_changes_expression()) + sqlE += "WHERE eventRangeID=:eventRangeID " + varMap[':eventRangeID'] = eventSpec.eventRangeID + self.execute(sqlE, varMap) + # update input file + if update_in_file: + for fileSpec in jobspec.inFiles: + varMap = fileSpec.values_map(only_changed=True) + if varMap != {}: + sqlF = "UPDATE {0} SET {1} ".format(fileTableName, + fileSpec.bind_update_changes_expression()) + sqlF += "WHERE fileID=:fileID " + varMap[':fileID'] = fileSpec.fileID + self.execute(sqlF, varMap) + else: + # set file status to done if jobs are done + if jobspec.is_final_status(): + varMap = dict() + varMap[':PandaID'] = jobspec.PandaID + varMap[':type'] = 'input' + varMap[':status'] = 'done' + sqlF = "UPDATE {0} SET status=:status ".format(fileTableName) + sqlF += "WHERE PandaID=:PandaID AND fileType=:type " + self.execute(sqlF, varMap) + # set to_delete flag + if jobspec.subStatus == 'done': + sqlD = "UPDATE {0} SET todelete=:to_delete ".format(fileTableName) + sqlD += "WHERE PandaID=:PandaID " + varMap = dict() + varMap[':PandaID'] = jobspec.PandaID + varMap[':to_delete'] = 1 + self.execute(sqlD, varMap) + # commit + self.commit() + tmpLog.debug('done with {0}'.format(nRow)) + # return + return nRow + except Exception: + # roll back + self.rollback() + # dump error + core_utils.dump_error_message(_logger) + # return + return None + + # insert output files into database + def insert_files(self,jobspec_list): + # get logger + tmpLog = core_utils.make_logger(_logger, method_name='insert_files') + tmpLog.debug('{0} jobs'.format(len(jobspec_list))) + try: + # sql to insert a file + sqlF = "INSERT INTO {0} ({1}) ".format(fileTableName, FileSpec.column_names()) + sqlF += FileSpec.bind_values_expression() + # loop over all jobs + varMapsF = [] + for jobSpec in jobspec_list: + for fileSpec in jobSpec.outFiles: + varMap = fileSpec.values_list() + varMapsF.append(varMap) + # insert + self.executemany(sqlF, varMapsF) + # commit + self.commit() + # return + return True + except Exception: + # roll back + self.rollback() + # dump error + core_utils.dump_error_message(tmpLog) + # return + return False + + # update worker + def update_worker(self, workspec, criteria=None): + try: + # get logger + tmpLog = core_utils.make_logger(_logger, 'workerID={0}'.format(workspec.workerID), + method_name='update_worker') + tmpLog.debug('start') + if criteria is None: + criteria = {} + # sql to update job + sql = "UPDATE {0} SET {1} ".format(workTableName, workspec.bind_update_changes_expression()) + sql += "WHERE workerID=:workerID " + # update worker + varMap = workspec.values_map(only_changed=True) + if len(varMap) > 0: + for tmpKey, tmpVal in iteritems(criteria): + mapKey = ':{0}_cr'.format(tmpKey) + sql += "AND {0}={1} ".format(tmpKey, mapKey) + varMap[mapKey] = tmpVal + varMap[':workerID'] = workspec.workerID + self.execute(sql, varMap) + nRow = self.cur.rowcount + # commit + self.commit() + tmpLog.debug('done with {0}'.format(nRow)) + else: + nRow = None + tmpLog.debug('skip since no updated attributes') + # return + return nRow + except Exception: + # roll back + self.rollback() + # dump error + core_utils.dump_error_message(_logger) + # return + return None + + # fill panda queue table + def fill_panda_queue_table(self, panda_queue_list, queue_config_mapper): + try: + # get logger + tmpLog = core_utils.make_logger(_logger, method_name='fill_panda_queue_table') + tmpLog.debug('start') + # get existing queues + sqlE = "SELECT queueName FROM {0} ".format(pandaQueueTableName) + varMap = dict() + self.execute(sqlE, varMap) + resE = self.cur.fetchall() + for queueName, in resE: + # delete if not listed in cfg + if queueName not in panda_queue_list: + sqlD = "DELETE FROM {0} ".format(pandaQueueTableName) + sqlD += "WHERE queueName=:queueName " + varMap = dict() + varMap[':queueName'] = queueName + self.execute(sqlD, varMap) + # commit + self.commit() + # loop over queues + for queueName in panda_queue_list: + queueConfig = queue_config_mapper.get_queue(queueName) + if queueConfig is not None: + # check if already exist + sqlC = "SELECT * FROM {0} ".format(pandaQueueTableName) + sqlC += "WHERE queueName=:queueName " + varMap = dict() + varMap[':queueName'] = queueName + self.execute(sqlC, varMap) + resC = self.cur.fetchone() + if resC is not None: + # update limits just in case + varMap = dict() + sqlU = "UPDATE {0} SET ".format(pandaQueueTableName) + for qAttr in ['nQueueLimitJob', 'nQueueLimitWorker', 'maxWorkers', + 'nQueueLimitJobRatio', 'nQueueLimitJobMax', 'nQueueLimitJobMin', + 'nQueueLimitWorkerRatio', 'nQueueLimitWorkerMax', 'nQueueLimitWorkerMin']: + if hasattr(queueConfig, qAttr): + sqlU += '{0}=:{0},'.format(qAttr) + varMap[':{0}'.format(qAttr)] = getattr(queueConfig, qAttr) + if len(varMap) == 0: + continue + sqlU = sqlU[:-1] + sqlU += " WHERE queueName=:queueName " + varMap[':queueName'] = queueName + self.execute(sqlU, varMap) + else: + # insert queue + varMap = dict() + varMap[':queueName'] = queueName + attrName_list = [] + tmpKey_list = [] + for attrName in PandaQueueSpec.column_names().split(','): + if hasattr(queueConfig, attrName): + tmpKey = ':{0}'.format(attrName) + attrName_list.append(attrName) + tmpKey_list.append(tmpKey) + varMap[tmpKey] = getattr(queueConfig, attrName) + sqlP = "INSERT IGNORE INTO {0} ({1}) ".format(pandaQueueTableName, ','.join(attrName_list)) + sqlS = "VALUES ({0}) ".format(','.join(tmpKey_list)) + self.execute(sqlP + sqlS, varMap) + # commit + self.commit() + tmpLog.debug('done') + # return + return True + except Exception: + # roll back + self.rollback() + # dump error + core_utils.dump_error_message(_logger) + # return + return False + + # get number of jobs to fetch + def get_num_jobs_to_fetch(self, n_queues, interval): + # get logger + tmpLog = core_utils.make_logger(_logger, method_name='get_num_jobs_to_fetch') + try: + tmpLog.debug('start') + retMap = {} + # sql to get queues + sqlQ = "SELECT queueName,nQueueLimitJob,nQueueLimitJobRatio,nQueueLimitJobMax,nQueueLimitJobMin " + sqlQ += "FROM {0} ".format(pandaQueueTableName) + sqlQ += "WHERE jobFetchTime IS NULL OR jobFetchTime<:timeLimit " + sqlQ += "ORDER BY jobFetchTime " + # sql to count nQueue + sqlN = "SELECT COUNT(*) cnt,status FROM {0} ".format(jobTableName) + sqlN += "WHERE computingSite=:computingSite AND status IN (:status1,:status2) " + sqlN += "GROUP BY status " + # sql to update timestamp + sqlU = "UPDATE {0} SET jobFetchTime=:jobFetchTime ".format(pandaQueueTableName) + sqlU += "WHERE queueName=:queueName " + sqlU += "AND (jobFetchTime IS NULL OR jobFetchTime<:timeLimit) " + # get queues + timeNow = datetime.datetime.utcnow() + varMap = dict() + varMap[':timeLimit'] = timeNow - datetime.timedelta(seconds=interval) + self.execute(sqlQ, varMap) + resQ = self.cur.fetchall() + iQueues = 0 + for queueName, nQueueLimitJob, nQueueLimitJobRatio, \ + nQueueLimitJobMax, nQueueLimitJobMin in resQ: + # update timestamp to lock the queue + varMap = dict() + varMap[':queueName'] = queueName + varMap[':jobFetchTime'] = timeNow + varMap[':timeLimit'] = timeNow - datetime.timedelta(seconds=interval) + self.execute(sqlU, varMap) + nRow = self.cur.rowcount + # commit + self.commit() + # skip if not locked + if nRow == 0: + continue + # count nQueue + varMap = dict() + varMap[':computingSite'] = queueName + varMap[':status1'] = 'starting' + varMap[':status2'] = 'running' + self.execute(sqlN, varMap) + resN = self.cur.fetchall() + nsMap = dict() + for tmpN, tmpStatus in resN: + nsMap[tmpStatus] = tmpN + # get num of queued jobs + try: + nQueue = nsMap['starting'] + except Exception: + nQueue = 0 + # dynamic nQueueLimitJob + if nQueueLimitJobRatio is not None and nQueueLimitJobRatio > 0: + try: + nRunning = nsMap['running'] + except Exception: + nRunning = 0 + nQueueLimitJob = int(nRunning * nQueueLimitJobRatio / 100) + if nQueueLimitJobMin is None: + nQueueLimitJobMin = 1 + nQueueLimitJob = max(nQueueLimitJob, nQueueLimitJobMin) + if nQueueLimitJobMax is not None: + nQueueLimitJob = min(nQueueLimitJob, nQueueLimitJobMax) + # more jobs need to be queued + if nQueueLimitJob is not None and nQueue < nQueueLimitJob: + retMap[queueName] = nQueueLimitJob - nQueue + # enough queues + iQueues += 1 + if iQueues >= n_queues: + break + tmpLog.debug('got {0}'.format(str(retMap))) + return retMap + except Exception: + # roll back + self.rollback() + # dump error + core_utils.dump_error_message(tmpLog) + # return + return {} + + # get jobs to propagate checkpoints + def get_jobs_to_propagate(self, max_jobs, lock_interval, update_interval, locked_by): + try: + # get logger + tmpLog = core_utils.make_logger(_logger, 'thr={0}'.format(locked_by), + method_name='get_jobs_to_propagate') + tmpLog.debug('start') + # sql to get jobs + sql = "SELECT PandaID FROM {0} ".format(jobTableName) + sql += "WHERE propagatorTime IS NOT NULL " + sql += "AND ((propagatorTime<:lockTimeLimit AND propagatorLock IS NOT NULL) " + sql += "OR (propagatorTime<:updateTimeLimit AND propagatorLock IS NULL)) " + sql += "ORDER BY propagatorTime LIMIT {0} ".format(max_jobs) + # sql to get jobs + sqlJ = "SELECT {0} FROM {1} ".format(JobSpec.column_names(), jobTableName) + sqlJ += "WHERE PandaID=:PandaID " + # sql to lock job + sqlL = "UPDATE {0} SET propagatorTime=:timeNow,propagatorLock=:lockedBy ".format(jobTableName) + sqlL += "WHERE PandaID=:PandaID " + sqlL += "AND ((propagatorTime<:lockTimeLimit AND propagatorLock IS NOT NULL) " + sqlL += "OR (propagatorTime<:updateTimeLimit AND propagatorLock IS NULL)) " + # sql to get events + sqlE = "SELECT {0} FROM {1} ".format(EventSpec.column_names(), eventTableName) + sqlE += "WHERE PandaID=:PandaID AND subStatus IN (:statusFinished,:statusFailed) " + # sql to get file + sqlF = "SELECT DISTINCT {0} FROM {1} f, {2} e, {1} f2 ".format(FileSpec.column_names('f2'), + fileTableName, + eventTableName) + sqlF += "WHERE e.PandaID=:PandaID AND e.fileID=f.fileID " + sqlF += "AND e.subStatus IN (:statusFinished,:statusFailed) " + sqlF += "AND f2.fileID=f.zipFileID " + # sql to get fileID of zip + sqlZ = "SELECT e.fileID,f.zipFileID FROM {0} f, {1} e ".format(fileTableName, eventTableName) + sqlZ += "WHERE e.PandaID=:PandaID AND e.fileID=f.fileID " + sqlZ += "AND e.subStatus IN (:statusFinished,:statusFailed) " + # get jobs + timeNow = datetime.datetime.utcnow() + lockTimeLimit = timeNow - datetime.timedelta(seconds=lock_interval) + updateTimeLimit = timeNow - datetime.timedelta(seconds=update_interval) + varMap = dict() + varMap[':lockTimeLimit'] = lockTimeLimit + varMap[':updateTimeLimit'] = updateTimeLimit + self.execute(sql, varMap) + resList = self.cur.fetchall() + pandaIDs = [] + for pandaID, in resList: + pandaIDs.append(pandaID) + # partially randomise to increase success rate for lock + nJobs = int(max_jobs * 0.2) + subPandaIDs = list(pandaIDs[nJobs:]) + random.shuffle(subPandaIDs) + pandaIDs = pandaIDs[:nJobs] + subPandaIDs + pandaIDs = pandaIDs[:max_jobs] + jobSpecList = [] + iEvents = 0 + for pandaID in pandaIDs: + # avoid a bulk update for many jobs with too many events + if iEvents > 10000: + break + # lock job + varMap = dict() + varMap[':PandaID'] = pandaID + varMap[':timeNow'] = timeNow + varMap[':lockedBy'] = locked_by + varMap[':lockTimeLimit'] = lockTimeLimit + varMap[':updateTimeLimit'] = updateTimeLimit + self.execute(sqlL, varMap) + nRow = self.cur.rowcount + # commit + self.commit() + if nRow > 0: + # read job + varMap = dict() + varMap[':PandaID'] = pandaID + self.execute(sqlJ, varMap) + res = self.cur.fetchone() + # make job + jobSpec = JobSpec() + jobSpec.pack(res) + jobSpec.propagatorLock = locked_by + zipFiles = {} + zipIdMap = dict() + # get zipIDs + varMap = dict() + varMap[':PandaID'] = jobSpec.PandaID + varMap[':statusFinished'] = 'finished' + varMap[':statusFailed'] = 'failed' + self.execute(sqlZ, varMap) + resZ = self.cur.fetchall() + for tmpFileID, tmpZipFileID in resZ: + zipIdMap[tmpFileID] = tmpZipFileID + # get zip files + varMap = dict() + varMap[':PandaID'] = jobSpec.PandaID + varMap[':statusFinished'] = 'finished' + varMap[':statusFailed'] = 'failed' + self.execute(sqlF, varMap) + resFs = self.cur.fetchall() + for resF in resFs: + fileSpec = FileSpec() + fileSpec.pack(resF) + zipFiles[fileSpec.fileID] = fileSpec + # read events + varMap = dict() + varMap[':PandaID'] = jobSpec.PandaID + varMap[':statusFinished'] = 'finished' + varMap[':statusFailed'] = 'failed' + self.execute(sqlE, varMap) + resEs = self.cur.fetchall() + for resE in resEs: + eventSpec = EventSpec() + eventSpec.pack(resE) + zipFileSpec = None + # get associated zip file if any + if eventSpec.fileID is not None: + if eventSpec.fileID not in zipIdMap: + continue + zipFileID = zipIdMap[eventSpec.fileID] + if zipFileID is not None: + zipFileSpec = zipFiles[zipFileID] + jobSpec.add_event(eventSpec, zipFileSpec) + iEvents += 1 + jobSpecList.append(jobSpec) + tmpLog.debug('got {0} jobs'.format(len(jobSpecList))) + return jobSpecList + except Exception: + # roll back + self.rollback() + # dump error + core_utils.dump_error_message(_logger) + # return + return [] + + # get jobs in sub status + def get_jobs_in_sub_status(self, sub_status, max_jobs, time_column=None, lock_column=None, + interval_without_lock=None, interval_with_lock=None, + locked_by=None, new_sub_status=None): + try: