2008-08-29 13:22:09 -04:00
|
|
|
## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
|
|
|
|
|
|
|
|
|
def configure(conf):
|
2013-04-01 22:33:46 +02:00
|
|
|
have_sqlite3 = conf.check_cfg(package='sqlite3', uselib_store='SQLITE3',
|
|
|
|
|
args=['--cflags', '--libs'],
|
|
|
|
|
mandatory=False)
|
2008-09-05 18:16:29 +01:00
|
|
|
|
2013-04-01 22:33:46 +02:00
|
|
|
conf.env['SQLITE_STATS'] = have_sqlite3
|
|
|
|
|
conf.report_optional_feature("SqliteDataOutput", "SQlite stats data output",
|
|
|
|
|
conf.env['SQLITE_STATS'],
|
|
|
|
|
"library 'sqlite3' not found")
|
2018-10-29 15:43:51 +01:00
|
|
|
have_sem = conf.check_nonfatal(header_name='semaphore.h', define_name='HAVE_SEMAPHORE_H')
|
|
|
|
|
conf.env['SEMAPHORE_ENABLED'] = have_sem
|
|
|
|
|
conf.write_config_header('ns3/stats-config.h', top=True)
|
2008-08-29 13:22:09 -04:00
|
|
|
|
|
|
|
|
def build(bld):
|
2013-08-08 06:40:41 -07:00
|
|
|
obj = bld.create_ns3_module('stats', ['core'])
|
2008-08-29 13:22:09 -04:00
|
|
|
obj.source = [
|
2013-08-08 06:40:41 -07:00
|
|
|
'helper/file-helper.cc',
|
|
|
|
|
'helper/gnuplot-helper.cc',
|
2011-03-04 10:56:07 -08:00
|
|
|
'model/data-calculator.cc',
|
|
|
|
|
'model/time-data-calculators.cc',
|
|
|
|
|
'model/data-output-interface.cc',
|
|
|
|
|
'model/omnet-data-output.cc',
|
|
|
|
|
'model/data-collector.cc',
|
2013-06-18 13:16:51 -07:00
|
|
|
'model/gnuplot.cc',
|
2013-08-08 06:40:41 -07:00
|
|
|
'model/data-collection-object.cc',
|
|
|
|
|
'model/probe.cc',
|
|
|
|
|
'model/boolean-probe.cc',
|
|
|
|
|
'model/double-probe.cc',
|
2014-10-15 07:06:11 -07:00
|
|
|
'model/time-probe.cc',
|
2013-08-08 06:40:41 -07:00
|
|
|
'model/uinteger-8-probe.cc',
|
|
|
|
|
'model/uinteger-16-probe.cc',
|
|
|
|
|
'model/uinteger-32-probe.cc',
|
|
|
|
|
'model/time-series-adaptor.cc',
|
|
|
|
|
'model/file-aggregator.cc',
|
|
|
|
|
'model/gnuplot-aggregator.cc',
|
|
|
|
|
'model/get-wildcard-matches.cc',
|
2008-08-29 13:22:09 -04:00
|
|
|
]
|
2011-06-08 11:42:04 -07:00
|
|
|
|
|
|
|
|
module_test = bld.create_ns3_module_test_library('stats')
|
|
|
|
|
module_test.source = [
|
|
|
|
|
'test/basic-data-calculators-test-suite.cc',
|
2013-06-18 13:42:57 -07:00
|
|
|
'test/average-test-suite.cc',
|
2013-08-08 06:40:41 -07:00
|
|
|
'test/double-probe-test-suite.cc',
|
2011-06-08 11:42:04 -07:00
|
|
|
]
|
|
|
|
|
|
2013-04-01 22:33:46 +02:00
|
|
|
headers = bld(features='ns3header')
|
2008-08-29 13:22:09 -04:00
|
|
|
headers.module = 'stats'
|
|
|
|
|
headers.source = [
|
2013-08-08 06:40:41 -07:00
|
|
|
'helper/file-helper.h',
|
|
|
|
|
'helper/gnuplot-helper.h',
|
2011-03-04 10:56:07 -08:00
|
|
|
'model/data-calculator.h',
|
|
|
|
|
'model/time-data-calculators.h',
|
|
|
|
|
'model/basic-data-calculators.h',
|
|
|
|
|
'model/data-output-interface.h',
|
|
|
|
|
'model/omnet-data-output.h',
|
|
|
|
|
'model/data-collector.h',
|
2013-06-18 13:16:51 -07:00
|
|
|
'model/gnuplot.h',
|
2013-06-18 13:42:57 -07:00
|
|
|
'model/average.h',
|
2013-08-08 06:40:41 -07:00
|
|
|
'model/data-collection-object.h',
|
|
|
|
|
'model/probe.h',
|
|
|
|
|
'model/boolean-probe.h',
|
|
|
|
|
'model/double-probe.h',
|
2014-10-15 07:06:11 -07:00
|
|
|
'model/time-probe.h',
|
2013-08-08 06:40:41 -07:00
|
|
|
'model/uinteger-8-probe.h',
|
|
|
|
|
'model/uinteger-16-probe.h',
|
|
|
|
|
'model/uinteger-32-probe.h',
|
|
|
|
|
'model/time-series-adaptor.h',
|
|
|
|
|
'model/file-aggregator.h',
|
|
|
|
|
'model/gnuplot-aggregator.h',
|
|
|
|
|
'model/get-wildcard-matches.h',
|
2008-08-29 13:22:09 -04:00
|
|
|
]
|
|
|
|
|
|
2008-12-29 13:28:54 +00:00
|
|
|
if bld.env['SQLITE_STATS']:
|
2011-03-04 10:56:07 -08:00
|
|
|
headers.source.append('model/sqlite-data-output.h')
|
|
|
|
|
obj.source.append('model/sqlite-data-output.cc')
|
2011-09-22 13:03:25 +01:00
|
|
|
obj.use.append('SQLITE3')
|
2011-03-22 15:41:38 +00:00
|
|
|
|
2018-10-29 15:43:51 +01:00
|
|
|
if bld.env['SQLITE_STATS'] and bld.env['SEMAPHORE_ENABLED']:
|
|
|
|
|
obj.source.append('model/sqlite-output.cc')
|
|
|
|
|
headers.source.append('model/sqlite-output.h')
|
|
|
|
|
|
2013-06-18 13:16:51 -07:00
|
|
|
if (bld.env['ENABLE_EXAMPLES']):
|
|
|
|
|
bld.recurse('examples')
|
|
|
|
|
|
2011-03-22 15:41:38 +00:00
|
|
|
bld.ns3_python_bindings()
|