mtp, mpi: Add copyright and licence for source files

This commit is contained in:
F5
2023-11-22 14:24:27 +08:00
parent ba1398822a
commit b3fdcbc6bd
12 changed files with 248 additions and 23 deletions

View File

@@ -1,3 +1,22 @@
/*
* Copyright (c) 2023 State Key Laboratory for Novel Software Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Songyuan Bai <i@f5soft.site>
*/
#include "ns3/applications-module.h"
#include "ns3/core-module.h"
#include "ns3/flow-monitor-module.h"

View File

@@ -1,3 +1,22 @@
/*
* Copyright (c) 2023 State Key Laboratory for Novel Software Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Songyuan Bai <i@f5soft.site>
*/
#include "ns3/applications-module.h"
#include "ns3/core-module.h"
#include "ns3/flow-monitor-module.h"

View File

@@ -1,4 +1,21 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2023 State Key Laboratory for Novel Software Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Songyuan Bai <i@f5soft.site>
*/
#include "hybrid-simulator-impl.h"
@@ -45,7 +62,7 @@ HybridSimulatorImpl::~HybridSimulatorImpl()
}
TypeId
HybridSimulatorImpl::GetTypeId(void)
HybridSimulatorImpl::GetTypeId()
{
static TypeId tid = TypeId("ns3::HybridSimulatorImpl")
.SetParent<SimulatorImpl>()
@@ -83,19 +100,19 @@ HybridSimulatorImpl::Destroy()
}
bool
HybridSimulatorImpl::IsFinished(void) const
HybridSimulatorImpl::IsFinished() const
{
return m_globalFinished;
}
bool
HybridSimulatorImpl::IsLocalFinished(void) const
HybridSimulatorImpl::IsLocalFinished() const
{
return MtpInterface::isFinished();
}
void
HybridSimulatorImpl::Stop(void)
HybridSimulatorImpl::Stop()
{
NS_LOG_FUNCTION(this);
for (uint32_t i = 0; i < MtpInterface::GetSize(); i++)
@@ -214,7 +231,7 @@ HybridSimulatorImpl::IsExpired(const EventId& id) const
}
void
HybridSimulatorImpl::Run(void)
HybridSimulatorImpl::Run()
{
NS_LOG_FUNCTION(this);
@@ -278,7 +295,7 @@ HybridSimulatorImpl::Run(void)
}
Time
HybridSimulatorImpl::Now(void) const
HybridSimulatorImpl::Now() const
{
// Do not add function logging here, to avoid stack overflow
return MtpInterface::GetSystem()->Now();
@@ -298,7 +315,7 @@ HybridSimulatorImpl::GetDelayLeft(const EventId& id) const
}
Time
HybridSimulatorImpl::GetMaximumSimulationTime(void) const
HybridSimulatorImpl::GetMaximumSimulationTime() const
{
return Time::Max() / 2;
}
@@ -321,13 +338,13 @@ HybridSimulatorImpl::GetSystemId() const
}
uint32_t
HybridSimulatorImpl::GetContext(void) const
HybridSimulatorImpl::GetContext() const
{
return MtpInterface::GetSystem()->GetContext();
}
uint64_t
HybridSimulatorImpl::GetEventCount(void) const
HybridSimulatorImpl::GetEventCount() const
{
uint64_t eventCount = 0;
for (uint32_t i = 0; i < MtpInterface::GetSize(); i++)
@@ -338,7 +355,7 @@ HybridSimulatorImpl::GetEventCount(void) const
}
void
HybridSimulatorImpl::DoDispose(void)
HybridSimulatorImpl::DoDispose()
{
delete[] m_pLBTS;
SimulatorImpl::DoDispose();

View File

@@ -1,4 +1,22 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2023 State Key Laboratory for Novel Software Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Songyuan Bai <i@f5soft.site>
*/
#ifndef NS3_HYBRID_SIMULATOR_IMPL_H
#define NS3_HYBRID_SIMULATOR_IMPL_H
@@ -18,7 +36,7 @@ namespace ns3
class HybridSimulatorImpl : public SimulatorImpl
{
public:
static TypeId GetTypeId(void);
static TypeId GetTypeId();
/** Default constructor. */
HybridSimulatorImpl();
@@ -27,8 +45,8 @@ class HybridSimulatorImpl : public SimulatorImpl
// virtual from SimulatorImpl
virtual void Destroy();
virtual bool IsFinished(void) const;
virtual void Stop(void);
virtual bool IsFinished() const;
virtual void Stop();
virtual void Stop(const Time& delay);
virtual EventId Schedule(const Time& delay, EventImpl* event);
virtual void ScheduleWithContext(uint32_t context, const Time& delay, EventImpl* event);
@@ -37,20 +55,20 @@ class HybridSimulatorImpl : public SimulatorImpl
virtual void Remove(const EventId& id);
virtual void Cancel(const EventId& id);
virtual bool IsExpired(const EventId& id) const;
virtual void Run(void);
virtual Time Now(void) const;
virtual void Run();
virtual Time Now() const;
virtual Time GetDelayLeft(const EventId& id) const;
virtual Time GetMaximumSimulationTime(void) const;
virtual Time GetMaximumSimulationTime() const;
virtual void SetScheduler(ObjectFactory schedulerFactory);
virtual uint32_t GetSystemId(void) const;
virtual uint32_t GetContext(void) const;
virtual uint64_t GetEventCount(void) const;
virtual uint32_t GetSystemId() const;
virtual uint32_t GetContext() const;
virtual uint64_t GetEventCount() const;
private:
// Inherited from Object
virtual void DoDispose(void);
virtual void DoDispose();
bool IsLocalFinished(void) const;
bool IsLocalFinished() const;
/** Are all parallel instances completed. */
bool m_globalFinished;

View File

@@ -1,3 +1,22 @@
/*
* Copyright (c) 2023 State Key Laboratory for Novel Software Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Songyuan Bai <i@f5soft.site>
*/
#include "ns3/applications-module.h"
#include "ns3/core-module.h"
#include "ns3/flow-monitor-module.h"

View File

@@ -1,3 +1,22 @@
/*
* Copyright (c) 2023 State Key Laboratory for Novel Software Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Songyuan Bai <i@f5soft.site>
*/
#include "logical-process.h"
#include "mtp-interface.h"

View File

@@ -1,3 +1,22 @@
/*
* Copyright (c) 2023 State Key Laboratory for Novel Software Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Songyuan Bai <i@f5soft.site>
*/
#ifndef LOGICAL_PROCESS_H
#define LOGICAL_PROCESS_H

View File

@@ -1,3 +1,22 @@
/*
* Copyright (c) 2023 State Key Laboratory for Novel Software Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Songyuan Bai <i@f5soft.site>
*/
#include "mtp-interface.h"
#include "ns3/assert.h"

View File

@@ -1,3 +1,22 @@
/*
* Copyright (c) 2023 State Key Laboratory for Novel Software Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Songyuan Bai <i@f5soft.site>
*/
#ifndef MTP_INTERFACE_H
#define MTP_INTERFACE_H

View File

@@ -1,3 +1,22 @@
/*
* Copyright (c) 2023 State Key Laboratory for Novel Software Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Songyuan Bai <i@f5soft.site>
*/
#include "multithreaded-simulator-impl.h"
#include "mtp-interface.h"

View File

@@ -1,3 +1,22 @@
/*
* Copyright (c) 2023 State Key Laboratory for Novel Software Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Songyuan Bai <i@f5soft.site>
*/
#ifndef MULTITHREADED_SIMULATOR_IMPL_H
#define MULTITHREADED_SIMULATOR_IMPL_H

View File

@@ -1,3 +1,22 @@
/*
* Copyright (c) 2023 State Key Laboratory for Novel Software Technology
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Songyuan Bai <i@f5soft.site>
*/
#include "ns3/example-as-test.h"
#include "ns3/mtp-module.h"
#include "ns3/test.h"