First release
[sim/ns3-o-ran-e2.git] / examples / test-wrappers.cc
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2022 Northeastern University
4  * Copyright (c) 2022 Sapienza, University of Rome
5  * Copyright (c) 2022 University of Padova
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation;
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  * Author: Andrea Lacava <thecave003@gmail.com>
21  *                 Tommaso Zugno <tommasozugno@gmail.com>
22  *                 Michele Polese <michele.polese@gmail.com>
23  */
24
25 #include "ns3/core-module.h"
26 #include "ns3/oran-interface.h"
27 #include <errno.h>
28
29 using namespace ns3;
30
31 /**
32 * Test field for the wrappers and their functions
33 */
34 int 
35 main (int argc, char *argv[])
36 {
37   // LogComponentEnable ("Asn1Types", LOG_LEVEL_ALL);
38   std::string test = "test";
39 //   Ptr<OctetString> one = Create<OctetString> (test, test.size ());
40   // Ptr<OctetString> due = Create<OctetString> (test, test.size ());
41   // Ptr<Snssai> snssai = Create<Snssai> ("test");
42
43   // std::cout << due->DecodeContent() << std::endl;
44
45   std::vector<Ptr<NrCellId>> nrCellIds;
46   for (uint16_t i = 0; i < 20; i++)
47     {
48       nrCellIds.push_back(Create<NrCellId> (i));
49       NS_LOG_UNCOND ("Count: " << i << " , value: ");
50       xer_fprint (stdout, &asn_DEF_BIT_STRING, nrCellIds[i]->GetPointer ());
51     }
52
53   return 0;
54 }