git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7380 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Lionel Gauthier
2015-05-06 09:10:17 +00:00
parent d428222d49
commit 45093a6afa
148 changed files with 0 additions and 16978 deletions
-15
View File
@@ -1,15 +0,0 @@
Archives in this directory contain static binaries, so any kind
of run-time linkage error is not expected. Please let me know
if you experience such an error, or any kind of unexpected behaviour.
LZMA archives can be extracted as follows,
tar xvfa SCOREF-MGMT-v1.0.4.tar.lzma
Not for all versions a binary is created when the change is
subtle and/or documentation related. So please follow OpenAirInterface
SVN for most up-to-date version.
Note: Name has changed from IF.MGMT to SCOREF-MGMT from version 1.1.0 on.
- Baris Demiray <baris.demiray@eurecom.fr>
-674
View File
@@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
-10
View File
@@ -1,10 +0,0 @@
~ SCOREF Management Module Design (SCOREF-MGMT) ~
SCOREF-MGMT is a server application currently having the interfaces to
GN (GeoNetworking) and FAC (Facilities) modules. Herein this directory
design documents corresponding to critical sections of MGMT-CORE will reside.
.xmi files are for Umbrello. Please see http://uml.sourceforge.net/
- Baris Demiray <baris.demiray@eurecom.fr>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

@@ -1,221 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<XMI verified="false" xmi.version="1.2" timestamp="2012-12-03T17:29:43" xmlns:UML="http://schema.omg.org/spec/UML/1.3">
<XMI.header>
<XMI.documentation>
<XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
<XMI.exporterVersion>1.5.8</XMI.exporterVersion>
<XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
</XMI.documentation>
<XMI.metamodel xmi.version="1.3" href="UML.xml" xmi.name="UML"/>
</XMI.header>
<XMI.content>
<UML:Model isSpecification="false" isAbstract="false" isLeaf="false" xmi.id="m1" isRoot="false" name="UML Model">
<UML:Namespace.ownedElement>
<UML:Stereotype visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="folder" name="folder"/>
<UML:Stereotype visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="datatype" name="datatype"/>
<UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Logical View" name="Logical View">
<UML:Namespace.ownedElement>
<UML:Package stereotype="folder" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Datatypes" name="Datatypes">
<UML:Namespace.ownedElement>
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="A8WiKgyJCayx" name="int"/>
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ig2vnF8xohCP" name="char"/>
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="SfVgAhhIpE08" name="bool"/>
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="uwR4XN2D248p" name="float"/>
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="HHk3wwTOZw5h" name="double"/>
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="emzRyxXsuxxP" name="short"/>
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="KxcMzj9E0tIu" name="long"/>
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="pjINfL4J64j4" name="unsigned int"/>
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="1GvtDqIWntsk" name="unsigned short"/>
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="c2yavGSjzk6d" name="unsigned long"/>
<UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4AuACdCEs753" name="string"/>
</UML:Namespace.ownedElement>
</UML:Package>
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="fp2dX8GbH8jT" name="main()"/>
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="d875XUOAJRlo" name="Util"/>
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="c70hKf1xl80G" name="Configuration"/>
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BKABBeColCV6" name="ManagementInformationBase"/>
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RhUblYtxs362" name="ManagementServer"/>
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="jNpyCZ6vSurm" name="InquiryThread"/>
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Dy2pjQabnnTg" name="PacketHandler"/>
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="YjQfDsrfoylV" name="ManagementClientManager"/>
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="WJnn914hqHAk" name="Packet"/>
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7zGxf72LspN9" name="CommunicationProfileManager"/>
<UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Lsx9BreRIssY" name="ItsKeyManager"/>
</UML:Namespace.ownedElement>
<XMI.extension xmi.extender="umbrello">
<diagrams>
<diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="1" snapy="10" linewidth="0" showattsig="1" isopen="0" showpackage="1" showpubliconly="1" showstereotype="1" name="class diagram" font="Sans Serif,10,-1,5,50,0,0,0,0,0" canvasheight="873" canvaswidth="1663" localid="-1" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffff00" zoom="100" xmi.id="FCaYFbnT8EWC" documentation="" showscope="1" snapgrid="0" showatts="1" type="1">
<widgets/>
<messages/>
<associations/>
</diagram>
<diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="1" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="1" showstereotype="1" name="Main Flow" font="Sans Serif,10,-1,5,50,0,0,0,0,0" canvasheight="873" canvaswidth="1663" localid="hIqQSJUFoWoQ" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffff00" zoom="100" xmi.id="xMZiFQSpSRNL" documentation="" showscope="1" snapgrid="0" showatts="1" type="3">
<widgets>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="131" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="mwfc1lfz7DfK" width="64" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="fp2dX8GbH8jT" height="32" drawasactor="0"/>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="329" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="XzQm87Gs1tU3" width="50" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="d875XUOAJRlo" height="32" drawasactor="0"/>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="502" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="aPRroCgJC46K" width="107" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="c70hKf1xl80G" height="32" drawasactor="0"/>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="689" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="pV1Zb2pCPE3B" width="212" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="BKABBeColCV6" height="32" drawasactor="0"/>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="995" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="hIqQSJUFoWoQ" width="149" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="RhUblYtxs362" height="32" drawasactor="0"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="348" showstereotype="1" y="535" text="Get the list of files reside in configuration/ directory" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="332" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="fqnLGJut09Xh" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="455" showstereotype="1" y="571" text="Parse all the valid configuration files found" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="275" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="FWO0b0p7vZHS" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="489" showstereotype="1" y="521" text="Initialize MIB with the configuration information" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="304" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="dM9pGMuuAfDQ" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="466" showstereotype="1" y="730" text="Instantiate a ManagementServer and pass the control to it for further actions and client handling" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="625" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="y7HwFndSJ0Su" height="20"/>
</widgets>
<messages>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="XzQm87Gs1tU3" textid="jzxk5zPNpqn9" operation="Util::getListOfFiles()" linewidth="none" seqnum="1" usesdiagramusefillcolor="1" x="163" showstereotype="1" y="136" widgetaid="mwfc1lfz7DfK" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="199" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="cavqb6FJYq47" height="32" sequencemessagetype="1000">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="168" showstereotype="1" y="109" text="1: Util::getListOfFiles()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="147" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="jzxk5zPNpqn9" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="aPRroCgJC46K" textid="JZmsOoz5mwqr" operation="Configuration::parseConfigurationFiles()" linewidth="none" seqnum="2" usesdiagramusefillcolor="1" x="163" showstereotype="1" y="243" widgetaid="mwfc1lfz7DfK" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="400" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="I3vorJKTtFKT" height="32" sequencemessagetype="1000">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="168" showstereotype="1" y="223" text="2: Configuration::parseConfigurationFiles()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="275" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="JZmsOoz5mwqr" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="pV1Zb2pCPE3B" textid="3RKvecOyA8oY" operation="ManagementInformationBase::initialize()" linewidth="none" seqnum="3" usesdiagramusefillcolor="1" x="163" showstereotype="1" y="291" widgetaid="mwfc1lfz7DfK" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="640" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="uDDh30oK3k8t" height="32" sequencemessagetype="1000">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="168" showstereotype="1" y="334" text="3: ManagementInformationBase::initialize()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="283" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="3RKvecOyA8oY" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="hIqQSJUFoWoQ" textid="7cpWwkAX66hC" operation="ManagementServer::readData()" linewidth="none" seqnum="4" usesdiagramusefillcolor="1" x="164" showstereotype="1" y="328" widgetaid="mwfc1lfz7DfK" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="904" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="RWZfjHgh50jn" height="8" sequencemessagetype="1001">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="169" showstereotype="1" y="446" text="4: ManagementServer::readData()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="229" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="7cpWwkAX66hC" height="20"/>
</messagewidget>
</messages>
<associations/>
</diagram>
<diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="1" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="1" showstereotype="1" name="Client Handling" font="Sans Serif,10,-1,5,50,0,0,0,0,0" canvasheight="873" canvaswidth="1663" localid="hnCrqHEjCEP3" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffff00" zoom="100" xmi.id="jvnwJj3ZfGMH" documentation="" showscope="1" snapgrid="0" showatts="1" type="3">
<widgets>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="133" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="ifHBXFTW7ImQ" width="149" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="RhUblYtxs362" height="32" drawasactor="0"/>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="570" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="bsJH9fYrIn2p" width="108" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="jNpyCZ6vSurm" height="32" drawasactor="0"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="212" showstereotype="1" y="160" text="Start thread for repetitive sending of WirelessStateRequest" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="383" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="3mHJZK6cnPjZ" height="20"/>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="873" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="sFVPCURH7VSD" width="114" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="Dy2pjQabnnTg" height="32" drawasactor="0"/>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="1038" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="yULuE2bLGpGJ" width="199" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="YjQfDsrfoylV" height="32" drawasactor="0"/>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="1301" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="hnCrqHEjCEP3" width="64" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="WJnn914hqHAk" height="32" drawasactor="0"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="222" showstereotype="1" y="245" text="InquiryThread calls for ManagementServer functionality repetitively" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="433" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="fxTICgmf7zIk" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="220" showstereotype="1" y="291" text="Read data from asynchronous UDP socket" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="277" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="ZyQkTJwcvgd0" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="214" showstereotype="1" y="356" text="There is some data to be received, callback is called by Boost" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="400" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="nfaGRTO4OsLZ" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="214" showstereotype="1" y="427" text="Received data is passed into this function to be processed" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="378" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="W7Eb6VLfRjOu" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="213" showstereotype="1" y="503" text="Received byte stream is passed to PacketHandler to be parsed and processed further" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="553" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="3IUyy5wjkUzA" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="212" showstereotype="1" y="591" text="Client state is updated according to the received data" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="351" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="vMCKCXtie5Ji" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="214" showstereotype="1" y="667" text="A response is ready and here it is serialized into a byte stream to be written onto the socket" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="595" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="aeM2MiuP0PLy" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="212" showstereotype="1" y="740" text="There is some data we sent so Boost calls our callback for final actions for this transmission" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="591" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="UFiDjfNe1ZwD" height="20"/>
</widgets>
<messages>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="bsJH9fYrIn2p" textid="uWXLOO5zHOGQ" operation="InquiryThread::operator()()" linewidth="none" seqnum="1" usesdiagramusefillcolor="1" x="208" showstereotype="1" y="151" widgetaid="ifHBXFTW7ImQ" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="415" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="2VJ9m5YTQLRc" height="8" sequencemessagetype="1001">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="213" showstereotype="1" y="131" text="1: InquiryThread::operator()()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="193" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="uWXLOO5zHOGQ" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="bsJH9fYrIn2p" textid="PvKeHa2ILKbu" operation="Send WirelessStateRequest repetitively" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="625" showstereotype="1" y="187" widgetaid="bsJH9fYrIn2p" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="48" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="SH3tcSVVy1qM" height="41" sequencemessagetype="1001">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="630" showstereotype="1" y="167" text=": Send WirelessStateRequest repetitively" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="705" width="265" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="PvKeHa2ILKbu" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="ifHBXFTW7ImQ" textid="OvZLuNfJGzwX" operation="ManagementServer::sendWirelessStateRequest()" linewidth="none" seqnum="" usesdiagramusefillcolor="1" x="208" showstereotype="1" y="237" widgetaid="bsJH9fYrIn2p" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="415" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="chUP6ExYTyR4" height="8" sequencemessagetype="1001">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="213" showstereotype="1" y="217" text=": ManagementServer::sendWirelessStateRequest()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="330" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="OvZLuNfJGzwX" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="ifHBXFTW7ImQ" textid="UBhx771V0Yqu" operation="this->readData()" linewidth="none" seqnum="2" usesdiagramusefillcolor="1" x="208" showstereotype="1" y="288" widgetaid="ifHBXFTW7ImQ" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="48" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="YyptIQns5IGB" height="32" sequencemessagetype="1001">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="213" showstereotype="1" y="268" text="2: this->readData()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="705" width="133" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="UBhx771V0Yqu" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="ifHBXFTW7ImQ" textid="riFwyT5SenNl" operation="this->handleReceive()" linewidth="none" seqnum="3" usesdiagramusefillcolor="1" x="208" showstereotype="1" y="351" widgetaid="ifHBXFTW7ImQ" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="48" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="vWD9V7g36TuM" height="32" sequencemessagetype="1001">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="213" showstereotype="1" y="331" text="3: this->handleReceive()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="705" width="164" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="riFwyT5SenNl" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="ifHBXFTW7ImQ" textid="5d4B6yXyeksc" operation="this->handleClientData()" linewidth="none" seqnum="4" usesdiagramusefillcolor="1" x="208" showstereotype="1" y="424" widgetaid="ifHBXFTW7ImQ" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="48" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="uNEuv5mpZzy2" height="32" sequencemessagetype="1001">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="213" showstereotype="1" y="404" text="4: this->handleClientData()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="705" width="183" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="5d4B6yXyeksc" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="sFVPCURH7VSD" textid="9GGu3jbty6IA" operation="PacketHandler::handle()" linewidth="none" seqnum="5" usesdiagramusefillcolor="1" x="207" showstereotype="1" y="497" widgetaid="ifHBXFTW7ImQ" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="731" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="Uy98g2jsylhh" height="32" sequencemessagetype="1000">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="215" showstereotype="1" y="477" text="5: PacketHandler::handle()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="177" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="9GGu3jbty6IA" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="yULuE2bLGpGJ" textid="tu2itnBpGWkS" operation="ManagementClientManager::updateClientState()" linewidth="none" seqnum="6" usesdiagramusefillcolor="1" x="207" showstereotype="1" y="584" widgetaid="ifHBXFTW7ImQ" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="938" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="YpCUtSdSC35N" height="32" sequencemessagetype="1000">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="212" showstereotype="1" y="564" text="6: ManagementClientManager::updateClientState()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="335" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="tu2itnBpGWkS" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="hnCrqHEjCEP3" textid="VQiLfs3NfFCV" operation="GeonetPacket::serialize()" linewidth="none" seqnum="7" usesdiagramusefillcolor="1" x="207" showstereotype="1" y="660" widgetaid="ifHBXFTW7ImQ" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="1134" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="2YsG4ciZuTM3" height="32" sequencemessagetype="1000">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="212" showstereotype="1" y="640" text="7: GeonetPacket::serialize()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="183" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="VQiLfs3NfFCV" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="ifHBXFTW7ImQ" textid="9bm3564aVmt8" operation="this->handleSend()" linewidth="none" seqnum="8" usesdiagramusefillcolor="1" x="208" showstereotype="1" y="735" widgetaid="ifHBXFTW7ImQ" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="48" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="VRDffcgfBWvD" height="32" sequencemessagetype="1001">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="213" showstereotype="1" y="715" text="8: this->handleSend()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="705" width="149" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="9bm3564aVmt8" height="20"/>
</messagewidget>
</messages>
<associations/>
</diagram>
<diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="1" snapy="10" linewidth="0" showattsig="1" isopen="1" showpackage="1" showpubliconly="1" showstereotype="1" name="Configuration" font="Sans Serif,10,-1,5,50,0,0,0,0,0" canvasheight="873" canvaswidth="1663" localid="tVvsNDVLWSAe" snapcsgrid="0" showgrid="0" showops="1" griddotcolor="#a0a0a4" backgroundcolor="#c3c3c3" usefillcolor="1" fillcolor="#ffff00" zoom="100" xmi.id="5ptjvCQTpmT9" documentation="" showscope="1" snapgrid="0" showatts="1" type="3">
<widgets>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="449" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="UOYUlrQF68Qp" width="107" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="c70hKf1xl80G" height="32" drawasactor="0"/>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="125" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="mnRnLMzQBq74" width="64" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="fp2dX8GbH8jT" height="32" drawasactor="0"/>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="754" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="yDF83KA4qis5" width="212" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="BKABBeColCV6" height="32" drawasactor="0"/>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="1008" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="oVhMzgbBnLuX" width="218" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="7zGxf72LspN9" height="32" drawasactor="0"/>
<objectwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" usesdiagramusefillcolor="1" instancename="" x="1275" decon="0" showstereotype="1" y="48" font="Sans Serif,10,-1,5,50,0,1,0,0,0" localid="tVvsNDVLWSAe" width="115" isinstance="0" multipleinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="Lsx9BreRIssY" height="32" drawasactor="0"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="509" showstereotype="1" y="246" text="Reset the default values of configuration parameters with parsed values" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="465" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="3wHXOQ9AWfiK" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="507" showstereotype="1" y="363" text="Insert the parsed communication profiles into the communication profile table" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="505" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="S3Q4KcqRT3pD" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="509" showstereotype="1" y="486" text="Insert the configuration item definitions (parsed from configuration/ directory) into the ItsKeyManager's table" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="697" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="8mnhcEdd9vBV" height="20"/>
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="162" showstereotype="1" y="137" text="Call for Configuration class' functionality to parse the configuration files" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="700" width="459" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="JKfp0L8QPYSh" height="20"/>
</widgets>
<messages>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="UOYUlrQF68Qp" textid="KcMQikDUYcGr" operation="Configuration::parseConfigurationFiles()" linewidth="none" seqnum="1" usesdiagramusefillcolor="1" x="158" showstereotype="1" y="127" widgetaid="mnRnLMzQBq74" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="343" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="1VYoHzxjNTB8" height="8" sequencemessagetype="1001">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="163" showstereotype="1" y="107" text="1: Configuration::parseConfigurationFiles()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="275" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="KcMQikDUYcGr" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="yDF83KA4qis5" textid="E9jkkxZiAooC" operation="ManagementInformationBase::setValue()" linewidth="none" seqnum="2" usesdiagramusefillcolor="1" x="503" showstereotype="1" y="237" widgetaid="UOYUlrQF68Qp" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="356" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="gnp3GyAaaUyH" height="8" sequencemessagetype="1001">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="508" showstereotype="1" y="217" text="2: ManagementInformationBase::setValue()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="287" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="E9jkkxZiAooC" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="oVhMzgbBnLuX" textid="yKyr8LywofGl" operation="CommunicationProfileManager::insert()" linewidth="none" seqnum="3" usesdiagramusefillcolor="1" x="503" showstereotype="1" y="354" widgetaid="UOYUlrQF68Qp" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="613" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="ITERG2dNztKf" height="8" sequencemessagetype="1001">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="508" showstereotype="1" y="334" text="3: CommunicationProfileManager::insert()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="274" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="yKyr8LywofGl" height="20"/>
</messagewidget>
<messagewidget linecolor="none" usesdiagramfillcolor="1" widgetbid="tVvsNDVLWSAe" textid="7tDQj5wabsTy" operation="ItsKeyManager::addKey()" linewidth="none" seqnum="4" usesdiagramusefillcolor="1" x="503" showstereotype="1" y="473" widgetaid="UOYUlrQF68Qp" font="Sans Serif,10,-1,5,50,0,0,0,0,0" width="828" isinstance="0" usefillcolor="1" fillcolor="none" xmi.id="l8YaomL7cIEn" height="8" sequencemessagetype="1001">
<floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="508" showstereotype="1" y="453" text="4: ItsKeyManager::addKey()" font="Sans Serif,10,-1,5,50,0,0,0,0,0" pretext="" role="704" width="181" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="7tDQj5wabsTy" height="20"/>
</messagewidget>
</messages>
<associations/>
</diagram>
</diagrams>
</XMI.extension>
</UML:Model>
<UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Use Case View" name="Use Case View">
<UML:Namespace.ownedElement/>
</UML:Model>
<UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Component View" name="Component View">
<UML:Namespace.ownedElement/>
</UML:Model>
<UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Deployment View" name="Deployment View">
<UML:Namespace.ownedElement/>
</UML:Model>
<UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Entity Relationship Model" name="Entity Relationship Model">
<UML:Namespace.ownedElement/>
</UML:Model>
</UML:Namespace.ownedElement>
</UML:Model>
</XMI.content>
<XMI.extensions xmi.extender="umbrello">
<docsettings viewid="5ptjvCQTpmT9" uniqueid="JKfp0L8QPYSh" documentation=""/>
<listview>
<listitem open="1" type="800" id="Views">
<listitem open="1" type="801" id="Logical View">
<listitem open="0" type="807" id="FCaYFbnT8EWC" label="class diagram"/>
<listitem open="0" type="810" id="jvnwJj3ZfGMH" label="Client Handling"/>
<listitem open="0" type="810" id="5ptjvCQTpmT9" label="Configuration"/>
<listitem open="0" type="810" id="xMZiFQSpSRNL" label="Main Flow"/>
<listitem open="1" type="813" id="7zGxf72LspN9"/>
<listitem open="1" type="813" id="c70hKf1xl80G"/>
<listitem open="1" type="813" id="jNpyCZ6vSurm"/>
<listitem open="1" type="813" id="Lsx9BreRIssY"/>
<listitem open="1" type="813" id="YjQfDsrfoylV"/>
<listitem open="1" type="813" id="BKABBeColCV6"/>
<listitem open="1" type="813" id="RhUblYtxs362"/>
<listitem open="1" type="813" id="WJnn914hqHAk"/>
<listitem open="1" type="813" id="Dy2pjQabnnTg"/>
<listitem open="1" type="813" id="d875XUOAJRlo"/>
<listitem open="1" type="813" id="fp2dX8GbH8jT"/>
<listitem open="0" type="830" id="Datatypes">
<listitem open="1" type="829" id="SfVgAhhIpE08"/>
<listitem open="1" type="829" id="ig2vnF8xohCP"/>
<listitem open="1" type="829" id="HHk3wwTOZw5h"/>
<listitem open="1" type="829" id="uwR4XN2D248p"/>
<listitem open="1" type="829" id="A8WiKgyJCayx"/>
<listitem open="1" type="829" id="KxcMzj9E0tIu"/>
<listitem open="1" type="829" id="emzRyxXsuxxP"/>
<listitem open="1" type="829" id="4AuACdCEs753"/>
<listitem open="1" type="829" id="pjINfL4J64j4"/>
<listitem open="1" type="829" id="c2yavGSjzk6d"/>
<listitem open="1" type="829" id="1GvtDqIWntsk"/>
</listitem>
</listitem>
<listitem open="1" type="802" id="Use Case View"/>
<listitem open="1" type="821" id="Component View"/>
<listitem open="1" type="827" id="Deployment View"/>
<listitem open="1" type="836" id="Entity Relationship Model"/>
</listitem>
</listview>
<codegeneration>
<codegenerator language="C++"/>
</codegeneration>
</XMI.extensions>
</XMI>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

@@ -1,9 +0,0 @@
Herein there are Lot 3 documents on messages exchanged among
SCOREF Management and Geonetworking modules, and with FACilities,
and big picture of these (and other) modules.
For the Doxygen documentation of the code please see
../Software/README.DOCUMENTATION.
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,48 +0,0 @@
~ SCOREF Management Module Implementation (SCOREF-MGMT) ~
SCOREF-MGMT is a server application currently having the interfaces to
GN (GeoNetworking) and FAC (Facilities) modules. Further developments
such as OpenAirInterface integration are scheduled.
For MGMT-GN interface all the packets defined in "CM-GN Interface Definition
" (currently v4) are implemented and used,
100 LOCATION_UPDATE (supported/implemented but not used)
101 LOCATION_TABLE_REQ
102 LOCATION_TABLE_RES
300 CONFIGURATION_UPDATE_AVAILABLE
301 CONFIGURATION_REQ
302 CONFIGURATION_RES_CONT
303 CONFIGURATION_RES_BULK
304 COMM_PROF_REQ
305 COMM_PROF_REP
402 WIRELESS_STATE_REQ
403 WIRELESS_STATE_RES
404 NETWORK_STATE
For MGMT-FAC interface, following packets defined in "FAC-CM to MGMT Interface
description" (currently v4) are implemented and/or used,
110 LOCATION_UPDATE (supported/implemented but not used)
300 CONFIGURATION_UPDATE_AVAILABLE
311 CONFIGURATION_REQUEST
312 CONFIGURATION_RES_CONT
313 CONFIGURATION_RES_BULK
314 CONFIGURATION_NOTIFICATION
315 COMM_PROF_REQ
316 COMM_PROF_REP
317 COMM_PROF_SELECTION_REQ (supported/implemented but not used)
318 COMM_PROF_SELECTION_RES (supported/implemented but not used)
Please refer to following files for further information, directories given in parenthesis
belong to SCOREF SVN,
- (Software/SoftwareComponents/MGMT/CORE/Documentation/)CM-GN Interface Definition_v4.pdf
- (Software/SoftwareComponents/MGMT/CORE/Documentation/)FAC-CM Interface Definition.pdf
- (Software/SoftwareComponents/MGMT/CORE/Documentation/)ITS Station Management Core - Low Level Description.pdf
- (Software/SoftwareComponents/MGMT/CORE/Documentation/)SCOREF-MGMT_Configuration.pdf
- README.BUILD (not available in releases, check OpenAirInterface SVN)
- README.DOCUMENTATION (not available in releases check OpenAirInterface SVN)
- README.RUNNING
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,43 +0,0 @@
SCOREF-MGMT has three build configurations which are all ready to be used
through the Makefile. These are,
1) Debug Configuration
Definition: Debug flags are on, optimisation is off, to be
run inside GDB, etc.
Command: Define make variable `BUILD_DEBUG' as
$ make BUILD_DEBUG=1
and relevant binary will be created in bin/
2) Dynamic Configuration
Definition: Optimisation flags are on, dynamic linkage, for
deployment (along with necessary libraries) or local use
Command: Define make variable `BUILD_DYNAMIC' as
$ make BUILD_DYNAMIC=1
and binary will be created in bin/
3) Static Configuration
Definition: Static linkage, to be sent to other people
and/or companies whom may not have necessary libraries
installed
Command: Define make variable `BUILD_STATIC' as
$ make BUILD_STATIC=1
and binary will be created in bin/
For Dynamic and Static configurations the make target `strip' may be used
to save space by removing symbols in the binary as follows,
$ make strip
For Eclipse development see README.BUILD.ECLIPSE file.
Please let me know in case of a build error sending relevant library
versions, platform, etc. information.
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,13 +0,0 @@
For Eclipse development, import the directory as "Existing code as Makefile
Project" and from "C/C++ General"/Paths and Symbols define those include
paths listed in README.BUILD.ECLIPSE.PATHS (those may change according to
installed libraries, etc. use Index/Search for 'Unresolved Includes' menu
item to find out directories for your own system. A sample path list is given
in README.BUILD.ECLIPSE.PATHS.xml file.
Coding style is given in README.BUILD.ECLIPSE.CODING_STYLE.xml file and may
be imported through Eclipse's Project Properties/C/C++ General/Coding Style
configuration window.
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,10 +0,0 @@
Please find .doxygen file in the root directory of the project.
Following command will generate source code documentation in ./doc/
directory.
$ doxygen SCOREF-MGMT.doxygen
More documentation, especially on control & data flow, will be added
over time. Class diagrams may be reached through Doxygen documentation.
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,41 +0,0 @@
~ SCOREF Management Module Release ~
SCOREF-MGMT module releases involve statically-built binaries,
configuration files and relevant documentation. There is a script
in the root of Software/ (same with this document) directory named
make-release.sh and it can be used as follows.
Firstly, one has to ensure that there are no build errors as the
script doesn't check for these.
Then you can run the script giving the version name as follows,
demiray@sud:~/workspace/SCOREF-MGMT/Software$ ./make-release.sh v1.8.0
Building the version v1.8.0
Preparing the release...
Copying binary...
Copying configuration files...
Copying documentation...
Preparing the compressed archive...
Removing temporary directory...
Release is ready
The compressed archive of the release will be ready in the same directory,
demiray@sud:~/workspace/SCOREF-MGMT/Software$ ls -l SCOREF-MGMT-v1.8.0.tar.bz2
-rw-r--r-- 1 demiray umts 705692 Jan 11 16:34 SCOREF-MGMT-v1.8.0.tar.bz2
In this archive file there are the documents listed below,
demiray@sud:~/workspace/SCOREF-MGMT/Software$ tar jtf SCOREF-MGMT-v1.8.0.tar.bz2
SCOREF-MGMT-v1.8.0/
SCOREF-MGMT-v1.8.0/MGMT.conf
SCOREF-MGMT-v1.8.0/SCOREF-MGMT
SCOREF-MGMT-v1.8.0/configuration/
SCOREF-MGMT-v1.8.0/configuration/MGMT.IHM.conf
SCOREF-MGMT-v1.8.0/README.RUNNING
SCOREF-MGMT-v1.8.0/README
This file is ready to be put on SVN or to be sent to project partners.
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,36 +0,0 @@
~ SCOREF Management Module Implementation ~
SCOREF-MGMT is a server application that handles messages sent from
GN (GeoNetworking) and FAC (Facilities) modules. Since SCOREF-MGMT is
the server it has to be started before these modules. SCOREF-MGMT
expects two command-line arguments having one optional, and they are
configuration file and optional log file name, respectively. If there
already is a log file with the same name it will be renamed (appending
date and time to its current name) and a new file will be created.
All the output is directed to this file and to standard output only for
debugging purposes. Further versions will write to the log file only.
[demiray@leynes test]$ ./SCOREF-MGMT MGMT.conf [LogFileName]
After SCOREF-MGMT is started it'll read given configuration file along
with those it finds under configuration/ directory (see Section 2.
Configuration File for FACilities in Software/SoftwareComponents/ \
MGMT/CORE/Documentation/SCOREF-MGMT_Configuration.pdf) and update local
configuration (such as UDP server port) and MIB (Management Information
Base) parameters, then it'll start listening for incoming connections on
UDP port defined by CONF_SERVER_PORT parameter in the configuration file.
Output of a sample run is given below:
demiray@sud:~/workspace/SCOREF-MGMT/Software/bin$ ./SCOREF-MGMT MGMT.conf
2012/11/23-16:06:24 INFO: Management Information Base has been created
2012/11/23-16:06:24 INFO: Following 3 file(s) have been found (only those with .conf extension will be parsed): .svn, MGMT.IHM.conf, MGMT.conf
2012/11/23-16:06:24WARNING: There is a file named '.svn' without .conf extension in given list
2012/11/23-16:06:24 INFO: Parsing configuration file 'configuration/MGMT.IHM.conf'
2012/11/23-16:06:24 INFO: Adding IHM integer parameter [name:MIB_MC002_GROUPNUM, id:49408, value:0]
2012/11/23-16:06:24 INFO: Adding IHM string parameter [name:MIB_MC002_GROUP1, id:49409, value:NULL]
...
At this point GN and FAC can be started. Please refer to relevant documentation
on how to do it and let me know about errors if you encounter any.
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,10 +0,0 @@
Google C++ Testing Framework is used for SCOREF-MGMT, relevant
code and documentation can be found under test/ directory.
Unit tests can be compiled from root directory as well. To do so
issue following command,
$ make test
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,69 +0,0 @@
0. Introduction
This directory involves the simulation of GN and FAC to test these interfaces.
1. Dependencies
Python packages should be installed.
2. Building
There is no build for this tool, it's plain Python which is interpreted rather
than to be built, see section 3. Running.
3. Commands
Following commands are supported.
3.1. DEFINE Command Family
3.1.1. DEFINE SERVER_ADDRESS <address>
Defines the destination address (i.e. the MGMT-CORE's address)
3.1.2. DEFINE SERVER_PORT <port>
Defines the destination port (i.e. the MGMT-CORE's port)
3.1.3. DEFINE CLIENT_PORT <port>
Defines the client's port (i.e. source port that is used to send the packets to MGMT-CORE from)
3.1.4. DEFINE CLIENT_TYPE <clientType>
Defines client type and can be 'GN', 'FAC', or 'LTE'
Packets sent will have relevant event types and sub-types based on this client type
3.2. SEND Command Family
3.2.1. SEND COMMUNICATION_PROFILE_REQUEST
Sends a COMMUNICATION_PROFILE_REQUEST packet to MGMT-CORE's given port
NOTICE: Client type has to be defined in advance for this command since event sub-type
changes from client to client for this packet
3.2.2. SEND NETWORK_STATE
Sends a NETWORK_STATE packet to MGMT-CORE's given port
3.2.3. SEND WIRELESS_STATE
Sends a WIRELESS_STATE_RESPONSE packet to MGMT-CORE's given port
NOTICE: Client type has to be defined in advance for this command since event sub-type
changes from client to client for this packet
3.2.4. SEND LOCATION_UPDATE
Sends a LOCATION_UPDATE to MGMT-CORE's given port
3.2.5. SEND CONFIGURATION_NOTIFICATION
Sends a CONFIGURATION_NOTIFICATION to MGMT-CORE's given port
3.2.6. SEND GET_CONFIGURATION
Sends a GET_CONFIGURATION to MGMT-CORE's given port
NOTICE: Client type has to be defined in advance for this command since event sub-type
changes from client to client for this packet
3.3. Util Command Family
3.2.1. WAIT Command
Makes the simulator wait for the specified amount of seconds
4. Running
Since this simulator has been written in Python you need to have the Python interpreter.
In order to run first scenario file, for example, issue the following command,
$ python main.py scenarios/01.sce
5. References
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,42 +0,0 @@
0. Introduction
Google C++ Testing Framework is used for SCOREF-MGMT module's
test code.
1. Dependencies
On Ubuntu, libgtest-dev and libgtest0 packages are necessary
to link this code against Google's library. Refer to relevant
documentation on other systems.
On Ubuntu 12.04, though, you cannot find binary libraries and
you have to build them yourself. Do following in order to build
the binary (this directory is installed by libgtest-dev package)
$ cd /usr/src/gtest
# sudo cmake .
# sudo make
# sudo mv libg* /usr/lib/
2. Building
In this directory, running make is enough. Please let me know
if you encounter any compile-time or run-time errors.
$ make
Be informed that you may have to do 'make clean' before you
have an up-to-date binary since test_* files are designated as
header files and a change in them would not trigger a re-build
3. Running
In this directory, running the binary created by the compilation
process is enough. There are no command-line parameters currently.
$ ./TEST-SCOREF-MGMT
4. References
See Google documentation for further details regarding the test
framework,
http://code.google.com/p/googletest/
- Baris Demiray <baris.demiray@eurecom.fr>
-138
View File
@@ -1,138 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="0.1691293236">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1691293236" moduleId="org.eclipse.cdt.core.settings" name="Default">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="SCOREF-MGMT" buildProperties="" description="" id="0.1691293236" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
<folderInfo id="0.1691293236." name="/" resourcePath="">
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1329950294" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1329950294.880574658" name=""/>
<builder arguments="BUILD_DEBUG=1" command="make" id="org.eclipse.cdt.build.core.settings.default.builder.1499652288" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="-1" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.138388770" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
<tool id="org.eclipse.cdt.build.core.settings.holder.1825568501" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.565634738" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SCOREF-MGMT/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SCOREF-MGMT/src/packets}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SCOREF-MGMT/src/util}&quot;"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.4"/>
<listOptionValue builtIn="false" value="/usr/include/linux"/>
<listOptionValue builtIn="false" value="/usr/lib/gcc/i486-linux-gnu/4.4/include"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.4/i486-linux-gnu/"/>
<listOptionValue builtIn="false" value="/usr/include/boost"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.6/"/>
<listOptionValue builtIn="false" value="/usr/include/x86_64-linux-gnu/"/>
<listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-linux-gnu/4.6/include/"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.6/x86_64-linux-gnu/"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/IF.MGMT/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/IF.MGMT/src/packets}&quot;"/>
<listOptionValue builtIn="false" value="/usr/include/i386-linux-gnu/"/>
<listOptionValue builtIn="false" value="/usr/lib/gcc/i686-linux-gnu/4.6/include/"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.6/i686-linux-gnu/"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.6/ext/"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1522413688" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.1069615162" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1813440655" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SCOREF-MGMT/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SCOREF-MGMT/src/packets}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SCOREF-MGMT/src/util}&quot;"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.4"/>
<listOptionValue builtIn="false" value="/usr/include/linux"/>
<listOptionValue builtIn="false" value="/usr/lib/gcc/i486-linux-gnu/4.4/include"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.4/i486-linux-gnu/"/>
<listOptionValue builtIn="false" value="/usr/include/boost"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.6/"/>
<listOptionValue builtIn="false" value="/usr/include/x86_64-linux-gnu/"/>
<listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-linux-gnu/4.6/include/"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.6/x86_64-linux-gnu/"/>
<listOptionValue builtIn="false" value="/usr/include/i386-linux-gnu/"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/IF.MGMT/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/IF.MGMT/src/packets}&quot;"/>
<listOptionValue builtIn="false" value="/usr/lib/gcc/i686-linux-gnu/4.6/include/"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.6/i686-linux-gnu/"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.6/ext/"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.982448758" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
<tool id="org.eclipse.cdt.build.core.settings.holder.1854207819" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1738041884" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SCOREF-MGMT/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SCOREF-MGMT/src/packets}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/SCOREF-MGMT/src/util}&quot;"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.4"/>
<listOptionValue builtIn="false" value="/usr/include/linux"/>
<listOptionValue builtIn="false" value="/usr/lib/gcc/i486-linux-gnu/4.4/include"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.4/i486-linux-gnu/"/>
<listOptionValue builtIn="false" value="/usr/include/boost"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.6/"/>
<listOptionValue builtIn="false" value="/usr/include/x86_64-linux-gnu/"/>
<listOptionValue builtIn="false" value="/usr/lib/gcc/x86_64-linux-gnu/4.6/include/"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.6/x86_64-linux-gnu/"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/IF.MGMT/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/IF.MGMT/src/packets}&quot;"/>
<listOptionValue builtIn="false" value="/usr/include/i386-linux-gnu/"/>
<listOptionValue builtIn="false" value="/usr/lib/gcc/i686-linux-gnu/4.6/include/"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.6/i686-linux-gnu/"/>
<listOptionValue builtIn="false" value="/usr/include/c++/4.6/ext/"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1126765345" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="SCOREF-MGMT.null.1756841027" name="SCOREF-MGMT"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<scannerConfigBuildInfo instanceId="0.1695373966">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="0.881925981">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="0.1268694268">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="0.1691293236">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="refreshScope" versionNumber="1">
<resource resourceType="PROJECT" workspacePath="/SCOREF-MGMT"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
<buildTargets>
<target name="all" path="test" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments>-j</buildArguments>
<buildTarget>all</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
</buildTargets>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cproject>
-85
View File
@@ -1,85 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Software</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value>BUILD_DEBUG=1 -j</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>false</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>
<pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
</pydev_project>
@@ -1,65 +0,0 @@
eclipse.preferences.version=1
org.eclipse.cdt.codan.checkers.errnoreturn=Warning
org.eclipse.cdt.codan.checkers.errnoreturn.params={implicit\=>false}
org.eclipse.cdt.codan.checkers.errreturnvalue=Error
org.eclipse.cdt.codan.checkers.errreturnvalue.params={}
org.eclipse.cdt.codan.checkers.noreturn=Error
org.eclipse.cdt.codan.checkers.noreturn.params={implicit\=>false}
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={}
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={}
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={no_break_comment\=>"no break",last_case_param\=>true,empty_case_param\=>false}
org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={unknown\=>false,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=Info
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={}
org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={}
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=Warning
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={}
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={macro\=>true,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={paramNot\=>false}
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={else\=>false,afterelse\=>false}
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={macro\=>true}
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={macro\=>true}
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={macro\=>true,exceptions\=>("@(\#)","$Id")}
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
@@ -1,162 +0,0 @@
eclipse.preferences.version=1
org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.cdt.core.formatter.alignment_for_assignment=16
org.eclipse.cdt.core.formatter.alignment_for_base_clause_in_type_declaration=80
org.eclipse.cdt.core.formatter.alignment_for_binary_expression=16
org.eclipse.cdt.core.formatter.alignment_for_compact_if=0
org.eclipse.cdt.core.formatter.alignment_for_conditional_expression=80
org.eclipse.cdt.core.formatter.alignment_for_conditional_expression_chain=18
org.eclipse.cdt.core.formatter.alignment_for_constructor_initializer_list=0
org.eclipse.cdt.core.formatter.alignment_for_declarator_list=16
org.eclipse.cdt.core.formatter.alignment_for_enumerator_list=48
org.eclipse.cdt.core.formatter.alignment_for_expression_list=0
org.eclipse.cdt.core.formatter.alignment_for_expressions_in_array_initializer=16
org.eclipse.cdt.core.formatter.alignment_for_member_access=0
org.eclipse.cdt.core.formatter.alignment_for_overloaded_left_shift_chain=16
org.eclipse.cdt.core.formatter.alignment_for_parameters_in_method_declaration=16
org.eclipse.cdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
org.eclipse.cdt.core.formatter.brace_position_for_array_initializer=end_of_line
org.eclipse.cdt.core.formatter.brace_position_for_block=end_of_line
org.eclipse.cdt.core.formatter.brace_position_for_block_in_case=end_of_line
org.eclipse.cdt.core.formatter.brace_position_for_method_declaration=end_of_line
org.eclipse.cdt.core.formatter.brace_position_for_namespace_declaration=end_of_line
org.eclipse.cdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.cdt.core.formatter.brace_position_for_type_declaration=end_of_line
org.eclipse.cdt.core.formatter.comment.min_distance_between_code_and_line_comment=1
org.eclipse.cdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
org.eclipse.cdt.core.formatter.compact_else_if=true
org.eclipse.cdt.core.formatter.continuation_indentation=2
org.eclipse.cdt.core.formatter.continuation_indentation_for_array_initializer=2
org.eclipse.cdt.core.formatter.format_guardian_clause_on_one_line=false
org.eclipse.cdt.core.formatter.indent_access_specifier_compare_to_type_header=true
org.eclipse.cdt.core.formatter.indent_access_specifier_extra_spaces=0
org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_access_specifier=true
org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_namespace_header=true
org.eclipse.cdt.core.formatter.indent_breaks_compare_to_cases=true
org.eclipse.cdt.core.formatter.indent_declaration_compare_to_template_header=false
org.eclipse.cdt.core.formatter.indent_empty_lines=false
org.eclipse.cdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.cdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.cdt.core.formatter.indentation.size=4
org.eclipse.cdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_after_template_declaration=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_before_colon_in_constructor_initializer_list=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_before_identifier_in_function_declaration=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
org.eclipse.cdt.core.formatter.insert_new_line_in_empty_block=insert
org.eclipse.cdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.cdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_arguments=insert
org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_parameters=insert
org.eclipse.cdt.core.formatter.insert_space_after_closing_brace_in_block=insert
org.eclipse.cdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_base_clause=insert
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_case=insert
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_conditional=insert
org.eclipse.cdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_base_types=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_declarator_list=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_expression_list=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_arguments=insert
org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_parameters=insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_arguments=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_parameters=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_bracket=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_exception_specification=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.cdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.cdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.cdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.cdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_arguments=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_parameters=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_bracket=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_exception_specification=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_base_clause=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_case=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_conditional=insert
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_default=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_base_types=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_declarator_list=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_expression_list=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_arguments=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_parameters=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_arguments=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_parameters=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_block=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_namespace_declaration=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_bracket=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_exception_specification=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_for=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_if=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.cdt.core.formatter.insert_space_before_postfix_operator=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_prefix_operator=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.cdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.cdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.cdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
org.eclipse.cdt.core.formatter.insert_space_between_empty_brackets=do not insert
org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_exception_specification=do not insert
org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
org.eclipse.cdt.core.formatter.join_wrapped_lines=true
org.eclipse.cdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.cdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.cdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.cdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.cdt.core.formatter.lineSplit=120
org.eclipse.cdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.cdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.cdt.core.formatter.tabulation.char=tab
org.eclipse.cdt.core.formatter.tabulation.size=4
org.eclipse.cdt.core.formatter.use_tabs_only_for_leading_indentations=false
@@ -1,3 +0,0 @@
eclipse.preferences.version=1
formatter_profile=_EURECOM
formatter_settings_version=1
-397
View File
@@ -1,397 +0,0 @@
v1.9.0 (released on February 5, 2013)
* SCOREF-MGMT.doxyfile has been updated
* Doxygen documentation as a single PDF file has been added
v1.8.1
* CONF_LOG_LEVEL parameter added to MGMT.conf file with levels from 0 to 4
* ManagementServer::send() method added to add a boost::lock_guard easier
* Bugfix Logger::log() was not checking against log levels before printing out given message
v1.8.0 (released on January 23, 2013)
* No changes on anything but version number
v1.7.5
* Bugfix LOCATION_UPDATE scenario should be for FAC, not for GN
* Location updates are now not generated but `relayed' as we receive it from FAC-CM
* A new task PacketHandlerResult::RELAY_TO_GN added
* Now Communication Profile 3 is not offered to anybody (CP1 took over)
v1.7.4
* Communication profile selection document (by Michelle) has been added under Documents/
* CONF_IPV6_ENABLED configuration file parameter has been added
* CommunicationProfileManager::selectProfile() method is now implemented
v1.7.3
* ../Documentation/SCOREF\ Integration\ Test\ Specification added
* Scenario for CONFIGURATION_NOTIFICATION is now for FAC as it should be
v1.7.2
* README.RELEASE file added
* make-release.sh now removes temporary files
v1.7.1
* make-release.sh file added
v1.7.0 (released on January 8, 2013)
* Version 7 of the document CM-GN to MGMT-CORE Interface Definition added
* Version 7 of the document FAC-CM to MGMT-CORE Interface Definition added
* Sequence number added into GeonetCommunicationProfileRequestPacket and
GeonetCommunicationProfileResponsePacket as requested by INRIA
* Simulator now sends COMM_PROF_SEL_REQ with new sequence number feature
* Bugfix A very stupid bitwise error fixed in GeonetPacket
v1.6.2
* Sequence number added into FacCommunicationProfileSelectionRequestPacket and
FacCommunicationProfileSelectionResponsePacket
* Bugfix Faulty Event Type/Subtype values are corrected for FAC packets
* Scenario files of the simulator have been given 'human-readable' names
v1.6.1
* LteWirelessStateResponse updated and InterfaceID & Status fields added
* Simulator updated accordingly
* Initial version of LTE-CM to MGMT Interface Description added to ../Documentation
v1.6.0 (released on 21 Dec 2012)
* Release version
v1.5.4
* New scenarios added for the simulator
* Wireless Status packet sent by the simulator updated according to the new LTE Wireless Status
* LteWirelessStateResponseEventPacket class added for the new LTE Wireless Status
* Bugfix Mutex control added for Logger class to prevent log messages from intermingling
* Network Status message now has a `timestamp' field as HITACHI asked
v1.5.3
* LTE client type and event type/subtype for Wireless State Response added
* Bugfix Wireless interface ID is now displayed correctly
* Bugfix Update error for already-present interface IDs in MIB::updateWirelessState() is fixed
* Simulator is now able to send unsolicited WIRELESS_STATE_RESPONSE
v1.5.2
* Simulator updated to make it send custom messages based on the client type
(for CONF_REQ and COMM_PROF_REQ packages)
* START and END commands removed from the command set of the simulator
* ../Documentation/FAC-CM... file's 5th version added
v1.5.1
* ../Design/UML/ directory added with sequence diagrams
* Another state control mechanism added for Wireless State Requests
* Network State information (received from GN) is now printed
* ../Documentation/SCOREF-Progress updated to 1.3
v1.5.0 (released on 30 Nov 2012)
* Bugfix Error with exception handling of boost ioservice handlers fixed
* Bugfix Parsing error with Extended and Valid fields of MessageHeader fixed
v1.4.1
* ../Documentation/SCOREF-MGMT\ Progress.{doc|pdf} file updated to v1.2
v1.4.0 (released on 28 Nov 2012)
* FAC-CM and MGMT-CORE interface documents' older versions have been added
* GN and MGMT-CORE interface documents' older versions have been added
* TODO.cppcheck file updated after fixes done to remove warnings
* Intelligent code's place (for profile selection) clarified
* ITS key data type handling now handles string and float types correctly
* Bugfix ManagementServer exceptions are now handled
* Bugfix FAC messages are now recognized to mark a client as 'ONLINE'
* Util::getDateAndTime() is now shorter and smarter
v1.3.5
* Client state CONNECTED removed, now there are ONLINE and OFFLINE only
* test/simulation/README update with scenario file information
* ../Documentation/SCOREF-MGMT Progress.pdf file added
v1.3.4
* These documentation files have been updated: README.RUNNING, README.HEADER_TEMPLATE, README.BUILD, README
v1.3.3
* CONF_LOCATION_UPDATE_INTERVAL removed from the configuration file, functionality is kept, though
* Bugfix Incoming buffer size is now validated in GeonetWirelessStateRequestEventPacket::serialize()
* InquiryThread's interface has been changed a little, now it receives ManagementServer functionality
as a IManagementPacketSender interface not to expose everything to the thread
v1.3.2
* ItsKeyManager error code has been changed to 0xDEAD from 0xEEEE
* GN addresses are now printed the same way HITACHI does
* ManagementClient does not have anything to do with neither UdpSocket nor
boost::thread anymore, they're handled by ManagementServer now
* InquiryThread doesn't play with UdpSocket anymore either, it merely notifies
ManagementServer to do what is necessary
* Bugfix Size check in FacConfigurationNotificationPacket::parse() doesn't
discard valid packets anymore
v1.3.1
* CONFIGURATION_NOTIFICATION packet of FACilities added to simulator
* A new scenario file 04.sce has been added for CONFIGURATION_NOTIFICATION
* CONFIGURATION_NOTIFICATION packet is now handled correctly and GN is being notified by a
CONFIGURATION_AVAILABLE packet
* ManagementClientManager::updateManagementClientState() doesn't handle packets anymore
and LOCATION_TABLE_REQUEST is now sent by ManagementServer upon the connection of a GN client
* Bugfix ConfigurationAvailable now resizes the serialized buffer correctly
v1.3.0 (released on 19 Nov 2012)
* Now simulator can send LOCATION_UPDATE
* Bugfix GeonetPacket::serialise() now validates incoming buffer size
* ManagementServer class introduced and caused intensive changes in main.cpp
* Client type is now recognized better according to the event type/subtypes
v1.2.2
* test/simulation/README updated
* test/simulation/packet.py's communication profile request code updated with Andrea's sample
* Bugfix Communication Profile filtering is now handled correctly
v1.2.1
* Simulator can now send COMMUNICATION_PROFILE_REQUEST
* A new scenerio file named 02.sce added for Communication Profile tests
* Bugfix Rx buffer resize error, now it's set to RX_BUFFER_SIZE correctly
* `extended', `valid', `version', and `priority' fields of packet header are now parsed
* Bugfix Local variable reference error mgmt_comm_prof_manager.cpp
* Bugfix Communication profile pass-by-value in mgmt_comm_prof_manager.cpp
* Bugfix Location table response is now parsed correctly
* Incoming Location Update is now parsed and MIB is updated
* Incoming filter sent thru COMM_PROF_REQ is now used to filter Communication Profiles
* -v and --version parameters are now recognized
v1.2.0 (released on 5 Nov 2012)
* UdpServer class renamed as UdpSocket
* ManagementClient class has its own socket now (currently not in use, though)
* README.RUNNING updated with FACilities configuration files directory
v1.1.13
* Bugfix erase/remove idiom error is fixed in mgmt_configuration.cpp
* PacketHandlerResult class is created to carry the result and the response packet if there's one
* PacketHandler does not have access to the socket anymore
v1.1.12
* Bugfix Invalid iterator in Communication Profile Response code
* PacketHandler now returns relevant task
* Bugfix Erase-remove idiom fixed in Configuration code
* Initial code for CONFIGURATION UPDATE AVAILABLE sending
v1.1.11
* Cppcheck corrections made
v1.1.10
* Bugfix for sample configuration lines given inside comments in a .conf file
* Bugfix Simulator now binds on a port to keep source port constant
* DEFINE_CLIENT_PORT command added for scenario files
* Bugfix Address copying error causing creation of bogus client objects in ManagementClient fixed
* Bugfix State comparison inside ManagementClient::setState() fixed
* Bugfix Stupid increment operator usage has been fixed for ManagementClientManager::updateMan...
v1.1.9
* Documentation/SCOREF-MGMT_Configuration.{odt|pdf} files have been updated according
to the new scheme introduced by FACilities configuration files
* bin/IF.MGMT.conf file renamed as bin/MGMT.conf
* New header and instructions have been added into bin/configuration/MGMT.IHM.conf file
* README.RUNNING and bin/valgrind.sh files updated according to configuration file name change
* Now Configuration class is able to parse any .conf extensioned file under some certain directory
* Exceptions thrown by unit test methods handled
* Unit tests written for new Util methods
* EURECOM's address has been updated in every file's header
* Bugfix for Exception::printStackTrace() code causing SIGSEGV
v1.1.8
* test/ directory reorganised and simulation/ and unittest/ directories have been added
* A basic simulator reading files under simulation/scenarios and doing what's written
has been added
v1.1.7
* TODO.cppcheck file added for static analysis (currently empty since all the notifications
have been fixed)
* Bugfix:cppcheck: Unnecessary copy creation for exceptions
* Bugfix:cppcheck: Inefficient vector size check
* Bugfix:cppcheck: Uninitialised members
* Bugfix:cppcheck: Redundant wide scopes of some variables have been reduced
* New include path has been added for sys/types.h and README.BUILD.ECLIPSE.PATHS.xml updated
v1.1.6
* Logger::LOG_OUTPUT_CHANNEL enumeration added to control log output channel as
FILE, STDOUT, BOTH, or NONE
* Unit tests for all Configuration class methods have been added
* Number of all the ITS keys is now calculated correctly in ItsKeyManager::getNumberOfKeys()
* Configuration::parseConfigurationFiles() now verifies if there's any configuration file to parse
* Configuration::setServerPort() now checks incoming port number against the real max value
* Bugfix in Util::unsetBit()
* Bugfix in Util::encodeBits()
* Bugfix in Util::trim()
* test/test_configuration_util.hpp added for utility methods of Configuration class' test
* test/data directory and test configuration files have been added
* OO code in test/main.cpp moved to test/main.hpp
* test/README updated according to new installation of Google C++ Testing Framework on Ubuntu 12.04
v1.1.5
* GeonetPacketFactory class has been renamed as ManagementPacketFactory
* Google C++ Testing Framework has been utilised
- test/ directory and test codes added
- README.TEST has been added
* Util::resetBuffer()'s and copyBuffer()'s parameters has been changed to
unsigned char* since size parameter is given in "bytes" and this could lead
to errors if resetBuffer() is given an array with elements greater than byte in size
* In Util class, boundary check errors have been fixed in encode8byteInteger(),
encode4byteInteger(), and encode2byteInteger() methods
* Redundant comment block has been removed from mgmt_util.hpp
* Software/Makefile has been modified after adding test/main.cpp to skip test
code's main() method
v1.1.4
* Communication Profile ID field of Communication Profile Selection Response packet
has been resized to 4 bytes and a 1-byte reserved field has been added to keep the alignment
* FacCommunicationProfileSelectionResponsePacket::serialize() updated accordingly
v1.1.3
* FacConfigurationNotification class has been added to get configuration updates from
FACilities thru UDP socket
* ItsKeyValue become a struct to support float and string values
* ItsKeyManager now can handle float and string values
* Configuration class now can parse float and string values (given with quotes)
* mgmt_types.hpp file's symbolic constants have been fixed
* VariableSizeConfigurationItem is introduced to support string-type configuration values
v1.1.2
* Configuration class now can handle more than one configuration file
* IF.IHM.conf file added for PCVE IHM parameters
* <parameterName|parameterId> format parsing has been added for IHM parameters
* ItsKey can also hold string values of configuration items
* Configuration file name is hardcoded now, the only parameter there is optional log file name
v1.1.1
* Util::printHexRepresentation() off-by-one index error fixed
* FAC message type & subtypes have been added
* Now both BTP_A and BTP_B flags are set upon finding BTP in a communication profile definition
* mgmt_gn_datatypes.h file has been renamed as mgmt_types.h
* Type property added for management clients (now they also may be Facilities client)
* FacCommunicationProfileSelectionRequestPacket and FacCommunicationProfileSelectionResponsePacket
packets have been added
v1.1.0 (released on 13 Aug 2012)
* README.* files have been updated and version elevated to 1.1.0
v1.0.23
* OpenDocument format of configuration manual has been added
* Location Update (0x100) packet and a corresponding configuration parameter has been added
Now both Wireless State Update and Location Update can be sent on different time intervals
v1.0.22
* Eclipse project file updated to use multiple g++ instances to build faster
* Communication profile parsing error fixed (NULL at the end is now trimmed to match std::map key)
* Communication profile off-by-one error fixed (profile item indexes were calculated as +1)
* Location Table Request is now sent by ManagementClient in its constructor
* State changes has been revised to make one more state valid
* Incoming packets are now passed to ManagementClientManager to update its state
* Util::getBinaryRepresentation() and Util::trim() methods added
* Makefile now compiles each file separately, which makes build faster for re-compilation
* Makefile parameters has been updated and README.BUILD file has been updated accordingly
* Makefile.sources file is no more used, files are found by shell command in Makefile
v1.0.21
* Location Table Request is now handled by ManagementClient
* State changes are now verified in ManagementClient
v1.0.20
* ManagementClient objects are now managed by ManagementClientManager
* ManagementClient now has InquiryThread and ManagementClientState
* Packet handler now sends replies itself
* InquiryThread is now aware of UDP connection
* Util::printHexRepresentation() is now in line with log format
* TRACE level has been added as a log level
v1.0.19
* Bugfix for string + integer concatenation using boost::lexical_cast
* util/Exception class has been added and utilised for stack trace printing
* Min/max values are defined for ITS keys and checked using try/catch with new Exception class
* c2x_update_gn_address_event structure has been removed since it's no more used
* More doxygen comments have been added and more debug messages have been removed
v1.0.18
* InquiryThread class has been added for sending repetitive Wireless State Request
* Doxygen file has been renamed to SCOREF-MGMT.doxygen
* README.BUILD.ECLIPSE.PATHS.xml file has been updated with new versions of used libraries
* Standard I/O is no more used anywhere, instead Logger class has been utilised
* Command-line parameter parser has been added but #ifdef'ed out to wait version 1.50.0 of Boost
v1.0.17
* SCOREF-MGMT_Configuration.pdf file has been added under Documentation/
v1.0.16
* Openair source file template has been prepended to every source file
* README.HEADER_TEMPLATE file has been added
* 'CM-GN Interface Definition_v4.pdf' and
'ITS Station Management Core - Low Level Description.pdf' files has been
added under Documentation/ and Documentation/README file has been updated
* Doxygen documentation has been added for mgmt_its_key_manager.hpp file
v1.0.15
* README.BUILD.ECLIPSE.PATHS.xml file updated with Boost path
* Communication profiles defined in L221-4.1.3 are entered into conf. file
* Communication profiles are now parsed from configuration file
* UdpServer and Util classes are moved into util/ directory
* A primitive Log class has been added
v1.0.14
* Wireless State response/request is now separate (not tested)
v1.0.13
* Compilation error fixed in main.cpp
* Doxygen comments for UdpServer class has been added
v1.0.12
* Forgotten UDP server class committed and version numbers are corrected
v1.0.11
* Missing Doxygen tags added
v1.0.10
* ManagementClient added and client state is now kept per-client basis
v1.0.9
* Communication profile request and response packets added
* README.BUILD.ECLISE and README.BUILD.ECLIPSE.CODING_STYLE.xml
files added for Eclipse development instructions
* GeonetMessageHandler now keeps client state and sends bulk configuration
if corresponding request has been lost
v1.0.8
* ITS parameters are now classified and processed accordingly
* ItsKeyManager class added to split ITS configuration code
* Linkage parameters are re-ordered in Makefile
v1.0.7
* UdpServer.{cpp|hpp} updated and main() code clarified
v1.0.6
* Parameter parsing error fixed
* FAC_ parameters added into configuration file
* Wireless State response parser added (not tested)
* README.BUILD.ECLIPSE file added
v1.0.5
* Makefile (and Makefile.sources) file added to remove development ties with
Eclipse and README.BUILD file updated accordingly
v1.0.4 (released on 23 May 2012)
* ITS key values are updated and classified as FAC and NET
* Wireless state and network state packets added
* Location table is now asked and response is parsed
v1.0.3
* Doxygen file added (IF.MGMT.doxyfile)
v1.0.2
* Configuration file added
* Configuration file is no more hard-coded but read as a command-line parameter
* UDP server port number is no more hard-coded but read from configuration file
* All 22 parameters are encoded into Set Configuration bulk message
* Comment lines written for most header files/classes/methods
* Faulty `key count' field encode fixed
v1.0.1
* `Get Configuration' message is parsed and replied with a "partial"
bulk Set Configuration message
v1.0.0
* Initial version
* Mostly structural code, almost nothing functional
- Baris Demiray <baris.demiray@eurecom.fr>
-674
View File
@@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
-54
View File
@@ -1,54 +0,0 @@
CPP=g++
RM=rm
ECHO=echo
STRIP=strip
CPP_FILES:=$(shell find ./src/ -iname '*.cpp')
OBJ_FILES=$(CPP_FILES:.cpp=.o)
EXE_FILE=bin/SCOREF-MGMT
CPPFLAGS=-Wall
LDFLAGS=-lboost_system -lboost_filesystem -lboost_thread -lboost_program_options
INCLUDE=-Isrc/ -Isrc/packets/ -Isrc/util/
TEST_DIR=test/
TEST_EXE=TEST-SCOREF-MGMT
OPT_FLAGS=-O3
DEBUG_FLAGS=-O0 -g3
STATIC_FLAGS=-static
# Default is dynamic build
BUILD_FLAGS=$(OPT_FLAGS)
ifdef BUILD_DEBUG
BUILD_FLAGS=$(DEBUG_FLAGS)
endif
ifdef BUILD_STATIC
BUILD_FLAGS=$(STATIC_FLAGS)
LDFLAGS=-static -lboost_system -lboost_filesystem -lboost_thread -pthread
endif
ifdef BUILD_DYNAMIC
BUILD_FLAGS=$(OPT_FLAGS)
endif
all: $(CPP_FILES) binary
binary: $(CPP_FILES) $(OBJ_FILES)
$(CPP) $(OBJ_FILES) -o $(EXE_FILE) $(LDFLAGS)
strip:
$(STRIP) $(EXE_FILE) &> /dev/null
test: binary
echo "Building test code..."
cd $(TEST_DIR)
make -f Makefile
cd -
echo "Unit tests are ready to be run under test/ directory"
clean:
$(RM) -fv $(EXE_FILE)
$(RM) -fv $(TEST_DIR)/$(TEST_EXE)
find . -iname "*.o" -exec rm -fv {} \;
.cpp.o:
$(CPP) -c $(BUILD_FLAGS) $(CPPFLAGS) $< -o $@
-48
View File
@@ -1,48 +0,0 @@
~ SCOREF Management Module Implementation (SCOREF-MGMT) ~
SCOREF-MGMT is a server application currently having the interfaces to
GN (GeoNetworking) and FAC (Facilities) modules. Further developments
such as OpenAirInterface integration are scheduled.
For MGMT-GN interface all the packets defined in "CM-GN Interface Definition
" (currently v4) are implemented and used,
100 LOCATION_UPDATE (supported/implemented but not used)
101 LOCATION_TABLE_REQ
102 LOCATION_TABLE_RES
300 CONFIGURATION_UPDATE_AVAILABLE
301 CONFIGURATION_REQ
302 CONFIGURATION_RES_CONT
303 CONFIGURATION_RES_BULK
304 COMM_PROF_REQ
305 COMM_PROF_REP
402 WIRELESS_STATE_REQ
403 WIRELESS_STATE_RES
404 NETWORK_STATE
For MGMT-FAC interface, following packets defined in "FAC-CM to MGMT Interface
description" (currently v4) are implemented and/or used,
110 LOCATION_UPDATE (supported/implemented but not used)
300 CONFIGURATION_UPDATE_AVAILABLE
311 CONFIGURATION_REQUEST
312 CONFIGURATION_RES_CONT
313 CONFIGURATION_RES_BULK
314 CONFIGURATION_NOTIFICATION
315 COMM_PROF_REQ
316 COMM_PROF_REP
317 COMM_PROF_SELECTION_REQ (supported/implemented but not used)
318 COMM_PROF_SELECTION_RES (supported/implemented but not used)
Please refer to following files for further information, directories given in parenthesis
belong to SCOREF SVN,
- (Software/SoftwareComponents/MGMT/CORE/Documentation/)CM-GN Interface Definition_v4.pdf
- (Software/SoftwareComponents/MGMT/CORE/Documentation/)FAC-CM Interface Definition.pdf
- (Software/SoftwareComponents/MGMT/CORE/Documentation/)ITS Station Management Core - Low Level Description.pdf
- (Software/SoftwareComponents/MGMT/CORE/Documentation/)SCOREF-MGMT_Configuration.pdf
- README.BUILD (not available in releases, check OpenAirInterface SVN)
- README.DOCUMENTATION (not available in releases check OpenAirInterface SVN)
- README.RUNNING
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,43 +0,0 @@
SCOREF-MGMT has three build configurations which are all ready to be used
through the Makefile. These are,
1) Debug Configuration
Definition: Debug flags are on, optimisation is off, to be
run inside GDB, etc.
Command: Define make variable `BUILD_DEBUG' as
$ make BUILD_DEBUG=1
and relevant binary will be created in bin/
2) Dynamic Configuration
Definition: Optimisation flags are on, dynamic linkage, for
deployment (along with necessary libraries) or local use
Command: Define make variable `BUILD_DYNAMIC' as
$ make BUILD_DYNAMIC=1
and binary will be created in bin/
3) Static Configuration
Definition: Static linkage, to be sent to other people
and/or companies whom may not have necessary libraries
installed
Command: Define make variable `BUILD_STATIC' as
$ make BUILD_STATIC=1
and binary will be created in bin/
For Dynamic and Static configurations the make target `strip' may be used
to save space by removing symbols in the binary as follows,
$ make strip
For Eclipse development see README.BUILD.ECLIPSE file.
Please let me know in case of a build error sending relevant library
versions, platform, etc. information.
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,13 +0,0 @@
For Eclipse development, import the directory as "Existing code as Makefile
Project" and from "C/C++ General"/Paths and Symbols define those include
paths listed in README.BUILD.ECLIPSE.PATHS (those may change according to
installed libraries, etc. use Index/Search for 'Unresolved Includes' menu
item to find out directories for your own system. A sample path list is given
in README.BUILD.ECLIPSE.PATHS.xml file.
Coding style is given in README.BUILD.ECLIPSE.CODING_STYLE.xml file and may
be imported through Eclipse's Project Properties/C/C++ General/Coding Style
configuration window.
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,155 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="1">
<profile kind="CodeFormatterProfile" name="EURECOM" version="1">
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.lineSplit" value="120"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_base_types" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_exception_specification" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_base_types" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_access_specifier" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_exception_specification" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_arguments" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_declarator_list" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_bracket" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_enumerator_list" value="48"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_declarator_list" value="16"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_empty_lines" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_arguments" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_colon_in_base_clause" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_declarator_list" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_between_empty_brackets" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_bracket" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_block" value="end_of_line"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_arguments" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_expression_list" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_parameters" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_expression_list" value="0"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_parameters" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_conditional_expression" value="80"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_access_specifier_compare_to_type_header" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_body_declarations_compare_to_namespace_header" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_compact_if" value="0"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_template_parameters" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_expression_list" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_exception_specification" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_before_identifier_in_function_declaration" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_base_clause_in_type_declaration" value="80"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_between_empty_parens_in_exception_specification" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_declaration_compare_to_template_header" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_statements_compare_to_block" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_template_arguments" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_angle_bracket_in_template_parameters" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_parameters" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
<setting id="org.eclipse.cdt.core.formatter.compact_else_if" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_colon_in_base_clause" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_after_template_declaration" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_namespace_declaration" value="end_of_line"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_angle_bracket_in_template_arguments" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_brace_in_namespace_declaration" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_bracket" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_closing_angle_bracket_in_template_parameters" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_angle_bracket_in_template_arguments" value="do not insert"/>
</profile>
</profiles>
@@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<cdtprojectproperties>
<section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.IncludePaths">
<language name="holder for library settings">
</language>
<language name="Assembly">
<includepath>/usr/include</includepath>
<includepath workspace_path="true">/SCOREF-MGMT/src</includepath>
<includepath workspace_path="true">/SCOREF-MGMT/src/packets</includepath>
<includepath workspace_path="true">/SCOREF-MGMT/src/util</includepath>
<includepath>/usr/include/c++/4.4</includepath>
<includepath>/usr/include/linux</includepath>
<includepath>/usr/lib/gcc/i486-linux-gnu/4.4/include</includepath>
<includepath>/usr/include/c++/4.4/i486-linux-gnu/</includepath>
<includepath>/usr/include/boost</includepath>
<includepath>/usr/include/c++/4.6/</includepath>
<includepath>/usr/include/x86_64-linux-gnu/</includepath>
<includepath>/usr/lib/gcc/x86_64-linux-gnu/4.6/include/</includepath>
<includepath>/usr/include/c++/4.6/x86_64-linux-gnu/</includepath>
<includepath>/usr/include/i386-linux-gnu/</includepath>
</language>
<language name="GNU C++">
<includepath>/usr/include</includepath>
<includepath workspace_path="true">/SCOREF-MGMT/src</includepath>
<includepath workspace_path="true">/SCOREF-MGMT/src/packets</includepath>
<includepath workspace_path="true">/SCOREF-MGMT/src/util</includepath>
<includepath>/usr/include/c++/4.4</includepath>
<includepath>/usr/include/linux</includepath>
<includepath>/usr/lib/gcc/i486-linux-gnu/4.4/include</includepath>
<includepath>/usr/include/c++/4.4/i486-linux-gnu/</includepath>
<includepath>/usr/include/boost</includepath>
<includepath>/usr/include/c++/4.6/</includepath>
<includepath>/usr/include/x86_64-linux-gnu/</includepath>
<includepath>/usr/lib/gcc/x86_64-linux-gnu/4.6/include/</includepath>
<includepath>/usr/include/c++/4.6/x86_64-linux-gnu/</includepath>
<includepath>/usr/include/i386-linux-gnu/</includepath>
</language>
<language name="GNU C">
<includepath>/usr/include</includepath>
<includepath workspace_path="true">/SCOREF-MGMT/src</includepath>
<includepath workspace_path="true">/SCOREF-MGMT/src/packets</includepath>
<includepath workspace_path="true">/SCOREF-MGMT/src/util</includepath>
<includepath>/usr/include/c++/4.4</includepath>
<includepath>/usr/include/linux</includepath>
<includepath>/usr/lib/gcc/i486-linux-gnu/4.4/include</includepath>
<includepath>/usr/include/c++/4.4/i486-linux-gnu/</includepath>
<includepath>/usr/include/boost</includepath>
<includepath>/usr/include/c++/4.6/</includepath>
<includepath>/usr/include/x86_64-linux-gnu/</includepath>
<includepath>/usr/lib/gcc/x86_64-linux-gnu/4.6/include/</includepath>
<includepath>/usr/include/c++/4.6/x86_64-linux-gnu/</includepath>
<includepath>/usr/include/i386-linux-gnu/</includepath>
</language>
</section>
<section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.Macros">
<language name="holder for library settings">
</language>
<language name="Assembly">
</language>
<language name="GNU C++">
</language>
<language name="GNU C">
</language>
</section>
</cdtprojectproperties>
@@ -1,10 +0,0 @@
Please find .doxygen file in the root directory of the project.
Following command will generate source code documentation in ./doc/
directory.
$ doxygen SCOREF-MGMT.doxygen
More documentation, especially on control & data flow, will be added
over time. Class diagrams may be reached through Doxygen documentation.
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,40 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file <filename>.{hpp|cpp}
* \brief <brief>
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
@@ -1,41 +0,0 @@
~ SCOREF Management Module Release ~
SCOREF-MGMT module releases involve statically-built binaries,
configuration files and relevant documentation. There is a script
in the root of Software/ (same with this document) directory named
make-release.sh and it can be used as follows.
Firstly, one has to ensure that there are no build errors as the
script doesn't check for these.
Then you can run the script giving the version name as follows,
demiray@sud:~/workspace/SCOREF-MGMT/Software$ ./make-release.sh v1.8.0
Building the version v1.8.0
Preparing the release...
Copying binary...
Copying configuration files...
Copying documentation...
Preparing the compressed archive...
Removing temporary directory...
Release is ready
The compressed archive of the release will be ready in the same directory,
demiray@sud:~/workspace/SCOREF-MGMT/Software$ ls -l SCOREF-MGMT-v1.8.0.tar.bz2
-rw-r--r-- 1 demiray umts 705692 Jan 11 16:34 SCOREF-MGMT-v1.8.0.tar.bz2
In this archive file there are the documents listed below,
demiray@sud:~/workspace/SCOREF-MGMT/Software$ tar jtf SCOREF-MGMT-v1.8.0.tar.bz2
SCOREF-MGMT-v1.8.0/
SCOREF-MGMT-v1.8.0/MGMT.conf
SCOREF-MGMT-v1.8.0/SCOREF-MGMT
SCOREF-MGMT-v1.8.0/configuration/
SCOREF-MGMT-v1.8.0/configuration/MGMT.IHM.conf
SCOREF-MGMT-v1.8.0/README.RUNNING
SCOREF-MGMT-v1.8.0/README
This file is ready to be put on SVN or to be sent to project partners.
- Baris Demiray <baris.demiray@eurecom.fr>
@@ -1,36 +0,0 @@
~ SCOREF Management Module Implementation ~
SCOREF-MGMT is a server application that handles messages sent from
GN (GeoNetworking) and FAC (Facilities) modules. Since SCOREF-MGMT is
the server it has to be started before these modules. SCOREF-MGMT
expects two command-line arguments having one optional, and they are
configuration file and optional log file name, respectively. If there
already is a log file with the same name it will be renamed (appending
date and time to its current name) and a new file will be created.
All the output is directed to this file and to standard output only for
debugging purposes. Further versions will write to the log file only.
[demiray@leynes test]$ ./SCOREF-MGMT MGMT.conf [LogFileName]
After SCOREF-MGMT is started it'll read given configuration file along
with those it finds under configuration/ directory (see Section 2.
Configuration File for FACilities in Software/SoftwareComponents/ \
MGMT/CORE/Documentation/SCOREF-MGMT_Configuration.pdf) and update local
configuration (such as UDP server port) and MIB (Management Information
Base) parameters, then it'll start listening for incoming connections on
UDP port defined by CONF_SERVER_PORT parameter in the configuration file.
Output of a sample run is given below:
demiray@sud:~/workspace/SCOREF-MGMT/Software/bin$ ./SCOREF-MGMT MGMT.conf
2012/11/23-16:06:24 INFO: Management Information Base has been created
2012/11/23-16:06:24 INFO: Following 3 file(s) have been found (only those with .conf extension will be parsed): .svn, MGMT.IHM.conf, MGMT.conf
2012/11/23-16:06:24WARNING: There is a file named '.svn' without .conf extension in given list
2012/11/23-16:06:24 INFO: Parsing configuration file 'configuration/MGMT.IHM.conf'
2012/11/23-16:06:24 INFO: Adding IHM integer parameter [name:MIB_MC002_GROUPNUM, id:49408, value:0]
2012/11/23-16:06:24 INFO: Adding IHM string parameter [name:MIB_MC002_GROUP1, id:49409, value:NULL]
...
At this point GN and FAC can be started. Please refer to relevant documentation
on how to do it and let me know about errors if you encounter any.
- Baris Demiray <baris.demiray@eurecom.fr>
-10
View File
@@ -1,10 +0,0 @@
Google C++ Testing Framework is used for SCOREF-MGMT, relevant
code and documentation can be found under test/ directory.
Unit tests can be compiled from root directory as well. To do so
issue following command,
$ make test
- Baris Demiray <baris.demiray@eurecom.fr>
File diff suppressed because it is too large Load Diff
-4
View File
@@ -1,4 +0,0 @@
- A document having doxygen-generated class diagrams (and more) will be produced
- boost::property_tree::ini_parser could be utilised for configuration file parse
- Baris Demiray <baris.demiray@eurecom.fr>
-100
View File
@@ -1,100 +0,0 @@
Checking ../SCOREF-MGMT/Software/src/main.cpp...
Checking ../SCOREF-MGMT/Software/src/main.cpp: BOOST_VERSION_1_50...
Checking ../SCOREF-MGMT/Software/src/main.cpp: UNUSED...
1/31 files checked 3% done
Checking ../SCOREF-MGMT/Software/src/mgmt_client.cpp...
2/31 files checked 6% done
Checking ../SCOREF-MGMT/Software/src/mgmt_client_manager.cpp...
3/31 files checked 10% done
Checking ../SCOREF-MGMT/Software/src/mgmt_comm_prof_manager.cpp...
4/31 files checked 17% done
Checking ../SCOREF-MGMT/Software/src/mgmt_configuration.cpp...
[../SCOREF-MGMT/Software/src/mgmt_configuration.cpp:246]: (warning) Return value of std::remove() ignored. Elements remain in container.
[../SCOREF-MGMT/Software/src/mgmt_configuration.cpp:248]: (warning) Return value of std::remove() ignored. Elements remain in container.
5/31 files checked 25% done
Checking ../SCOREF-MGMT/Software/src/mgmt_information_base.cpp...
6/31 files checked 32% done
Checking ../SCOREF-MGMT/Software/src/mgmt_inquiry_thread.cpp...
7/31 files checked 33% done
Checking ../SCOREF-MGMT/Software/src/mgmt_its_key_manager.cpp...
8/31 files checked 38% done
Checking ../SCOREF-MGMT/Software/src/mgmt_packet_factory.cpp...
Checking ../SCOREF-MGMT/Software/src/mgmt_packet_factory.cpp: UNUSED...
9/31 files checked 39% done
Checking ../SCOREF-MGMT/Software/src/mgmt_packet_handler.cpp...
Checking ../SCOREF-MGMT/Software/src/mgmt_packet_handler.cpp: UNUSED...
10/31 files checked 44% done
Checking ../SCOREF-MGMT/Software/src/mgmt_server.cpp...
Checking ../SCOREF-MGMT/Software/src/mgmt_server.cpp: UNUSED...
11/31 files checked 50% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_fac_packet_comm_profile_selection_request.cpp...
12/31 files checked 52% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_fac_packet_comm_profile_selection_response.cpp...
13/31 files checked 54% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_fac_packet_configuration_notification.cpp...
14/31 files checked 57% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet.cpp...
15/31 files checked 59% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp...
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp: UNUSED...
16/31 files checked 63% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_response.cpp...
17/31 files checked 66% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_configuration_available.cpp...
18/31 files checked 68% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_get_configuration.cpp...
19/31 files checked 69% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_location_table_request.cpp...
20/31 files checked 71% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_location_table_response.cpp...
21/31 files checked 74% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_location_update.cpp...
22/31 files checked 77% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_network_state.cpp...
23/31 files checked 79% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_set_configuration.cpp...
24/31 files checked 82% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_wireless_state_request.cpp...
25/31 files checked 84% done
Checking ../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_wireless_state_response.cpp...
26/31 files checked 86% done
Checking ../SCOREF-MGMT/Software/src/util/mgmt_exception.cpp...
27/31 files checked 87% done
Checking ../SCOREF-MGMT/Software/src/util/mgmt_log.cpp...
28/31 files checked 90% done
Checking ../SCOREF-MGMT/Software/src/util/mgmt_udp_socket.cpp...
29/31 files checked 94% done
Checking ../SCOREF-MGMT/Software/src/util/mgmt_util.cpp...
30/31 files checked 99% done
Checking ../SCOREF-MGMT/Software/test/unittest/main.cpp...
Checking ../SCOREF-MGMT/Software/test/unittest/main.cpp: PRIVATE...
31/31 files checked 100% done
Checking usage of global functions..
[../SCOREF-MGMT/Software/src/mgmt_its_key_manager.cpp:61]: (style) The function 'findKeyId' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:116]: (style) The function 'getAccess11n' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:112]: (style) The function 'getAccess3g' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:120]: (style) The function 'getAccessEthernet' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:108]: (style) The function 'getAccessItsG5' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:124]: (style) The function 'getChannelCch' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:128]: (style) The function 'getChannelSch1' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:132]: (style) The function 'getChannelSch2' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:136]: (style) The function 'getChannelSch3' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:140]: (style) The function 'getChannelSch4' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_fac_packet_comm_profile_selection_request.cpp:54]: (style) The function 'getLatency' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:104]: (style) The function 'getNetworkDsmiIpv4v6' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:84]: (style) The function 'getNetworkGn' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:96]: (style) The function 'getNetworkIpv4' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:100]: (style) The function 'getNetworkIpv4v6' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:92]: (style) The function 'getNetworkIpv6' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:88]: (style) The function 'getNetworkIpv6Gn' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_fac_packet_comm_profile_selection_request.cpp:58]: (style) The function 'getRelevance' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_fac_packet_comm_profile_selection_request.cpp:62]: (style) The function 'getReliability' is never used.
[../SCOREF-MGMT/Software/src/mgmt_client.cpp:96]: (style) The function 'getState' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:60]: (style) The function 'getTransportBtpA' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:64]: (style) The function 'getTransportBtpB' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:76]: (style) The function 'getTransportRtp' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:80]: (style) The function 'getTransportStcp' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:68]: (style) The function 'getTransportTcp' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_comm_profile_request.cpp:72]: (style) The function 'getTransportUdp' is never used.
[../SCOREF-MGMT/Software/src/packets/mgmt_gn_packet_get_configuration.cpp:57]: (style) The function 'getTxMode' is never used.
[../SCOREF-MGMT/Software/src/mgmt_client_manager.cpp:190]: (style) The function 'isFacConnected' is never used.
@@ -1,96 +0,0 @@
##########################################################################################
#
# EURECOM OpenAirInterface
# Copyright(c) 1999 - 2012 EURECOM
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see http://www.gnu.org/licenses/.
#
# Contact Information
# Openair Admin: openair_admin@eurecom.fr
# Openair Tech : openair_tech@eurecom.fr
# Forums : http://forums.eurecom.fsr/openairinterface
# Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
#
##########################################################################################
# SCOREF Management Module Configuration
# Maintainer: baris.demiray@eurecom.fr
####################
# Generic parameters
CONF_IPV6_ENABLED = 0
# Log levels are as follows
# 0, 1, 2, 3, 4 for TRACE, DEBUG, INFO, WARNING, and ERROR respectively
CONF_LOG_LEVEL = 1
#######################
# Connection parameters
CONF_SERVER_PORT = 1402
CONF_WIRELESS_STATE_UPDATE_INTERVAL = 60
########################################
# Management Information Base Parameters
########################################
# Common parameters
MIB_GN_ALL_STATION_TYPE = 1
MIB_GN_ALL_STATION_SUBTYPE = 1
##########################
# Network (NET) parameters
MIB_GN_NET_LOCAL_ADDR_CONF_METHOD = 0
MIB_GN_NET_DEFAULT_HOP_LIMIT = 1
MIB_GN_NET_MAX_PACKET_LIFETIME = 20000
MIB_GN_NET_MIN_PACKET_REPETITION_INTERVAL = 1000
MIB_GN_NET_GEO_BCAST_FORWARDING_ALGORITHM = 0
MIB_GN_NET_GEO_UCAST_FORWARDING_ALGORITHM = 0
MIB_GN_NET_TRAFFIC_CLASS_RELEVANCE = 5
MIB_GN_NET_TRAFFIC_CLASS_RELIABILITY = 2
MIB_GN_NET_TRAFFIC_CLASS_LATENCY = 2
MIB_GN_NET_CBF_MIN_TTS = 100
MIB_GN_NET_CBF_MAX_TTS = 500
MIB_GN_NET_MAX_COMM_RANGE = 1000
MIB_GN_NET_DEF_TX_POWER = 5
MIB_GN_NET_DEF_BITRATE = 12
MIB_GN_NET_DEF_CHANNEL = 178
MIB_GN_NET_DEF_PRIORITY = 5
MIB_GN_NET_DEF_CHANNEL_BW = 30
MIB_GN_NET_SEC_ALLOW_UNSECURE = 1
MIB_GN_NET_SEC_END2END = 0
MIB_GN_NET_SEC_PSEUDONYM = 0
#############################
# Facilities (FAC) Parameters
MIB_GN_FAC_VEHICLE_WIDTH = 3
MIB_GN_FAC_VEHICLE_LENGTH = 7
MIB_GN_FAC_CAM_BTP_PORT = 2000
MIB_GN_FAC_DENM_BTP_PORT = 3000
MIB_GN_FAC_LDM_GARBAGE_COLLECTION_INTERVAL = 1000
########################################################
# Communication Profiles (defined in SCOREF-L221 section
# 4.1.3 Les Profils de Communication)
# Format: Transport, Network, Access, and Channel parts are
# separated with comma. If there is more than one entry 'in'
# these parts it's separated by a semicolon.
# Example: BTP,GN,ITSG5,CCH -> Comma separated
# TCP:UDP -> Semicolon separated
CP1 = BTP,GN,ITSG5,CCH
CP2 = BTP,GN,ITSG5,SCH1
CP3 = BTP,GN,ITSG5,SCH2
CP4 = BTP,GN,ITSG5,SCH3
CP5 = BTP,GN,ITSG5,SCH4
CP6 = TCP,IPv6_GN,ITSG5,CCH
CP7 = TCP,IPv6_GN,ITSG5,SCH1
CP8 = TCP,IPv6_GN,ITSG5,SCH2
CP9 = TCP,IPv6_GN,ITSG5,SCH3
CP10 = TCP,IPv6_GN,ITSG5,SCH4
CP11 = TCP:UDP,IPv4/v6:DSMIPv4/v6,3G
CP12 = TCP:UDP,IPv6,11n
CP13 = UDP,IPv6,Ethernet
@@ -1,50 +0,0 @@
####################################################################################################
# File name: MGMT.IHM.conf #
# Contact: Baris Demiray <baris.demiray@eurecom.fr> #
# Michelle Wetterwald <michelle.wetterwald@eurecom.fr> #
# EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE #
# Tél: +33 (0)4 93 00 81 00 Fax: +33 (0)4 93 00 82 00 #
# Project: SCORE@F | http://www.scoref.fr/ #
# Description: This is a sample configuration file for those FACilities who want to introduce new #
# configurations to Management module #
# Last updated: 11/10/12 #
# Information: Management module traverses ./configuration/ directory and parses any file with #
# .conf extension find therein. Rules to adhere in order to introduce new #
# configuration to Management module, #
# File naming scheme: MGMT.<applicationName>.conf #
# Configuration item naming scheme: 2-byte configuration parameter ID has to be #
# given since this is needed for Management to build a CONFIGURATION_RESPONSE packet #
# <configurationParameterName>|<configurationParameterID> = <value> #
# For IHM, for example, configuration parameter IDs start from 0xC100 and goes on up #
# to 0xC116. Any other application should declare a range. Integer, floating point, #
# and string values may be supplied as follows: #
# MIB_MC002_VEHICLE_TYPE|0xC100 = 1 #
# MIB_MC002_SPEED|0xC101 = 70.8 #
# MIB_MC002_LANG|0xC102 = "en-us" #
# Please notice that configuration parameter ID is given in hexadecimal denotation #
# and string values has be given with quotes #
# Reference: Software/SoftwareComponents/MGMT/CORE/Documentation/SCOREF-MGMT_Configuration.pdf #
####################################################################################################
# IHM Configuration
MIB_MC002_GROUPNUM|0xC100 = 0
MIB_MC002_GROUP1|0xC101 = NULL
MIB_MC002_GROUP2|0xC102 = NULL
MIB_MC002_GROUP3|0xC103 = NULL
MIB_MC002_GROUPN|0xC104 = NULL
MIB_MC002_CRITICLIMIT|0xC105 = 15
MIB_MC002_PLUG|0xC106 = 1
MIB_MC002_VEHICLETYPE|0xC107 = 1
MIB_MC002_CHARGETYPE|0xC108 = 1
MIB_MC002_ACTIVLIMIT|0xC109 = 0
MIB_MC002_WAITTIME|0xC10A = 0
MIB_MC002_CHARGETIME|0xC10B = 0
MIB_MC002_PROVIDERNUM|0xC10C = 6
MIB_MC002_PROVIDER1|0xC10D = NULL
MIB_MC002_PROVIDER2|0xC10E = NULL
MIB_MC002_PROVIDER3|0xC10F = NULL
MIB_MC002_PROVIDERN|0xC110 = NULL
MIB_MC002_PRICE|0xC111 = 0
MIB_MC002_DETOUR|0xC112 = 0
@@ -1 +0,0 @@
valgrind --track-origins=yes --leak-check=full --show-reachable=yes -v -v ./SCOREF-MGMT MGMT.conf
Binary file not shown.
@@ -1,38 +0,0 @@
# Verify parameters
if [ $# -ne 1 ]
then
echo "Usage: `basename $0` <version>"
exit
fi
VERSION=$1
BINARY_NAME=SCOREF-MGMT
RELEASE_NAME="$BINARY_NAME-$VERSION"
echo "Building the version $VERSION"
make clean &> /dev/null
make BUILD_STATIC=1 -j &> /dev/null
strip bin/$BINARY_NAME
echo "Preparing the release..."
mkdir $RELEASE_NAME
echo "Copying binary..."
cp bin/$BINARY_NAME $RELEASE_NAME
echo "Copying configuration files..."
cp bin/MGMT.conf bin/configuration -r $RELEASE_NAME
rm $RELEASE_NAME/configuration/.svn -rfv &> /dev/null
echo "Copying documentation..."
cp README README.RUNNING $RELEASE_NAME
echo "Preparing the compressed archive..."
tar cjvf $RELEASE_NAME.tar.bz2 $RELEASE_NAME &> /dev/null
echo "Removing temporary directory..."
rm $RELEASE_NAME -rf &> /dev/null
echo "Release is ready"
exit
@@ -1,66 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_packet_sender.hpp
* \brief This is an abstract base class implemented by ManagementServer class
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_PACKET_SENDER_H_
#define MGMT_PACKET_SENDER_H_
/**
* This is an abstract base class implemented by ManagementServer class
* to provide functionality of status query packet sending for InquiryThread
*/
class IManagementPacketSender {
public:
/**
* Virtual destructor for this abstract base class
*/
// virtual ~IManagementPacketSender() = 0;
public:
/**
* Send a Wireless State Request packet to GN client
*
* @param none
* @return true if success, false otherwise
*/
virtual bool sendWirelessStateRequest() = 0;
};
#endif /* MGMT_PACKET_SENDER_H_ */
-190
View File
@@ -1,190 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file main.cpp
* \brief SCOREF Management module's hometown
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include <iostream>
#include <vector>
#include <string>
#include <ctime>
using namespace std;
#include <boost/program_options.hpp>
#include <boost/array.hpp>
#include <boost/asio.hpp>
using boost::asio::ip::udp;
#include "mgmt_packet_handler.hpp"
#include "mgmt_client_manager.hpp"
#include "util/mgmt_exception.hpp"
#include "mgmt_configuration.hpp"
#include "util/mgmt_util.hpp"
#include "util/mgmt_log.hpp"
#include "mgmt_server.hpp"
#include "version.hpp"
void printVersion() {
cerr << "SCORE@F MANAGEMENT Module version " << MGMT_VERSION << endl;
}
void printHelp(const string& binaryName) {
cerr << binaryName << " <configurationFile> [logFileName]" << endl;
}
#ifdef BOOST_VERSION_1_50
const string CONF_HELP_PARAMETER_STRING = "help";
const string CONF_LOG_LEVEL_PARAMETER_STRING = "loglevel";
#endif
int main(int argc, char** argv) {
string logFileName, configurationFileName;
/**
* Process command-line parameters
* Configuration file name is necessary yet log file name is optional here
*/
if (argc > 1 && (!string(argv[1]).compare("-v") || !string(argv[1]).compare("--version"))) {
printVersion();
exit(0);
} else if (argc == 2) {
logFileName = "SCOREF-MGMT.log";
configurationFileName = argv[1];
} else if (argc == 3) {
configurationFileName = argv[1];
logFileName = argv[2];
} else {
printHelp(argv[0]);
exit(1);
}
#ifdef BOOST_VERSION_1_50
/**
* Define and parse command-line parameters
*/
po::options_description commandLineOptions("Command-line options");
desc.add_options()
(CONF_HELP_PARAMETER_STRING, "Print help message")
(CONF_LOG_LEVEL_PARAMETER_STRING, po::value<int>(), "Set log level (DEBUG=0, INFO=1, WARNING=2, ERROR=3)");
po::variables_map vm;
po::store(po::parse_command_line(argc, argv, commandLineOptions), vm);
po::notify(vm);
if (vm.count(CONF_HELP_PARAMETER_STRING)) {
printHelp(argv[0]);
return 1;
}
if (vm.count(CONF_LOG_LEVEL_PARAMETER_STRING)) {
logger.info("Log level was set to " + vm[CONF_LOG_LEVEL_PARAMETER_STRING].as<int>());
logger.setLogLevel(vm[CONF_LOG_LEVEL_PARAMETER_STRING.as<int>]);
} else {
logger.info("Compression level was not set, default is DEBUG");
}
#endif
/**
* Create a Logger object
*/
Logger logger(logFileName, Logger::TRACE);
/**
* Prepare the list of FACilities configuration files by traversing
* the configration/ directory's content
*/
string facilitiesConfigurationFileDirectory = "configuration/";
vector<string> configurationFileVector = Util::getListOfFiles(facilitiesConfigurationFileDirectory);
/**
* Add MGMT module's configuration file to the list
*/
configurationFileVector.push_back(configurationFileName);
Configuration configuration(configurationFileVector, logger);
configuration.setFacilitiesConfigurationDirectory(facilitiesConfigurationFileDirectory);
/**
* Create the father
*/
ManagementInformationBase mib(logger);
/**
* Parse configuration file and create UDP server socket
*/
try {
configuration.parseConfigurationFiles(mib);
} catch (Exception& e) {
e.updateStackTrace("Cannot parse the configuration file");
e.printStackTrace();
exit(-1);
}
/**
* Update IPv6 configuration
*/
if (configuration.isIpv6Enabled())
mib.enableIpv6();
/**
* Initialise MIB
*/
try {
mib.initialise();
} catch (Exception& e) {
e.updateStackTrace("Cannot initialise ManagementInformationBase!");
throw;
}
/**
* Instantiate a Client Manager and pass it to Management Server
*/
boost::asio::io_service ioService;
ManagementClientManager clientManager(mib, configuration, logger);
ManagementServer server(ioService, configuration, mib, clientManager, logger);
try {
ioService.run();
} catch (Exception& e) {
e.updateStackTrace("Cannot run I/O service!");
e.printStackTrace();
} catch (std::exception& e) {
logger.error(e.what());
}
logger.info("Exiting...");
return 0;
}
@@ -1,158 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_client.cpp
* \brief A container to hold information about Management clients
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "packets/mgmt_gn_packet_location_table_request.hpp"
#include "util/mgmt_exception.hpp"
#include <boost/lexical_cast.hpp>
#include "mgmt_client.hpp"
ManagementClient::ManagementClient(ManagementInformationBase& mib, const udp::endpoint& clientEndpoint, u_int8_t wirelessStateUpdateInterval, u_int8_t locationUpdateInterval, Logger& logger)
: mib(mib), clientEndpoint(clientEndpoint), logger(logger) {
/**
* Check that source port is not an ephemeral port which would
* change every time a client sendto()s to MGMT
*/
if (clientEndpoint.port() >= 32768 && clientEndpoint.port() <= 61000)
logger.error("Client uses an ephemeral port that will change every time it sends data and this will confuse my state management!");
/**
* Initialise state strings map
*/
clientStateStringMap.insert(std::make_pair(ManagementClient::OFFLINE, "OFFLINE"));
clientStateStringMap.insert(std::make_pair(ManagementClient::ONLINE, "ONLINE"));
/**
* Initialise type strings map
*/
clientTypeStringMap.insert(std::make_pair(ManagementClient::UNKNOWN, "Unknown"));
clientTypeStringMap.insert(std::make_pair(ManagementClient::GN, "GeoNetworking"));
clientTypeStringMap.insert(std::make_pair(ManagementClient::FAC, "Facilities"));
clientTypeStringMap.insert(std::make_pair(ManagementClient::LTE, "Long Term Evolution"));
/**
* Initialise this client's state and type
*/
state = ManagementClient::OFFLINE;
type = ManagementClient::UNKNOWN;
/**
* We are not waiting a reply from this client now
*/
repliedToTheLastPacket = true;
}
ManagementClient::ManagementClient(const ManagementClient& managementClient)
: mib(managementClient.mib), clientEndpoint(managementClient.clientEndpoint), logger(managementClient.logger) {
throw Exception("Copy constructor is called for a ManagementClient object!", logger);
}
ManagementClient::~ManagementClient() {
clientTypeStringMap.clear();
}
boost::asio::ip::address ManagementClient::getAddress() const {
return clientEndpoint.address();
}
unsigned short int ManagementClient::getPort() const {
return clientEndpoint.port();
}
const udp::endpoint& ManagementClient::getEndpoint() const {
return this->clientEndpoint;
}
ManagementClient::ManagementClientState ManagementClient::getState() const {
return state;
}
bool ManagementClient::setState(ManagementClient::ManagementClientState state) {
if (this->state == state)
return true;
logger.info("State has changed from " + clientStateStringMap[this->state] + " to " + clientStateStringMap[state]);
this->state = state;
return true;
}
ManagementClient::ManagementClientType ManagementClient::getType() const {
return this->type;
}
bool ManagementClient::setType(ManagementClient::ManagementClientType type) {
this->type = type;
return true;
}
bool ManagementClient::operator==(const ManagementClient& client) const {
if (this->clientEndpoint.address() == client.getAddress())
return true;
return false;
}
bool ManagementClient::operator<(const ManagementClient& client) const {
if (this->clientEndpoint.address() < client.getAddress())
return true;
return false;
}
void ManagementClient::waitingForReply() {
repliedToTheLastPacket = false;
}
void ManagementClient::replyReceived() {
repliedToTheLastPacket = true;
}
bool ManagementClient::isAlive() {
return state == ManagementClient::ONLINE && repliedToTheLastPacket == true;
}
string ManagementClient::toString() {
stringstream ss;
ss << "ManagementClient[ip:" << clientEndpoint.address().to_string()
<< ", port:" << boost::lexical_cast<string>(clientEndpoint.port())
<< ", type:" << clientTypeStringMap[type] << ", state:" << clientStateStringMap[state] << "]";
return ss.str();
}
@@ -1,245 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_client.hpp
* \brief A container to hold information about Management clients
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_CLIENT_HPP_
#define MGMT_CLIENT_HPP_
#include "util/mgmt_log.hpp"
#include <boost/asio.hpp>
#include <string>
#include <map>
using boost::asio::ip::udp;
/**
* A container to hold information about Management clients, mostly used
* in Message Handler code
*/
class ManagementClient {
public:
/**
* Client state
*/
enum ManagementClientState {
/**
* Client is not connected or is unreachable
*/
OFFLINE = 0,
/**
* A client is connected and alive
*/
ONLINE = 1,
};
/**
* Client type
*/
enum ManagementClientType {
/**
* Initial value, this is the value set when a client object
* is created but the type has not yet determined
*/
UNKNOWN = 0,
/**
* GeoNetworking client
*/
GN = 1,
/**
* Facilities client
*/
FAC = 2,
/**
* LTE client
*/
LTE = 3
};
public:
/**
* Constructor for ManagementClient class
*
* @param mib Management Information Base reference
* @param clientEndpoint Client's connection information
* @param wirelessStateUpdateInterval Determines how frequent the wireless state update will be performed
* @param locationUpdateInterval Determines how frequent the location update will be performed
* @logger Logger object reference
*/
ManagementClient(ManagementInformationBase& mib, const udp::endpoint& clientEndpoint, u_int8_t wirelessStateUpdateInterval, u_int8_t locationUpdateInterval, Logger& logger);
/**
* Destructor for ManagementClient class
*/
~ManagementClient();
private:
/**
* Copy constructor to prevent the usage of default copy constructor
*/
ManagementClient(const ManagementClient& managementClient);
public:
/**
* Getter for IP address of this client
*
* @return IP address of this client
*/
boost::asio::ip::address getAddress() const;
/**
* Getter for port number of this client
*
* @return Port number of this client
*/
unsigned short int getPort() const;
/**
* Returns a reference to the udp::endpoint of this client
*
* return A reference to udp::endpoint of this client
*/
const udp::endpoint& getEndpoint() const;
/**
* Returns the state of this client
*
* @return ManagementClientState value for this client
*/
ManagementClientState getState() const;
/**
* Sets the state of this client with given state
*
* @param state New ManagementClientState for this client
* @return true on success, false otherwise
*/
bool setState(ManagementClientState state);
/**
* Returns the type of this client
*
* @return ManagementClientType value for this client
*/
ManagementClientType getType() const;
/**
* Sets the type of this client with given state
*
* @param state New ManagementClientType for this client
* @return true on success, false otherwise
*/
bool setType(ManagementClientType type);
/**
* Overloaded == operator to use ManagementClient type as a std::map key
*
* @param client Client that is going to be compared with
* @return true if clients are the same, false otherwise
*/
bool operator==(const ManagementClient& client) const;
/**
* Overloaded < operator to use ManagementClient type as a std::map key
*
* @param client Client that is going to be compared with
* @return true if host object's IP address is smaller, false otherwise
*/
bool operator<(const ManagementClient& client) const;
/**
* This is called when we send a packet to this client that
* requires a response
*
* @param none
* @return none
*/
void waitingForReply();
/**
* This is called when we receive a reply corresponding to the
* request packet we sent to this client
*
* @param none
* @return none
*/
void replyReceived();
/**
* Returns if this client has replied to the last packet we sent
*
* @param none
* @return true if this client is alive, false otherwise
*/
bool isAlive();
/**
* Returns string representation of this client
*
* @return std::string representation of this client
*/
string toString();
private:
/**
* Management Information Base reference
*/
ManagementInformationBase& mib;
/**
* Client's udp::endpoint information
*/
udp::endpoint clientEndpoint;
/**
* Client's connection state with Management module
*/
ManagementClient::ManagementClientState state;
/**
* Client type
*/
ManagementClient::ManagementClientType type;
/**
* Logger object reference
*/
Logger& logger;
/**
* String representations for Management Client states
*/
map<ManagementClient::ManagementClientState, string> clientStateStringMap;
/**
* String representations for Management Client types
*/
map<ManagementClient::ManagementClientType, string> clientTypeStringMap;
/**
* True if this client has replied to the last packet we sent to
* it that requires a response, false otherwise
*/
bool repliedToTheLastPacket;
/**
* Last heartbeat's receive time
*/
time_t lastHeartbeatTime;
};
#endif /* MGMT_CLIENT_HPP_ */
@@ -1,220 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_client_manager.cpp
* \brief A container for a manager for Management clients
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "packets/mgmt_gn_packet_configuration_available.hpp"
#include "mgmt_client_manager.hpp"
#include "util/mgmt_exception.hpp"
#include <boost/lexical_cast.hpp>
ManagementClientManager::ManagementClientManager(ManagementInformationBase& mib, Configuration& configuration, Logger& logger)
: mib(mib), configuration(configuration), logger(logger) {
}
ManagementClientManager::~ManagementClientManager() {
clientVector.clear();
}
ManagementClientManager::Task ManagementClientManager::updateClientState(const udp::endpoint& clientEndpoint, EventType eventType) {
bool clientExists = false;
ManagementClient* client = NULL;
/**
* Traverse client list and check if we already have this client
*/
for (vector<ManagementClient*>::const_iterator it = clientVector.begin(); it != clientVector.end(); ++it) {
logger.trace("Comparing IP addresses " + (*it)->getAddress().to_string() + " and " + clientEndpoint.address().to_string());
logger.trace("Comparing UDP ports " + boost::lexical_cast<string>((*it)->getPort()) + " and " + boost::lexical_cast<string>(clientEndpoint.port()));
if ((*it)->getAddress() == clientEndpoint.address() && (*it)->getPort() == clientEndpoint.port()) {
logger.debug("A client object for " + clientEndpoint.address().to_string() + ":" + boost::lexical_cast<string>(clientEndpoint.port()) + " is found");
client = *it;
clientExists = true;
}
}
/**
* Create a new client object if we couldn't find one
*/
if (!clientExists) {
ManagementClient* newClient = NULL;
try {
newClient = new ManagementClient(mib, clientEndpoint, configuration.getWirelessStateUpdateInterval(), configuration.getLocationUpdateInterval(), logger);
} catch (Exception& e) {
e.updateStackTrace("Cannot create a ManagementClient object!");
throw;
} catch (std::exception& e) {
throw Exception(e.what(), logger);
}
clientVector.push_back(newClient);
logger.info("A client object for " + clientEndpoint.address().to_string() + ":" + boost::lexical_cast<string>(clientEndpoint.port()) + " is created");
client = newClient;
}
/**
* Update client's (the one either found or created) state according
* to the event type
*/
switch (eventType) {
case MGMT_GN_EVENT_CONF_REQUEST:
case MGMT_FAC_EVENT_CONF_REQUEST:
case MGMT_FAC_EVENT_CONF_NOTIFICATION:
case MGMT_GN_EVENT_STATE_WIRELESS_STATE_RESPONSE:
case MGMT_GN_EVENT_STATE_NETWORK_STATE:
case MGMT_GN_EVENT_CONF_COMM_PROFILE_REQUEST:
case MGMT_FAC_EVENT_CONF_COMM_PROFILE_REQUEST:
case MGMT_FAC_EVENT_CONF_COMM_PROFILE_SELECTION_REQUEST:
case MGMT_GN_EVENT_LOCATION_TABLE_RESPONSE:
case MGMT_FAC_EVENT_LOCATION_UPDATE:
case MGMT_LTE_EVENT_STATE_WIRELESS_STATE_RESPONSE:
client->setState(ManagementClient::ONLINE);
break;
/**
* Any other packet doesn't cause a state change for clients
*/
default:
break;
}
/**
* Update client's type according to incoming message
*/
switch (eventType) {
case MGMT_GN_EVENT_LOCATION_UPDATE:
case MGMT_GN_EVENT_LOCATION_TABLE_REQUEST:
case MGMT_GN_EVENT_LOCATION_TABLE_RESPONSE:
case MGMT_GN_EVENT_CONF_UPDATE_AVAILABLE:
case MGMT_GN_EVENT_CONF_REQUEST:
case MGMT_GN_EVENT_CONF_CONT_RESPONSE:
case MGMT_GN_EVENT_CONF_BULK_RESPONSE:
case MGMT_GN_EVENT_CONF_COMM_PROFILE_REQUEST:
case MGMT_GN_EVENT_CONF_COMM_PROFILE_RESPONSE:
case MGMT_GN_EVENT_STATE_WIRELESS_STATE_REQUEST:
case MGMT_GN_EVENT_STATE_WIRELESS_STATE_RESPONSE:
case MGMT_GN_EVENT_STATE_NETWORK_STATE:
client->setType(ManagementClient::GN);
break;
case MGMT_FAC_EVENT_LOCATION_UPDATE:
case MGMT_FAC_EVENT_LOCATION_TABLE_REQUEST:
case MGMT_FAC_EVENT_LOCATION_TABLE_RESPONSE:
case MGMT_FAC_EVENT_CONF_REQUEST:
case MGMT_FAC_EVENT_CONF_CONT_RESPONSE:
case MGMT_FAC_EVENT_CONF_BULK_RESPONSE:
case MGMT_FAC_EVENT_CONF_NOTIFICATION:
case MGMT_FAC_EVENT_CONF_COMM_PROFILE_REQUEST:
case MGMT_FAC_EVENT_CONF_COMM_PROFILE_RESPONSE:
case MGMT_FAC_EVENT_CONF_COMM_PROFILE_SELECTION_REQUEST:
case MGMT_FAC_EVENT_CONF_COMM_PROFILE_SELECTION_RESPONSE:
client->setType(ManagementClient::FAC);
break;
case MGMT_LTE_EVENT_STATE_WIRELESS_STATE_RESPONSE:
client->setType(ManagementClient::LTE);
break;
case MGMT_EVENT_ANY:
default:
logger.warning("Cannot determine client type by incoming event type/subtype!");
client->setType(ManagementClient::UNKNOWN);
break;
}
logger.info(toString());
/**
* Return a task according to the client type
*/
if (client->getType() == ManagementClient::GN && !clientExists) {
/**
* This is a new GN client so we should ask for Location Table
*/
return ManagementClientManager::SEND_LOCATION_TABLE_REQUEST;
}
return ManagementClientManager::NOTHING;
}
const ManagementClient* ManagementClientManager::getClientByType(ManagementClient::ManagementClientType clientType) const {
/**
* Traverse client vector and find the specific client of given type
*/
for (vector<ManagementClient*>::const_iterator it = clientVector.begin(); it != clientVector.end(); ++it) {
if ((*it)->getType() == clientType)
return *it;
}
return NULL;
}
ManagementClient* ManagementClientManager::getClientByEndpoint(const udp::endpoint& endPoint) {
/**
* Traverse client vector and find the specific client at given end point
*/
for (vector<ManagementClient*>::const_iterator it = clientVector.begin(); it != clientVector.end(); ++it) {
if ((*it)->getEndpoint() == endPoint)
return *it;
}
return NULL;
}
bool ManagementClientManager::isGnConnected() const {
return (getClientByType(ManagementClient::GN) == NULL) ? false : true;
}
bool ManagementClientManager::isFacConnected() const {
return (getClientByType(ManagementClient::FAC) == NULL) ? false : true;
}
string ManagementClientManager::toString() {
stringstream ss;
ss << "Client Status[count:" << clientVector.size() << "]" << endl;
for (vector<ManagementClient*>::iterator it = clientVector.begin(); it != clientVector.end(); ++it)
ss << (*it)->toString() << endl;
return ss.str();
}
@@ -1,153 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*******************************************************************************/
/*!
* \file mgmt_client_manager.hpp
* \brief A container for a manager for Management clients
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_CLIENT_MANAGER_HPP_
#define MGMT_CLIENT_MANAGER_HPP_
#include "util/mgmt_udp_socket.hpp"
#include "mgmt_configuration.hpp"
#include "mgmt_types.hpp"
#include "util/mgmt_log.hpp"
#include "mgmt_client.hpp"
#include <vector>
using namespace std;
/**
* A container for a manager for Management clients
*/
class ManagementClientManager {
public:
/**
* Following enumeration is used to tell caller of updateManagementClientState()
* method what steps are to follow
*/
enum Task {
/**
* Nothing is to be done
*/
NOTHING = 0,
/**
* Send a Location Table Request (only if the client is GN)
*/
SEND_LOCATION_TABLE_REQUEST = 1
};
public:
/**
* Constructor for ManagementClientManager class
*
* @param mib Management Information Base reference
* @param configuration Management configuration to pass to/to manage client objects
* @param logger Logger object reference
*/
ManagementClientManager(ManagementInformationBase& mib, Configuration& configuration, Logger& logger);
/**
* Destructor for ManagementClientManager class
*/
~ManagementClientManager();
public:
/**
* Handles incoming data and updates client vector accordingly, by creating
* a new client object if necessary or updating its state if there's one
* defined for sender source address
*
* @param clientEndpoint A udp::endpoint reference
* @param eventType Type/subtype of event the packet was sent for
* @return ManagementClientManager::Task for the caller
*/
ManagementClientManager::Task updateClientState(const udp::endpoint& clientEndpoint, EventType eventType);
/**
* Returns relevant ManagementClient of given type
*
* @return A const pointer of the ManagementClient object of given type
*/
const ManagementClient* getClientByType(ManagementClient::ManagementClientType clientType) const;
/**
* Returns the client at given end
*
* @param endPoint Connection end point information of type udp::endpoint
* @return A pointer of the relevant ManagementClient object
*/
ManagementClient* getClientByEndpoint(const udp::endpoint& endPoint);
/**
* Tells if GN is connected
*
* @param none
* @return true if there's a GN connected, false otherwise
*/
bool isGnConnected() const;
/**
* Tells if FAC is connected
*
* @param none
* @return true if there's a FAC connected, false otherwise
*/
bool isFacConnected() const;
/**
* Returns the string representation of Client Manager and the clients it manages
*
* @param none
* @return std::string representation of this class
*/
string toString();
private:
/**
* Management Information Base reference
*/
ManagementInformationBase& mib;
/**
* Client vector holding clients of connected/online (see ManagementClientState) state
*/
vector<ManagementClient*> clientVector;
/**
* Configuration object reference to fetch necessary configuration information
*/
Configuration& configuration;
/**
* Logger object reference
*/
Logger& logger;
};
#endif /* MGMT_CLIENT_MANAGER_HPP_ */
@@ -1,310 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_comm_prof_manager.cpp
* \brief Communication Profiles list is kept and maintained by this container
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_comm_prof_manager.hpp"
#include "util/mgmt_exception.hpp"
#include <boost/lexical_cast.hpp>
CommunicationProfileManager::CommunicationProfileManager(Logger& logger)
: logger(logger) {
initialise();
}
CommunicationProfileManager::~CommunicationProfileManager() {
communicationProfileMap.clear();
communicationProfileStringMap.clear();
}
bool CommunicationProfileManager::insert(const string& profileIdString, const string& profileDefinitionString) {
if (profileIdString.empty() || profileDefinitionString.empty())
return false;
/**
* Parse communication profiles defined in the configuration file and
* insert them into the communication profile map
*/
CommunicationProfileItem communicationProfileItem;
/**
* std::string as a map key should not have a NULL at
* the end so here we trim it
*/
string trimmedProfileDefinitionString = Util::trim(profileDefinitionString, '\0');
try {
communicationProfileItem = parse(profileIdString, trimmedProfileDefinitionString);
} catch (Exception& e) {
e.updateStackTrace("Cannot parse Communication Profile definitions");
throw;
}
communicationProfileMap.insert(communicationProfileMap.end(), std::make_pair(communicationProfileItem.id, communicationProfileItem));
logger.debug("Communication profile: " + profileIdString + ":" + profileDefinitionString);
logger.info("Communication profile: " + communicationProfileItem.toString());
return true;
}
u_int8_t CommunicationProfileManager::getProfileCount() const {
return communicationProfileMap.size();
}
map<CommunicationProfileID, CommunicationProfileItem>& CommunicationProfileManager::getProfileMap() {
return communicationProfileMap;
}
map<CommunicationProfileID, CommunicationProfileItem> CommunicationProfileManager::getProfileMapSubset(u_int32_t filter) {
/**
* If we're asked everything, return everything
*/
if (filter == 0xFFFFFFFF)
return getProfileMap();
map<CommunicationProfileID, CommunicationProfileItem> filteredProfileMap;
map<CommunicationProfileID, CommunicationProfileItem>::const_iterator it = communicationProfileMap.begin();
/**
* If `filter' is zero then return an empty map
*/
if (!filter)
return filteredProfileMap;
u_int8_t transportMask = ((filter & 0xFF000000) >> 24);
u_int8_t networkMask = ((filter & 0xFF0000) >> 16);
u_int8_t accessMask = ((filter & 0xFF00) >> 8);
u_int8_t channelMask = (filter & 0xFF);
logger.info("Preparing a communication profile subset with following filter...");
logger.info("Comm. Profile Filter [transport:" + Util::getBinaryRepresentation(transportMask) + " network:" + Util::getBinaryRepresentation(networkMask) + " access:" + Util::getBinaryRepresentation(accessMask) + " channel:" + Util::getBinaryRepresentation(channelMask) + "]");
/**
* Travers all the communication profiles and find those match with the filter...
*/
while (it != communicationProfileMap.end()) {
/**
* We should take the subset of communication profile table having those profiles
* that provide all the protocols requested in the filter
*/
logger.info("Checking with: " + it->second.toString());
/**
* If the mask is 0xFF then client wants everything, don't check further
*/
if ((transportMask == 0xFF || (it->second.transport & transportMask) == it->second.transport) &&
(networkMask == 0xFF || (it->second.network & networkMask) == it->second.network) &&
(accessMask == 0xFF || (it->second.access & accessMask) == it->second.access)) {
/**
* Channel information is present only if Access technology is ITSG5 so
* we check if `access' field's first bit is set or not
*/
if (channelMask == 0xFF || (Util::isBitSet(it->second.access, 0) && (it->second.channel & channelMask) == it->second.channel)) {
logger.info("Communication profile match, adding this into the COMM_PROFILE_RESPONSE packet...");
filteredProfileMap.insert(filteredProfileMap.end(), std::make_pair(it->first, it->second));
}
}
++it;
}
return filteredProfileMap;
}
CommunicationProfileID CommunicationProfileManager::selectProfile(bool ipv6Enabled, u_int8_t latency, u_int8_t relevance, u_int8_t reliability) {
/**
* Select an appropriate CP according to user requirements
* This decision making was designed by Michelle with regards to the definition in L221 document
*
* See Documentation/Communication Profile Selection/CP Mapping.docx for further information
*/
if (relevance <= 1 && latency <= 1 && reliability <= 1)
return 1;
else if (relevance == 3 && latency == 2 && reliability == 2)
return 1;
else if (relevance <= 3 && latency <= 2 && reliability <= 2)
return 1; // This is 3 in Michelle's document, but changed later on
else if (relevance <= 7 && latency <= 3 && reliability <= 3) {
if (ipv6Enabled)
return 11;
else
return 1; // This is 3 in Michelle's document, but changed later on
}
return 0;
}
string CommunicationProfileManager::toString() const {
stringstream ss;
ss << "Communication profile count: " << communicationProfileMap.size() << endl;
map<CommunicationProfileID, CommunicationProfileItem>::const_iterator it = communicationProfileMap.begin();
while (it != communicationProfileMap.end()) {
ss << "Communication Profile [ID:" << it->second.id
<< ", transport:" << it->second.transport
<< ", network:" << it->second.network
<< ", access: " << it->second.access
<< ", channel: " << it->second.channel << "]" << endl;
++it;
}
return ss.str();
}
void CommunicationProfileManager::initialise() {
/*
* Transport string & index map
*/
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("BTP_A", 1));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("BTP_B", 2));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("TCP", 3));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("UDP", 4));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("RTP", 5));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("STCP", 6));
/*
* Network string & index map
*/
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("GN", 1));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("IPv6_GN", 2));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("IPv6", 3));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("IPv4", 4));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("IPv4/v6", 5));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("DSMIPv4/v6", 6));
/*
* Access string & index map
*/
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("ITSG5", 1));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("3G", 2));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("11n", 3));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("Ethernet", 4));
/*
* Channel string & index map
*/
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("CCH", 1));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("SCH1", 2));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("SCH2", 3));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("SCH3", 4));
communicationProfileStringMap.insert(communicationProfileStringMap.end(), std::make_pair("SCH4", 5));
}
CommunicationProfileItem CommunicationProfileManager::parse(const string& profileIdString, const string& profileDefinitionString) {
CommunicationProfileItem communicationProfileItem;
u_int8_t profileID = 0x00;
try {
profileID = (u_int8_t)boost::lexical_cast<unsigned short>(profileIdString.substr(profileIdString.find("CP") + 2, profileIdString.length() - 2).c_str());
communicationProfileItem.id = profileID;
} catch (...) {
throw Exception("Cannot parse Communication Profile ID string '" + profileIdString + "' in configuration file", logger);
}
/*
* Parse communication profile string and get tokens for each layer
*/
vector<string> profileItemVector = Util::split(profileDefinitionString, ',');
const string access = profileItemVector[2];
string channel;
/*
* For access methods `3G' and `Ethernet' this information is not relevant; for `11n'
* the choice is made by the Access Point, here parse accordingly
*/
if (!access.compare(0, 2, "3G") || !access.compare(0, 3, "11n") || !access.compare(0, 8, "Ethernet")) {
channel = "";
} else {
channel = profileItemVector[3];
}
/*
* Fill transport, network, access, and channel fields respectively
*/
setFlags(profileItemVector[0], communicationProfileItem.transport);
setFlags(profileItemVector[1], communicationProfileItem.network);
setFlags(profileItemVector[2], communicationProfileItem.access);
if (channel.empty()) {
logger.info("Access type is either 3G, or Ethernet, or 11n. Skipping channel information");
} else {
setFlags(profileItemVector[3], communicationProfileItem.channel);
}
return communicationProfileItem;
}
bool CommunicationProfileManager::setFlags(const string& configuration, u_int8_t& octet) {
if (configuration.empty())
return false;
vector<string> profileStrings = Util::split(configuration, ':');
vector<string>::iterator iterator = profileStrings.begin();
while (iterator != profileStrings.end()) {
/**
* Verify incoming communication profile definition string item and handle "BTP" exception
*/
if (iterator->compare("BTP") == 0) {
logger.debug("Communication profile string 'BTP' has found, both BTP_A and BTP_B flags will be set");
/**
* If communication profile includes BTP then we should set both BTP_A and BTP_B
* bits since they'll both be defined and available
*
* Bit indexes start from 1 in 'MNGT to CM-GN Interface' paper but it
* corresponds to bit 0 for Util::setBit() so here we subtract 1 to
* find index against 0 as the first
*/
Util::setBit(octet, static_cast<u_int8_t>(communicationProfileStringMap["BTP_A"] - 1));
Util::setBit(octet, static_cast<u_int8_t>(communicationProfileStringMap["BTP_B"] - 1));
} else if (communicationProfileStringMap[*iterator] != 0) {
/*
* If index is valid than set the bit at that index
*/
Util::setBit(octet, static_cast<u_int8_t>(communicationProfileStringMap[*iterator] - 1));
} else if (communicationProfileStringMap[*iterator] == 0) {
/*
* Invalid strings are ignored
*/
logger.warning("Communication profile definition string '" + *iterator + "' is not valid!");
logger.info("Check SCOREF-MGMT_Configuration.pdf file for valid configuration settings");
}
++iterator;
}
return true;
}
@@ -1,192 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_comm_prof_manager.hpp
* \brief Communication Profiles list is kept and maintained by this container
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_COMM_PROF_MANAGER_HPP_
#define MGMT_COMM_PROF_MANAGER_HPP_
#include "util/mgmt_util.hpp"
#include "util/mgmt_log.hpp"
#include "mgmt_types.hpp"
#include <string>
#include <map>
using namespace std;
/**
* Communication Profile Item
*/
typedef u_int32_t CommunicationProfileID;
struct CommunicationProfileItem {
CommunicationProfileID id;
u_int8_t transport;
u_int8_t network;
u_int8_t access;
u_int8_t channel;
/**
* Constructor for CommunicationProfileItem to
* initialise variables
*/
CommunicationProfileItem() {
id = 0;
transport = 0;
network = 0;
access = 0;
channel = 0;
}
string toString() const {
stringstream ss;
ss << "[id:" << setfill('0') << setw(2) << id
<< " transport:" << Util::getBinaryRepresentation(transport)
<< " network:" << Util::getBinaryRepresentation(network)
<< " access:" << Util::getBinaryRepresentation(access)
<< " channel:" << Util::getBinaryRepresentation(channel) << "]";
return ss.str();
}
} __attribute__((packed));
/**
* Communication Profiles list is kept and maintained by this container
*/
class CommunicationProfileManager {
public:
/**
* Constructor for CommunicationProfileManager class
*
* @param logger Logger object reference
*/
CommunicationProfileManager(Logger& logger);
/**
* Destructor for CommunicationProfileManager class
*/
~CommunicationProfileManager();
public:
/**
* Inserts given communication profile information into the table
*
* @param profileIdString Communication profile ID string
* @param profileDefinitionString Communication profile details
* @return true on success, false otherwise
*/
bool insert(const string& profileIdString, const string& profileDefinitionString);
/**
* Returns the number of profiles present
*
* @return Number of communication profiles, ie. table size
*/
u_int8_t getProfileCount() const;
/**
* Returns communication profile map
*
* @return std::map of Communication Profile Table
*/
map<CommunicationProfileID, CommunicationProfileItem>& getProfileMap();
/**
* Returns communication profile map subset filtered by incoming request map
*
* @param filter 32-bit filter part of a Communication Profile Request packet
* @return Filtered subset of communication profile
*/
map<CommunicationProfileID, CommunicationProfileItem> getProfileMapSubset(u_int32_t filter);
/**
* In this method we have the intelligent code that'll pick a proper communication
* profile according to the parameters (or in other words the requirements) given
* by the client
*
* @param ipv6Enabled Indicates if IPv6 is enabled
* @param latency Latency requirement
* @param relevance Relevance requirement
* @param reliability Reliability requirement
* @return A communication profile ID of type CommunicationProfileID
*/
static CommunicationProfileID selectProfile(bool ipv6Enabled, u_int8_t latency, u_int8_t relevance, u_int8_t reliability);
/**
* Returns string representation of Communication Profile Table
*
* return std::string representation of table
*/
string toString() const;
private:
/**
* Initialises profile item strings
*/
void initialise();
/**
* Parses comma-separated Communication Profile string and returns
* a CommunicationProfileItem structure filled accordingly
*
* @param profileIdString Profile ID string (CP1, CP2, etc.)
* @param profileDefinitionString Comma-separated profile definition
* @return CommunicationProfileItem having parsed information
*/
CommunicationProfileItem parse(const string& profileIdString, const string& profileDefinitionString);
/**
* A helper method to set any bits given in particular communication
* profile string, e.g. if a string "IPv4/v6:DSMIPv4/v6" is given then
* this method will set both 'IPv4/v6' and 'DSMIPv4/v6' flags in given
* octet
*
* @param octet Octet that the found out flags will be set
* @return true on success, false otherwise
*/
bool setFlags(const string& configuration, u_int8_t& octet);
private:
/**
* Communication profile map
*/
map<CommunicationProfileID, CommunicationProfileItem> communicationProfileMap;
/**
* Communication profile string and bitmap index map
*/
map<string, u_int8_t> communicationProfileStringMap;
/**
* Logger object reference
*/
Logger& logger;
};
#endif /* MGMT_COMM_PROF_MANAGER_HPP_ */
@@ -1,389 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_configuration.cpp
* \brief A container with configuration file parsing capability
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "util/mgmt_exception.hpp"
#include "mgmt_configuration.hpp"
#include <boost/lexical_cast.hpp>
#include <boost/tokenizer.hpp>
#include <iostream>
#include <fstream>
using namespace boost;
using namespace std;
/**
* Initialise configuration parameter name strings
*/
const string Configuration::CONF_SERVER_PORT_PARAMETER("CONF_SERVER_PORT");
const string Configuration::CONF_WIRELESS_STATE_UPDATE_INTERVAL("CONF_WIRELESS_STATE_UPDATE_INTERVAL");
const string Configuration::CONF_LOCATION_UPDATE_INTERVAL("CONF_LOCATION_UPDATE_INTERVAL");
const string Configuration::CONF_IPV6_ENABLED("CONF_IPV6_ENABLED");
const string Configuration::CONF_LOG_LEVEL("CONF_LOG_LEVEL");
Configuration::Configuration(const vector<string>& configurationFileNameVector, Logger& logger)
: configurationFileNameVector(configurationFileNameVector), logger(logger) {
/**
* Write given configuration files' names
*/
stringstream ss;
vector<string>::const_iterator it = configurationFileNameVector.begin();
while (it != configurationFileNameVector.end())
/**
* Following is a nasty-looking one-liner not to put a comma at the end
*/
ss << *it++ << ((it+1 == configurationFileNameVector.end()) ? "" : ", ");
logger.info("Following " + boost::lexical_cast<string>(configurationFileNameVector.size()) + \
" file(s) have been found (only those with .conf extension will be parsed): " + ss.str());
/**
* Set default values
*/
this->serverPort = 1402;
this->wirelessStateUpdateInterval = 10;
this->locationUpdateInterval = 20;
this->ipv6Enabled = false;
}
Configuration::~Configuration() {
configurationFileNameVector.clear();
}
bool Configuration::parseConfigurationFiles(ManagementInformationBase& mib) {
/**
* Verify there is at least one configuration file given to be parsed
*/
if (configurationFileNameVector.empty())
throw Exception("No configuration file name is given to be parsed", logger);
ifstream configurationFileStream;
string parameter, value;
string line;
string netParameterPrefix("MIB_GN_NET");
string facParameterPrefix("MIB_GN_FAC");
string ihmParameterPrefix("MIB_MC002");
string commonParameterPrefix("MIB_GN_ALL");
string confParameterPrefix("CONF_");
string communicationProfilePrefix("CP");
/*
* Here we traverse configuration files and let MIB know about
* every single parameter/[parameterID/]value pair we find
*/
for (vector<string>::const_iterator it = configurationFileNameVector.begin(); it != configurationFileNameVector.end(); ++it) {
/**
* Check file name extension and do not parse if it's not '.conf'
*/
string fileExtension = Util::getFileExtension(*it);
if (fileExtension.compare(".conf") != 0) {
logger.warning("There is a file named '" + *it + "' without .conf extension in given list");
continue;
}
string configurationFile = *it;
/**
* Add directory name if a FACilities configuration file is being parsed
*/
if (configurationFile.compare("MGMT.conf") != 0)
configurationFile = facilitiesConfigurationDirectory + configurationFile;
logger.info("Parsing configuration file '" + configurationFile + "'");
configurationFileStream.open(configurationFile.c_str());
if (configurationFileStream.is_open()) {
/**
* Traverse and parse configuration file lines
*/
while (!configurationFileStream.eof()) {
getline(configurationFileStream, line);
if (parseLine(line, parameter, value)) {
/**
* Trim value if it's not a string
*/
if (value.find('"') == string::npos)
value = Util::trim(value, '\0');
/*
* NETwork and FACilities parameters are sent to MIB
*/
if (!line.compare(0, netParameterPrefix.length(), netParameterPrefix) ||
!line.compare(0, facParameterPrefix.length(), facParameterPrefix) ||
!line.compare(0, commonParameterPrefix.length(), commonParameterPrefix)) {
try {
ItsKeyValue valueContainer;
valueContainer.intValue = atoi(value.c_str());
if (mib.setValue(parameter, valueContainer))
logger.info("Parameter '" + parameter + "' has been set to '" + value + "'");
} catch (Exception& e) {
e.updateStackTrace("Cannot set MIB ITS key using value given in the configuration file");
throw;
}
/*
* General configuration parameters are handled locally in this class
*/
} else if (!line.compare(0, confParameterPrefix.size(), confParameterPrefix)) {
try {
setValue(parameter, value);
} catch (Exception& e) {
e.updateStackTrace("Cannot process given configuration value");
throw;
}
/*
* Communication profiles are sent to MIB
*/
} else if (!line.compare(0, communicationProfilePrefix.size(), communicationProfilePrefix)) {
try {
mib.getCommunicationProfileManager().insert(parameter, value);
} catch (Exception& e) {
e.updateStackTrace("Cannot process communication profile string");
throw;
}
/**
* Point de Charge Vehicule Electrique (PCVE) IHM Parameters
*/
} else if (!line.compare(0, ihmParameterPrefix.size(), ihmParameterPrefix)) {
/**
* Parse parameter of format <configurationParameter|configurationParameterID>
*/
string parameterName;
u_int16_t parameterId;
parseParameterId(parameter, parameterName, parameterId);
/**
* Update MIB and add new ITS key but before check ITS data type (it
* can be integer and string)
*/
if (Util::isNumeric(value)) {
logger.info("Adding IHM integer parameter [name:" + parameterName + ", id:" + boost::lexical_cast<string>(parameterId) + ", value:" + value + "]");
mib.getItsKeyManager().addKey(static_cast<ItsKeyID>(parameterId), parameterName, ITS_KEY_TYPE_IHM, atoi(value.c_str()));
} else if (value.find('.') != string::npos) {
logger.info("Adding IHM float parameter [name:" + parameterName + ", id:" + boost::lexical_cast<string>(parameterId) + ", value:" + value + "]");
mib.getItsKeyManager().addKey(static_cast<ItsKeyID>(parameterId), parameterName, ITS_KEY_TYPE_IHM, boost::lexical_cast<float>(value));
} else {
logger.info("Adding IHM string parameter [name:" + parameterName + ", id:" + boost::lexical_cast<string>(parameterId) + ", value:" + value + "]");
/**
* Parse value trimming '"' characters and whitespace if it's not "NULL"
*/
if (value.find("NULL") == string::npos) {
value = value.substr(value.find('"') + 1, value.length() - value.find('"') - 2);
} else {
// Since NULL actually means empty string
value = "";
}
mib.getItsKeyManager().addKey(static_cast<ItsKeyID>(parameterId), parameterName, ITS_KEY_TYPE_IHM, value);
}
} else {
logger.warning("Unrecognized configuration item: '" + parameter + "'");
}
}
}
logger.debug("Closing file stream for '" + configurationFile + "'");
configurationFileStream.close();
} else {
configurationFileStream.close();
throw Exception("Cannot open configuration file '" + configurationFile + "'!", logger);
}
}
return true;
}
bool Configuration::parseLine(const string& line, string& parameter, string& value) {
/**
* Get the substring till '#' character if there's one
*/
string configurationLine = line;
if (line.find('#') != string::npos) {
configurationLine.erase(0, configurationLine.length() - configurationLine.find('#'));
}
/**
* Ignore this line if it's empty or there's no equal sign in it
*/
if (configurationLine.empty() || configurationLine.find('=') == string::npos)
return false;
/**
* Parse the line according to the place of equal sign
*/
parameter = configurationLine.substr(0, configurationLine.find("="));
value = configurationLine.substr(configurationLine.find("=") + 1, configurationLine.length());
/**
* Trim value string if there's no '"' character
*/
remove(parameter.begin(), parameter.end() + 1, ' ');
if (value.find('"') == string::npos)
remove(value.begin(), value.end() + 1, ' ');
return true;
}
bool Configuration::parseParameterId(const string& param, string& parameterString, u_int16_t& parameterId) {
if (param.find('|') == string::npos)
return false;
/**
* Parse the string according to the separator '|'
*/
parameterString = param.substr(0, param.find('|'));
stringstream parameterIdStringStream;
parameterIdStringStream << hex << param.substr(param.find('|') + 1, param.length());
/**
* Cast parameter ID string and update incoming variable reference
*/
parameterIdStringStream >> parameterId;
return true;
}
bool Configuration::setValue(const string& parameter, const string& value) {
/**
* Parse CONF_SERVER_PORT parameter
*/
if (!parameter.compare(0, CONF_SERVER_PORT_PARAMETER.length(), CONF_SERVER_PORT_PARAMETER)) {
setServerPort(atoi(value.c_str()));
/**
* Parse CONF_WIRELESS_STATE_UPDATE_INTERVAL parameter
*/
} else if (!parameter.compare(0, CONF_WIRELESS_STATE_UPDATE_INTERVAL.length(), CONF_WIRELESS_STATE_UPDATE_INTERVAL)) {
setWirelessStateUpdateInterval(atoi(value.c_str()));
/**
* Parse CONF_LOCATION_UPDATE_INTERVAL parameter
*/
} else if (!parameter.compare(0, CONF_LOCATION_UPDATE_INTERVAL.length(), CONF_LOCATION_UPDATE_INTERVAL)) {
/**
* This configuration parameter is removed because Location Update is now sent by
* a module developed by Laurens from POTI directly to GN
*
* Add the following configuration parameter into MGMT.conf to get this back
*
* CONF_LOCATION_UPDATE_INTERVAL = 30
*/
setLocationUpdateInterval(atoi(value.c_str()));
/**
* Parse CONF_IPV6_ENABLED parameter
*/
} else if (!parameter.compare(0, CONF_IPV6_ENABLED.length(), CONF_IPV6_ENABLED)) {
if (atoi(value.c_str()) == 1)
ipv6Enabled = true;
else if (atoi(value.c_str()) == 0)
ipv6Enabled = false;
else
throw Exception(CONF_IPV6_ENABLED + " can be 0 or 1, invalid value (" + value + ") provided", logger);
logger.info(string("IPv6 is ") + ((ipv6Enabled) ? "enabled" : "disabled"));
/**
* Parse CONF_LOG_LEVEL parameter
*/
} else if (!parameter.compare(0, CONF_LOG_LEVEL.length(), CONF_LOG_LEVEL)) {
if (atoi(value.c_str()) < 0 || atoi(value.c_str()) > 4)
throw Exception(CONF_LOG_LEVEL + " can be 0 to 4, invalid value (" + value + ") provided", logger);
/**
* Update the log level
*/
logger.setLogLevel(static_cast<Logger::LOG_LEVEL>(atoi(value.c_str())));
logger.info("Log level is updated to " + logger.getCurrentLogLevelName());
}
return true;
}
const vector<string>& Configuration::getConfigurationFileVector() const {
return configurationFileNameVector;
}
void Configuration::addConfigurationFile(const string& configurationFileName) {
this->configurationFileNameVector.push_back(configurationFileName);
}
void Configuration::setFacilitiesConfigurationDirectory(const string& directory) {
facilitiesConfigurationDirectory = directory;
}
int Configuration::getServerPort() const {
return serverPort;
}
void Configuration::setServerPort(int serverPort) {
if (serverPort > 0 && serverPort < 65535)
this->serverPort = serverPort;
/**
* Do nothing and so keep the default value otherwise
*/
}
u_int8_t Configuration::getWirelessStateUpdateInterval() const {
return wirelessStateUpdateInterval;
}
void Configuration::setWirelessStateUpdateInterval(u_int8_t interval) {
/**
* Verify incoming value for wireless state update interval
* Keep default value if incoming is invalid
*/
if (interval >= 10 && interval <= 120) {
logger.info("Setting Wireless State Update Interval to " + boost::lexical_cast<string>((int)interval) + " seconds");
wirelessStateUpdateInterval = interval;
} else
logger.warning("Parsed value (" + boost::lexical_cast<string>((int)interval) + ") of Wireless State Update Interval is invalid [min=10,max=120], keeping default value (" + boost::lexical_cast<string>((int)wirelessStateUpdateInterval) + ")");
}
u_int8_t Configuration::getLocationUpdateInterval() const {
return locationUpdateInterval;
}
void Configuration::setLocationUpdateInterval(u_int8_t interval) {
/**
* Verify incoming value for location update interval
* Keep default value if incoming is invalid
*/
if (interval >= 20 && interval <= 120) {
logger.info("Setting Location Update Interval to " + boost::lexical_cast<string>((int)interval) + " seconds");
locationUpdateInterval = interval;
} else
logger.warning("Parsed value (" + boost::lexical_cast<string>((int)interval) + ") of Location Update Interval is invalid [min=20,max=120], keeping default value (" + boost::lexical_cast<string>((int)locationUpdateInterval) + ")");
}
bool Configuration::isIpv6Enabled() const {
return ipv6Enabled;
}
@@ -1,251 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_configuration.hpp
* \brief A container with configuration file parsing capability
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_CONFIGURATION_HPP_
#define MGMT_CONFIGURATION_HPP_
#include "mgmt_information_base.hpp"
#include "util/mgmt_log.hpp"
#include <string>
using namespace std;
/**
* This is a little interface to pass to Communication Profile Manager without
* exposing every single configuration detail
*/
class IPv6Configuration {
public:
/**
* Virtual destructor for IPv6Configuration class
*/
virtual ~IPv6Configuration() {}
public:
/**
* Returns a boolean that indicates IPv6 enable/disable configuration
*/
virtual bool isIpv6Enabled() const = 0;
protected:
/**
* IPv6 is enabled or not
*/
bool ipv6Enabled;
};
/**
* A container with configuration file parsing capability, this class is utilised
* to update ManagementInformationBase class with configuration file content
*/
class Configuration : public IPv6Configuration {
public:
/**
* Parameter string for UDP server port
*/
static const string CONF_SERVER_PORT_PARAMETER;
/**
* Parameter string for repetition interval (in seconds)
* for Wireless State Request message
*/
static const string CONF_WIRELESS_STATE_UPDATE_INTERVAL;
/**
* Parameter string for repetition interval (in seconds)
* for Location Update message
*/
static const string CONF_LOCATION_UPDATE_INTERVAL;
/**
* Parameter string for IPv6 enabling
*/
static const string CONF_IPV6_ENABLED;
/**
* Parameter string for log level
*/
static const string CONF_LOG_LEVEL;
public:
/**
* Constructor for Configuration class
*
* @param configurationFileNameList Configuration files that shall be parsed
* @param logger Logger object reference
*/
Configuration(const vector<string>& configurationFileNameVector, Logger& logger);
/**
* Destructor for Configuration class
*/
~Configuration();
public:
/**
* Parses given set of configuration files and updates MIB accordingly
*
* @param mib Management Information Base reference
* @return true on success, false otherwise
*/
bool parseConfigurationFiles(ManagementInformationBase& mib);
/**
* Returns configuration file name vector
*
* @return Configuration file name vector
*/
const vector<string>& getConfigurationFileVector() const;
/**
* Adds a configuration file name to the vector
*
* @param configurationFileName New configuration file's name
* @return none
*/
void addConfigurationFile(const string& configurationFileName);
/**
* Sets the directory name where Configuration class is going to
* look for FACilities configuration files
*
* @param directory Directory name (relative to ./)
* @return none
*/
void setFacilitiesConfigurationDirectory(const string& directory);
/**
* Returns UDP server port number
*
* @param none
* @return UDP server port number
*/
int getServerPort() const;
/**
* Sets UDP server port number
*
* @param new port number
* @return none
*/
void setServerPort(int serverPort);
/**
* Returns Wireless State Update interval (in seconds)
*
* @return Wireless State Update interval in seconds
*/
u_int8_t getWirelessStateUpdateInterval() const;
/**
* Sets Wireless State Update interval
*
* @param interval Wireless State Update interval in seconds
* @return none
*/
void setWirelessStateUpdateInterval(u_int8_t interval);
/**
* Returns Location Update interval (in seconds)
*
* @return Location Update interval in seconds
*/
u_int8_t getLocationUpdateInterval() const;
/**
* Sets Location Update interval
*
* @param interval Location Update interval in seconds
* @return none
*/
void setLocationUpdateInterval(u_int8_t interval);
/**
* Returns a boolean indication IPv6 configuration
* @implements bool IPv6Configuration::isIpv6Enabled()
*/
bool isIpv6Enabled() const;
private:
/**
* Parses incoming string of format "parameter = value" and fills in
* passed parameter and value variables
*
* @param line Configuration file line
* @param parameter Parameter's name
* @param value Parameter's value
* @return true on success, false otherwise
*/
static bool parseLine(const string& line, string& parameter, string& value);
/**
* Parses IHM configuration IDs of type <configurationItemName|configurationItemID>
*
* @param param Parameter string (input)
* @param parameterString "configurationItemName" part of the parameter string (output)
* @param parameterID "configurationItemID" part of the parameter string (output)
* @return bool true on success, false otherwise
*/
static bool parseParameterId(const string& param, string& parameterString, u_int16_t& parameterId);
/**
* Sets configuration parameter's value with given value
*
* @param parameter Parameter name
* @param value Parameter value
* @return true on success, false otherwise
*/
bool setValue(const string& parameter, const string& value);
private:
/**
* Directory where FACilities configuration files reside
*/
string facilitiesConfigurationDirectory;
/**
* Configuration files name vector
*/
vector<string> configurationFileNameVector;
/**
* UDP server port number
*/
int serverPort;
/**
* Wireless State Update interval (in seconds)
*/
u_int8_t wirelessStateUpdateInterval;
/**
* Location Update interval (in seconds)
*/
u_int8_t locationUpdateInterval;
/**
* Log level configuration
*/
Logger::LOG_LEVEL logLevel;
/**
* Logger object reference
*/
Logger& logger;
};
#endif /* MGMT_CONFIGURATION_HPP_ */
@@ -1,253 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_information_base.cpp
* \brief A container to hold configuration parameters of Management entity
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_information_base.hpp"
#include "util/mgmt_exception.hpp"
#include <boost/lexical_cast.hpp>
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
ManagementInformationBase::ManagementInformationBase(Logger& logger)
: itsKeyManager(logger), communicationProfileManager(logger), logger(logger) {
logger.info("Management Information Base has been created");
/**
* Default configuration for IPv6 is OFF
*/
this->ipv6Enabled = false;
}
ManagementInformationBase::~ManagementInformationBase() {}
bool ManagementInformationBase::initialise() {
try {
// Common Parameters
itsKeyManager.addKey(MGMT_GN_ALL_ITSKEY_ID_STATION_TYPE, "MIB_GN_ALL_STATION_TYPE", ITS_KEY_TYPE_COMMON, 1, 1, 30);
itsKeyManager.addKey(MGMT_GN_ALL_ITSKEY_ID_STATION_SUBTYPE, "MIB_GN_ALL_STATION_SUBTYPE", ITS_KEY_TYPE_COMMON, 1, 0, 1);
// NETwork Parameters
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_LOCAL_ADD_CONF_METHOD, "MIB_GN_NET_LOCAL_ADDR_CONF_METHOD", ITS_KEY_TYPE_NET, 0, 0, 1);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_DEFAULT_HOP_LIMIT, "MIB_GN_NET_DEFAULT_HOP_LIMIT", ITS_KEY_TYPE_NET, 1, 0, 255);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_MAX_PKT_LIFETIME, "MIB_GN_NET_MAX_PACKET_LIFETIME", ITS_KEY_TYPE_NET, 20000, 1, 6300000);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_MIN_PKT_REPETITION_INTERVAL, "MIB_GN_NET_MIN_PACKET_REPETITION_INTERVAL", ITS_KEY_TYPE_NET, 1000);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_GEO_BCAST_FORWARDING_ALG, "MIB_GN_NET_GEO_BCAST_FORWARDING_ALGORITHM", ITS_KEY_TYPE_NET, 0, 0, 2);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_GEO_UCAST_FORWARDING_ALG, "MIB_GN_NET_GEO_UCAST_FORWARDING_ALGORITHM", ITS_KEY_TYPE_NET, 0, 0, 3);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_TRAFFIC_CLASS_RELEVANCE, "MIB_GN_NET_TRAFFIC_CLASS_RELEVANCE", ITS_KEY_TYPE_NET, 5, 0, 7);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_TRAFFIC_CLASS_RELIABILITY, "MIB_GN_NET_TRAFFIC_CLASS_RELIABILITY", ITS_KEY_TYPE_NET, 2, 0, 3);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_TRAFFIC_CLASS_LATENCY, "MIB_GN_NET_TRAFFIC_CLASS_LATENCY", ITS_KEY_TYPE_NET, 2, 0, 3);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_CBF_MIN_TTS, "MIB_GN_NET_CBF_MIN_TTS", ITS_KEY_TYPE_NET, 100);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_CBF_MAX_TTS, "MIB_GN_NET_CBF_MAX_TTS", ITS_KEY_TYPE_NET, 500);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_MAX_COMM_RANGE, "MIB_GN_NET_MAX_COMM_RANGE", ITS_KEY_TYPE_NET, 1000);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_DEF_TX_POWER, "MIB_GN_NET_DEF_TX_POWER", ITS_KEY_TYPE_NET, 5);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_DEF_BITRATE, "MIB_GN_NET_DEF_BITRATE", ITS_KEY_TYPE_NET, 12);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_DEF_CHANNEL, "MIB_GN_NET_DEF_CHANNEL", ITS_KEY_TYPE_NET, 178);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_DEF_PRIORITY, "MIB_GN_NET_DEF_PRIORITY", ITS_KEY_TYPE_NET, 5, 0, 7);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_GN_DEF_CHANNEL_BW, "MIB_GN_NET_DEF_CHANNEL_BW", ITS_KEY_TYPE_NET, 30);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_SEC_ALLOW_UNSECURE, "MIB_GN_NET_SEC_ALLOW_UNSECURE", ITS_KEY_TYPE_NET, 1);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_SEC_END_2_END, "MIB_GN_NET_SEC_END2END", ITS_KEY_TYPE_NET, 0);
itsKeyManager.addKey(MGMT_GN_NET_ITSKEY_ID_SEC_PSEUDONYM, "MIB_GN_NET_SEC_PSEUDONYM", ITS_KEY_TYPE_NET, 0);
// FACilities Parameters
itsKeyManager.addKey(MGMT_GN_FAC_ITSKEY_ID_VEHICLE_WIDTH, "MIB_GN_FAC_VEHICLE_WIDTH", ITS_KEY_TYPE_FAC, 3);
itsKeyManager.addKey(MGMT_GN_FAC_ITSKEY_ID_VEHICLE_LENGTH, "MIB_GN_FAC_VEHICLE_LENGTH", ITS_KEY_TYPE_FAC, 7);
itsKeyManager.addKey(MGMT_GN_FAC_ITSKEY_ID_CAM_BTP_PORT, "MIB_GN_FAC_CAM_BTP_PORT", ITS_KEY_TYPE_FAC, 2000);
itsKeyManager.addKey(MGMT_GN_FAC_ITSKEY_ID_DENM_BTP_PORT, "MIB_GN_FAC_DENM_BTP_PORT", ITS_KEY_TYPE_FAC, 3000);
itsKeyManager.addKey(MGMT_GN_FAC_ITSKEY_ID_LDM_GARBAGE_COLLECTION_INTERVAL, "MIB_GN_FAC_LDM_GARBAGE_COLLECTION_INTERVAL", ITS_KEY_TYPE_FAC, 1000);
} catch (Exception& e) {
e.updateStackTrace("Cannot define ITS key");
throw;
}
logger.info("Management Information Base has been initialised");
logger.info("Number of ITS key elements defined is " + boost::lexical_cast<string>(itsKeyManager.getNumberOfKeys()));
return true;
}
bool ManagementInformationBase::setValue(ItsKeyID id, ItsKeyValue value) {
try {
itsKeyManager.setKeyValue(id, value);
} catch (Exception& e) {
e.updateStackTrace("Cannot set ITS key using its ID");
throw;
}
return true;
}
bool ManagementInformationBase::setValue(ItsKeyID id, const vector<unsigned char>& value) {
/**
* Set the value according to its data type
*/
logger.info("ITS key type to be changed is " + itsKeyManager.getDataTypeName(id));
switch (itsKeyManager.getDataType(id)) {
case ITS_DATA_TYPE_FLOAT:
if (value.size() != 4) {
logger.warning("ITS Key ID " + boost::lexical_cast<string>((int)id) + " has float type but incompatible size");
return false;
} else
logger.debug("ITS Key size is compatible, updating corresponding key...");
/**
* And update the value
*/
logger.info("ITS Key ID " + boost::lexical_cast<string>((int)id) + "'s current value is " + boost::lexical_cast<string>(itsKeyManager.getKeyValue(id).floatValue));
itsKeyManager.getKeyValue(id).floatValue = Util::parse4byteFloat(value);
logger.info("ITS Key ID " + boost::lexical_cast<string>((int)id) + "'s new value is " + boost::lexical_cast<string>(itsKeyManager.getKeyValue(id).floatValue));
break;
case ITS_DATA_TYPE_INTEGER:
if (value.size() != 4) {
logger.warning("ITS Key ID " + boost::lexical_cast<string>((int)id) + " has integer type but incompatible size");
return false;
} else
logger.debug("ITS Key size is compatible, updating corresponding key...");
/**
* And update the value
*/
logger.info("ITS Key ID " + boost::lexical_cast<string>((int)id) + "'s current value is " + boost::lexical_cast<string>(itsKeyManager.getKeyValue(id).intValue));
Util::parse4byteInteger(value.data(), &itsKeyManager.getKeyValue(id).intValue);
logger.info("ITS Key ID " + boost::lexical_cast<string>((int)id) + "'s new value is " + boost::lexical_cast<string>(itsKeyManager.getKeyValue(id).intValue));
break;
case ITS_DATA_TYPE_STRING:
logger.info("ITS Key ID " + boost::lexical_cast<string>((int)id) + "'s current value is " + itsKeyManager.getKeyValue(id).stringValue);
itsKeyManager.getKeyValue(id).stringValue = string(value.begin(), value.end());
logger.info("ITS Key ID " + boost::lexical_cast<string>((int)id) + "'s current value is " + itsKeyManager.getKeyValue(id).stringValue);
break;
default:
logger.warning("Invalid data type for an ITS key");
return false;
}
return true;
}
bool ManagementInformationBase::setValue(const string& name, ItsKeyValue value) {
if (name.empty())
throw Exception("Incoming parameter name is empty!", logger);
try {
itsKeyManager.setKeyValue(name, value);
} catch (Exception& e) {
e.updateStackTrace("Cannot set ITS key using its name");
throw;
}
return true;
}
ItsKeyValue ManagementInformationBase::getItsKeyValue(ItsKeyID id) {
return itsKeyManager.getKeyValue(id);
}
std::size_t ManagementInformationBase::getLength(ItsKeyID itsKey) {
return itsKeyManager.getDataTypeSize(itsKey);
}
ItsKeyManager& ManagementInformationBase::getItsKeyManager() {
return this->itsKeyManager;
}
WirelessStateResponseItem* ManagementInformationBase::getWirelessState(InterfaceID interfaceId) {
return wirelessStateMap[interfaceId];
}
bool ManagementInformationBase::updateWirelessState(InterfaceID interfaceId, WirelessStateResponseItem* wirelessState) {
map<InterfaceID, WirelessStateResponseItem*>::iterator itemIndex = wirelessStateMap.find(interfaceId);
/**
* First check if we already had this Interface ID, if yes, then replace it
*/
if (itemIndex == wirelessStateMap.end())
wirelessStateMap.insert(wirelessStateMap.end(), pair<InterfaceID, WirelessStateResponseItem*>(interfaceId, wirelessState));
else
itemIndex->second = wirelessState;
/**
* Print the list of interfaces we had so far
*/
logger.info("I had the information for following interfaces so far...");
for (map<InterfaceID, WirelessStateResponseItem*>::const_iterator it = wirelessStateMap.begin(); it != wirelessStateMap.end(); ++it)
logger.info(it->second->toString());
return true;
}
NetworkStateMessage& ManagementInformationBase::getNetworkState() {
return networkState;
}
CommunicationProfileManager& ManagementInformationBase::getCommunicationProfileManager() {
return communicationProfileManager;
}
bool ManagementInformationBase::updateLocationTable(LocationTableItem* locationTableItem) {
locationTable.insert(locationTable.end(), pair<GnAddress, LocationTableItem*>(locationTableItem->gnAddress, locationTableItem));
return true;
}
const LocationInformation& ManagementInformationBase::getLocationInformation() {
return location;
}
bool ManagementInformationBase::setLocationInformation(const LocationInformation& locationUpdate) {
location = locationUpdate;
return true;
}
bool ManagementInformationBase::setNetworkFlags(const u_int8_t& networkFlags) {
this->networkFlags = networkFlags;
return true;
}
void ManagementInformationBase::enableIpv6() {
ipv6Enabled = true;
}
bool ManagementInformationBase::isIpv6Enabled() const {
return ipv6Enabled;
}
@@ -1,222 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_information_base.hpp
* \brief A container to hold configuration parameters of Management entity
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_INFORMATION_BASE_HPP_
#define MGMT_INFORMATION_BASE_HPP_
#include "mgmt_comm_prof_manager.hpp"
#include "mgmt_its_key_manager.hpp"
#include "mgmt_types.hpp"
#include <sys/types.h>
#include <string>
#include <map>
/**
* A container to hold configuration parameters of Management entity
*/
class ManagementInformationBase {
public:
/**
* Constructor for ManagementInformationBase class
*
* @param Logger object reference
*/
ManagementInformationBase(Logger& logger);
/**
* Destructor for ManagementInformationBase class
*/
~ManagementInformationBase();
public:
/**
* Initialises ItsKeyManager member by defining configuration items
*
* @return true on success, false otherwise
*/
bool initialise();
/**
* Returns value of relevant ITS key through ItsKeyManager methods
*
* @param itsKeyId ITS key ID
* @return Value of relevant ITS key
*/
ItsKeyValue getItsKeyValue(ItsKeyID itsKeyId);
/**
* Sets value of relevant ITS key through ItsKeyManager methods
*
* @param itsKeyId ITS key ID
* @param value Value to be set
* @return true on success, false otherwise
*/
bool setValue(ItsKeyID itsKeyId, ItsKeyValue value);
/**
* Sets value of relevant ITS key through ItsKeyManager methods
*
* @param itsKeyId ITS key ID
* @param value Value to be set
* @return true on success, false otherwise
*/
bool setValue(ItsKeyID itsKeyId, const vector<unsigned char>& value);
/**
* Sets value of relevant ITS key through ItsKeyManager methods
*
* @param configurationItemName std::string name of configuration item
* @param value Value to be set
* @return true on success, false otherwise
*/
bool setValue(const string& configurationItemName, ItsKeyValue value);
/**
* Returns DWORD length of relevant ITS key
*
* @param itsKeyId ITS key ID
* @return byte length of given key of type std::size_t
*/
std::size_t getLength(ItsKeyID itsKeyId);
/**
* Returns ItsKeyManager container's reference
*
* @return ItsKeyManager reference
*/
ItsKeyManager& getItsKeyManager();
/**
* Returns wireless state of relevant interface
*
* @param interfaceId Interface ID of the interface
* @return A reference to WirelessStateResponseItem of relevant interface
*/
WirelessStateResponseItem* getWirelessState(InterfaceID interfaceId);
/**
* Adds a new wireless state information for an interface
*
* @param interfaceId Interface ID of type InterfaceID
* @param wirelessState Wireless State information
* @return true on success, false otherwise
*/
bool updateWirelessState(InterfaceID interfaceId, WirelessStateResponseItem* wirelessState);
/**
* Returns the network state of this MIB
*
* @return A reference to the NetworkStateMessage object of this MIB
*/
NetworkStateMessage& getNetworkState();
/**
* Returns Communication Profile Manager reference
*
* @return Communication Profile Manager reference
*/
CommunicationProfileManager& getCommunicationProfileManager();
/**
* Updates Location Table with given information
*
* @param locationTableItem A pointer to a location Table Item
* @return true on success, false otherwise
*/
bool updateLocationTable(LocationTableItem* locationTableItem);
/**
* Returns location information
*
* @return LocationInformation structure
*/
const LocationInformation& getLocationInformation();
/**
* Updates location information with given data
*
* @param locationUpdate A copy of a LocationInformation structure
* @return true on success, false otherwise
*/
bool setLocationInformation(const LocationInformation& locationUpdate);
/**
* Sets network flags
*
* @param networkFlags Network flags of type u_int8_t
* @return true on success, false otherwise
*/
bool setNetworkFlags(const u_int8_t& networkFlags);
/**
* Sets IPv6 configuration value, if this is not called then the
* default value "false" will stay intact
*/
void enableIpv6();
/**
* Retuns a boolean indication IPv6 configuration status
*/
bool isIpv6Enabled() const;
private:
/**
* An object of ItsKeyManager class to keep track of ITS keys and their values
*/
ItsKeyManager itsKeyManager;
/**
* Wireless and network state messages
*/
map<InterfaceID, WirelessStateResponseItem*> wirelessStateMap;
/**
* Network state of this MIB entity
*/
NetworkStateMessage networkState;
/**
* Location Table map
*/
u_int8_t networkFlags;
/**
* Location table that consists of a map of LocationTableItem objects
*/
map<GnAddress, LocationTableItem*> locationTable;
/**
* Communication profile manager
*/
CommunicationProfileManager communicationProfileManager;
/**
* Location information
*/
LocationInformation location;
/**
* Ipv6 configuration
*/
bool ipv6Enabled;
/**
* Logger object reference
*/
Logger& logger;
};
#endif /* MGMT_INFORMATION_BASE_HPP_ */
@@ -1,80 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_inquiry_thread.cpp
* \brief A thread worker function to ask repetitive questions to relevant modules to update MIB
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_inquiry_thread.hpp"
#include <boost/lexical_cast.hpp>
#include <boost/date_time.hpp>
#include "util/mgmt_util.hpp"
#include <boost/thread.hpp>
#include <iostream>
using namespace std;
InquiryThread::InquiryThread(IManagementPacketSender* packetSender, u_int8_t wirelessStateUpdateInterval, Logger& logger)
: packetSender(packetSender), logger(logger) {
this->wirelessStateUpdateInterval = wirelessStateUpdateInterval;
}
InquiryThread::~InquiryThread() {
}
void InquiryThread::operator()() {
/**
* Send a Wireless State Request every `wirelessStateUpdateInterval' second(s)
*/
boost::posix_time::seconds wait(wirelessStateUpdateInterval);
while (true) {
logger.info("Will wait for " + boost::lexical_cast<string>((int)wirelessStateUpdateInterval) + " second(s) to send a Wireless State Request");
boost::this_thread::sleep(wait);
if (requestWirelessStateUpdate())
logger.info("A Wireless State Request packet sent to GN");
else
logger.warning("Cannot send a Wireless State Request packet to GN!");
}
}
bool InquiryThread::requestWirelessStateUpdate() {
/**
* Use ManagementServerFunctionality to send a Wireless State Update to GN
*/
return packetSender->sendWirelessStateRequest();
}
@@ -1,100 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_inquiry_thread.hpp
* \brief A thread worker function to ask repetitive questions to relevant modules to update MIB
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_INQUIRY_THREAD_HPP_
#define MGMT_INQUIRY_THREAD_HPP_
#include "interface/mgmt_packet_sender.hpp"
#include "mgmt_information_base.hpp"
#include "util/mgmt_log.hpp"
/**
* A thread worker function to ask repetitive questions to relevant modules to update MIB
*/
class InquiryThread {
public:
/**
* Constructor for InquiryThread class
*
* @param packetSender Packet sending functionality of ManagementServer class
* @param wirelessStateUpdateInterval Wireless State Update interval in seconds
* @param logger Logger object reference
*/
InquiryThread(IManagementPacketSender* packetSender, u_int8_t wirelessStateUpdateInterval, Logger& logger);
/**
* Destructor for InquiryThread class
*/
virtual ~InquiryThread();
public:
/**
* () operator overload to pass this method to boost::thread
*
* @param none
* @return none
*/
void operator()();
/**
* Sends request for a Wireless State Response message
* Incoming message will be handled and MIB will be updated
* accordingly by GeonetMessageHandler class
*
* @param none
* @return true on success, false otherwise
*/
bool requestWirelessStateUpdate();
private:
/**
* IManagementPacketSender reference to use ManagementServer's functionality
*/
IManagementPacketSender* packetSender;
/**
* Wireless State Update interval in seconds
*/
u_int8_t wirelessStateUpdateInterval;
/**
* Logger object reference
*/
Logger& logger;
};
#endif /* MGMT_INQUIRY_THREAD_HPP_ */
@@ -1,223 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_its_key_manager.cpp
* \brief ITS keys and relevant configuration information is maintained in this container
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_its_key_manager.hpp"
#include "util/mgmt_exception.hpp"
#include <boost/lexical_cast.hpp>
#include "util/mgmt_util.hpp"
#include <sstream>
ItsKeyManager::ItsKeyManager(Logger& logger) : logger(logger) {
/**
* Insert string correspondences for numerical values of ITS key data types
*/
itsKeyDataTypeName.insert(itsKeyDataTypeName.end(), std::make_pair(ITS_DATA_TYPE_FLOAT, "FLOAT"));
itsKeyDataTypeName.insert(itsKeyDataTypeName.end(), std::make_pair(ITS_DATA_TYPE_INTEGER, "INTEGER"));
itsKeyDataTypeName.insert(itsKeyDataTypeName.end(), std::make_pair(ITS_DATA_TYPE_STRING, "STRING"));
}
ItsKeyManager::~ItsKeyManager() {
itsKeyMap.clear();
}
ItsKeyID ItsKeyManager::findKeyId(const string& keyName) const {
map<ItsKeyID, ItsKey>::const_iterator iterator = itsKeyMap.begin();
while (iterator != this->itsKeyMap.end()) {
if (!iterator->second.name.compare(keyName))
return iterator->first;
++iterator;
}
return static_cast<ItsKeyID>(0xDEAD);
}
map<ItsKeyID, ItsKeyValue> ItsKeyManager::getSubset(ItsKeyType keyType) const {
map<ItsKeyID, ItsKey>::const_iterator iterator = itsKeyMap.begin();
map<ItsKeyID, ItsKeyValue> subset;
while (iterator != this->itsKeyMap.end()) {
// Add every ITS key which is common and is of requested type into the map
if (iterator->second.keyType == keyType || iterator->second.keyType == ITS_KEY_TYPE_COMMON || keyType == ITS_KEY_TYPE_ALL)
subset.insert(subset.end(), std::make_pair(iterator->first, iterator->second.value));
++iterator;
}
return subset;
}
bool ItsKeyManager::addKey(ItsKeyID id, const string& name, ItsKeyType keyType, ItsDataType dataType, ItsKeyValue value, ItsKeyValue minValue, ItsKeyValue maxValue) {
/**
* Validate incoming values
*/
if (name.empty())
throw Exception("ITS key name is empty!", logger);
else if (dataType == ITS_DATA_TYPE_INTEGER && (value.intValue < minValue.intValue || value.intValue > maxValue.intValue))
throw Exception("ITS key '" + name + "'s value (" + boost::lexical_cast<string>(value.intValue) + ") is out-of-range!", logger);
else if (dataType == ITS_DATA_TYPE_FLOAT && (value.floatValue < minValue.floatValue || value.floatValue > maxValue.floatValue))
throw Exception("ITS key '" + name + "'s value (" + boost::lexical_cast<string>(value.floatValue) + ") is out-of-range!", logger);
ItsKey itsKey;
itsKey.name = name;
itsKey.keyType = keyType;
itsKey.dataType = dataType;
itsKey.value = value;
itsKey.minValue = minValue;
itsKey.maxValue = maxValue;
itsKeyMap.insert(itsKeyMap.end(), std::make_pair(id, itsKey));
return true;
}
bool ItsKeyManager::addKey(ItsKeyID id, const string& name, ItsKeyType keyType, u_int32_t value, u_int32_t minValue, u_int32_t maxValue) {
ItsKeyValue valueContainer, minValueContainer, maxValueContainer;
valueContainer.intValue = value;
minValueContainer.intValue = minValue;
maxValueContainer.intValue = maxValue;
ItsKey itsKey;
itsKey.name = name;
itsKey.keyType = keyType;
itsKey.dataType = ITS_DATA_TYPE_INTEGER;
itsKey.value = valueContainer;
itsKey.minValue = minValueContainer;
itsKey.maxValue = maxValueContainer;
itsKeyMap.insert(itsKeyMap.end(), std::make_pair(id, itsKey));
return true;
}
bool ItsKeyManager::addKey(ItsKeyID id, const string& name, ItsKeyType keyType, const string& value) {
ItsKeyValue valueContainer;
valueContainer.stringValue = Util::trim(value, '"');
ItsKey itsKey;
itsKey.name = name;
itsKey.keyType = keyType;
itsKey.dataType = ITS_DATA_TYPE_STRING;
itsKey.value = valueContainer;
itsKeyMap.insert(itsKeyMap.end(), std::make_pair(id, itsKey));
return true;
}
ItsKeyValue& ItsKeyManager::getKeyValue(ItsKeyID id) {
return itsKeyMap[id].value;
}
ItsKeyType ItsKeyManager::getKeyType(ItsKeyID id) {
return itsKeyMap[id].keyType;
}
ItsDataType ItsKeyManager::getDataType(ItsKeyID id) {
return itsKeyMap[id].dataType;
}
string ItsKeyManager::getDataTypeName(ItsKeyID id) {
return itsKeyDataTypeName[itsKeyMap[id].dataType];
}
std::size_t ItsKeyManager::getDataTypeSize(ItsKeyID id) {
switch (itsKeyMap[id].dataType) {
case ITS_DATA_TYPE_INTEGER:
return sizeof(int);
case ITS_DATA_TYPE_FLOAT:
return sizeof(float);
case ITS_DATA_TYPE_STRING:
return itsKeyMap[id].value.stringValue.length();
default:
logger.warning("ITS key with ID " + boost::lexical_cast<string>((int)id) + " doesn't have a valid data type!");
/**
* Most of the ITS keys are of type integer so let's return the size of an integer
*/
return sizeof(int);
}
}
bool ItsKeyManager::setKeyValue(const string& name, ItsKeyValue value) {
map<ItsKeyID, ItsKey>::iterator iterator = itsKeyMap.begin();
while (iterator != this->itsKeyMap.end()) {
if (!name.compare(0, iterator->second.name.length(), iterator->second.name)) {
iterator->second.value = value;
return true;
}
++iterator;
}
return false;
}
bool ItsKeyManager::setKeyValue(ItsKeyID id, ItsKeyValue value) {
itsKeyMap[id].value = value;
return true;
}
u_int16_t ItsKeyManager::getNumberOfKeys(ItsKeyType type) const {
/**
* If we're asked for all, return the size of the ITS key map
*/
if (type == ITS_KEY_TYPE_ALL)
return itsKeyMap.size();
map<ItsKeyID, ItsKey>::const_iterator iterator = itsKeyMap.begin();
u_int16_t numberOfKeys = 0;
while (iterator != itsKeyMap.end()) {
/**
* Count all `common' keys and those of type `type'
*/
if (type == ITS_KEY_TYPE_COMMON || iterator->second.keyType == type)
++numberOfKeys;
++iterator;
}
return numberOfKeys;
}
@@ -1,244 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_its_key_manager.hpp
* \brief ITS keys and relevant configuration information is maintained in this container
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_ITS_KEY_MANAGER_HPP_
#define MGMT_ITS_KEY_MANAGER_HPP_
#include <map>
#include <string>
#include <climits>
using namespace std;
#include "mgmt_types.hpp"
#include "util/mgmt_log.hpp"
#include <sys/types.h>
/**
* ITS key types according to module they belong to
*
* ITS_KEY_TYPE_COMMON: ITS keys common for NETwork and FACilities,
* ITS_KEY_TYPE_NET: NETwork ITS keys,
* ITS_KEY_TYPE_FAC: FACilities ITS keys,
* ITS_KEY_TYPE_IHM: PCVE IHM keys,
* ITS_KEY_TYPE_ALL: All ITS keys defined
*/
enum ItsKeyType {
ITS_KEY_TYPE_COMMON = 0,
ITS_KEY_TYPE_NET = 1,
ITS_KEY_TYPE_FAC = 2,
ITS_KEY_TYPE_IHM = 3,
ITS_KEY_TYPE_ALL = 4
};
/**
* ITS data type
*/
enum ItsDataType {
ITS_DATA_TYPE_INTEGER = 0,
ITS_DATA_TYPE_FLOAT = 1,
ITS_DATA_TYPE_STRING = 2
};
/**
* ITS key value container that can contain
* integer, float, and string values
*/
struct ItsKeyValue {
string stringValue;
float floatValue;
u_int32_t intValue;
};
/**
* ITS key structure holding every property of an ITS key
*/
struct ItsKey {
string name;
ItsKeyType keyType;
ItsDataType dataType;
ItsKeyValue value;
ItsKeyValue minValue;
ItsKeyValue maxValue;
};
/**
* ITS keys and relevant configuration information is maintained in this container
*/
class ItsKeyManager {
public:
/**
* Constructor for ItsKeyManager class
*
* @param logger Logger object reference
*/
ItsKeyManager(Logger& logger);
/**
* Destructor for ItsKeyManager class
*/
~ItsKeyManager();
public:
/**
* Enqueues given ITS key, name and value to ITS keys map
*
* @param id ITS key ID of new key to be added
* @param name Name of new key to be added
* @param keyType ITS key type
* @param dataType ITS key's data type
* @param value Value of new key to be added
* @param minValue Minimum value of new key
* @param maxValue Maximum value of new key
* @return true on success, false otherwise
*/
bool addKey(ItsKeyID id, const string& name, ItsKeyType keyType, ItsDataType dataType, ItsKeyValue value, ItsKeyValue minValue, ItsKeyValue maxValue);
/**
* Enqueues given ITS key, name and value to ITS keys map
*
* @param id ITS key ID of new key to be added
* @param name Name of new key to be added
* @param keyType ITS key type
* @param value Value of new key to be added
* @param minValue Minimum value of new key
* @param maxValue Maximum value of new key
* @return true on success, false otherwise
*/
bool addKey(ItsKeyID id, const string& name, ItsKeyType keyType, u_int32_t value, u_int32_t minValue = 0, u_int32_t maxValue = INT_MAX);
/**
* Enqueues given ITS key, name and value to ITS keys map
*
* @param id ITS key ID of new key to be added
* @param name Name of new key to be added
* @param keyType ITS key type
* @param value Value of new key to be added
* @return true on success, false otherwise
*/
bool addKey(ItsKeyID id, const string& name, ItsKeyType keyType, const string& value);
/**
* Returns the value container of the key with given ITS key ID
*
* @param id ITS key ID of the key
* @return Value of ITS key
*/
ItsKeyValue& getKeyValue(ItsKeyID id);
/**
* Returns ITS key type
*
* @param id ITS key ID of the key
* @return ITS key type
*/
ItsKeyType getKeyType(ItsKeyID id);
/**
* Returns ITS data type (integer or string)
*
* @param id ITS key ID of the key
* @return ITS key type
*/
ItsDataType getDataType(ItsKeyID id);
/**
* Returns ITS data type's string name
*
* @param id ITS key ID of the key
* @return std::string name of the data type of the ITS key
*/
string getDataTypeName(ItsKeyID id);
/**
* Returns the size of ITS key
*
* @param id ITS key ID of the key
* @return Size of the ITS key's value in bytes
*/
std::size_t getDataTypeSize(ItsKeyID id);
/**
* Sets the value of ITS key given its name
*
* @param name Name of ITS key to be reset
* @param value Value to be set as the new value of relevant ITS key
* @return true on success, false otherwise
*/
bool setKeyValue(const string& name, ItsKeyValue value);
/**
* Sets the value of ITS key given its ITS key ID
*
* @param id ITS key ID of ITS key to be reset
* @param value Value to be set as the new value of relevant ITS key
* @return true on success, false otherwise
*/
bool setKeyValue(ItsKeyID id, ItsKeyValue value);
/**
* Returns ITS key ID of ITS key given its name
*
* @param keyName Name of the ITS key being searched
* @return ITS key ID of the ITS key if found, 0xDEAD otherwise
*/
ItsKeyID findKeyId(const string& keyName) const;
/**
* Returns the number of ITS keys defined in ITS key map
*
* @param type ITS Key type, may take following values,
* ITS_KEY_TYPE_COMMON = Returns ITS keys common for NETwork and FACilities,
* ITS_KEY_TYPE_NET = Returns NETwork ITS keys,
* ITS_KEY_TYPE_FAC = Returns FACilities ITS keys,
* ITS_KEY_TYPE_ALL = Returns all ITS keys defined
*/
u_int16_t getNumberOfKeys(ItsKeyType type = ITS_KEY_TYPE_COMMON) const;
public:
/**
* Returns the subset of ITS key map having ITS keys of given type
*
* @param keyType ITS key type to filter ITS keys
* @return List of type std::map containing ITS keys of asked type
*/
map<ItsKeyID, ItsKeyValue> getSubset(ItsKeyType keyType) const;
private:
/**
* List of type std::map for 'ITS key ID to ITS key value' mapping
*/
map<ItsKeyID, ItsKey> itsKeyMap;
/**
* String name map for ITS key data types
*/
map<ItsDataType, string> itsKeyDataTypeName;
/**
* Logger object reference
*/
Logger& logger;
};
#endif /* MGMT_ITS_KEY_MANAGER_HPP_ */
@@ -1,63 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_packet_factory.cpp
* \brief A container with necessary (mostly responses) packet generation functionality
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "packets/mgmt_fac_packet_comm_profile_selection_response.hpp"
#include "packets/mgmt_gn_packet_comm_profile_response.hpp"
#include "packets/mgmt_gn_packet_set_configuration.hpp"
#include "mgmt_packet_factory.hpp"
#include <iostream>
using namespace std;
ManagementPacketFactory::ManagementPacketFactory(ManagementInformationBase& mib, Logger& logger) :
mib(mib), logger(logger) {
}
GeonetPacket* ManagementPacketFactory::createSetConfigurationEventPacket(ItsKeyID itsKeyID) {
return new GeonetSetConfigurationEventPacket(mib, logger, itsKeyID);
}
GeonetPacket* ManagementPacketFactory::createCommunicationProfileResponse(GeonetCommunicationProfileRequestPacket* request) {
return new GeonetCommunicationProfileResponsePacket(mib, request->getCommunicationProfileRequestSet(), request->getSequenceNumber(), logger);
}
GeonetPacket* ManagementPacketFactory::createCommunicationProfileSelectionResponse(FacCommunicationProfileSelectionRequestPacket* request) {
return new FacCommunicationProfileSelectionResponsePacket(mib, request->getLatency(), request->getRelevance(), request->getReliability(), request->getSequenceNumber(), logger);
}
@@ -1,105 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_packet_factory.hpp
* \brief A container with necessary (mostly responses) packet generation functionality
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_PACKET_FACTORY_HPP_
#define MGMT_PACKET_FACTORY_HPP_
#include "packets/mgmt_fac_packet_comm_profile_selection_request.hpp"
#include "packets/mgmt_gn_packet_comm_profile_request.hpp"
#include "packets/mgmt_gn_packet.hpp"
#include "mgmt_information_base.hpp"
#include "util/mgmt_log.hpp"
#include "mgmt_types.hpp"
/**
* A container with necessary (mostly responses) packet generation functionality
*/
class ManagementPacketFactory {
public:
/**
* Constructor for ManagementPacketFactory class
*
* @param mib Management Information Base reference
* @param logger Logger object reference
*/
ManagementPacketFactory(ManagementInformationBase& mib, Logger& logger);
public:
/**
* Creates and returns a Set Configuration packet whose type is determined
* by the default parameter
*
* @param itsKeyID ITS key ID, if this has the default value MGMT_GN_ITSKEY_ALL
* then this method creates a bulk response, otherwise generated packet will carry
* specified ITS key only
* @return Pointer to the GeonetPacket created
*/
GeonetPacket* createSetConfigurationEventPacket(ItsKeyID itsKeyID = MGMT_GN_ITSKEY_ALL);
/**
* Creates a Communication Profile Response packet according to what
* was asked in relevant request packet
*
* @param request Pointer to the Communication Profile Request packet
* @return Pointer to the Communication Profile Response packet
*/
GeonetPacket* createCommunicationProfileResponse(GeonetCommunicationProfileRequestPacket* request);
/**
* Creates a Communication Profile Selection Response packet according to what
* was asked in relevant request packet
*
* @param request Pointer to the Communication Profile Selection Request packet
* @return Pointer to the Communication Profile Selection Response packet
*/
GeonetPacket* createCommunicationProfileSelectionResponse(FacCommunicationProfileSelectionRequestPacket* request);
private:
/**
* ManagementInformationBase reference used to fetch necessary information
* to create certain messages/replies
*/
ManagementInformationBase& mib;
/**
* Logger object reference
*/
Logger& logger;
};
#endif /* MGMT_PACKET_FACTORY_HPP_ */
@@ -1,269 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_handler.cpp
* \brief A container with packet handling functionality, all the packets read on the socket is passed here
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_packet_handler.hpp"
#include "util/mgmt_exception.hpp"
#include <boost/lexical_cast.hpp>
#include "mgmt_types.hpp"
#include "util/mgmt_util.hpp"
#include <exception>
#include <iostream>
#include <cstring>
using namespace std;
PacketHandler::PacketHandler(ManagementInformationBase& mib, Logger& logger) :
mib(mib), logger(logger) {
try {
this->packetFactory = new ManagementPacketFactory(mib, logger);
} catch (...) {
throw Exception("Cannot allocate a Geonet Packet Factory!", logger);
}
}
PacketHandler::PacketHandler(const PacketHandler& packetHandler) :
mib(packetHandler.mib), logger(packetHandler.logger) {
throw Exception("Copy constructor for a PacketHandler object is called!", logger);
}
PacketHandler::~PacketHandler() {
delete packetFactory;
}
PacketHandlerResult* PacketHandler::handle(const vector<unsigned char>& packetBuffer) {
if (packetBuffer.size() < sizeof(MessageHeader)) {
logger.error("Buffer size (" + boost::lexical_cast<string>(packetBuffer.size()) + " byte(s)) is not enough to carry a message!");
logger.warning("Discarding packet...");
return new PacketHandlerResult(PacketHandlerResult::INVALID_PACKET, NULL);
}
u_int16_t eventType = GeonetPacket::parseEventTypeOfPacketBuffer(packetBuffer);
switch (eventType) {
case MGMT_GN_EVENT_CONF_REQUEST:
logger.info("GET_CONFIGURATION packet of size " + boost::lexical_cast<string>(packetBuffer.size()) + " has been received from GN");
return handleGetConfigurationEvent(new GeonetGetConfigurationEventPacket(packetBuffer, logger), ManagementClient::GN);
case MGMT_FAC_EVENT_CONF_REQUEST:
logger.info("GET_CONFIGURATION packet of size " + boost::lexical_cast<string>(packetBuffer.size()) + " has been received from FAC");
return handleGetConfigurationEvent(new GeonetGetConfigurationEventPacket(packetBuffer, logger), ManagementClient::FAC);
case MGMT_GN_EVENT_STATE_NETWORK_STATE:
logger.info("NETWORK_STATE packet of size " + boost::lexical_cast<string>(packetBuffer.size()) + " has been received");
return handleNetworkStateEvent(new GeonetNetworkStateEventPacket(mib, packetBuffer, logger));
case MGMT_GN_EVENT_STATE_WIRELESS_STATE_RESPONSE:
logger.info("WIRELESS_STATE_RESPONSE packet (GN) of size " + boost::lexical_cast<string>(packetBuffer.size()) + " has been received");
return handleWirelessStateResponseEvent(new GeonetWirelessStateResponseEventPacket(mib, packetBuffer, logger));
case MGMT_LTE_EVENT_STATE_WIRELESS_STATE_RESPONSE:
logger.info("WIRELESS_STATE_RESPONSE packet (LTE) of size " + boost::lexical_cast<string>(packetBuffer.size()) + " has been received");
return handleWirelessStateResponseEvent(new LteWirelessStateResponseEventPacket(mib, packetBuffer, logger));
case MGMT_GN_EVENT_CONF_COMM_PROFILE_REQUEST:
logger.info("COMMUNICATION_PROFILE_REQUEST packet of size " + boost::lexical_cast<string>(packetBuffer.size()) + " has been received from GN");
return handleCommunicationProfileRequestEvent(new GeonetCommunicationProfileRequestPacket(packetBuffer, logger), ManagementClient::GN);
case MGMT_FAC_EVENT_CONF_COMM_PROFILE_REQUEST:
logger.info("COMMUNICATION_PROFILE_REQUEST packet of size " + boost::lexical_cast<string>(packetBuffer.size()) + " has been received from FAC");
return handleCommunicationProfileRequestEvent(new GeonetCommunicationProfileRequestPacket(packetBuffer, logger), ManagementClient::FAC);
case MGMT_GN_EVENT_LOCATION_TABLE_RESPONSE:
logger.info("LOCATION_TABLE_RESPONSE packet of size " + boost::lexical_cast<string>(packetBuffer.size()) + " has been received");
return handleLocationTableResponse(new GeonetLocationTableResponseEventPacket(mib, packetBuffer, logger));
case MGMT_FAC_EVENT_CONF_NOTIFICATION:
logger.info("CONFIGURATION_NOTIFICATION packet of size " + boost::lexical_cast<string>(packetBuffer.size()) + " has been received");
return handleConfigurationNotification(new FacConfigurationNotificationPacket(mib, packetBuffer, logger));
case MGMT_FAC_EVENT_LOCATION_UPDATE:
logger.info("LOCATION_UPDATE packet of size " + boost::lexical_cast<string>(packetBuffer.size()) + " has been received");
return handleLocationUpdate(new GeonetLocationUpdateEventPacket(mib, packetBuffer, logger));
case MGMT_FAC_EVENT_CONF_COMM_PROFILE_SELECTION_REQUEST:
logger.info("COMM_PROF_SELECTION_REQUEST packet of size " + boost::lexical_cast<string>(packetBuffer.size()) + " has been received");
return handleCommunicationProfileSelectionRequest(new FacCommunicationProfileSelectionRequestPacket(packetBuffer, logger));
/**
* Handle unexpected packets as well
*/
case MGMT_GN_EVENT_LOCATION_TABLE_REQUEST:
case MGMT_GN_EVENT_CONF_UPDATE_AVAILABLE:
case MGMT_GN_EVENT_CONF_CONT_RESPONSE:
case MGMT_FAC_EVENT_CONF_CONT_RESPONSE:
case MGMT_GN_EVENT_CONF_BULK_RESPONSE:
case MGMT_FAC_EVENT_CONF_BULK_RESPONSE:
case MGMT_GN_EVENT_CONF_COMM_PROFILE_RESPONSE:
case MGMT_FAC_EVENT_CONF_COMM_PROFILE_RESPONSE:
case MGMT_GN_EVENT_STATE_WIRELESS_STATE_REQUEST:
case MGMT_FAC_EVENT_CONF_COMM_PROFILE_SELECTION_RESPONSE:
logger.error("Unexpected packet (event: " + boost::lexical_cast<string>(eventType) + ") received, connected client is buggy");
logger.error("Ignoring...");
return new PacketHandlerResult(PacketHandlerResult::INVALID_PACKET, NULL);
case MGMT_EVENT_ANY:
default:
logger.error("Unknown message received, ignoring...");
return new PacketHandlerResult(PacketHandlerResult::INVALID_PACKET, NULL);
}
return new PacketHandlerResult(PacketHandlerResult::DISCARD_PACKET, NULL);
}
PacketHandlerResult* PacketHandler::handleGetConfigurationEvent(GeonetGetConfigurationEventPacket* request, ManagementClient::ManagementClientType clientType) {
if (!request)
return new PacketHandlerResult(PacketHandlerResult::INVALID_PACKET, NULL);
/**
* Create a response according to the request
*/
GeonetPacket* reply = this->packetFactory->createSetConfigurationEventPacket(static_cast<ItsKeyID> (request->getConfID()));
/**
* Set the event type/sub-type according to the client type (no need to change anything
* if the client type is GN, it's the default value)
*/
if (clientType == ManagementClient::FAC) {
/**
* Mind the type of the Set Configuration packet, it may be BULK or CONTINUOUS
*/
if (reply->getEventType() == MGMT_GN_EVENT_CONF_BULK_RESPONSE)
reply->setEventType(MGMT_FAC_EVENT_CONF_BULK_RESPONSE);
else
reply->setEventType(MGMT_FAC_EVENT_CONF_CONT_RESPONSE);
}
/**
* Clean up
*/
delete request;
logger.info("A SET_CONFIGURATION packet is prepared, will be sent soon...");
return new PacketHandlerResult(PacketHandlerResult::DELIVER_PACKET, reply);
}
PacketHandlerResult* PacketHandler::handleNetworkStateEvent(GeonetNetworkStateEventPacket* request) {
delete request;
/*
* Creation of a GeonetNetworkStateEventPacket is enough for processing...
*/
return new PacketHandlerResult(PacketHandlerResult::DISCARD_PACKET, NULL);
}
PacketHandlerResult* PacketHandler::handleWirelessStateResponseEvent(GeonetPacket* request) {
delete request;
/*
* Creation of a {Lte|Gn}WirelessStateEventPacket is enough for processing...
*/
return new PacketHandlerResult(PacketHandlerResult::DISCARD_PACKET, NULL);
}
PacketHandlerResult* PacketHandler::handleLocationTableResponse(GeonetLocationTableResponseEventPacket* packet) {
delete packet;
/*
* Creation of a GeonetLocationTableResponseEventPacket is enough for processing...
*/
return new PacketHandlerResult(PacketHandlerResult::DISCARD_PACKET, NULL);
}
PacketHandlerResult* PacketHandler::handleConfigurationNotification(FacConfigurationNotificationPacket* packet) {
if (!packet) {
logger.warning("Invalid Configuration Notification packet received!");
return NULL;
}
/**
* MIB is already notified about this ITS key value change in the
* constructor of FacConfigurationNotificationPacket class
*/
/**
* Command ManagementServer to notify GN about this update...
*/
return new PacketHandlerResult(PacketHandlerResult::SEND_CONFIGURATION_UPDATE_AVAILABLE, NULL);
}
PacketHandlerResult* PacketHandler::handleCommunicationProfileRequestEvent(GeonetCommunicationProfileRequestPacket* request, ManagementClient::ManagementClientType clientType) {
if (!request)
return new PacketHandlerResult(PacketHandlerResult::INVALID_PACKET, NULL);
/**
* Create a response according to the request and send to the client right away
*/
GeonetPacket* reply = this->packetFactory->createCommunicationProfileResponse(request);
/**
* Set the event type/sub-type according to the client type (no need to change anything
* if the client type is GN, it's the default value)
*/
if (clientType == ManagementClient::FAC)
reply->setEventType(MGMT_FAC_EVENT_CONF_COMM_PROFILE_RESPONSE);
/**
* Clean up
*/
delete request;
return new PacketHandlerResult(PacketHandlerResult::DELIVER_PACKET, reply);
}
PacketHandlerResult* PacketHandler::handleCommunicationProfileSelectionRequest(FacCommunicationProfileSelectionRequestPacket* request) {
if (!request)
return new PacketHandlerResult(PacketHandlerResult::INVALID_PACKET, NULL);
/**
* Create a response according to the request and send to the client right away
*/
GeonetPacket* reply = this->packetFactory->createCommunicationProfileSelectionResponse(request);
/**
* Clean up
*/
delete request;
return new PacketHandlerResult(PacketHandlerResult::DELIVER_PACKET, reply);
}
PacketHandlerResult* PacketHandler::handleLocationUpdate(GeonetLocationUpdateEventPacket* packet) {
delete packet;
/*
* Creation of a GeonetLocationUpdateEventPacket is enough for processing...
*/
return new PacketHandlerResult(PacketHandlerResult::RELAY_TO_GN, NULL);
}
@@ -1,252 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_packet_handler.hpp
* \brief A container with packet handling functionality, all the packets read on the socket is passed here
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_PACKET_HANDLER_HPP_
#define MGMT_PACKET_HANDLER_HPP_
#include <boost/array.hpp>
using namespace boost;
#include "packets/mgmt_fac_packet_configuration_notification.hpp"
#include "packets/mgmt_lte_packet_wireless_state_response.hpp"
#include "packets/mgmt_gn_packet_location_table_response.hpp"
#include "packets/mgmt_gn_packet_wireless_state_response.hpp"
#include "packets/mgmt_gn_packet_comm_profile_request.hpp"
#include "packets/mgmt_gn_packet_get_configuration.hpp"
#include "packets/mgmt_gn_packet_location_update.hpp"
#include "packets/mgmt_gn_packet_network_state.hpp"
#include "packets/mgmt_gn_packet.hpp"
#include "mgmt_information_base.hpp"
#include "mgmt_packet_factory.hpp"
#include "util/mgmt_log.hpp"
#include "mgmt_client.hpp"
/**
* A container for PacketHandler classes feedback to its callers
*/
class PacketHandlerResult {
public:
/**
* Result of packet processing to be returned to relevant unit calling handle()
*/
enum Result {
/**
* Packet is processed and no further action is necessary
*/
DISCARD_PACKET = 0,
/**
* Invalid packet
*/
INVALID_PACKET = 1,
/**
* Deliver the packet given within this PacketHandlerResult object
*/
DELIVER_PACKET = 2,
/**
* All the clients with relevant configuration requirements
* (meaning NET or FAC parameters) should be informed of new configuration
* PS: This comment above is valid only for GN right now since it's the only "other" client than FAC
*/
SEND_CONFIGURATION_UPDATE_AVAILABLE = 3,
/**
* Relays the packet as-is to GN
* This case is used for LOCATION_UPDATE packet
*/
RELAY_TO_GN = 4
};
public:
/**
* Constructor for PacketHandlerResult class
*
* @param result PacketHandler's result after it processes given packet
* @param packet GeonetPacket after it's generated by PacketHandler
*/
PacketHandlerResult(PacketHandlerResult::Result result, GeonetPacket* packet) : result(result), packet(packet) {}
/**
* Deconstructor for this result set, responsible for the deallocation of GeonetPacket pointer
*/
~PacketHandlerResult() {
delete packet;
}
public:
/**
* Returns the result packet of this class
*
* @return Resulting packet of type GeonetPacket
*/
GeonetPacket* getPacket() const {
return this->packet;
}
/**
* Returns the result enumeration
*
* @return Return enumeration of type PacketHandlerResult::Result
*/
PacketHandlerResult::Result getResult() const {
return this->result;
}
private:
/**
* Result enumeration
*/
PacketHandlerResult::Result result;
/**
* GeonetPacket pointer
*/
GeonetPacket* packet;
};
/**
* A container with packet handling functionality, all the packets read on
* the socket is passed here
*/
class PacketHandler {
public:
/**
* Constructor for PacketHandler class
*
* @param mib ManagementInformationBase reference
* @param logger Logger object reference
*/
PacketHandler(ManagementInformationBase& mib, Logger& logger);
/**
* Destructor for PacketHandler class
*/
~PacketHandler();
private:
/**
* Copy constructor to prevent the usage of default one
*/
PacketHandler(const PacketHandler& packetHandler);
public:
/**
* Takes buffer of a packet and processes accordingly
*
* @param packetBuffer Packet buffer
* @return relevant PacketHandler::Result enumeration according to the result
*/
PacketHandlerResult* handle(const vector<unsigned char>& packetBuffer);
private:
/**
* Handles a Get Configuration message creating its reply utilizing relevant
* PacketFactory method
*
* @param packet Pointer to Get Configuration packet object
* @param Management client type information (Event type/subtype changes according to the client type)
* @return Pointer to a PacketHandlerResult object
*/
PacketHandlerResult* handleGetConfigurationEvent(GeonetGetConfigurationEventPacket* packet, ManagementClient::ManagementClientType clientType);
/**
* Handles a Network State message and triggers an update at MIB
*
* @param packet Pointer to Network State packet
* @return Pointer to a PacketHandlerResult object
*/
static PacketHandlerResult* handleNetworkStateEvent(GeonetNetworkStateEventPacket* packet);
/**
* Handles a Wireless State Response message and triggers an update at MIB
*
* @param packet Pointer to incoming Wireless State Response packet
* @return Pointer to a PacketHandlerResult object
*/
static PacketHandlerResult* handleWirelessStateResponseEvent(GeonetPacket* packet);
/**
* Handles a Location Table Response packet
*
* @param Pointer to a Location Table Response packet
* @return Pointer to a PacketHandlerResult object
*/
static PacketHandlerResult* handleLocationTableResponse(GeonetLocationTableResponseEventPacket* packet);
/**
* Handles a Configuration Notification packet
*
* @param Pointer to a Configuration Notification packet
* @return Pointer to a PacketHandlerResult object
*/
PacketHandlerResult* handleConfigurationNotification(FacConfigurationNotificationPacket* packet);
/**
* Handles a Communication Profile Request event message and creates a
* Communication Profile Response packet
*
* @param Pointer to a Communication Profile Request packet
* @param Management client type information (Event type/subtype changes according to the client type)
* @return Pointer to a PacketHandlerResult object
*/
PacketHandlerResult* handleCommunicationProfileRequestEvent(GeonetCommunicationProfileRequestPacket* packet, ManagementClient::ManagementClientType clientType);
/**
* Handles a Communication Profile Selection Request event message and creates a
* Communication Profile Selection Response packet
*
* @param Pointer to a Communication Profile Selection Request packet
* @return Pointer to a PacketHandlerResult object
*/
PacketHandlerResult* handleCommunicationProfileSelectionRequest(FacCommunicationProfileSelectionRequestPacket* request);
/**
* Handles an incoming Location Update message and updates MIB with
* this incoming information
*
* @param Pointer to a Location Update packet
* @return Pointer to a PacketHandlerResult object
*/
PacketHandlerResult* handleLocationUpdate(GeonetLocationUpdateEventPacket* packet);
private:
/**
* GeonetPacketFactory object to hide packet generation details from PacketHandler class
*/
ManagementPacketFactory* packetFactory;
/**
* ManagementInformationBase object to fetch necessary information when needed
*/
ManagementInformationBase& mib;
/**
* Logger object reference
*/
Logger& logger;
};
#endif /* MGMT_PACKET_HANDLER_HPP_ */
@@ -1,394 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fsr/openairinterface
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
*******************************************************************************/
/*!
* \file mgmt_server.cpp
* \brief Management functionality provided by boost::asio's asynchronous I/O wrapper
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "packets/mgmt_gn_packet_configuration_available.hpp"
#include "packets/mgmt_gn_packet_wireless_state_request.hpp"
#include "packets/mgmt_gn_packet_location_table_request.hpp"
#include "packets/mgmt_gn_packet_location_update.hpp"
#include "util/mgmt_exception.hpp"
#include <boost/lexical_cast.hpp>
#include "mgmt_server.hpp"
#include <boost/bind.hpp>
ManagementServer::ManagementServer(ba::io_service& ioService, const Configuration& configuration, ManagementInformationBase& mib, ManagementClientManager& clientManager, Logger& logger)
try : ioService(ioService), socket(ioService, ba::ip::udp::endpoint(udp::v4(), configuration.getServerPort())), mib(mib), configuration(configuration), clientManager(clientManager),
logger(logger), packetHandler(mib, logger) {
/**
* Immediately start reading data
*/
logger.info("Reading data on port " + boost::lexical_cast<string>(configuration.getServerPort()));
readData();
/**
* Initialise InquiryThread object for Wireless State updates
*/
try {
inquiryThreadObject = new InquiryThread(this, configuration.getWirelessStateUpdateInterval(), logger);
inquiryThread = new boost::thread(*inquiryThreadObject);
} catch (std::exception& e) {
throw Exception(e.what(), logger);
}
} catch (Exception& e) {
e.updateStackTrace("Cannot initialize ManagementServer!");
throw;
}
ManagementServer::~ManagementServer() {
delete inquiryThreadObject;
delete inquiryThread;
rxData.clear();
txData.clear();
}
bool ManagementServer::sendWirelessStateRequest() {
/**
* Check if there's a GN connected
*/
if (!clientManager.isGnConnected()) {
logger.warning("Attempted to send a Wireless Status Request but GN is not connected...");
return false;
}
/**
* Fetch and validate client object
*/
ManagementClient* geoNetworkingClient = clientManager.getClientByEndpoint(recipient);
if (!geoNetworkingClient)
return false;
/**
* Check if we have received a reply for the last packet we sent
*/
if (!geoNetworkingClient->isAlive()) {
logger.error("This client did not reply to the last packet we sent, marking it as OFFLINE");
geoNetworkingClient->setState(ManagementClient::OFFLINE);
return false;
}
/**
* Create the relevant packet and serialize it
*/
GeonetWirelessStateRequestEventPacket request(logger);
txData.resize(TX_BUFFER_SIZE);
request.serialize(txData);
/**
* Send serialized data thru socket
*/
this->send(txData, recipient);
geoNetworkingClient->waitingForReply();
/**
* Reset TX buffer
*/
txData.resize(TX_BUFFER_SIZE);
return true;
}
void ManagementServer::readData() {
try {
/**
* Reset buffers
*/
rxData.resize(RX_BUFFER_SIZE);
/**
* Register handleReceive() as the call-back of Rx
*/
socket.async_receive_from(boost::asio::buffer(rxData, ManagementServer::RX_BUFFER_SIZE), recipient,
boost::bind(&ManagementServer::handleReceive, this,
ba::placeholders::error,
ba::placeholders::bytes_transferred));
} catch (Exception& e) {
e.updateStackTrace("Cannot receive data from asynchronous UDP socket!");
throw;
}
}
void ManagementServer::handleReceive(const boost::system::error_code& error, size_t size) {
try {
/**
* Resize RX buffer according to the amount of data received
*/
rxData.resize(size);
if (!error) {
logger.debug("Following " + boost::lexical_cast<string>(size) + " byte(s) received from " + recipient.address().to_string() + ":" + boost::lexical_cast<string>(recipient.port()));
Util::printHexRepresentation(rxData.data(), size, logger);
/**
* Utilize PacketHandler class to generate a response, if necessary
*/
try {
handleClientData();
} catch (Exception& e) {
e.updateStackTrace("Cannot process Rx data!");
throw;
}
} else {
logger.warning("Error[code:" + boost::lexical_cast<string>(error.value()) + ", message:" + error.message() + "]");
logger.info("Discarding incoming data...");
}
/**
* Read data again...
*/
readData();
} catch (Exception& e) {
e.updateStackTrace("Cannot handle a receive on asynchronous UDP socket!");
throw;
}
}
void ManagementServer::handleClientData() {
/**
* PacketHandler class will return a result set
*/
PacketHandlerResult* result = NULL;
ManagementClientManager::Task task;
try {
result = packetHandler.handle(rxData);
} catch (Exception& e) {
e.updateStackTrace("Cannot process incoming client data!");
throw;
}
/**
* First inform Management Client Manager about this incoming packet (if it's valid)
*/
if (!result)
return;
else if (result->getResult() == PacketHandlerResult::DISCARD_PACKET
|| result->getResult() == PacketHandlerResult::DELIVER_PACKET
|| result->getResult() == PacketHandlerResult::SEND_CONFIGURATION_UPDATE_AVAILABLE
|| result->getResult() == PacketHandlerResult::RELAY_TO_GN) {
/**
* Inform Client Manager of this sender
*/
try {
task = clientManager.updateClientState(recipient, (EventType)GeonetPacket::parseEventTypeOfPacketBuffer(rxData));
} catch (Exception& e) {
e.updateStackTrace("Cannot update Management Client's state according to incoming data!");
throw;
}
}
/**
* Do the necessary told by PacketHandler
*/
GeonetConfigurationAvailableEventPacket* configurationAvailablePacket = NULL;
GeonetLocationUpdateEventPacket* locationUpdatePacket = NULL;
/**
* Find the GN client as we might need to talk to it
*/
const ManagementClient* gnClient = clientManager.getClientByType(ManagementClient::GN);
switch (result->getResult()) {
case PacketHandlerResult::DISCARD_PACKET:
delete result;
break;
case PacketHandlerResult::INVALID_PACKET:
logger.error("Incoming packet is not valid, discarding..");
delete result;
break;
case PacketHandlerResult::DELIVER_PACKET:
/**
* Serialize response packet
*/
txData.resize(TX_BUFFER_SIZE);
result->getPacket()->serialize(txData);
/**
* Send serialized data thru socket
*/
this->send(txData, recipient);
/**
* Reset TX buffer
*/
txData.resize(TX_BUFFER_SIZE);
delete result;
break;
case PacketHandlerResult::SEND_CONFIGURATION_UPDATE_AVAILABLE:
/**
* Update GN client with new configuration information
*/
if (!gnClient) {
logger.info("There is no GN client connected right now, so a CONFIGURATION_AVAILABLE won't be sent");
break;
}
/**
* Create a CONFIGURATION_UPDATE_AVAILABLE packet
*/
try {
configurationAvailablePacket = new GeonetConfigurationAvailableEventPacket(mib, logger);
/**
* Serialize...
*/
txData.resize(TX_BUFFER_SIZE);
configurationAvailablePacket->serialize(txData);
} catch (...) {
throw Exception("Cannot create a CONFIGURATION_UPDATE_AVAILABLE packet!", logger);
}
logger.info("A CONFIGURATION_UPDATE_AVAILABLE packet is prepared, sending...");
/**
* Send serialized data thru socket
*/
this->send(txData, udp::endpoint(udp::v4(), gnClient->getPort()));
/**
* Reset TX buffer
*/
txData.resize(TX_BUFFER_SIZE);
delete result;
break;
case PacketHandlerResult::RELAY_TO_GN:
/**
* Relay incoming LOCATION_UPDATE (from FAC-CM) to CM-GN
*/
if (!gnClient) {
logger.info("There is no GN client connected right now, so the LOCATION_UPDATE won't be relayed");
break;
}
/**
* Create a LOCATION_UPDATE packet
*/
try {
locationUpdatePacket = new GeonetLocationUpdateEventPacket(mib, logger);
/**
* Serialize...
*/
txData.resize(TX_BUFFER_SIZE);
locationUpdatePacket->serialize(txData);
} catch (...) {
throw Exception("Cannot create a LOCATION_UPDATE packet!", logger);
}
logger.info("A LOCATION_UPDATE packet is prepared, sending...");
/**
* Send thru socket
*/
this->send(txData, udp::endpoint(udp::v4(), gnClient->getPort()));
delete result;
break;
default:
logger.warning("Something nasty happened, there's no such task for PacketHandler!");
break;
}
/**
* Do the necessary told by ManagementClientHandler
*/
GeonetLocationTableRequestEventPacket* locationTableRequest = NULL;
switch (task) {
case ManagementClientManager::NOTHING:
break;
case ManagementClientManager::SEND_LOCATION_TABLE_REQUEST:
/**
* Here we should send a LOCATION TABLE REQUEST
*/
try {
locationTableRequest = new GeonetLocationTableRequestEventPacket(0xffffffffffffffff, logger);
locationTableRequest->serialize(txData);
delete locationTableRequest;
} catch (...) {
throw Exception("Cannot create/serialize a Location Table Request packet!", logger);
}
/**
* Send serialized data thru socket
*/
logger.info("Sending a LOCATION_TABLE_REQUEST packet");
this->send(txData, recipient);
break;
default:
logger.warning("Invalid task is returned by ManagementClientManager class!");
break;
}
}
void ManagementServer::handleSend(const boost::system::error_code& errorCode, size_t size) {
/**
* Just print information about the data that has just been sent
*/
logger.debug("Following content (size=" + boost::lexical_cast<string>(size) + ") has been written onto the socket");
Util::printHexRepresentation(txData.data(), size, logger);
}
bool ManagementServer::send(const vector<unsigned char>& buffer, const boost::asio::ip::udp::endpoint& recipient) {
/**
* Ensure that there's only one entering here at any given time
*/
boost::lock_guard<boost::mutex> lock(txMutex);
socket.async_send_to(ba::buffer(buffer), recipient,
boost::bind(&ManagementServer::handleSend, this,
ba::placeholders::error,
ba::placeholders::bytes_transferred));
return true;
}
@@ -1,188 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_server.hpp
* \brief This is where everything begins and ends
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_SERVER_H_
#define MGMT_SERVER_H_
#include "interface/mgmt_packet_sender.hpp"
#include "mgmt_information_base.hpp"
#include "mgmt_inquiry_thread.hpp"
#include "mgmt_packet_handler.hpp"
#include "mgmt_client_manager.hpp"
#include "mgmt_configuration.hpp"
#include <boost/thread/mutex.hpp>
#include "util/mgmt_log.hpp"
#include <boost/thread.hpp>
#include <boost/asio.hpp>
#include <vector>
using boost::asio::ip::udp;
namespace ba = boost::asio;
/**
* Management server functionality and a wrapper for boost::asio's asynchronous I/O
*/
class ManagementServer : public IManagementPacketSender {
public:
/**
* Receive buffer size in bytes
*/
static const u_int16_t RX_BUFFER_SIZE = 1024;
/**
* Transmit buffer size in bytes
*/
static const u_int16_t TX_BUFFER_SIZE = 1024;
public:
/**
* Constructor for ManagementServer class
*
* @param ioService I/O functionality is passed by the caller
* @param configuration A reference to the Configuration object of SCOREF-MGMT
* @param mib ManagementInformationBase reference
* @param logger Logger object reference for logging purposes
*/
ManagementServer(ba::io_service& ioService, const Configuration& configuration, ManagementInformationBase& mib, ManagementClientManager& clientManager, Logger& logger);
/**
* Destructor for ManagementServer class
*/
virtual ~ManagementServer();
public:
/**
* Implementation of IManagementPacketSender functionality
*
* @param none
* @return true on success, false otherwise
*/
bool sendWirelessStateRequest();
public:
/**
* Receive data
*/
void readData();
/**
* Callback for Rx, so called when data is read on the socket
*
* @param errorCode Error code
* @param size Amount of data available
*/
void handleReceive(const boost::system::error_code& errorCode, size_t size);
/**
* Handles incoming Management data, called by handleReceive()
*
* @param none
* @return none
*/
void handleClientData();
/**
* Callback for Tx, so called when data is written onto the socket
*
* @param errorCode Error code
* @param size Amount of data to be sent
*/
void handleSend(const boost::system::error_code& errorCode, size_t size);
/**
* Sends given buffer over the socket
*
* @param buffer Buffer to be sent of type unsigned char vector
* @param recipient Destination of type udp::endpoint
*/
bool send(const vector<unsigned char>& buffer, const boost::asio::ip::udp::endpoint& recipient);
private:
/**
* The io_service object that the datagram socket will use to dispatch
* handlers for any asynchronous operation performed on the socket
*/
ba::io_service& ioService;
/**
* udp::socket object
*/
ba::ip::udp::socket socket;
/**
* UDP connection's recipient
*/
ba::ip::udp::endpoint recipient;
/**
* RX buffer
*/
vector<unsigned char> rxData;
/**
* TX buffer
*/
vector<unsigned char> txData;
/**
* Management Information Base reference
*/
ManagementInformationBase& mib;
/**
* Configuration information
*/
const Configuration& configuration;
/**
* Client manager
*/
ManagementClientManager& clientManager;
/**
* InquiryThread object for Wireless State updates
*/
InquiryThread* inquiryThreadObject;
/**
* InquiryThread runner for Wireless State updates
*/
boost::thread* inquiryThread;
/**
* Logger object reference for logging purposes
*/
Logger& logger;
/**
* Response packets are generated using PacketHandler class
*/
PacketHandler packetHandler;
/**
* Mutex to control data transmission
*/
boost::mutex txMutex;
};
#endif /* MGMT_SERVER_H_ */
@@ -1,479 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_types.h
* \brief Definitions of common data types used in SCOREF Management Module
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_TYPES_HPP_
#define MGMT_TYPES_HPP_
#include "util/mgmt_util.hpp"
#include <sys/types.h>
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
/**
* Configuration Item IDs
*/
enum ItsKeyID {
/**
* Common ITS keys
*/
MGMT_GN_ALL_ITSKEY_ID_STATION_TYPE = 0,
MGMT_GN_ALL_ITSKEY_ID_STATION_SUBTYPE = 1,
/**
* Network ITS keys
*/
MGMT_GN_NET_ITSKEY_ID_GN_LOCAL_ADD_CONF_METHOD = 1000,
MGMT_GN_NET_ITSKEY_ID_DEFAULT_HOP_LIMIT = 1001,
MGMT_GN_NET_ITSKEY_ID_GN_MAX_PKT_LIFETIME = 1002,
MGMT_GN_NET_ITSKEY_ID_GN_MIN_PKT_REPETITION_INTERVAL = 1003,
MGMT_GN_NET_ITSKEY_ID_GN_GEO_BCAST_FORWARDING_ALG = 1010,
MGMT_GN_NET_ITSKEY_ID_GN_GEO_UCAST_FORWARDING_ALG = 1011,
MGMT_GN_NET_ITSKEY_ID_GN_TRAFFIC_CLASS_RELEVANCE = 1020,
MGMT_GN_NET_ITSKEY_ID_GN_TRAFFIC_CLASS_RELIABILITY = 1021,
MGMT_GN_NET_ITSKEY_ID_GN_TRAFFIC_CLASS_LATENCY = 1022,
MGMT_GN_NET_ITSKEY_ID_GN_CBF_MIN_TTS = 1030,
MGMT_GN_NET_ITSKEY_ID_GN_CBF_MAX_TTS = 1031,
MGMT_GN_NET_ITSKEY_ID_GN_MAX_COMM_RANGE = 1040,
MGMT_GN_NET_ITSKEY_ID_GN_DEF_TX_POWER = 1050,
MGMT_GN_NET_ITSKEY_ID_GN_DEF_BITRATE = 1051,
MGMT_GN_NET_ITSKEY_ID_GN_DEF_CHANNEL = 1052,
MGMT_GN_NET_ITSKEY_ID_GN_DEF_PRIORITY = 1053,
MGMT_GN_NET_ITSKEY_ID_GN_DEF_CHANNEL_BW = 1054,
MGMT_GN_NET_ITSKEY_ID_SEC_ALLOW_UNSECURE = 2000,
MGMT_GN_NET_ITSKEY_ID_SEC_END_2_END = 2001,
MGMT_GN_NET_ITSKEY_ID_SEC_PSEUDONYM = 2002,
/**
* FACilities ITS keys
*/
MGMT_GN_FAC_ITSKEY_ID_VEHICLE_WIDTH = 2,
MGMT_GN_FAC_ITSKEY_ID_VEHICLE_LENGTH = 3,
MGMT_GN_FAC_ITSKEY_ID_CAM_BTP_PORT = 3010,
MGMT_GN_FAC_ITSKEY_ID_DENM_BTP_PORT = 3011,
MGMT_GN_FAC_ITSKEY_ID_LDM_GARBAGE_COLLECTION_INTERVAL = 3020,
/**
* Configuration set ITS keys
*/
MGMT_GN_ITSKEY_SET_NET = 0xaaaa,
MGMT_GN_ITSKEY_SET_FAC = 0xbbbb,
MGMT_GN_ITSKEY_ALL = 0xffff
};
/**
* Message & Event Types
*/
enum EventType {
/**
* Any
*/
MGMT_EVENT_ANY = 0x000,
/**
* Location
*/
MGMT_GN_EVENT_LOCATION_UPDATE = 0x100,
MGMT_FAC_EVENT_LOCATION_UPDATE = 0x110,
MGMT_GN_EVENT_LOCATION_TABLE_REQUEST = 0x101,
MGMT_FAC_EVENT_LOCATION_TABLE_REQUEST = 0x103,
MGMT_GN_EVENT_LOCATION_TABLE_RESPONSE = 0x102,
MGMT_FAC_EVENT_LOCATION_TABLE_RESPONSE = 0x104,
/**
* Configuration
*/
MGMT_GN_EVENT_CONF_UPDATE_AVAILABLE = 0x300,
MGMT_GN_EVENT_CONF_REQUEST = 0x301,
MGMT_FAC_EVENT_CONF_REQUEST = 0x311,
MGMT_GN_EVENT_CONF_CONT_RESPONSE = 0x302,
MGMT_FAC_EVENT_CONF_CONT_RESPONSE = 0x312,
MGMT_GN_EVENT_CONF_BULK_RESPONSE = 0x303,
MGMT_FAC_EVENT_CONF_BULK_RESPONSE = 0x313,
MGMT_FAC_EVENT_CONF_NOTIFICATION = 0x314,
MGMT_GN_EVENT_CONF_COMM_PROFILE_REQUEST = 0x304,
MGMT_FAC_EVENT_CONF_COMM_PROFILE_REQUEST = 0x315,
MGMT_GN_EVENT_CONF_COMM_PROFILE_RESPONSE = 0x305,
MGMT_FAC_EVENT_CONF_COMM_PROFILE_RESPONSE = 0x316,
MGMT_FAC_EVENT_CONF_COMM_PROFILE_SELECTION_REQUEST = 0x317,
MGMT_FAC_EVENT_CONF_COMM_PROFILE_SELECTION_RESPONSE = 0x318,
/**
* State
*/
MGMT_GN_EVENT_STATE_WIRELESS_STATE_REQUEST = 0x402,
MGMT_GN_EVENT_STATE_WIRELESS_STATE_RESPONSE = 0x403,
MGMT_LTE_EVENT_STATE_WIRELESS_STATE_RESPONSE = 0x423,
MGMT_GN_EVENT_STATE_NETWORK_STATE = 0x404
};
/**
* Configuration Message / Transmission Type
*/
enum ConfigurationTransmissionMode {
C2X_MGMT_GN_CONF_TX_CONT = 0,
C2X_MGMT_GN_CONF_TX_BULK = 1
};
/**
* Message Header
*/
struct MessageHeader {
u_int8_t version;
u_int8_t priority;
u_int8_t eventType;
u_int8_t eventSubtype;
/**
* Returns if this packet contains extended/ventor specific data
*/
bool isExtended() const {
return Util::isBitSet(version, 0);
}
/**
* Returns if this packet contains valid data
*/
bool isValid() const {
return Util::isBitSet(version, 1);
}
/**
* Returns the last 4 bits of version field (which is actual version information)
*/
u_int8_t getVersion() const {
return version & 0x0F;
}
/**
* Returns the first 3 bits of priority field (which is actual priority information)
*/
u_int8_t getPriority() const {
return priority >> 5;
}
} __attribute__((packed));
/**
* Location Information
*/
struct LocationInformation {
u_int32_t timestamp; /* Time in milliseconds */
u_int32_t latitude; /* Latitude in 1/10 micro-degree */
u_int32_t longitude; /* Longitude in 1/10 micro-degree */
u_int16_t speed; /* Speed in signed units of 1 meter */
u_int16_t heading;
u_int16_t altitude;
u_int16_t acceleration; /* TAcc, PodAcc, SAcc, Hacc, AltAcc */
/**
* Initialize everything to zero
*/
LocationInformation() {
timestamp = latitude = longitude = speed = heading = altitude = acceleration = 0;
}
string toString() const {
stringstream ss;
ss << "LocationInformation[timestamp:" << timestamp << ", latitude:" << latitude
<< ", longitude:" << longitude << ", speed:" << speed << ", heading:" << heading
<< ", altitude:" << altitude << ", acceleration:" << acceleration;
return ss.str();
}
} __attribute__((packed));
/**
* Update Location Event
*/
struct LocationUpdateMessage {
MessageHeader header;
LocationInformation location;
} __attribute__((packed));
typedef u_int64_t GnAddress;
/**
* Query Location Table Event Message
*/
struct LocationTableRequest {
MessageHeader header;
GnAddress gnAddress;
} __attribute__((packed));
/**
* Location Table Response Item
*/
struct LocationTableItem {
GnAddress gnAddress;
u_int32_t timestamp; /* Time in milliseconds */
u_int32_t latitude; /* Latitude in 1/10 micro-degree */
u_int32_t longitude; /* Longitude in 1/10 micro-degree */
u_int16_t speed; /* Speed in signed units of 1 meter */
u_int16_t heading;
u_int16_t altitude;
u_int16_t acceleration;
u_int16_t sequenceNumber;
u_int8_t lpvFlags;
u_int8_t reserved;
string toString() const {
stringstream ss;
/**
* Print GN address in hex (as Andrea told) and the rest in decimal notation
*/
ss << "[gnAddr:" << hex << showbase << gnAddress << ", ";
ss << resetiosflags(ios_base::hex) << resetiosflags(ios_base::showbase);
ss << "ts:" << timestamp
<< " lat.:" << latitude
<< " long.:" << longitude
<< " speed:" << speed
<< " heading:" << heading
<< " alt.:" << altitude
<< " accel.:" << acceleration
<< " sn.:" << sequenceNumber
<< " lpv:" << (int)lpvFlags
<< " res.:" << (int)reserved << "]";
return ss.str();
}
} __attribute__((packed));
/**
* Reply Location Event
*/
struct LocationTableResponse {
MessageHeader header;
u_int16_t lpvCount;
u_int8_t networkFlags;
u_int8_t reserved;
// Location table items will follow
} __attribute__((packed));
/**
* Wireless State Request Message
*/
struct WirelessStateRequestMessage {
MessageHeader header;
} __attribute__((packed));
/**
* Wireless State Response Message
*/
struct WirelessStateResponseMessage {
MessageHeader header;
u_int8_t interfaceCount;
u_int8_t reserved_first8;
u_int16_t reserved_last16;
} __attribute__((packed));
/**
* Wireless State of a Certain Interface
*/
typedef u_int16_t InterfaceID;
/**
* Interface type
*/
enum WirelessInterfaceType {
WIRELESS_TYPE_LTE = 0,
WIRELESS_TYPE_GN = 1
};
struct WirelessStateResponseItem {
virtual ~WirelessStateResponseItem() {}
WirelessInterfaceType interfaceType;
/**
* This method stringfies the information contained in this struct and
* to be implemented by sub-structs
*/
virtual string toString() const = 0;
} __attribute__((packed));
/**
* Wireless State for GN
*/
struct GnWirelessStateResponseItem : public WirelessStateResponseItem {
InterfaceID interfaceId; /** 16-bit */
u_int16_t accessTechnology;
u_int16_t channelFrequency;
u_int16_t bandwidth;
u_int8_t channelBusyRatio;
u_int8_t status;
u_int8_t averageTxPower;
u_int8_t reserved;
string toString() const {
stringstream ss;
ss << "GN WirelessState[If ID:" << interfaceId
<< ", Access Tech:" << accessTechnology
<< ", Channel Freq:" << channelFrequency
<< ", Bandwidth:" << bandwidth
<< ", Busy Ratio:" << (int)channelBusyRatio
<< ", Status:" << (int)status
<< ", Average TX Power:" << (int)averageTxPower << "]";
return ss.str();
}
} __attribute__((packed));
/**
* Wireless State for LTE
*/
#define LTE_WIRELESS_STATE_RESPONSE_SIZE 0x14 /** 4-byte header, 16-byte body (including reserved 4 bytes) */
struct LteWirelessStateResponse : public WirelessStateResponseItem {
InterfaceID interfaceId; /** 16-bit */
u_int16_t reservedFirst16bit;
u_int16_t referenceSignalReceivedPower;
u_int16_t referenceSignalReceivedQuality;
u_int8_t channelQualityIndication;
u_int8_t status;
u_int16_t reservedSecond16bit;
u_int32_t packetLossRate;
string toString() const {
stringstream ss;
ss << "LTE WirelessState[If ID:" << interfaceId
<< ", Ref. Sig. Rx Pow.:" << referenceSignalReceivedPower
<< ", Ref. Sig. Rx Qual.:" << referenceSignalReceivedQuality
<< ", Channel Qual. Ind.:" << (int)channelQualityIndication
<< ", Status:" << (int)status
<< ", Pkt Loss Rate:" << packetLossRate << "]";
return ss.str();
}
} __attribute__((packed));
/**
* Network State Message
*/
struct NetworkStateMessage {
MessageHeader header;
u_int32_t timestamp;
u_int32_t rxPackets;
u_int32_t rxBytes;
u_int32_t txPackets;
u_int32_t txBytes;
u_int32_t toUpperLayerPackets;
u_int32_t discardedPackets;
u_int32_t duplicatePackets;
u_int32_t forwardedPackets;
} __attribute__((packed));
/**
* Configuration Available Message
*/
struct ConfigureAvailableMessage {
MessageHeader header;
u_int16_t reserved;
u_int16_t keyCount;
} __attribute__((packed));
/**
* Configuration Request Message
*/
struct ConfigurationRequestMessage {
MessageHeader header;
u_int16_t configurationId;
u_int16_t transmissionMode;
} __attribute__((packed));
/**
* Configuration Item
*
* This structure holds the common "configuration item" fields of
* continuous and bulk configuration set messages
*/
struct ConfigurationItem {
u_int16_t configurationId;
u_int16_t length; /* # of DWORDs */
u_int32_t configurationValue;
} __attribute__((packed));
/**
* Variable-size Configuration Item
*
* This structure holds the variable-size "configuration item" field
* of FAC Configuration Notification
*/
struct VariableSizeConfigurationItem {
u_int16_t configurationId;
u_int16_t length; /* # of bytes */
vector<unsigned char> configurationBuffer;
};
/**
* Set Configuration Event (Continuous)
*/
struct ContinuousConfigurationResponse {
MessageHeader header;
ConfigurationItem configurationItem;
} __attribute__((packed));
/**
* Set Configuration Event (Bulk)
*
* This struct is processed with a std::vector<ConfigurationItem>
* See GeonetSetConfigurationEventPacket.{hpp|cpp}
*/
struct BulkConfigurationResponse {
MessageHeader header;
u_int16_t reserved;
u_int16_t keyCount;
} __attribute__((packed));
/**
* FAC Configuration Notification
*/
struct ConfigurationNotification {
MessageHeader header;
VariableSizeConfigurationItem configurationItem;
};
#endif /* MGMT_TYPES_HPP_ */
@@ -1,98 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_fac_packet_comm_profile_selection_request.cpp
* \brief A container for Communication Profile Selection Request event
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_fac_packet_comm_profile_selection_request.hpp"
#include "../util/mgmt_util.hpp"
#include <sstream>
FacCommunicationProfileSelectionRequestPacket::FacCommunicationProfileSelectionRequestPacket(const vector<unsigned char>& packetBuffer, Logger& logger)
: GeonetPacket(packetBuffer, logger) {
parse(packetBuffer);
}
FacCommunicationProfileSelectionRequestPacket::~FacCommunicationProfileSelectionRequestPacket() {}
u_int8_t FacCommunicationProfileSelectionRequestPacket::getLatency() const {
return packet.latency;
}
u_int8_t FacCommunicationProfileSelectionRequestPacket::getRelevance() const {
return packet.relevance;
}
u_int8_t FacCommunicationProfileSelectionRequestPacket::getReliability() const {
return packet.reliability;
}
u_int8_t FacCommunicationProfileSelectionRequestPacket::getSequenceNumber() const {
return packet.sequenceNumber;
}
bool FacCommunicationProfileSelectionRequestPacket::parse(const vector<unsigned char>& packetBuffer) {
/**
* Verify incoming buffer's size
*/
if (packetBuffer.size() < sizeof(CommunicationProfileSelectionRequest))
return false;
/**
* Parse octets
*/
u_int8_t payloadIndex = sizeof(MessageHeader);
packet.latency = packetBuffer[payloadIndex++];
packet.relevance = packetBuffer[payloadIndex++];
packet.reliability = packetBuffer[payloadIndex++];
packet.sequenceNumber = packetBuffer[payloadIndex];
return true;
}
string FacCommunicationProfileSelectionRequestPacket::toString() const {
stringstream ss;
ss << "CommunicationProfileSelectionRequest["
<< "latency:" << hex << (int)packet.latency
<< ", relevance:" << hex << (int)packet.relevance
<< ", reliability:" << hex << (int)packet.reliability
<< ", sequenceNum:" << (int)packet.sequenceNumber << "]";
return ss.str();
}
@@ -1,119 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_fac_packet_comm_profile_selection_request.hpp
* \brief A container for Communication Profile Selection Request event
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_FAC_PACKET_COMM_PROFILE_SELECTION_REQUEST_HPP_
#define MGMT_FAc_PACKET_COMM_PROFILE_SELECTION_REQUEST_HPP_
#include "mgmt_gn_packet.hpp"
/**
* Communication Profile Selection Request
*/
struct CommunicationProfileSelectionRequest {
MessageHeader header;
u_int8_t latency;
u_int8_t relevance;
u_int8_t reliability;
u_int8_t sequenceNumber;
} __attribute__((packed));
/**
* A container for Communication Profile Selection Request event
*/
class FacCommunicationProfileSelectionRequestPacket: public GeonetPacket {
public:
/**
* Constructor for FacCommunicationProfileSelectionRequestPacket class
*
* @param packetBuffer vector containing packet data
* @param logger Logger object reference
*/
FacCommunicationProfileSelectionRequestPacket(const vector<unsigned char>& packetBuffer, Logger& logger);
/**
* Destructor for FacCommunicationProfileSelectionRequestPacket class
*/
~FacCommunicationProfileSelectionRequestPacket();
public:
/**
* Returns `latency' field
*
* @return 8-bit `latency' field
*/
u_int8_t getLatency() const;
/**
* Returns `reliability' field
*
* @return 8-bit `reliability' field
*/
u_int8_t getReliability() const;
/**
* Returns `relevance' field
*
* @return 8-bit `relevance' field
*/
u_int8_t getRelevance() const;
/**
* Returns `sequence number' field
*
* @return 8-bit sequence number field
*/
u_int8_t getSequenceNumber() const;
/**
* Parses the packet buffer and fills in private member
*
* @param packetBuffer Vector containing packet data
* @return true on success, false otherwise
*/
bool parse(const vector<unsigned char>& packetBuffer);
/**
* Returns std::string representation of packet
*
* @return String representation of packet
*/
string toString() const;
private:
CommunicationProfileSelectionRequest packet;
};
#endif /* MGMT_FAC_PACKET_COMM_PROFILE_SELECTION_REQUEST_HPP_ */
@@ -1,104 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2010 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_fac_packet_comm_profile_selection_response.cpp
* \brief A container for Communication Profile Selection Response event
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_fac_packet_comm_profile_selection_response.hpp"
#include "../util/mgmt_util.hpp"
FacCommunicationProfileSelectionResponsePacket::FacCommunicationProfileSelectionResponsePacket(ManagementInformationBase& mib,
u_int8_t latency, u_int8_t relevance, u_int8_t reliability, u_int8_t sequenceNumber, Logger& logger) :
GeonetPacket(false, true, 0x00, 0x00, MGMT_FAC_EVENT_CONF_COMM_PROFILE_SELECTION_RESPONSE, logger), mib(mib) {
packet.latency = latency;
packet.relevance = relevance;
packet.reliability = reliability;
packet.sequenceNumber = sequenceNumber;
}
FacCommunicationProfileSelectionResponsePacket::~FacCommunicationProfileSelectionResponsePacket() {}
bool FacCommunicationProfileSelectionResponsePacket::serialize(vector<unsigned char>& buffer) const {
/**
* Verify incoming buffer size
*/
if (buffer.size() < sizeof(CommunicationProfileSelectionResponse))
return false;
/**
* Serialise header first...
*/
GeonetPacket::serialize(buffer);
/**
* ..then append communication profile information
*/
u_int8_t payloadIndex = sizeof(MessageHeader);
buffer[payloadIndex++] = packet.latency;
buffer[payloadIndex++] = packet.relevance;
buffer[payloadIndex++] = packet.reliability;
buffer[payloadIndex++] = packet.sequenceNumber;
/**
* Get the most suitable communication profile from CommunicationProfileManager...
*/
CommunicationProfileID communicationProfileId = mib.getCommunicationProfileManager().selectProfile(mib.isIpv6Enabled(), packet.latency, packet.relevance, packet.reliability);
logger.debug(string("Ipv6 is ") + ((mib.isIpv6Enabled()) ? "enabled" : "disabled"));
/**
* ...and encode it into the response packet
*/
Util::encode4byteInteger(buffer, payloadIndex, static_cast<int>(communicationProfileId));
/**
* Resize incoming buffer according to packet size
*/
buffer.resize(sizeof(CommunicationProfileSelectionResponse));
return true;
}
string FacCommunicationProfileSelectionResponsePacket::toString() const {
stringstream ss;
ss << GeonetPacket::toString() << endl
<< "Latency: " << hex << (int)packet.latency << endl
<< "Relevance: " << hex << (int)packet.relevance << endl
<< "Reliability: " << hex << (int)packet.reliability << endl
<< "Communication Profile ID: " << oct << (int)packet.communicationProfileId << endl;
return ss.str();
}
@@ -1,108 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_fac_packet_comm_profile_selection_response.hpp
* \brief A container for Communication Profile Selection Response event
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_FAC_PACKET_COMM_PROFILE_SELECTION_RESPONSE_HPP_
#define MGMT_FAC_PACKET_COMM_PROFILE_SELECTION_RESPONSE_HPP_
#include "mgmt_gn_packet.hpp"
/**
* Communication Profile Selection Response
*/
struct CommunicationProfileSelectionResponse {
MessageHeader header;
u_int8_t latency;
u_int8_t relevance;
u_int8_t reliability;
u_int8_t sequenceNumber;
u_int32_t communicationProfileId;
} __attribute__((packed));
/**
* A container for Communication Profile Selection Response event
*/
class FacCommunicationProfileSelectionResponsePacket : public GeonetPacket {
public:
/**
* Constructor for FacCommunicationProfileSelectionResponsePacket class
*
* @param mib Management Information Base reference
* @param latency `Latency' requirement parameter
* @param relevance `Relevance' requirement parameter
* @param reliability `Reliability' requirement parameter
* @param sequenceNumber `Sequence Number' of the request (that of response's will match it)
* @param logger Logger object reference
*/
FacCommunicationProfileSelectionResponsePacket(ManagementInformationBase& mib, u_int8_t latency, u_int8_t relevance, u_int8_t reliability, u_int8_t sequenceNumber, Logger& logger);
/**
* Destructor for FacCommunicationProfileSelectionResponsePacket class
*/
~FacCommunicationProfileSelectionResponsePacket();
public:
/**
* Serialises the packet into given buffer
*
* @param Vector to be used to serialise the packet into
* @return true on success, false otherwise
*/
bool serialize(vector<unsigned char>& buffer) const;
/**
* Returns std::string representation of packet
*
* @return String representation of packet
*/
string toString() const;
private:
/**
* Management Information Base reference to fetch
* necessary information to build this packet
*/
ManagementInformationBase& mib;
/**
* A copy of the packet information
*/
CommunicationProfileSelectionResponse packet;
};
#endif /* MGMT_FAC_PACKET_COMM_PROFILE_SELECTION_RESPONSE_HPP_ */
@@ -1,104 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_fac_packet_configuration_notification.cpp
* \brief A container Configuration Notification
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_fac_packet_configuration_notification.hpp"
#include <boost/lexical_cast.hpp>
#include <sstream>
using namespace std;
FacConfigurationNotificationPacket::FacConfigurationNotificationPacket(ManagementInformationBase& mib, const vector<unsigned char>& packetBuffer, Logger& logger) :
GeonetPacket(packetBuffer, logger), mib(mib), logger(logger) {
/**
* Parse the packet...
*/
parse(packetBuffer);
/**
* ...and update MIB with extracted information
*/
logger.info("Notifying MIB about this ITS key value change...");
mib.setValue(static_cast<ItsKeyID>(packet.configurationItem.configurationId), packet.configurationItem.configurationBuffer);
}
FacConfigurationNotificationPacket::~FacConfigurationNotificationPacket() {}
bool FacConfigurationNotificationPacket::parse(const vector<unsigned char>& packetBuffer) {
if (packetBuffer.size() < sizeof(MessageHeader)) {
logger.warning("Incoming buffer is short of size (size=" + boost::lexical_cast<string>(packetBuffer.size()) + ") to carry a Configuration Notification packet!");
return false;
}
/**
* Parse configuration id and size of configuration item
*/
u_int8_t payloadIndex = sizeof(MessageHeader);
packet.configurationItem.configurationId = packetBuffer[payloadIndex];
packet.configurationItem.configurationId <<= 8;
packet.configurationItem.configurationId |= packetBuffer[payloadIndex + 1];
packet.configurationItem.length = packetBuffer[payloadIndex + 2];
packet.configurationItem.length <<= 8;
packet.configurationItem.length |= packetBuffer[payloadIndex + 3];
/**
* Verify packet size again having data length this time
*/
u_int16_t packetHeaderLength = sizeof(MessageHeader) + sizeof(packet.configurationItem.configurationId) + sizeof(packet.configurationItem.length);
if (packetBuffer.size() != packetHeaderLength + packet.configurationItem.length) {
logger.info("Incoming Configuration Notification packet is short of size to carry the payload it asserts it carries!");
return false;
}
/**
* Extract payload...
*/
packet.configurationItem.configurationBuffer.resize(packet.configurationItem.length);
copy(packetBuffer.begin() + packetHeaderLength, packetBuffer.end(), packet.configurationItem.configurationBuffer.begin());
return true;
}
string FacConfigurationNotificationPacket::toString() const {
stringstream ss;
ss << "ConfigurationNotification[ConfID:" << hex << showbase << packet.configurationItem.configurationId
<< resetiosflags(ios_base::hex) << ", Length:" << packet.configurationItem.length << "]";
return ss.str();
}
@@ -1,96 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_fac_packet_configuration_notification.hpp
* \brief A container for Configuration Notification
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_FAC_PACKET_CONFIGURATION_NOTIFICATION_HPP_
#define MGMT_FAC_PACKET_CONFIGURATION_NOTIFICATION_HPP_
#include "../util/mgmt_log.hpp"
#include "mgmt_gn_packet.hpp"
/**
* A container for Configuration Notification
*/
class FacConfigurationNotificationPacket : public GeonetPacket {
public:
/**
* Constructor for FacConfigurationNotificationPacket class
*
* @param mib Management Information Base reference to update relevant configuration
* @param packetBuffer Packet bytes
* @param logger Logger object reference
*/
FacConfigurationNotificationPacket(ManagementInformationBase& mib, const vector<unsigned char>& packetBuffer, Logger& logger);
/**
* Destructor for FacConfigurationNotificationPacket class
*/
virtual ~FacConfigurationNotificationPacket();
public:
/**
* Parses incoming packet data and updates `packet' member
*
* @param packetBuffer std::vector carrying packet data
* @return true on success, false otherwise
*/
bool parse(const vector<unsigned char>& packetBuffer);
/**
* Returns string (of type std::string) representation of packet
*
* @return String representation of packet
*/
string toString() const;
private:
/**
* Management Information Base reference
*/
ManagementInformationBase& mib;
/**
* Configuration Notification packet
*/
ConfigurationNotification packet;
/**
* Logger reference
*/
Logger& logger;
};
#endif /* MGMT_FAC_PACKET_CONFIGURATION_NOTIFICATION_HPP_ */
@@ -1,150 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packets.cpp
* \brief Superclass for all Management-Geonet messages
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_gn_packet.hpp"
#include "../util/mgmt_util.hpp"
#include <sstream>
#include <iostream>
using namespace std;
GeonetPacket::GeonetPacket(bool extendedMessage, bool validity, u_int8_t version, u_int8_t priority,
u_int16_t eventType, Logger& logger) : logger(logger) {
Util::resetBuffer(reinterpret_cast<unsigned char*>(&header), sizeof(MessageHeader));
if (extendedMessage)
this->header.version |= 0x80;
if (validity)
this->header.version |= 0x40;
this->header.version |= (version & 0x0f);
this->header.priority = priority;
this->header.priority <<= 5;
this->header.eventType = (eventType >> 8);
this->header.eventSubtype = (eventType & 0xFF);
}
GeonetPacket::GeonetPacket(const vector<unsigned char>& packetBuffer, Logger& logger)
: logger(logger) {
parseHeaderBuffer(packetBuffer, &this->header);
/**
* Print the packet information
*/
logger.info(toString());
}
GeonetPacket::~GeonetPacket() {
}
bool GeonetPacket::parseHeaderBuffer(const vector<unsigned char>& headerBuffer, MessageHeader* header) {
if (headerBuffer.size() < sizeof(MessageHeader) || !header)
return false;
/**
* Parse (E) and (V) fields first
*/
extended = Util::isBitSet(headerBuffer[0], 0);
valid = Util::isBitSet(headerBuffer[0], 1);
if (!valid)
logger.warning("Incoming packet's (V) validity flag is not set! Will parse anyway...");
header->version = headerBuffer[0] & 0x0f;
header->priority = (headerBuffer[1] >> 5);
header->eventType = headerBuffer[2];
header->eventSubtype = headerBuffer[3];
return true;
}
bool GeonetPacket::serialize(vector<unsigned char>& buffer) const {
/**
* Validate incoming buffer's size
*/
if (buffer.size() < sizeof(MessageHeader)) {
logger.error("Incoming buffer is not sufficient to encode a message header into!");
return false;
}
logger.debug("Serialising header...");
buffer[0] = header.version;
buffer[0] |= 0x40; // encode Validity flag as 1
buffer[1] = header.priority;
buffer[1] <<= 5;
buffer[2] = header.eventType;
buffer[3] = header.eventSubtype;
return true;
}
bool GeonetPacket::isExtended() const {
return extended;
}
bool GeonetPacket::isValid() const {
return valid;
}
bool GeonetPacket::setEventType(const u_int16_t& eventType) {
this->header.eventType = (eventType >> 8);
this->header.eventSubtype = (eventType & 0xFF);
return true;
}
u_int16_t GeonetPacket::getEventType() const {
u_int16_t eventType = header.eventType;
eventType <<= 8;
eventType |= header.eventSubtype;
return eventType;
}
string GeonetPacket::toString() const {
stringstream ss;
ss << "GeonetHeader[extended:" << isExtended() << ", valid:" << isValid()
<< ", version:" << (int) header.getVersion() << ", priority:" << (int) header.getPriority()
<< ", eventType:" << hex << showbase << setw(2) << (int) header.eventType
<< ", eventSubType: " << (int) header.eventSubtype << "]";
return ss.str();
}
@@ -1,165 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packets.hpp
* \brief Superclass for all Management-Geonet messages
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_GN_PACKET_HPP_
#define MGMT_GN_PACKET_HPP_
#include "../mgmt_information_base.hpp"
#include "../mgmt_types.hpp"
#include "../util/mgmt_log.hpp"
#include <string>
#include <vector>
using namespace std;
/**
* Superclass for all Management-Geonet messages
*/
class GeonetPacket {
public:
/**
* Constructor for GeonetPacket class
*
* @param extendedMessage Indicates if this an extended (vendor specific) message
* @param validity Indicates non-existent data
* @param version Version number
* @param priority Priority
* @param eventType 16-bit Event Type and Event Subtype information
* @param logger Logger object reference
*/
GeonetPacket(bool extendedMessage, bool validity, u_int8_t version, u_int8_t priority, u_int16_t eventType, Logger& logger);
/**
* Buffer-parser constructor for GeonetPacket class
*
* @param packetBuffer Buffer carrying GeonetPacket
* @param logger Logger object reference
*/
GeonetPacket(const vector<unsigned char>& packetBuffer, Logger& logger);
/**
* Virtual destructor for GeonetPacket class
*/
virtual ~GeonetPacket();
public:
/**
* Parses buffer and fills in incoming header structure
*
* @param headerBuffer Buffer carrying message header
* @param header Structure to be filled in
* @return true on success, false otherwise
*/
bool parseHeaderBuffer(const vector<unsigned char>& headerBuffer, MessageHeader* header);
/**
* Serialises header fields onto given buffer
* This method is called by every subclass::serialize()
*
* @param buffer Buffer to serialise buffer on
* @return true on success, false otherwise
*/
virtual bool serialize(vector<unsigned char>& buffer) const;
/**
* Returns if this packet contains extended/vendor specific data
* Those who override this method will be excommunicated, fair warning
*
* @return boolean
*/
bool isExtended() const;
/**
* Returns if this packet contains valid data
* Those who override this method will be excommunicated, fair warning
*
* @return boolean
*/
bool isValid() const;
/**
* Sets the Event Type/SubType field with incoming value
*
* @param eventType 16-bit Event Type/SubType
* @return true on success, false otherwise
*/
bool setEventType(const u_int16_t& eventType);
/**
* Returns the Event Type/SubType value as a 16-bit value
*
* @return 16-bit Event Type/SubType value
*/
u_int16_t getEventType() const;
/**
* Utility method to get event type of a packet buffer
*
* @param buffer A packet buffer of type vector<unsigned char> reference
* @return Event type
*/
static u_int16_t parseEventTypeOfPacketBuffer(const vector<unsigned char>& buffer) {
const MessageHeader* header = reinterpret_cast<const MessageHeader*>(buffer.data());
u_int16_t eventType = header->eventType;
eventType <<= 8;
eventType |= header->eventSubtype;
return eventType;
}
/**
* Returns string representation of relevant GeonetPacket object
*
* @return std::string representation
*/
virtual string toString() const;
protected:
/**
* Header is kept in superclass for every Geonet* subclass
*/
MessageHeader header;
/**
* (E) Extended bit
*/
bool extended;
/**
* (V) Validity bit
*/
bool valid;
/**
* Logger object reference
*/
Logger& logger;
};
#endif /* MGMT_GN_PACKET_HPP_ */
@@ -1,222 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_comm_profile_request.cpp
* \brief A container for Communication Profile Request event
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_gn_packet_comm_profile_request.hpp"
#include "../util/mgmt_util.hpp"
#include <sstream>
GeonetCommunicationProfileRequestPacket::GeonetCommunicationProfileRequestPacket(const vector<unsigned char>& packetBuffer, Logger& logger)
: GeonetPacket(packetBuffer, logger) {
parse(packetBuffer);
}
GeonetCommunicationProfileRequestPacket::~GeonetCommunicationProfileRequestPacket() {
}
u_int32_t GeonetCommunicationProfileRequestPacket::getCommunicationProfileRequestSet() const {
return communicationProfileRequestSet;
}
u_int8_t GeonetCommunicationProfileRequestPacket::getSequenceNumber() const {
return sequenceNumber;
}
#ifdef UNUSED
bool GeonetCommunicationProfileRequestPacket::getTransportBtpA() const {
return transportBtpA;
}
bool GeonetCommunicationProfileRequestPacket::getTransportBtpB() const {
return transportUdp;
}
bool GeonetCommunicationProfileRequestPacket::getTransportTcp() const {
return transportUdp;
}
bool GeonetCommunicationProfileRequestPacket::getTransportUdp() const {
return transportUdp;
}
bool GeonetCommunicationProfileRequestPacket::getTransportRtp() const {
return transportUdp;
}
bool GeonetCommunicationProfileRequestPacket::getTransportStcp() const {
return transportUdp;
}
bool GeonetCommunicationProfileRequestPacket::getNetworkGn() const {
return networkGn;
}
bool GeonetCommunicationProfileRequestPacket::getNetworkIpv6Gn() const {
return networkIpv6Gn;
}
bool GeonetCommunicationProfileRequestPacket::getNetworkIpv6() const {
return networkIpv6;
}
bool GeonetCommunicationProfileRequestPacket::getNetworkIpv4() const {
return networkIpv4;
}
bool GeonetCommunicationProfileRequestPacket::getNetworkIpv4v6() const {
return networkIpv4v6;
}
bool GeonetCommunicationProfileRequestPacket::getNetworkDsmiIpv4v6() const {
return networkDsmIpv4v6;
}
bool GeonetCommunicationProfileRequestPacket::getAccessItsG5() const {
return accessItsG5;
}
bool GeonetCommunicationProfileRequestPacket::getAccess3g() const {
return access3G;
}
bool GeonetCommunicationProfileRequestPacket::getAccess11n() const {
return access11n;
}
bool GeonetCommunicationProfileRequestPacket::getAccessEthernet() const {
return accessEthernet;
}
bool GeonetCommunicationProfileRequestPacket::getChannelCch() const {
return channelCch;
}
bool GeonetCommunicationProfileRequestPacket::getChannelSch1() const {
return channelSch1;
}
bool GeonetCommunicationProfileRequestPacket::getChannelSch2() const {
return channelSch2;
}
bool GeonetCommunicationProfileRequestPacket::getChannelSch3() const {
return channelSch3;
}
bool GeonetCommunicationProfileRequestPacket::getChannelSch4() const {
return channelSch4;
}
#endif
bool GeonetCommunicationProfileRequestPacket::parse(const vector<unsigned char>& packetBuffer) {
/**
* Verify the size of incoming buffer
*/
if (packetBuffer.size() < sizeof(MessageHeader))
return false;
u_int8_t payloadIndex = sizeof(MessageHeader);
/*
* Parse first octet which is "transport"
*/
transportBtpA = Util::isBitSet(packetBuffer[payloadIndex], 0x01);
transportBtpB = Util::isBitSet(packetBuffer[payloadIndex], 0x02);
transportTcp = Util::isBitSet(packetBuffer[payloadIndex], 0x03);
transportUdp = Util::isBitSet(packetBuffer[payloadIndex], 0x04);
transportRtp = Util::isBitSet(packetBuffer[payloadIndex], 0x05);
transportStcp = Util::isBitSet(packetBuffer[payloadIndex], 0x06);
/*
* Parse second octet which is "network"
*/
networkGn = Util::isBitSet(packetBuffer[payloadIndex + 1], 0x01);
networkIpv6Gn = Util::isBitSet(packetBuffer[payloadIndex + 1], 0x02);
networkIpv6 = Util::isBitSet(packetBuffer[payloadIndex + 1], 0x03);
networkIpv4 = Util::isBitSet(packetBuffer[payloadIndex + 1], 0x04);
networkIpv4v6 = Util::isBitSet(packetBuffer[payloadIndex + 1], 0x05);
networkDsmIpv4v6 = Util::isBitSet(packetBuffer[payloadIndex + 1], 0x06);
/*
* Parse third octet which is "access"
*/
accessItsG5 = Util::isBitSet(packetBuffer[payloadIndex + 2], 0x01);
access3G = Util::isBitSet(packetBuffer[payloadIndex + 2], 0x02);
access11n = Util::isBitSet(packetBuffer[payloadIndex + 2], 0x03);
accessEthernet = Util::isBitSet(packetBuffer[payloadIndex + 2], 0x04);
/**
* Parse fourth octet whih is "channel"
*/
channelCch = Util::isBitSet(packetBuffer[payloadIndex + 3], 0x01);
channelSch1 = Util::isBitSet(packetBuffer[payloadIndex + 3], 0x02);
channelSch2 = Util::isBitSet(packetBuffer[payloadIndex + 3], 0x03);
channelSch3 = Util::isBitSet(packetBuffer[payloadIndex + 3], 0x04);
channelSch4 = Util::isBitSet(packetBuffer[payloadIndex + 3], 0x05);
/**
* Parse whole set of requested configuration
*/
Util::parse4byteInteger(packetBuffer.data() + payloadIndex, &communicationProfileRequestSet); payloadIndex += 4;
/**
* Parse the sequence number and ignore reserved part
*/
sequenceNumber = packetBuffer.data()[payloadIndex];
return true;
}
string GeonetCommunicationProfileRequestPacket::toString() const {
stringstream ss;
ss << GeonetPacket::toString() << endl
<< "Transport [BTPA:" << transportBtpA << ", BTPB:" << transportBtpB
<< ", TCP:" << transportTcp << ", UDP:" << transportUdp
<< ", RTP:" << transportRtp << ", STCP:" << transportStcp << "]" << endl
<< "Network [GN:" << networkGn << ", IPv6GN:" << networkIpv6Gn
<< ", IPv6:" << networkIpv6 << ", IPv4:" << networkIpv4
<< ", IPv4v6:" << networkIpv4v6 << ", DSMIPv4v6:" << networkDsmIpv4v6 << "]" << endl
<< "Access [ITSG5:" << accessItsG5 << ", 3G:" << access3G
<< ", 11n:" << access11n << ", Ethernet:" << accessEthernet << "]" << endl
<< "Channel [CCH:" << channelCch << ", SCH1:" << channelSch1
<< ", SCH2:" << channelSch2 << ", SCH3:" << channelSch3
<< ", SCH4: " << channelSch4 << "]" << endl
<< "Sequence number:" << sequenceNumber << endl;
return ss.str();
}
@@ -1,264 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_comm_profile_request.hpp
* \brief A container for Communication Profile Request event
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_GN_PACKET_COMM_PROFILE_REQUEST_HPP_
#define MGMT_GN_PACKET_COMM_PROFILE_REQUEST_HPP_
#include "mgmt_gn_packet.hpp"
/**
* Communication Profile Request
*/
struct CommunicationProfileRequest {
MessageHeader header;
u_int8_t transport;
u_int8_t network;
u_int8_t access;
u_int8_t channel;
u_int8_t sequenceNumber;
u_int8_t reserved8bit;
u_int16_t reserved16bit;
} __attribute__((packed));
/**
* A container for Communication Profile Request event
*/
class GeonetCommunicationProfileRequestPacket: public GeonetPacket {
public:
/**
* Constructor for GeonetCommunicationProfileRequestPacket class
*
* @param packetBuffer vector containing packet data
* @param logger Logger object reference
*/
GeonetCommunicationProfileRequestPacket(const vector<unsigned char>& packetBuffer, Logger& logger);
/**
* Destructor for GeonetCommunicationProfileRequestPacket class
*/
~GeonetCommunicationProfileRequestPacket();
public:
/**
* Returns 32-bit requested flag set that actually is the payload of this packet
*
* @return 32-bit requested flag set
*/
u_int32_t getCommunicationProfileRequestSet() const;
/**
* Returns 8-bit sequence number
*
* @return 8-bit sequence number
*/
u_int8_t getSequenceNumber() const;
#ifdef UNUSED
/**
* Returns Transport::BTPA flag's value
*
* @return true if set, false otherwise
*/
bool getTransportBtpA() const;
/**
* Returns Transport::BTPB flag's value
*
* @return true if set, false otherwise
*/
bool getTransportBtpB() const;
/**
* Returns Transport::TCP flag's value
*
* @return true if set, false otherwise
*/
bool getTransportTcp() const;
/**
* Returns Transport::UDP flag's value
*
* @return true if set, false otherwise
*/
bool getTransportUdp() const;
/**
* Returns Transport::RTP flag's value
*
* @return true if set, false otherwise
*/
bool getTransportRtp() const;
/**
* Returns Transport::STCP flag's value
*
* @return true if set, false otherwise
*/
bool getTransportStcp() const;
/**
* Returns Network::GN flag's value
*
* @return true if set, false otherwise
*/
bool getNetworkGn() const;
/**
* Returns Network::IPv6GN flag's value
*
* @return true if set, false otherwise
*/
bool getNetworkIpv6Gn() const;
/**
* Returns Network::IPv6 flag's value
*
* @return true if set, false otherwise
*/
bool getNetworkIpv6() const;
/**
* Returns Network::IPv4 flag's value
*
* @return true if set, false otherwise
*/
bool getNetworkIpv4() const;
/**
* Returns Network::IPv4v6 flag's value
*
* @return true if set, false otherwise
*/
bool getNetworkIpv4v6() const;
/**
* Returns Network::DSMIIPv4v6 flag's value
*
* @return true if set, false otherwise
*/
bool getNetworkDsmiIpv4v6() const;
/**
* Returns Access::ITSG5 flag's value
*
* @return true if set, false otherwise
*/
bool getAccessItsG5() const;
/**
* Returns Access::3G flag's value
*
* @return true if set, false otherwise
*/
bool getAccess3g() const;
/**
* Returns Access::11n flag's value
*
* @return true if set, false otherwise
*/
bool getAccess11n() const;
/**
* Returns Access::Ethernet flag's value
*
* @return true if set, false otherwise
*/
bool getAccessEthernet() const;
/**
* Returns Channel::CCH flag's value
*
* @return true if set, false otherwise
*/
bool getChannelCch() const;
/**
* Returns Channel::SCH1 flag's value
*
* @return true if set, false otherwise
*/
bool getChannelSch1() const;
/**
* Returns Channel::SCH2 flag's value
*
* @return true if set, false otherwise
*/
bool getChannelSch2() const;
/**
* Returns Channel::SCH3 flag's value
*
* @return true if set, false otherwise
*/
bool getChannelSch3() const;
/**
* Returns Channel::SCH4 flag's value
*
* @return true if set, false otherwise
*/
bool getChannelSch4() const;
#endif
/**
* Parses the packet buffer and fills configuration flags
*
* @param packetBuffer Vector containing packet data
* @return true on success, false otherwise
*/
bool parse(const vector<unsigned char>& packetBuffer);
/**
* Returns std::string representation of packet
*
* @return String representation of packet
*/
string toString() const;
private:
/**
* Transport flags
*/
bool transportBtpA, transportBtpB, transportTcp;
bool transportUdp, transportRtp, transportStcp;
/**
* Network flags
*/
bool networkGn, networkIpv6Gn, networkIpv6;
bool networkIpv4, networkIpv4v6, networkDsmIpv4v6;
/**
* Access flags
*/
bool accessItsG5, access3G, access11n, accessEthernet;
/**
* Channel flags
*/
bool channelCch, channelSch1, channelSch2;
bool channelSch3, channelSch4;
/**
* Sequence number
*/
u_int8_t sequenceNumber;
/**
* Communication profile request flag set (packet payload)
*/
u_int32_t communicationProfileRequestSet;
};
#endif /* MGMT_GN_PACKET_COMM_PROFILE_REQUEST_HPP_ */
@@ -1,122 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2010 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_comm_profile_response.cpp
* \brief A container for Communication Profile Response event
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_gn_packet_comm_profile_response.hpp"
#include <boost/lexical_cast.hpp>
#include "../util/mgmt_util.hpp"
GeonetCommunicationProfileResponsePacket::GeonetCommunicationProfileResponsePacket(ManagementInformationBase& mib,
u_int32_t communicationProfileRequest, u_int8_t sequenceNumber, Logger& logger) :
GeonetPacket(false, true, 0x00, 0x00, MGMT_GN_EVENT_CONF_COMM_PROFILE_RESPONSE, logger), mib(mib), logger(logger) {
this->communicationProfileRequest = communicationProfileRequest;
this->sequenceNumber = sequenceNumber;
}
GeonetCommunicationProfileResponsePacket::~GeonetCommunicationProfileResponsePacket() {
}
bool GeonetCommunicationProfileResponsePacket::serialize(vector<unsigned char>& buffer) const {
/**
* Verify incoming buffer size
*/
if (buffer.size() < sizeof(CommunicationProfileResponse))
return false;
/**
* Serialise header first...
*/
GeonetPacket::serialize(buffer);
/**
* Fetch those profiles matching with the incoming bitmap (sent in the COMM_PROFILE_REQ)
*/
map<CommunicationProfileID, CommunicationProfileItem> filteredProfileMap = mib.getCommunicationProfileManager().getProfileMapSubset(communicationProfileRequest);
/**
* Append communication profile item count
*/
u_int8_t payloadIndex = sizeof(MessageHeader);
Util::encode2byteInteger(buffer, payloadIndex, filteredProfileMap.size());
payloadIndex += 2;
/**
* Append sequence number
*/
buffer[payloadIndex++] = sequenceNumber;
/**
* ...and then the `reserved' field
*/
buffer[payloadIndex++] = 0x00;
/**
* ...and communication profile item(s)
*/
map<CommunicationProfileID, CommunicationProfileItem>::const_iterator it = filteredProfileMap.begin();
while (it != filteredProfileMap.end()) {
Util::encode4byteInteger(buffer, payloadIndex, it->second.id);
payloadIndex += 4;
buffer[payloadIndex++] = it->second.transport;
buffer[payloadIndex++] = it->second.network;
buffer[payloadIndex++] = it->second.access;
buffer[payloadIndex++] = it->second.channel;
// Now `payloadIndex' points to the next available place
++it;
}
logger.info("A COMM_PROFILE_RESPONSE packet has been generated having " + boost::lexical_cast<string>(filteredProfileMap.size()) + " profile(s) out of " + boost::lexical_cast<string>((int)mib.getCommunicationProfileManager().getProfileCount()));
/**
* Resize buffer to the number of bytes we've written into it
*/
buffer.resize(sizeof(CommunicationProfileResponse) + filteredProfileMap.size() * sizeof(CommunicationProfileItem));
return true;
}
string GeonetCommunicationProfileResponsePacket::toString() const {
stringstream ss;
ss << GeonetPacket::toString() << endl
<< mib.getCommunicationProfileManager().toString() << endl;
return ss.str();
}
@@ -1,114 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_comm_profile_response.hpp
* \brief A container for Communication Profile Response event
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_GN_PACKET_COMM_PROFILE_RESPONSE_HPP_
#define MGMT_GN_PACKET_COMM_PROFILE_RESPONSE_HPP_
#include "mgmt_gn_packet.hpp"
/**
* Communication Profile Response
*/
struct CommunicationProfileResponse {
MessageHeader header;
u_int16_t communicationProfileCount;
u_int8_t sequenceNumber;
u_int8_t reserved;
/* CommunicationProfileItem(s) follow(s)... */
} __attribute__((packed));
/**
* A container for Communication Profile Response event
*/
class GeonetCommunicationProfileResponsePacket : public GeonetPacket {
public:
/**
* Constructor for GeonetCommunicationProfileResponsePacket class
*
* @param mib Management Information Base reference
* @param communicationProfileRequest Communication Profile Request
* @param sequenceNumber 8-bit sequence number
* @param logger Logger object reference
*/
GeonetCommunicationProfileResponsePacket(ManagementInformationBase& mib, u_int32_t communicationProfileRequest, u_int8_t sequenceNumber, Logger& logger);
/**
* Destructor for GeonetCommunicationProfileResponsePacket class
*/
~GeonetCommunicationProfileResponsePacket();
public:
/**
* Serialises the packet into given buffer
*
* @param Vector to be used to serialise the packet into
* @return true on success, false otherwise
*/
bool serialize(vector<unsigned char>& buffer) const;
/**
* Returns std::string representation of packet
*
* @return String representation of packet
*/
string toString() const;
private:
/**
* Management Information Base reference to fetch
* necessary information to build this packet
*/
ManagementInformationBase& mib;
/**
* Logger reference
*/
Logger& logger;
/**
* Sequence number (the one parsed from corresponding Communication Profile Request packet)
*/
u_int8_t sequenceNumber;
/**
* Communication Profile Request flag set to determine
* requested options and respond accordingly
*/
u_int32_t communicationProfileRequest;
};
#endif /* MGMT_GN_PACKET_COMM_PROFILE_RESPONSE_HPP_ */
@@ -1,88 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_configuration_available.cpp
* \brief A container for Configuration Available Event
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_gn_packet_configuration_available.hpp"
#include <boost/lexical_cast.hpp>
#include <iostream>
#include <sstream>
using namespace std;
GeonetConfigurationAvailableEventPacket::GeonetConfigurationAvailableEventPacket(ManagementInformationBase& mib, Logger& logger)
: GeonetPacket(false, true, 0x00, 0x00, MGMT_GN_EVENT_CONF_UPDATE_AVAILABLE, logger), mib(mib) {
}
GeonetConfigurationAvailableEventPacket::~GeonetConfigurationAvailableEventPacket() {
}
bool GeonetConfigurationAvailableEventPacket::serialize(vector<unsigned char>& buffer) {
if (buffer.size() < sizeof(ConfigureAvailableMessage)) {
logger.error("Incoming buffer' size is not sufficient!");
return false;
}
// Get some help from superclass to place header into given buffer
if (!GeonetPacket::serialize(buffer)) {
logger.error("Cannot serialise header into given buffer!");
return false;
}
u_int8_t bodyIndex = sizeof(MessageHeader);
u_int16_t keyCount = mib.getItsKeyManager().getNumberOfKeys();
// encode `reserved' field
buffer[bodyIndex] = 0x00;
buffer[bodyIndex + 1] = 0x00;
// encode `key count' field
buffer[bodyIndex + 2] = ((keyCount >> 8) & 0xff);
buffer[bodyIndex + 3] = (keyCount & 0xff);
/**
* Resize buffer to the number of bytes we've written into it
*/
buffer.resize(sizeof(ConfigureAvailableMessage));
return true;
}
string GeonetConfigurationAvailableEventPacket::toString() const {
return string("Key count: " + boost::lexical_cast<string>(mib.getItsKeyManager().getNumberOfKeys()));
}
@@ -1,91 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_configuration_available.hpp
* \brief A container for Configuration Available Event
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_GN_PACKET_CONFIGURATION_AVAILABLE_HPP_
#define MGMT_GN_PACKET_CONFIGURATION_AVAILABLE_HPP_
#include "../mgmt_information_base.hpp"
#include "../util/mgmt_log.hpp"
#include "mgmt_gn_packet.hpp"
#include <vector>
/**
* A container for Configuration Available Event
*/
class GeonetConfigurationAvailableEventPacket : public GeonetPacket {
public:
/**
* Constructor for GeonetConfigurationAvailableEventPacket class
*
* @param mib Management Information Base reference to fetch necessary
* information to build this packet
* @param logger Logger object reference
*/
GeonetConfigurationAvailableEventPacket(ManagementInformationBase& mib, Logger& logger);
/**
* Destructor for GeonetConfigurationAvailableEventPacket class
*/
~GeonetConfigurationAvailableEventPacket();
public:
/**
* Serialises packet header and payload into given buffer
*
* @param buffer Vector buffer that the packet will be serialised into
* @return true on success, false otherwise
*/
bool serialize(vector<unsigned char>& buffer);
/**
* Returns string representation of the packet
*
* @return std::string representation of the packet
*/
string toString() const;
private:
/**
* Management Information Base reference to fetch necessary
* information to build this packet
*/
ManagementInformationBase& mib;
};
#endif /* MGMT_GN_PACKET_CONFIGURATION_AVAILABLE_HPP_ */
@@ -1,84 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_get_configuration.cpp
* \brief A container for Get Configuration Event packet
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_gn_packet_get_configuration.hpp"
#include <iostream>
#include <sstream>
using namespace std;
GeonetGetConfigurationEventPacket::GeonetGetConfigurationEventPacket(const vector<unsigned char>& packetBuffer, Logger& logger) :
GeonetPacket(packetBuffer, logger) {
parse(packetBuffer);
logger.info(toString());
}
u_int16_t GeonetGetConfigurationEventPacket::getConfID() const {
return packet.configurationId;
}
u_int16_t GeonetGetConfigurationEventPacket::getTxMode() const {
return packet.transmissionMode;
}
string GeonetGetConfigurationEventPacket::toString() const {
stringstream ss;
ss << "[ConfID:" << packet.configurationId << ", txMode:" << packet.transmissionMode << "]";
return ss.str();
}
bool GeonetGetConfigurationEventPacket::parse(const vector<unsigned char>& packetBuffer) {
if (packetBuffer.size() < sizeof(ConfigurationRequestMessage))
return false;
u_int8_t payloadIndex = sizeof(MessageHeader);
packet.configurationId = packetBuffer[payloadIndex];
packet.configurationId <<= 8;
packet.configurationId |= packetBuffer[payloadIndex + 1];
packet.transmissionMode = packetBuffer[payloadIndex + 2];
packet.transmissionMode <<= 8;
packet.transmissionMode |= packetBuffer[payloadIndex + 3];
return true;
}
@@ -1,99 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_get_configuration.hpp
* \brief A container for Get Configuration Event packet
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_GN_PACKET_GET_CONFIGURATION_HPP_
#define MGMT_GN_PACKET_GET_CONFIGURATION_HPP_
#include <string>
#include <vector>
#include "mgmt_gn_packet.hpp"
using namespace std;
/**
* A container for Get Configuration Event packet
*/
class GeonetGetConfigurationEventPacket: public GeonetPacket {
public:
/**
* Constructor of GeonetGetConfigurationEventPacket class
*
* @param packetBuffer Incoming packet buffer that is going to be parsed
* @param logger Logger object reference
*/
GeonetGetConfigurationEventPacket(const vector<unsigned char>& packetBuffer, Logger& logger);
public:
/**
* Returns configuration ID that is requested
*
* @return Requested configuration ID
*/
u_int16_t getConfID() const;
/**
* Returns TX mode that is requested
*
* @return Requested TX mode (bulk or single)
*/
u_int16_t getTxMode() const;
/**
* Returns string representation of this packet
*
* @return std::string representation of this packet
*/
string toString() const;
private:
/**
* Parses incoming packet data and updates `packet' member
*
* @param packetBuffer std::vector carrying packet data
* @return true on success, false otherwise
*/
bool parse(const vector<unsigned char>& packetBuffer);
private:
/**
* Packet that will hold parsed information
*/
ConfigurationRequestMessage packet;
};
#endif /* MGMT_GN_PACKET_GET_CONFIGURATION_HPP_ */
@@ -1,81 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_location_table_request.cpp
* \brief A container for Location Table Request Event packet
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_gn_packet_location_table_request.hpp"
#include "../util/mgmt_util.hpp"
#include <iostream>
#include <sstream>
using namespace std;
GeonetLocationTableRequestEventPacket::GeonetLocationTableRequestEventPacket(GnAddress address, Logger& logger)
: GeonetPacket(false, true, 0x00, 0x00, MGMT_GN_EVENT_LOCATION_TABLE_REQUEST, logger) {
this->gnAddress = address;
}
bool GeonetLocationTableRequestEventPacket::serialize(vector<unsigned char>& buffer) const {
if (buffer.size() < sizeof(LocationTableRequest))
return false;
// Encode header first
if (!GeonetPacket::serialize(buffer)) {
logger.error("Cannot serialise header into given buffer!");
return false;
}
// Then the GN address follows
if (!Util::encode8byteInteger(buffer, sizeof(MessageHeader), this->gnAddress)) {
logger.error("Cannot serialise GN address into given buffer!");
return false;
}
buffer.resize(sizeof(LocationTableRequest));
return true;
}
string GeonetLocationTableRequestEventPacket::toString() const {
stringstream ss;
ss << GeonetPacket::toString();
ss << "GN Address: " << gnAddress << endl;
return ss.str();
}
@@ -1,85 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_location_table_request.hpp
* \brief A container for Location Table Request Event packet
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_GN_PACKET_LOCATION_TABLE_REQUEST_HPP_
#define MGMT_GN_PACKET_LOCATION_TABLE_REQUEST_HPP_
#include "../util/mgmt_log.hpp"
#include "mgmt_gn_packet.hpp"
#include <string>
using namespace std;
/**
* A container for Location Table Request Event packet
*/
class GeonetLocationTableRequestEventPacket: public GeonetPacket {
public:
/**
* Constructor of GeonetLocationTableRequestEventPacket class
*
* @param address GN Address that is going to be requested
* @param logger Logger object reference
*/
GeonetLocationTableRequestEventPacket(GnAddress address, Logger& logger);
public:
/**
* Serialises packet information into incoming buffer
*
* @param buffer std::vector that packet information will be serialised into
* @return true on success, false otherwise
*/
bool serialize(vector<unsigned char>& buffer) const;
/**
* Returns string representation of this packet
*
* @return std::string representation of this packet
*/
string toString() const;
private:
/**
* GN address that is going to be questioned
*/
GnAddress gnAddress;
};
#endif /* MGMT_GN_PACKET_LOCATION_TABLE_REQUEST_HPP_ */
@@ -1,105 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_location_table_response.hpp
* \brief A container for Location Table Response Event packet
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_gn_packet_location_table_response.hpp"
#include <boost/lexical_cast.hpp>
#include "../util/mgmt_util.hpp"
#include <sstream>
GeonetLocationTableResponseEventPacket::GeonetLocationTableResponseEventPacket(ManagementInformationBase& mib, const vector<unsigned char>& packetBuffer, Logger& logger)
: GeonetPacket(packetBuffer, logger), mib(mib) {
parse(packetBuffer);
}
string GeonetLocationTableResponseEventPacket::toString() const {
stringstream ss;
return ss.str();
}
bool GeonetLocationTableResponseEventPacket::parse(const vector<unsigned char>& packetBuffer) {
u_int16_t lpvCount = 0;
u_int16_t packetBufferIndex = sizeof(MessageHeader);
// Parse LPV Count...
if (Util::parse2byteInteger(packetBuffer.data() + packetBufferIndex, &lpvCount)) {
logger.info("Location table response has following number of entr{y|ies}: " + boost::lexical_cast<string>(lpvCount));
} else {
logger.error("Cannot parse location table entry count");
return false;
}
// ...and Network Flags
mib.setNetworkFlags(packetBuffer[2]);
/**
* Skip 4-byte part (LPV Count, Network Flags, and Reserved flags) coming immediately after the header
*/
u_int16_t itemIndex = packetBufferIndex + sizeof(u_int32_t);
/**
* Traverse location table items...
*/
for (; lpvCount != 0; lpvCount--) {
LocationTableItem* item = new LocationTableItem();
Util::parse8byteInteger(packetBuffer.data() + itemIndex, &item->gnAddress); itemIndex += sizeof(GnAddress);
Util::parse4byteInteger(packetBuffer.data() + itemIndex, &item->timestamp); itemIndex += sizeof(u_int32_t);
Util::parse4byteInteger(packetBuffer.data() + itemIndex, &item->latitude); itemIndex += sizeof(u_int32_t);
Util::parse4byteInteger(packetBuffer.data() + itemIndex, &item->longitude); itemIndex += sizeof(u_int32_t);
Util::parse2byteInteger(packetBuffer.data() + itemIndex, &item->speed); itemIndex += sizeof(u_int16_t);
Util::parse2byteInteger(packetBuffer.data() + itemIndex, &item->heading); itemIndex += sizeof(u_int16_t);
Util::parse2byteInteger(packetBuffer.data() + itemIndex, &item->altitude); itemIndex += sizeof(u_int16_t);
Util::parse2byteInteger(packetBuffer.data() + itemIndex, &item->acceleration); itemIndex += sizeof(u_int16_t);
Util::parse2byteInteger(packetBuffer.data() + itemIndex, &item->sequenceNumber); itemIndex += sizeof(u_int16_t);
item->lpvFlags = packetBuffer.data()[itemIndex++];
item->reserved = packetBuffer.data()[itemIndex++];
// Update MIB with this record
mib.updateLocationTable(item);
logger.info("Management Information Base has been updated with following location table entry: ");
logger.info(item->toString());
// itemIndex shows the next record now, if there's any
}
return true;
}
@@ -1,92 +0,0 @@
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface 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.
OpenAirInterface 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 OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06410 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_location_table_response.hpp
* \brief A container for Location Table Response Event packet
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#ifndef MGMT_GN_PACKET_LOCATION_TABLE_RESPONSE_HPP_
#define MGMT_GN_PACKET_LOCATION_TABLE_RESPONSE_HPP_
#include "../mgmt_information_base.hpp"
#include "../util/mgmt_log.hpp"
#include "mgmt_gn_packet.hpp"
#include <string>
using namespace std;
/**
* A container for Location Table Response Event packet
*/
class GeonetLocationTableResponseEventPacket: public GeonetPacket {
public:
/**
* Constructor of GeonetLocationTableResponseEventPacket class
*
* @param mib Management Information Base reference to keep it up-to-date
* with incoming information
* @param packetBuffer std::vector containing packet data
* @param logger Logger object reference
*/
GeonetLocationTableResponseEventPacket(ManagementInformationBase& mib,
const vector<unsigned char>& packetBuffer, Logger& logger);
public:
/**
* Returns string representation of this packet
*
* @return std::string representation of this packet
*/
string toString() const;
private:
/**
* Parses incoming packet buffer and updates MIB with this information
*
* @param packetBuffer std::vector containing packet data
* @return true on success, false otherwise
*/
bool parse(const vector<unsigned char>& packetBuffer);
private:
/**
* Management Information Base reference to keep it up-to-date with incoming
* Location Table information
*/
ManagementInformationBase& mib;
};
#endif /* MGMT_GN_PACKET_LOCATION_TABLE_RESPONSE_HPP_ */
@@ -1,120 +0,0 @@
/*******************************************************************************
Eurecom OpenAirInterface
Copyright(c) 1999 - 2012 Eurecom
This program is free software; you can redistribute it and/or modify it
under the terms and conditions of the GNU General Public License,
version 2, as published by the Free Software Foundation.
This program is distributed in the hope 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.,
51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
The full GNU General Public License is included in this distribution in
the file called "COPYING".
Contact Information
Openair Admin: openair_admin@eurecom.fr
Openair Tech : openair_tech@eurecom.fr
Forums : http://forums.eurecom.fr/openairinterface
Address : EURECOM, Campus SophiaTech, 450 Route des Chappes, 06410 Biot FRANCE
*******************************************************************************/
/*!
* \file mgmt_gn_packet_location_update.cpp
* \brief A container for Location Update Event packet
* \company EURECOM
* \date 2012
* \author Baris Demiray
* \email: baris.demiray@eurecom.fr
* \note none
* \bug none
* \warning none
*/
#include "mgmt_gn_packet_location_update.hpp"
#include <boost/lexical_cast.hpp>
#include <ctime>
GeonetLocationUpdateEventPacket::GeonetLocationUpdateEventPacket(ManagementInformationBase& mib, Logger& logger)
: GeonetPacket(false, true, 0x00, 0x00, MGMT_GN_EVENT_LOCATION_UPDATE, logger), mib(mib), logger(logger) {
}
GeonetLocationUpdateEventPacket::GeonetLocationUpdateEventPacket(ManagementInformationBase& mib, const vector<unsigned char>& packetBuffer, Logger& logger)
: GeonetPacket(packetBuffer, logger), mib(mib), logger(logger) {
parse(packetBuffer);
}
GeonetLocationUpdateEventPacket::~GeonetLocationUpdateEventPacket() {
}
bool GeonetLocationUpdateEventPacket::serialize(vector<unsigned char>& buffer) const {
if (buffer.size() < sizeof(LocationUpdateMessage)) {
logger.warning("Incoming buffer (size:" + boost::lexical_cast<string>(buffer.size()) + ") is not enough to carry a Location Update packet!");
return false;
}
/**
* Serialise header first..
*/
if (!GeonetPacket::serialize(buffer)) {
logger.error("Cannot serialise packet header");
return false;
}
/**
* ..and then the body
*/
u_int8_t payloadIndex = sizeof(MessageHeader);
const LocationInformation& location = mib.getLocationInformation();
logger.info("Following Location Information will be encoded:");
logger.info(location.toString());
Util::encode4byteInteger(buffer, payloadIndex, location.timestamp); payloadIndex += 4;
Util::encode4byteInteger(buffer, payloadIndex, location.latitude); payloadIndex += 4;
Util::encode4byteInteger(buffer, payloadIndex, location.longitude); payloadIndex += 4;
Util::encode2byteInteger(buffer, payloadIndex, location.speed); payloadIndex += 2;
Util::encode2byteInteger(buffer, payloadIndex, location.heading); payloadIndex += 2;
Util::encode2byteInteger(buffer, payloadIndex, location.altitude); payloadIndex += 2;
Util::encode2byteInteger(buffer, payloadIndex, location.acceleration); payloadIndex += 2;
buffer.resize(sizeof(LocationUpdateMessage));
return true;
}
bool GeonetLocationUpdateEventPacket::parse(const vector<unsigned char>& packetBuffer) {
if (packetBuffer.size() != sizeof(LocationUpdateMessage))
return false;
LocationInformation locationUpdate;
/**
* Skip header..
*/
u_int8_t payloadOffset = sizeof(MessageHeader);
/**
* Parse fields..
*/
Util::parse4byteInteger(packetBuffer.data() + payloadOffset, &locationUpdate.timestamp); payloadOffset += sizeof(u_int32_t);
Util::parse4byteInteger(packetBuffer.data() + payloadOffset, &locationUpdate.latitude); payloadOffset += sizeof(u_int32_t);
Util::parse4byteInteger(packetBuffer.data() + payloadOffset, &locationUpdate.longitude); payloadOffset += sizeof(u_int32_t);
Util::parse2byteInteger(packetBuffer.data() + payloadOffset, &locationUpdate.speed); payloadOffset += sizeof(u_int16_t);
Util::parse2byteInteger(packetBuffer.data() + payloadOffset, &locationUpdate.heading); payloadOffset += sizeof(u_int16_t);
Util::parse2byteInteger(packetBuffer.data() + payloadOffset, &locationUpdate.altitude); payloadOffset += sizeof(u_int16_t);
Util::parse2byteInteger(packetBuffer.data() + payloadOffset, &locationUpdate.acceleration); payloadOffset += sizeof(u_int16_t);
logger.info("Following Location Information has been parsed:");
logger.info(locationUpdate.toString());
logger.info("Notifying MIB for this information...");
return mib.setLocationInformation(locationUpdate);
}

Some files were not shown because too many files have changed in this diff Show More